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: 7216

Author: ian.rushforth

Date: 05/02/2019

Subject: Re: Completing "Maria vs. Some Bastards"

 

Further to the bug-fix below, I would just add one other thing.  Immediately after the new subroutine (which is supposed to handle moving on to Game Mode 1) at #9A30, there is the following code:
#9A41    LD (#8453), A #9A44    JR #9A3E
Now, I can't find anywhere in the program that uses this code.  It may be a relic.  The address #8453 isn't used - other than on this occasion -  as far as I can tell by searching for '53 84' in JSWED's hex editor.  The address actually holds the ASCII code 'R' from the fossil MM message 'AIR'.  I tried searching in vain for the string '41 9A', so there is no direct jump to these commands, nor are there any relative jumps to here within 128 bytes in either direction.
It is possible that it is reached via a JP (HL) command, with H and L being defined separately.  Or else there could be an element of self-modifying code. e.g. the operand of the relative jump at #9A37 could be patched to allow some kind of special effect when a particular item is collected?  (It is notable that this bit of code ends with a relative jump back to #9A3E, which is the jump back to the main item-handling routine (at the end of the subroutine which is supposed to make 'Maria' disappear.  This suggests that if the code is used in some way, it must be in relation to the collection of items.)
Anyway, if you're implementing the patch below (to make the game completable), then to be on the 'safe' side, I thought that perhaps the relative jump at #9A44 should be replaced with a direct jump to #942C (there is space in the code immediately afterwards to allow for the one-byte longer command) - at the risk that the stack might be left with a Return address remaining on it, if indeed the program does ever arrive at this point via a CALL?


---In manicminerandjetsetwilly@yahoogroups.com, wrote :

And here is a bug-fix for the aforementioned bug, which should fit into the available space:
At #9425, replace the JUMP to #9A30 with a CALL to #9A30.
#9A30    LD A, (#85C2)        ; The address #85C2 is reset to zero at the start of the game; it counts the number of items collected as a positive number
#9A33    ADD A, #01            ; Increment the Accumulator
#9A35    LD (#85C2), A
#9A38    CP [operand]          ; Has the number of items collected reached the target number?  [The operand of this command is set by the BASIC loader to #78/#F0/#F6 for Easy/Normal/Hard Mode, or #01 for Cheat Mode.]
#9A3A    RET NZ                  ; If the number of items collected hasn't reached the target, then RETURN back to the main item-handling routine
#9A3B    LD A, #01               ; If the 'number of items collected' has reached the target, then...
#9A3D    LD (#85DE), A       ; ...set the Game Mode Indicator to 1
#9A40    RET                        ; RETURN back to the main item-handling routine, at the point where the item will be marked as collected

 

 

arrowleft
arrowright