Common searches

First post, by vanfanel

User metadata
Rank Newbie

Hi there,

According to JEMMEX author, the problem with Lemmings 2 on some hardware is that, if Soundblaster is selected as sound device in v86 mode, an exception 0D occurs in Jemm/Qemm ( MS Emm386 hangs ). It's due to a word write access at offset 0xFFFF, something not allowed in true v86 mode ( no problem for DosBox, apparently ).

I would like to hex-edit the game executable and try to get rid of that word write access at offset 0xFFFF: it should be possible.
But how would one go and find what hex position in the game executable file has to be patched?


Reply 1 of 1, by wbahnassi

User metadata
Rank Member

Run the game under a debugger. The debugger will break on the crash right at the offending instruction. Grab a few bytes of binary code starting from the instruction, and look for it in the executable. If it's not there, then you'll need to find it in one of the game's files which it dynamically loads. Then you can turn that into a NoP and pray it works.

BTW, what you're after is most probably a patch to the game's SB detection routine, which fails on fast CPUs (a very common problem on old games). The write to 0xFFFF is probably not going to be intentional, but a side effect of a failed handshake with the SB. It's timing sensitive, so hopefully your debugger won't slow things down too much and still causes the issue to repro.