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: 7094
Author: ian.rushforth
Date: 20/03/2017
Subject: Re: Advanced Trainer - Daniel's suggestions
I wrote:
> > One more detail - if Willy drops off the bottom of the screen in Manic Miner whilst the x-coordinate of the
> > left-hand half of his sprite is odd, then the first character of the scrolling message on the Title Screen is
> > also corrupted (i.e. the value at #9D00 is overwritten by one of Willy's graphic bytes). However, this
> > doesn't occur if Willy drops off the bottom whilst his x-coordinate* is even.
To clarify further, the address #9CFE is picked up from the routine which defines the base of the stack (after the game is first loaded), which follows on directly from the end of the lookup table at #8300 (see #8402-#8403). That is interpreted as Willy's y-coordinate, and is OR'd with his x-coordinate to decide where to try and draw the left-hand half of the part of his sprite which extends beyond the bottom of the screen. So if his x-coordinate is odd, then the left-hand half of his sprite is written to #9CFF. Then a simple INC HL is used to identify where to draw the right-hand half of his sprite, which means that #9D00 [the first character of the scrolling message] is overwritten. (If Willy's x-coordinate is even, then the particular pair of graphic bytes under consideration are written to #9CEF and #9CFF, leaving the scrolly message alone.)
> Actually, the above also relies on Willy being in an animation-frame other than his right-facing frame 0. (It is > the right-hand half of his sprite that overwrites the first character of the scrolling message in this scenario,
> and if he is in right-facing frame 0 then his right half is Inkless.)
In the above, when I said "overwrites" I should perhaps have said "is merged with" - once again, an OR command is involved, merging Willy's pixels with those of his host cells. So if the right-hand half of Willy's sprite happens to be Inkless (as is the case with the regular right-facing frame 0), then it won't corrupt any addresses to which it is erroneously written.
