Homebrew RELEASE Development Thread - RetroArch libnx

  • Thread starter m4xw
  • Start date
  • Views 671,838
  • Replies 4,272
  • Likes 69
Status
Not open for further replies.

CatmanFan

Anxious and regretful
Member
Joined
Aug 14, 2016
Messages
1,963
Trophies
0
Website
www.youtube.com
XP
2,602
Country
Morocco
@SeannyM I did what you told me to do, and this is what I get now (again, another copy of an error):
/bin/sh: git: command not found
/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc -DSWITCH=1 -U__linux__ -U__li
nux -DRARCH_INTERNAL -g -O2 -fPIE -I/opt/devkitpro/libnx/include/ -ffunction-sec
tions -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -sp
ecs=/opt/devkitpro/libnx/switch.specs -D__SWITCH__ -std=gnu11 -MMD -DINLINE="
inline" -O3 -DNDEBUG -fipa-pta -D__LIBRETRO__ -DM64P_PLUGIN_API -DM64P_CORE_PRO
TOTYPES -D_ENDUSER_RELEASE -DSINC_LOWER_QUALITY -I./mupen64plus-core/src -I./mu
pen64plus-core/src/api -I./include -I./mupen64plus-core/src/plugin/audio_libretr
o -I./libretro-common/include -I./libretro -nostdlib -DNEW_DYNAREC=3 -DDYN
AREC -c mupen64plus-core/src/r4300/recomp.c -o mupen64plus-core/src/r4300/recomp
.o
mupen64plus-core/src/r4300/recomp.c:36:10: fatal error: sys/mman.h: No such file
or directory
#include <sys/mman.h>
^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:904: mupen64plus-core/src/r4300/recomp.o] Error 1
When I try removing the reference to sys/mman.h, this is what I get:
/bin/sh: git: command not found
/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc -DSWITCH=1 -U__linux__ -U__li
nux -DRARCH_INTERNAL -g -O2 -fPIE -I/opt/devkitpro/libnx/include/ -ffunction-sec
tions -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -sp
ecs=/opt/devkitpro/libnx/switch.specs -D__SWITCH__ -std=gnu11 -MMD -DINLINE="
inline" -O3 -DNDEBUG -fipa-pta -D__LIBRETRO__ -DM64P_PLUGIN_API -DM64P_CORE_PRO
TOTYPES -D_ENDUSER_RELEASE -DSINC_LOWER_QUALITY -I./mupen64plus-core/src -I./mu
pen64plus-core/src/api -I./include -I./mupen64plus-core/src/plugin/audio_libretr
o -I./libretro-common/include -I./libretro -nostdlib -DNEW_DYNAREC=3 -DDYN
AREC -c mupen64plus-core/src/r4300/recomp.c -o mupen64plus-core/src/r4300/recomp
.o
In file included from mupen64plus-core/src/r4300/recomp.h:49,
from mupen64plus-core/src/r4300/cached_interp.h:30,
from mupen64plus-core/src/r4300/recomp.c:40:
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'fldcw_m16'
:
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:406:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m16));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'mov_reg8_m
8':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:413:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m8));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'mov_reg32_
m32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:420:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'add_reg32_
m32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:427:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'movsx_reg3
2_m16':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:435:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m16));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'movsx_reg3
2_m8':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:443:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m8));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'mul_m32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:450:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'mov_m32_im
m32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:457:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'cmp_m32_im
m32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:465:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'inc_m32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:473:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'and_m32_im
m32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:480:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'sub_m32_im
m32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:488:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'or_m32_imm
32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:496:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'mov_m8_reg
8':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:504:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m8));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'mov_reg16_
m16':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:512:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m16));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'mov_m16_re
g16':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:520:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m16));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'cmp_reg32_
m32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:527:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'add_m32_re
g32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:534:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'sub_reg32_
m32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:541:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'mov_eax_me
moffs32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:547:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(memoffs32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'test_m32_i
mm32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:569:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)m32);
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'mov_m32_re
g32':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:590:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(m32));
^
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h: In function 'mov_memoff
s32_eax':
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h:691:10: warning: cast fr
om pointer to integer of different size [-Wpointer-to-int-cast]
put32((unsigned int)(memoffs32));
^
mupen64plus-core/src/r4300/recomp.c: In function 'malloc_exec':
mupen64plus-core/src/r4300/recomp.c:2563:18: warning: implicit declaration of fu
nction 'mmap'; did you mean 'jmp'? [-Wimplicit-function-declaration]
void *block = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVA
TE | MAP_ANONYMOUS, -1, 0);
^~~~
jmp
mupen64plus-core/src/r4300/recomp.c:2563:35: error: 'PROT_READ' undeclared (firs
t use in this function)
void *block = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVA
TE | MAP_ANONYMOUS, -1, 0);
^~~~~~~~~
mupen64plus-core/src/r4300/recomp.c:2563:35: note: each undeclared identifier is
reported only once for each function it appears in
mupen64plus-core/src/r4300/recomp.c:2563:47: error: 'PROT_WRITE' undeclared (fir
st use in this function)
void *block = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVA
TE | MAP_ANONYMOUS, -1, 0);
^~~~~~~~~~
mupen64plus-core/src/r4300/recomp.c:2563:60: error: 'PROT_EXEC' undeclared (firs
t use in this function)
void *block = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVA
TE | MAP_ANONYMOUS, -1, 0);
^~~~~~~~~
mupen64plus-core/src/r4300/recomp.c:2563:71: error: 'MAP_PRIVATE' undeclared (fi
rst use in this function)
void *block = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVA
TE | MAP_ANONYMOUS, -1, 0);
^~~~~~~~~
~~
mupen64plus-core/src/r4300/recomp.c:2563:85: error: 'MAP_ANONYMOUS' undeclared (
first use in this function)
void *block = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVA
TE | MAP_ANONYMOUS, -1, 0);

