Xi Tian Qu Jing II (Unl) Crash Issue

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

Post Reply
WhiteHat94
Posts: 46
Joined: Fri Apr 07, 2017 5:02 pm

Xi Tian Qu Jing II (Unl) Crash Issue

Post by WhiteHat94 »

Wasn't sure exactly where to post this but had a question about this game. I was looking at speedrunning this but unfortunately the game crashes when entering the transition to the bosses. Mesen gives an "Invalid OP Code - CPU Crashed" message, and it also crashes on MiSTer, FCEUX and Everdrive. I've seen a playthru on youtube, so not sure what they played on.

So really my only question, is it possible to "easily" fix this so the game works, or is it not worth anyone's time? I attached a Mesen savestate right before a boss crash if anyone wants to mess with it, just go right and jump the pit to get the crash. Can also provide the ROM, but I think it's pretty available.
Attachments
xitianqujing2_1.zip
(6.49 KiB) Downloaded 20 times
Fiskbit
Posts: 891
Joined: Sat Nov 18, 2017 9:15 pm

Re: Xi Tian Qu Jing II (Unl) Crash Issue

Post by Fiskbit »

I think your issue is that you're running this PAL Dendy game in NTSC mode. In my own playthrough and using your saved state on a Mesen v2 build from 1/20/2024, I didn't encounter any issue, but forcing the game into NTSC mode, it crashes as described. PAL timings are very different from NTSC, and for games targeting PAL, it's not surprising to me that they would misbehave on NTSC.
Last edited by Fiskbit on Fri Mar 01, 2024 1:40 am, edited 1 time in total.
Reason: This is is a Dendy game, not a PAL game as I mistakenly thought.
User avatar
TakuikaNinja
Posts: 89
Joined: Mon Jan 09, 2023 6:42 pm
Location: New Zealand
Contact:

Re: Xi Tian Qu Jing II (Unl) Crash Issue

Post by TakuikaNinja »

Yeah, it seems like it's relying on "Dendy" timing during bulk PPU transfers with rendering disabled. An NMI can interrupt it and switch banks when it wasn't supposed to. Most common dumps seem to have a bad header that don't specify the correct frame timing, which some emulators mitigate through hash databases or heuristics.
Last edited by TakuikaNinja on Fri Mar 01, 2024 1:30 am, edited 1 time in total.
WhiteHat94
Posts: 46
Joined: Fri Apr 07, 2017 5:02 pm

Re: Xi Tian Qu Jing II (Unl) Crash Issue

Post by WhiteHat94 »

Great, thanks for the answers. I actually had tried it in PAL mode before and the same thing happened, but putting it in Dendy PAL mode it works.
Fiskbit
Posts: 891
Joined: Sat Nov 18, 2017 9:15 pm

Re: Xi Tian Qu Jing II (Unl) Crash Issue

Post by Fiskbit »

You're right, it's Dendy, not PAL. The ROM I found called it PAL (and uses an iNES header, which doesn't really specify), but the NES 2.0 database used by Mesen contains this game and correctly marks it as Dendy. Mesen has an Auto region feature that will automatically run the game according to the header's or database's specified region.
User avatar
TakuikaNinja
Posts: 89
Joined: Mon Jan 09, 2023 6:42 pm
Location: New Zealand
Contact:

Re: Xi Tian Qu Jing II (Unl) Crash Issue

Post by TakuikaNinja »

Fiskbit wrote: Fri Mar 01, 2024 1:15 am You're right, it's Dendy, not PAL. The ROM I found called it PAL (and uses an iNES header, which doesn't really specify), but the NES 2.0 database used by Mesen contains this game and correctly marks it as Dendy. Mesen has an Auto region feature that will automatically run the game according to the header's or database's specified region.
I seem to have made the same mistake - whoops. I'm guessing the dump was made in an era where Dendy (PAL Famiclone) systems weren't understood very well yet.
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: Xi Tian Qu Jing II (Unl) Crash Issue

Post by NewRisingSun »

WhiteHat94 wrote: Wed Feb 28, 2024 7:09 amis it possible to "easily" fix this so the game works, or is it not worth anyone's time?
Attached please find my NTSC compatibility patch. Removes the crash before the boss fight, plays music correctly at 60 Hz, and removes the setting of the PPU Slave Mode bit.
Attachments
journey to the west 2 (ntsc).ips
(120 Bytes) Downloaded 12 times
Fiskbit
Posts: 891
Joined: Sat Nov 18, 2017 9:15 pm

Re: Xi Tian Qu Jing II (Unl) Crash Issue

Post by Fiskbit »

Oh, this is one of those unlicensed games that keeps the PPU in slave mode the whole time? People should be careful about that; it's possible (though not confirmed) that this can damage the PPU, because it makes the PPU output signals on pins that are shorted to ground.

For reference, NewRisingSun put together a list of such games, which you can find here.
WhiteHat94
Posts: 46
Joined: Fri Apr 07, 2017 5:02 pm

Re: Xi Tian Qu Jing II (Unl) Crash Issue

Post by WhiteHat94 »

NewRisingSun wrote: Fri Mar 01, 2024 7:48 am
WhiteHat94 wrote: Wed Feb 28, 2024 7:09 amis it possible to "easily" fix this so the game works, or is it not worth anyone's time?
Attached please find my NTSC compatibility patch. Removes the crash before the boss fight, plays music correctly at 60 Hz, and removes the setting of the PPU Slave Mode bit.
Wow, thanks so much, now the game is beatable on NTSC console. It seems to make the game a bit jankier overall, like clipping thru some slopes now or partially getting stuck in a floor, I assume due to the faster framerate messing with some of the collision? Either way, still nice to be able to play thru on console.
Post Reply