libretro / gpsp

gpSP for libretro.
GNU General Public License v2.0
52 stars 52 forks source link

[ARM32 Dynarec] Open Lara / Doom 2 / Duke Nukem - Display Issues #196

Closed andymcca closed 1 year ago

andymcca commented 1 year ago

All 3 games at least seem to suffer from the same 3D visual issue with vertical bands down the screen which aren't present in other emulators (mgba/VBA-M/gpsp standalone). This applies to ARM32 Dynarec on libretro only (ARM32 Intepreter/x86 do not have this issue, nor does gpsp 0.91 standalone running with ARM32 Dynarec).

To reproduce, simply start a new game in either ROM.

ON ALL VERSIONS (including x86) - With Open Lara (download from https://www.gamebrew.org/wiki/OpenLara_GBA) you can only use the version for 'Slow Flash Carts' (N3S1), otherwise gpsp will have a black screen (music still plays).

andymcca commented 1 year ago

@davidgfnet the commit where this happens is 11ec213c99d5d22905ff82cf3fb26ba6a8adf290.

Actually, Doom and Duke Nukem don't work properly before this commit, but I was able to verify with Open Lara (N3S1) which does work all the way back to 2014.

If you build from the commit before this one, 7e27010a3c08811e4ed04097e1961009c3fef8d7, you don't get the banding lines on the display in Open Lara in ARM32 Dynarec. It's only when you compile any commits from 11ec213c99d5d22905ff82cf3fb26ba6a8adf290 onwards that the lines/banding appears.

Unfortunately it looks like 11ec213c99d5d22905ff82cf3fb26ba6a8adf290 contains a fair bit of rewriting of code etc, so doesn't look easy on the face of it to get to the root of the issue, but hopefully you see it different!

davidgfnet commented 1 year ago

This doesnt happen on x86 dynarec right? In that case must be some very interesting bug in the arm dynarec. I will compare it side by side with perhaps arm64 and see where they deviate. Thanks!

andymcca commented 1 year ago

@davidgfnet correct, it doesn't happen on x86. Agree it's an interesting one - before that commit, Doom 2 was completely broken (even though it worked in gpsp 0.91 standalone), displaying garbage throughout the opening screens. Will leave it to you to investigate but if you're not going to get to it for a while, let me know and I'll take more of a look.

davidgfnet commented 1 year ago

Commit f4e65d15 should have fixed this.

andymcca commented 1 year ago

Conrimed! All 3 games now display correctly on ARM32 Dynarec - thank you @davidgfnet ! 😃

Now just the OpenLara issue remaining (i.e. black screen on startup for non-'Slow Flash Carts' version). Not sure if this is worth keeping the issue open for - I'll close it given a workaround ROM exists and that this issue was mostly about the display issues which have now been fixed.