melonDS-emu / melonDS

DS emulator, sorta
https://melonds.kuribo64.net
GNU General Public License v3.0
3.02k stars 499 forks source link

lolSnes JIT Issues #1253

Open poudink opened 2 years ago

poudink commented 2 years ago

Block sizes below 4 break lolSnes. Audio emulation will be completely gone and games usually won't get past the intro. With Super Mario World for instance, the game gets stuck on a black screen right after the Nintendo logo. This is interesting, because lower block sizes are supposed to be more accurate, yet here only low block sizes cause any issues, with interpreter and higher JIT block sizes working fine. Another interesting thing is that DeSmuME seems to have a bit of the opposite issue: block sizes above ~4 work, but cause massive slowdown, while block sizes 4 and below work mostly perfectly.

lolSnes has a second issue with the JIT, specifically with the game Metal Max Returns (I used the fan translation, dunno if it's necessary to reproduce the issue). The game never worked in lolSnes and breaks after the title screen, but the way it breaks is different with the JIT turned on. With the JIT off, the game will black screen and play a new music for a few seconds, while the following text appears on the bottom screen:

[192] PPU mode 0 Slow ROM

Followed by a few seemingly random error/PPU mode messages which seem to always at least include

!! PPU EXT SYNC

With the JIT on (block size and optimizations don't seem to matter), the game will instead get to a blinking corrupted screen and continue playing the title screen music. The following text will appear on the bottom screen:

[192] PPU mode 0 Slow ROM SRAM save

DeSmuME has the same issue.

Arisotura commented 2 years ago

most probable cause is that the ARM7 binary in lolSNES has some self-modifying code, in some really ghetto fashion. if that breaks, you're not getting SPC emulation, which breaks most if not all SNES games.

zurgeg commented 2 years ago

Block sizes below 4 break lolSnes. Audio emulation will be completely gone and games usually won't get past the intro. With Super Mario World for instance, the game gets stuck on a black screen right after the Nintendo logo. This is interesting, because lower block sizes are supposed to be more accurate, yet here only low block sizes cause any issues, with interpreter and higher JIT block sizes working fine. Another interesting thing is that DeSmuME seems to have a bit of the opposite issue: block sizes above ~4 work, but cause massive slowdown, while block sizes 4 and below work mostly perfectly.

lolSnes has a second issue with the JIT, specifically with the game Metal Max Returns (I used the fan translation, dunno if it's necessary to reproduce the issue). The game never worked in lolSnes and breaks after the title screen, but the way it breaks is different with the JIT turned on. With the JIT off, the game will black screen and play a new music for a few seconds, while the following text appears on the bottom screen:

[192] PPU mode 0 Slow ROM

Followed by a few seemingly random error/PPU mode messages which seem to always at least include

!! PPU EXT SYNC

With the JIT on (block size and optimizations don't seem to matter), the game will instead get to a blinking corrupted screen and continue playing the title screen music. The following text will appear on the bottom screen:

[192] PPU mode 0 Slow ROM SRAM save

DeSmuME has the same issue.

I know this represents a bigger issue with melonDS, but out of pure curiosity, why use lolSNES under melonDS instead of just using a desktop SNES emulator?

poudink commented 2 years ago

I'm playing SNES games on my DSi since that's the only handheld console I currently have. Since lolSnes has poor compatibility, I always test SNES games on a DS emulator to see if they work so I don't waste my time taking out my SD card for a game that doesn't work.