jpd002 / Play-

Play! - PlayStation2 Emulator
http://purei.org
Other
2.11k stars 256 forks source link

Switch porting #1134

Open dariotarantini opened 2 years ago

dariotarantini commented 2 years ago

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

jpd002 commented 2 years ago

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.

dariotarantini commented 2 years ago

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

Zer0xFF commented 2 years ago

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 . 
dariotarantini commented 2 years ago

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

uyjulian commented 2 years ago

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/

dariotarantini commented 2 years ago

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!

mrcmunir commented 2 years ago

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

xerpi commented 2 years ago

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 commented 2 years ago

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

ericsonia commented 2 years ago

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

Nice 😍

gouchi commented 2 months ago

If needed, you can make a test using Lakka.