Play- icon indicating copy to clipboard operation
Play- copied to clipboard

Switch porting

Open dariotarantini opened this issue 3 years ago • 11 comments

It would be nice to have this emulator as a libretro core or native nx app with libnx

here is the toolchain for building switch homebrew https://switchbrew.org/wiki/Setting_up_Development_Environment

dariotarantini avatar Oct 15 '21 19:10 dariotarantini

I know some people have attempted this already, with some success if I remember well, but I can't really help there since I don't have anything to develop on the Switch.

jpd002 avatar Oct 19 '21 14:10 jpd002

Im can try if you help me, since im a developer myself, but i dont have too much experience with c/c++. Also, you can build / test everything using yuzu emulator, so you would run an emulator inside another emulator. At least to test it.

Btw, how can i build retroarch core for this project? I would start with it and just change the compiler

dariotarantini avatar Oct 19 '21 14:10 dariotarantini

I know some people have attempted this already, with some success if I remember well, but I can't really help there since I don't have anything to develop on the Switch.

test were done on a switch running linux, which is basically just another ARM linux device, though Horizon OS (native Switch OS) has gained GLES and even OpenGL 4.x core support, so it should be possible to run Play! natively.

having said that, I've had a quick look previously and I dont recall there being cmake support, so that'd be fun getting it to work.

how can i build retroarch core for this project?

cmake .. -DBUILD_PLAY=NO  -DBUILD_LIBRETRO_CORE=yes
cmake --build . 

Zer0xFF avatar Oct 19 '21 15:10 Zer0xFF

having said that, I've had a quick look previously and I dont recall there being cmake support, so that'd be fun getting it to work.

actually libnx use makefile for building, so probably you can do it. as i said, im not experencied in c/c++. Btw I will test it right now. here is a makefile of a native switch program with opengl https://github.com/switchbrew/switch-examples/blob/master/graphics/opengl/simple_triangle/Makefile

dariotarantini avatar Oct 19 '21 16:10 dariotarantini

It has already been demonstrated that the emulator can run on Switch: https://gbatemp.net/threads/play-ps2-emulator-is-running-on-the-nintendo-switch.538600/

uyjulian avatar Oct 19 '21 16:10 uyjulian

It has already been demonstrated that the emulator can run on Switch: https://gbatemp.net/threads/play-ps2-emulator-is-running-on-the-nintendo-switch.538600/

yes, but thoose tests are run inside a linux distro, ubuntu. Since retroarch is available natively (directly inside switch os), since the hardware is powerful enought to play ps2games, it would be nice if someone build a native core (using libnx lib and devkit64 compiler) of play!

dariotarantini avatar Oct 19 '21 16:10 dariotarantini

yes, but thoose tests are run inside a linux distro, ubuntu. Since retroarch is available natively (directly inside switch os), since the hardware is powerful enought to play ps2games, it would be nice if someone build a native core (using libnx lib and devkit64 compiler) of play!

the L4T driver is better able to run vulkan and nvidia implement shaders interlocks in a recent driver under linux I highly doubt that it can be run better from there. Sometimes getting 10-20fps faster than OpenGL rendering or some graphical errors present under OpenGL that are not under Vulkan.

libnx will be never support Vulkan and you stuck to nouveau implementation so will be slower than L4T propietari driver. https://github.com/switchbrew/libnx/issues/317

mrcmunir avatar Nov 09 '21 22:11 mrcmunir

Hi! I know it's an old thread, but I've started a Switch port (using devkitA64, libnx and deko3d). I've already got JIT working and now I'll add initial GS (graphics) support using deko3d.

xerpi avatar Sep 08 '22 17:09 xerpi

Very initial graphics are working. Enough to run ps2sdk's cube sample. IMG_20220909_153550

xerpi avatar Sep 09 '22 06:09 xerpi

Very initial graphics are working. Enough to run ps2sdk's cube sample. IMG_20220909_153550

Nice 😍

ericsonia avatar Sep 09 '22 07:09 ericsonia