Homebrew RELEASE Development Thread - RetroArch libnx

  • Thread starter Thread starter m4xw
  • Start date Start date
  • Views Views 764,836
  • Replies Replies 4,272
  • Likes Likes 69
Status
Not open for further replies.
I mean, shaders aren't used on the Vita port and yet it has the XMB menu working, so perhaps the issue has nothing to do with shaders.
Probably one of my missing texture functions then.

I mean it still handles input just fine, just shows a black screen.
 
  • Like
Reactions: Billy Acuña
Just for fun, I tried to compile Mupen64Plus, [yes, I know it won't work so please don't go "TOLD YOU" on me], and here is the result:
The core isn't designed for video game consoles with homebrew installed (I've found only Windows, Linux, Mac OS X, iOS and Android in its Makefile), so it constantly keeps throwing me up an error culminating in "make: *** [Makefile:333: GLideN64/src/Combiner.o] Error 1", no matter what changes I try to make to the Makefile.
I think Parallel-N64 was designed for video game consoles though, since I found a compilation process code for PS Vita in its Makefile. GLupeN64 was ported to the (S)NES Classic although I haven't found the source code for the port though, neither in the Makefile nor on GitHub.

I decided to try and compile Parallel-N64, and I did some changes to the LibNX code upon porting it there:
Code:
# Nintendo Switch (libnx)
else ifeq ($(platform), switch)
include $(DEVKITPRO)/libnx/switch_rules
    EXT=a
    HAVE_NEON = 0
    WITH_DYNAREC = arm
    DYNAREC_USED = 0
    GLES = 0
    HAVE_OPENGL = 0
    HAVE_PARALLEL=0
    TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
    DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL
    CFLAGS    :=     $(DEFINES) -g \
                -O2 \
                -fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -specs=$(LIBNX)/switch.specs
    CFLAGS += $(INCDIRS)
    CFLAGS    +=    $(INCLUDE)  -D__SWITCH__
    CXXFLAGS := $(ASFLAGS) $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
    CFLAGS += -std=gnu11
STATIC_LINKING = 1
And this is what I got:
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/cached_interp.c:37:
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));
^
In file included from mupen64plus-core/src/r4300/mips_instructions.def:50,
from mupen64plus-core/src/r4300/cached_interp.c:165:
mupen64plus-core/src/r4300/fpu.h: At top level:
mupen64plus-core/src/r4300/fpu.h:56:12: fatal error: fenv.h: No such file or dir
ectory
#include <fenv.h>
^~~~~~~~
compilation terminated.
make: *** [Makefile:892: mupen64plus-core/src/r4300/cached_interp.o] Error 1
 
  • Like
Reactions: Vponto
Just for fun, I tried to compile Mupen64Plus, [yes, I know it won't work so please don't go "TOLD YOU" on me], and here is the result:
The core isn't designed for video game consoles with homebrew installed (I've found only Windows, Linux, Mac OS X, iOS and Android in its Makefile), so it constantly keeps throwing me up an error culminating in "make: *** [Makefile:333: GLideN64/src/Combiner.o] Error 1", no matter what changes I try to make to the Makefile.
I think Parallel-N64 was designed for video game consoles though, since I found a compilation process code for PS Vita in its Makefile. GLupeN64 was ported to the (S)NES Classic although I haven't found the source code for the port though, neither in the Makefile nor on GitHub.

I decided to try and compile Parallel-N64, and I did some changes to the LibNX code upon porting it there:
Code:
# Nintendo Switch (libnx)
else ifeq ($(platform), switch)
include $(DEVKITPRO)/libnx/switch_rules
    EXT=a
    HAVE_NEON = 0
    WITH_DYNAREC = arm
    DYNAREC_USED = 0
    GLES = 0
    HAVE_OPENGL = 0
    HAVE_PARALLEL=0
    TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
    DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL
    CFLAGS    :=     $(DEFINES) -g \
                -O2 \
                -fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -specs=$(LIBNX)/switch.specs
    CFLAGS += $(INCDIRS)
    CFLAGS    +=    $(INCLUDE)  -D__SWITCH__
    CXXFLAGS := $(ASFLAGS) $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
    CFLAGS += -std=gnu11
