Resource centre for ZX Spectrum games
using Manic Miner and Jet Set Willy game engines
Archive of the
Manic Miner & Jet Set Willy Yahoo! Group
messages
|
|
||
|
|
Message: 4394
Author: andrewbroad
Date: 19/08/2004
Subject: To Fix the Bug in F.I.R.3 (Re: Apologies)
dm_boozefreek wrote:
>No! It is caused by a runaway patch-vector in Room 37, which crashes
> Sorry everybody the bug in F.I.R.3. seems to be unsortable
the game when you enter that room.
Room 37's patch-vector (Offsets 238,239) currently points to address
47490, which you have overwritten with graphics, hence the chaos
when the CPU attempts to interpret these graphics as machine-code
instructions!
The simplest fix is to set Room 37's patch-vector to do nothing -
i.e. set it to point to a RET instruction at, say, address 38454:
POKE 58862,54
POKE 58863,150
------------------
Technical appendix
------------------
Address of a JSW room-datum = 49152 + 256*room + offset
Address of Room 37's patch-vector
= 49152 + 256*37 + 238 = 58862 (address of low byte)
= 49152 + 256*37 + 239 = 58863 (address of high byte)
Room 37's patch-vector
= low byte + 256*high byte
= PEEK 58862 + 256*PEEK 58863
= 130 + 256*185
= 47490
Room 37's patch-vector after the fix
= 54 + 256*150
= 38454
PEEK 38454 = 201 (op-code for RET)
--
Dr. Andrew Broad
http://www.geocities.com/andrewbroad/
http://www.geocities.com/andrewbroad/spectrum/
http://www.geocities.com/andrewbroad/spectrum/willy/
