devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Port for PlayStation Portable support

Open AJenbo opened this issue 1 year ago • 10 comments

Things are now building pretty smoothly.

image

Running in the PPSSPP emulator: https://www.youtube.com/watch?v=UmAv7nrME-I

It does look like it's unable to reinitialize the graphics system so we need to disable related options. Also we need to find a good way to downscale to 480x272 on SDL2. The PSP only supports textures of 512x512 so it won't be able to do it using a single 847x480 texture. One option would running at 960x544 and then 1/2 scale it in software.

Todo

  • [x] Fix resolution
  • [x] Fix running on hardware
  • [ ] Performance is about 7 FPS

AJenbo avatar Mar 10 '23 01:03 AJenbo

PSP only supports power-of-two textures, but can't we use 1024x1024? If not, perhaps we can have 2 separate textures: one for the bottom panel and one of the rest of the screen.

glebm avatar Mar 10 '23 13:03 glebm

Well the issue is width, not height :) 847x480 vs 512x512

https://github.com/libcg/gLib2D/blob/master/glib2d.h#L418

AJenbo avatar Mar 10 '23 13:03 AJenbo

@AJenbo looks like it didn't upload the artifact on CircleCI. Let me know when I can grab that and I can do a quick test on hardware (also if you want to just send me a few builds to test different configurations, just let me know).

stefanmielke avatar Mar 10 '23 15:03 stefanmielke

Well the issue is width, not height :)

Oh, right. We can just blit the final surface to 2 side-by-side textures actually, since we render everything in software to an 8-bit surface first anyway.

glebm avatar Mar 10 '23 15:03 glebm

@stefanmielke thanks, I corrected the artifact path.

AJenbo avatar Mar 10 '23 16:03 AJenbo

@AJenbo got this error when running it: "The game could not be started (80020148)". Other homebrew run fine (also tested the Tyrian port).

Additionally, I copied the other files next to the game at "PSP\GAME\DevilutionX", not sure if it was expecting them somewhere else.

This is how it ended: PSP\GAME\DevilutionX\devilutionx.mpq (grabbed from the Linux build) PSP\GAME\DevilutionX\DIABDAT.MPQ PSP\GAME\DevilutionX\EBOOT.PBP

To add more info, the game show the PSP logo at the start, then goes straight to a black screen, stays there for a couple seconds, and then crashes to the PSP homescreen with the message.

stefanmielke avatar Mar 10 '23 17:03 stefanmielke

@stefanmielke we got it running on hardware in case you want to mess a bit more with it.

AJenbo avatar Nov 12 '23 04:11 AJenbo

Everything is now working, only issue left is performance which is a good deal slower then what is ideal.

AJenbo avatar Nov 14 '23 05:11 AJenbo