flycast icon indicating copy to clipboard operation
flycast copied to clipboard

Zombie Revenge (DC and Naomi) - Episode 3 boss gets stuck in wall

Open fantasicplanet opened this issue 11 months ago • 5 comments

Platform / OS / Hardware: Windows 11, gtx 4070 ti super, ryzen 9900x

Flycast version: v2.5-20-g5b7597523

Description of the Issue

The boss of Episode 3 (Warehouse level) has 2 types of jump: one that's shorter that lands him somewhere in the arena and one that's long and goes to the perimeter of the arena. You can make him do the long jump by shooting him a lot.

He gets stuck in the wall after doing the long jump. You can shoot him to return him to a normal state, but if he is in the corner diagonally opposite the pipes and on the fence, he can slip out of the arena and softlock the game. I triggered it today by running to the opposite side of him and the camera swung and caused him to immediately fly out. If you just wait and don't shoot, he'll eventually fly out of the arena too.

This happens in both the Dreamcast and Naomi arcade version. It also happened in other naomi/dc emulators like nullDC and demul, in case that provides any extra insight.

On original arcade hardware and the original Dreamcast version, this doesn't happen. Confirmed this on both.

Debugging Steps Tested

*Tried native resolution and all bells/whistles disabled *Tried all renderers

Screenshots

See twitch highlight for an example - note i'm playing as 2 characters at once, but it's the same result with 1 character. https://www.twitch.tv/videos/2640772157

fantasicplanet avatar Dec 11 '25 02:12 fantasicplanet

I'm not confident this can be fixed easily if it's present in all dreamcast emulators. But could you upload a savestate of this level so I can easily reproduce it? Thanks

flyinghead avatar Dec 11 '25 14:12 flyinghead

Sure thing - here you go: https://mega.nz/file/YpkH1QCA#SJaNWSNRZ1r9U7Vbq6TP_vMgTMflKFLrlwKqp-wF0UU

it won't let me upload directly. Thanks for taking a look into it!

fantasicplanet avatar Dec 12 '25 02:12 fantasicplanet

I don't know if this will be helpful, but I've identified the commits where the issue is reproducible and where it is not.

a23c895: Reproducible 3d570f8: Not reproducible

kihato avatar Sep 15 '26 09:09 kihato

I think the root of the issue is the usual precision error of FIPR/FTRV, or perhaps FSRRA (square root reciprocal).

The commit you mention restores the rounding and denormal modes of the host CPU when resuming the game. Previously it would be left as default, which on the x86 family is round to nearest and preserve denormals. The SH4 defaults to round to zero and "handle denormals as zero". So a possible theory is that one error mitigates the other by making subtle changes to floating point results. I couldn't figure out if it's due to rounding mode or denormals. Restoring only one still reproduces the bug.

What I can say is the mentioned commit is absolutely needed for Sword of the Berzerk for example. Try pausing and resuming the game in the initial animation sequence for fun effects 🤣

flyinghead avatar Sep 15 '26 11:09 flyinghead

Power stone Naomi port has a similar bug :

Image
EXEEDUR — 9:16 PM
First, that's naomi version in fact.. I notice that when I fight jack and break the glass jack jumps to that spot and gets into endless loop until he gets interrupted  (falcon faces him always in the first match)

Might be related

BenoitAdam avatar Sep 29 '26 20:09 BenoitAdam