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: 4943
Author: andrewbroad
Date: 14/10/2005
Subject: Re: Willy and Toilet in same room?
Alexandra wrote:
>This is because the code that checks if Willy is in the Master
> Another tech problem in JSW: RR. My 'maria' and 'toilet' (which are
> Willy and his Bed in RR) are in the same room, but this is causing
> the 'toilet' (Bed) not to appear.
Bedroom only jumps to the toilet-display routine if he is NOT in the
Master Bedroom:
38196: LD A,(33824) ; get current room-number (PEEK 33824)
38199: CP 35 ; are we in "Master Bedroom" [35]?
38201: JR NZ,38298 ; if not then jump to toilet-display routine
(Note that you can change which room behaves as "Master Bedroom" [r]
with POKE 38200,r; and POKE 33824,r is a useful runtime POKE to
teleport to Room r)
> Does anyone know a way around this?It's fiddly.
1. If the jump at 38201 is not taken and Maria is still there, it
will reach the RET instruction at 38261 (unless Maria collides with
something and kills you).
2. If the jump at 38201 is not taken and Maria is not there (because
all the items have been collected), it will reach the RET
instruction at 38275.
Now, to jump to the toilet-display routine even in "Master Bedroom",
we'd have to replace these two RET instructions with jumps to 38298.
Unfortunately a RET instruction is one byte long, while a JR
instruction is two bytes long (the second byte is the operand that
tells it by how many bytes to jump forwards/backwards, as a signed
value from -128 to +127). So to make this change would entail
shunting and relocating of code.
--
Dr. Andrew Broad
http://www.geocities.com/andrewbroad/
http://www.geocities.com/andrewbroad/spectrum/
http://www.geocities.com/andrewbroad/spectrum/willy/