STATIC_LINKING = 1
And this is what I got:
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/cached_interp.c:37:
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));
^
In file included from mupen64plus-core/src/r4300/mips_instructions.def:50,
from mupen64plus-core/src/r4300/cached_interp.c:165:
mupen64plus-core/src/r4300/fpu.h: At top level:
mupen64plus-core/src/r4300/fpu.h:56:12: fatal error: fenv.h: No such file or dir
ectory
#include <fenv.h>
^~~~~~~~
compilation terminated.
make: *** [Makefile:892: mupen64plus-core/src/r4300/cached_interp.o] Error 1
If you want more info on each core look here.
https://github.com/libretro/docs/tree/master/docs/library

Sent from my LG-US997 using Tapatalk
 
If you want more info on each core look here.
https://github.com/libretro/docs/tree/master/docs/library

Sent from my LG-US997 using Tapatalk
Found only Mupen64Plus.
And I also found this within its document:
  • CPU Core (dynamic_recompiler/cached_interpreter/pure_interpreter)
    Choose which kind of CPU emulation is going to be used. Dynamic recompiler is the fastest mode.
    Dynamic recompilier is not available on all platforms.
Which CPU emulation do you think is best for Switch? Lest we forget I'm a noob trying to understand how these cores work...
 
Is possible Prosystem core (atari 7800) ?
Can someone compilate this core?
Thanks
 
Found only Mupen64Plus.
And I also found this within its document:

Which CPU emulation do you think is best for Switch? Lest we forget I'm a noob trying to understand how these cores work...
Dynamic no doubt.
Switch should have one available since Mupen64 is available for Android devices with similar architecture to the Switch (ARM64/AArch64/ARMv8)
 
Still, no matter what modifications I try to do, I get the exact same Combiner.o error.
In file included from GLideN64/src/OpenGL.h:13,
from GLideN64/src/Combiner.cpp:6:
GLideN64/src/winlnxdefs.h:33:10: fatal error: dlfcn.h: No such file or directory

#include <dlfcn.h>
^~~~~~~~~
compilation terminated.
make: *** [Makefile:336: GLideN64/src/Combiner.o] Error 1
Here is the current LibNX code as it stands, with a little bit of the Android code thrown in there:
Code:
# Nintendo Switch (libnx)
else ifeq ($(platform), switch)
include $(DEVKITPRO)/libnx/switch_rules
    EXT=a
    GL_LIB := -lGLESv2
    GLES = 1
    WITH_DYNAREC = arm
    HAVE_NEON = 0
    TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
    DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL
    CFLAGS    :=     $(DEFINES) -g \
                -O2 \
                -fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -specs=$(LIBNX)/switch.specs
    CFLAGS += $(INCDIRS)
    CFLAGS    +=    $(INCLUDE)  -D__SWITCH__
    CXXFLAGS := $(ASFLAGS) $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
    CFLAGS += -std=gnu11
STATIC_LINKING = 1
So I'm guessing it's more worth it trying out Parallel-N64...unless I've done something wrong in the code, but I'm too lazy to do research on it.
 
Last edited by CatmanFan,
GL_LIB := -lGLESv2

I wish GPU support would magically appear like that

Your error tho is because there are no header files like that. I actually need to implement those for dynamic core support btw.

But there would be much more errors to come if your build would continue ;) Leave it be. It is not possible currently.
 
Last edited by m4xw,
Am I missing something, or does fast forward not work? I've tried to bind it in snes9x and beetle-ngp and had no success.
 
Also, I've confirmed that Yabause won't work at all. Trying to run games just ends up in a black screen, and I can't open the RetroArch menu.
 
So I had the time to read from page 18 and up, saw tons of cores being ported, but they're lost in the waves. Would it be a problem for me to sort them so they could be placed on the front page for those like me?
 
So I had the time to read from page 18 and up, saw tons of cores being ported, but they're lost in the waves. Would it be a problem for me to sort them so they could be placed on the front page for those like me?
Do what you like. Though pretty sure a list is gonna be made once we get the build system going




Sent from my LG-US997 using Tapatalk
 
  • Like
Reactions: wicksand420
So I had the time to read from page 18 and up, saw tons of cores being ported, but they're lost in the waves. Would it be a problem for me to sort them so they could be placed on the front page for those like me?
Would save me lots of work. Planned on doing that today but am still lost with this threading Issue.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum