devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Add playstation 2 support

Open Wolf3s opened this issue 1 month ago • 12 comments

This port uses SDL2 instead of SDL1.2

Images of the port running on real hardware: Polish_20251127_140900065

Goals:

  • Make all levels load

Wolf3s avatar Nov 26 '25 23:11 Wolf3s

This port uses SDL2 instead of SDL1.2

The previous attempt was also SDL2, the remaining issues was fully working sound ingame and being able to get to the dungeon on real hardware

AJenbo avatar Nov 29 '25 15:11 AJenbo

This port uses SDL2 instead of SDL1.2

The previous attempt was also SDL2, the remaining issues was fully working sound ingame and being able to get to the dungeon on real hardware

I found another issue: the mappings of gamepad on ps2 doesn't work properly. The dungeon level doesn't load.

Wolf3s avatar Nov 29 '25 15:11 Wolf3s

The dungeon level doesn't load.

For me the issue was caused by it failing to reading / writing the save file

AJenbo avatar Nov 29 '25 16:11 AJenbo

The dungeon level doesn't load.

For me the issue was caused by it failing to reading / writing the save file

It's not related since i could load my profile without any issue. I will see if there is a implementation on other platforms to fix that.

Wolf3s avatar Nov 29 '25 19:11 Wolf3s

Your probably running out of memory, try disabling sound support with -DNOSOUND=ON that should save a lot of memory.

Using a custom PS2 audio and unpacked MPQ saves enough memory to run the game.

AJenbo avatar Nov 29 '25 19:11 AJenbo

Your probably running out of memory, try disabling sound support with -DNOSOUND=ON that should save a lot of memory.

Using a custom PS2 audio and unpacked MPQ saves enough memory to run the game.

I will test the no sound option and if works i will revert the other commit that uses custom audio keeping audiolib working.

Wolf3s avatar Nov 29 '25 20:11 Wolf3s

Your probably running out of memory, try disabling sound support with -DNOSOUND=ON that should save a lot of memory.

Using a custom PS2 audio and unpacked MPQ saves enough memory to run the game.

Updates: even with custom PS2 audio, the level doesn´t load also when i deactivate no sound for video it plays without sound due to a dependency of AudioLib. If we want the video audio working properly AudioLib should be enabled.

Wolf3s avatar Nov 29 '25 23:11 Wolf3s

-DNOSOUND=ON was for testing to see if you could get in the dungeon with lower memory usage. I wasn't suggesting for you to enable the custom PS2 audio implementation at the same time, it's best to test just one thing at a time.

Regarding video audio that could be implemented without AudioLib.

AJenbo avatar Nov 30 '25 00:11 AJenbo

For PS2, I think we should go with SDL3 rather than SDL2. SDL3 has much better audio capabilities and eliminates the need for SDL_audiolib, though we haven't implemented audio support for SDL3 yet.

glebm avatar Nov 30 '25 08:11 glebm

We do for the intro which is what was missing on the PS2 sound implementation :)

AJenbo avatar Nov 30 '25 10:11 AJenbo

We do for the intro which is what was missing on the PS2 sound implementation :)

We do for the intro which is what was missing on the PS2 sound implementation :)

-DNOSOUND=ON was for testing to see if you could get in the dungeon with lower memory usage. I wasn't suggesting for you to enable the custom PS2 audio implementation at the same time, it's best to test just one thing at a time.

Regarding video audio that could be implemented without AudioLib.

Oh ok, i've just enabled to free up some memory

Wolf3s avatar Nov 30 '25 12:11 Wolf3s

We do for the intro which is what was missing on the PS2 sound implementation :)

We do for the intro which is what was missing on the PS2 sound implementation :)

-DNOSOUND=ON was for testing to see if you could get in the dungeon with lower memory usage. I wasn't suggesting for you to enable the custom PS2 audio implementation at the same time, it's best to test just one thing at a time. Regarding video audio that could be implemented without AudioLib.

Oh ok, i've just enabled to free up some memory

My goal now it's to make load all the levels plus fix joystick.

Wolf3s avatar Nov 30 '25 13:11 Wolf3s