I finally figured out how to make the glitch possible in SDLPoP:
https://github.com/NagyD/SDLPoP/commit/ ... c54b8e271d
As it turns out, I have added those extra lines (within the new #ifdefs) before v1.00!
Unfortunately I don't remember what did they fix.
I'm still not fully sure why those line affect this glitch.
What I know is that they make a difference here:
https://github.com/NagyD/SDLPoP/blob/90 ... 004.c#L480
At the point where the prince should go through the closed gate, the checked flags both become zero after three bumps if FIX_COLL_FLAGS is defined, but they remain 0xFF longer if it's undefined.
Before the fix I made a savestate where prince is standing right under the closing gate.
I could not reproduce the glitch from that state, I had to start from an earlier room.
Maybe the collision flags become 0xFF while the prince is in one of the earlier rooms.
I have also added a new folder called replays-testcases, for replays which test glitches and their fixes.
https://github.com/NagyD/SDLPoP/tree/ma ... -testcases
There I added a replay for this glitch.