x-station / xstation-issues

Issues and support for the xstation optical drive emulator
24 stars 5 forks source link

Nightmare Creatures boot problem #342

Open Z3R0XZ opened 9 months ago

Z3R0XZ commented 9 months ago

Nightmare Creatures sometimes it takes like 5 tries to boot. The game has 7 executables, and the first one is just a video player to play a STR video, I don't konw if that helps.

ramapcsx2 commented 9 months ago

Hey, this is a known problem with this game. It also does it when running from CD, though less often there. I've tried to find anything that could affect it, but the issue seems to be random variance in hitting one of the Kernel bugs in the BIOS. Nothing I tried could actually affect boot reliability, neither positive nor negative :p

Z3R0XZ commented 9 months ago

Oh, thanks for letting me know that is not an xStation problem. I might do a patch since I made a custom trainer for it. The code for the game is A$$ LOL. Edit: I made a simple patch to skip the intro FMV (which also skips loading the stream executable into RAM) and tested it 15 times: 5 times powering on/off using fast boot, 5 using full boot, and 5 using the reset. With 0 problems, it always boots without problem even using my custom trainer executable, I'm sure the FMV player has a bug... If you want to test it, just modify the BIN offset from 0x14 to 0x2C at 0x0000F5B4 from the USA version.

ramapcsx2 commented 9 months ago

Oh awesome, I could use some help from a PSX hacker for this! :D

So yea, what I reasoned is that the problem with this game is the repeated executable reloads at boot, which all use the super buggy kernel code. I suspect the game dies around this particular bug: https://github.com/grumpycoders/pcsx-redux/blob/fce881226e30e11cca1370751932e8f36a67c59f/src/mips/openbios/cdrom/helpers.c#L37

It makes sense that reducing these reloads would then improve boot reliability :)

What would be awesome now though is, if you could look for further details on what exactly goes wrong with the game.. I'm not sure what can be done, but if the game had printfs around the reloads, maybe with some status results, that would help.. Another thing would be patching particular details, such as any delay loops (longer/shorter/remove) etc, anything really that gets the game to show some repeatable behaviour. Right now, it is just all totally random, though I noticed the disk version dies less often than xStation. I have the PAL release here, but PAL/NTSC-U both do it.