^~~~~~~~~~~~~
mupen64plus-core/src/r4300/recomp.c:2564:17: error: 'MAP_FAILED' undeclared (fir
st use in this function)
if (block == MAP_FAILED)
^~~~~~~~~~
mupen64plus-core/src/r4300/recomp.c: In function 'free_exec':
mupen64plus-core/src/r4300/recomp.c:2603:4: warning: implicit declaration of fun
ction 'munmap' [-Wimplicit-function-declaration]
munmap(ptr, length);
^~~~~~
make: *** [Makefile:904: mupen64plus-core/src/r4300/recomp.o] Error 1
I might be a bit too lazy rn though
BTW, I don't want to replace the "indef vita" thingy in the recomp.c, since it has a reference to a certain psp2 kernel that might not be compatible with the Switch.

--------------------- MERGED ---------------------------

Oh right, it's the mmap and stuff you were talking about. My bad.
 

hitodesu

Well-Known Member
Member
Joined
Mar 10, 2017
Messages
136
Trophies
0
Age
25
XP
259
Country
United States
Anybody run into save corruption on the latest snes9x2010 build using an exFat sd card? Afraid to be the first to find out.
 

CatmanFan

Anxious and regretful
Member
Joined
Aug 14, 2016
Messages
1,963
Trophies
0
Website
www.youtube.com
XP
2,602
Country
Morocco
Had to literally comment out all the errors in the recomp.c file so that it wouldn't bother me, but this time, new dynarec hates me. Even when I'm using empty dynarec.
Might be better worth off using Lakka in the meantime. Doesn't help that I'm still lazy.
Ah well, going to try reARMed next.

--------------------- MERGED ---------------------------

reARMed gives me the dreaded ./configure error.
When I try to comment the error exit function out, this is what I get:
C:\devkitPro\devkitA64\projects\RetroArch\Cores\pcsx_rearmed-master>make platform=switch
Please run ./configure before running make!
cc -Wall -Iinclude -ffast-math -O3 -DNDEBUG -DNO_FRONTEND -c -o libpcsxcore/cdriso.o libpcsxcore/cdriso.c
make: cc: Command not found
make: *** [<builtin>: libpcsxcore/cdriso.o] Error 127

C:\devkitPro\devkitA64\projects\RetroArch\Cores\pcsx_rearmed-master>make -f Makefile.libretro platform=switch
/bin/sh: git: command not found
cdriso.c
/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc -MMD -MP -MF /libpcsxcore/cdriso.d -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_THREADS=1 -g -O2 -fPIE -I/opt/devkitpro/libnx/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -specs=/opt/devkitpro/libnx/switch.specs -D__SWITCH__ -std=gnu11 -fPIC -Wall -Iinclude -ffast-math -O3 -DNDEBUG -DFRONTEND_SUPPORTS_RGB565 -DHAVE_LIBRETRO -DNO_FRONTEND -c libpcsxcore/cdriso.c -o libpcsxcore/cdriso.o
libpcsxcore/cdriso.c:29:10: fatal error: zlib.h: No such file or directory
#include <zlib.h>
^~~~~~~~
compilation terminated.
make: *** [/opt/devkitpro/devkitA64/base_rules:19: libpcsxcore/cdriso.o] Error 1

Jeez what world do I live in
 

Xenosaiga

Time to switch it up
Member
Joined
Oct 9, 2015
Messages
1,501
Trophies
0
Age
33
Location
The Shadows
XP
1,070
Country
United States
I searched athe thread and have seen no recent mention of VBA. I have been using https://gbatemp.net/threads/vba-next-for-switch-works-4-1.504947/ and have not really had many issues with it so far.

I am just wondering if there is any reason to switch from it or if I would gain any benifits from doing so right now. I am on latest firmware. 5.something and I am using Hekate.

Thanks for any responses.
 

m4xw

Ancient Deity
OP
Developer
Joined
May 25, 2018
Messages
2,442
Trophies
1
Age
119
XP
6,958
Country
Germany
  • Like
Reactions: Xenosaiga
D

Deleted-351540

Guest
Got around to trying the new Salamander build. Aspect ratio finally survives a restart of Retroarch, so that's nice. Also, being able to configure favorites is a godsend.

I can't find any setting for "fast forward", but I'm certain that I'm just not seeing it. Good work!
 

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,803
Trophies
1
Age
44
XP
6,575
Country
Germany
I searched athe thread and have seen no recent mention of VBA. I have been using https://gbatemp.net/threads/vba-next-for-switch-works-4-1.504947/ and have not really had many issues with it so far.

I am just wondering if there is any reason to switch from it or if I would gain any benifits from doing so right now. I am on latest firmware. 5.something and I am using Hekate.

Thanks for any responses.

That's the good old battle between RetroArch and standalone emulators.
RetroArch unifies multiple things so you have one place to play all your retro games from while standalone emulators are often more up to date and offer more features as they are not limited to what RetroArch has interfaces for.
If you only care about using VBA you might be happy with what you've linked.
I prefer RetroArch. :P
Tested and working on new TX SX OS v1.2
Thx for letting us know. Interesting that TX cares that much that they work on fixing things in order for specific homebrews to work.

what is the difference between retroNX, lakka.tv and retroarch libnx?
retroNX seem to that "Salamander Pack": One homebrew from within you access all cores which are inside a cores folder somewhere on your SD card. Technically it's still RetroArch with Libnx.
lakka.tv is a Linux distribution that does nothing else but running RetroArch and has been ported to the Switch. You can boot into it and use (nothing but) RetroArch. It already has hardware acceleration and XMB menu theme but no sound and other downsides.
 

naddel81

Well-Known Member
Member
Joined
Dec 14, 2009
Messages
2,552
Trophies
1
XP
3,813
Country
United States
thanks, lordelan. but all the retroarch versions for switch are linux-based and will fuck up my battery meter, right?
so it is better to use standalone emulators until this has been software-fixed?
 
D

Deleted-351540

Guest
thanks, lordelan. but all the retroarch versions for switch are linux-based and will fuck up my battery meter, right?
so it is better to use standalone emulators until this has been software-fixed?
No, Retroarch is not linux so it will not desync your battery from Horizon. In fact, it is ran inside Horizon so the battery will not be affected at all.

You are thinking of Lakka, which is a linux based Retroarch distro. It will cause a battery desync.
 
  • Like
Reactions: naddel81

naddel81

Well-Known Member
Member
Joined
Dec 14, 2009
Messages
2,552
Trophies
1
XP
3,813
Country
United States
No, Retroarch is not linux so it will not desync your battery from Horizon. In fact, it is ran inside Horizon so the battery will not be affected at all.

You are thinking of Lakka, which is a linux based Retroarch distro. It will cause a battery desync.

so I will wait for retroNX to hit version 1.0 and my emulation-dreams will be satisfied?!
 

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,803
Trophies
1
Age
44
XP
6,575
Country
Germany
  • Like
Reactions: naddel81

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,803
Trophies
1
Age
44
XP
6,575
Country
Germany
just put the salamander folder to SD-card and it will be shown when I load hbmenu.nro?
No. Inside the salamander folder there are two folders which you put in your sd root. Also you have to adjust the core folder inside RetroArch's settings -> directory settings if I remember that right. Read what's been written on reddit.
 
  • Like
Reactions: naddel81
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Veho @ Veho: Has he had seizures before?