Login
Back to forumSee the full topicGo to last reply

Posted By

Luca
on 2014-10-25
06:38:26
 Re: MIK goes for a SPIN trying to make...

Ok, the infamous 16K bug has been found and fixed wink
A brief explanation follows.


After the mistake in level 8, there's another unrelated typo from the author:
--- [cut] ---                                 
. 3663 EE F8 18 INC $18F8
. 3666 AD F8 18 LDA $18F8
. 3669 C9 28 CMP #$28
. 366B F0 0E BEQ $367B
. 366D A2 30 LDX #$30
. 366F 8E FB 18 STX $18FB
. 3672 8E FC E0 STX $E0FC
. 3675 20 B0 18 JSR $18B0
--- [cut] ---


The author should have written "STX $18FC" instead!
All the sfx in Pin Point are cunningly produced with a single engine that replays the same effect at a decreasing volume, once the duration and frequency have been set. $18FB and $18FC are the two variables needed before JSR toward it.
The very first time this particular sound effect with bugged code is requested is here:

This is a weird passage, because you can even not jump to reach the other platforms and you won't die (if you do the same in the opposite direction, from the reached ramp to the original accessing position you'll die instead, weird we've said, uh...).

Anyway... When this jump is performed, the sfx routine is called from the memory we've just seen above, and due to the typo, the value 30 is written in location $E0FC on a Plus/4 (a game into $0000- $3FFF memory range of course is not affected by this), in location $60FC on a 32K machine due the wrap on (same as before), and in location $20FC on a C16/C116 due to the wrap on (o-oh!).

What of the game code lies in around $20FC memory? Well, there can be found the code that draws the game screen line per line:
--- [cut] ---
. 20F9 BD F0 0C LDA $0CF0,X
. 20FC 60 RTS
. 20FD C0 07 CPY #$07
. 20FF D0 04 BNE $2105
. 2101 BD 18 0D LDA $0D18,X
. 2104 60 RTS
. 2105 C0 08 CPY #$08
. 2107 D0 04 BNE $210D
. 2109 BD 40 0D LDA $0D40,X
--- [cut] ---

Due the author's mistake, after that jump, the value 60 in $20FC (which means the RTS command) is changed to 30. No more RTS, no more exact code in the screen drawing, no more return to subroutine, so the sacrosanct cascade of bad words from the buyer of the game occurs grin

Fixing? Easy, and you've just got howto:
>3674 18



Back to top


Copyright © Plus/4 World Team, 2001-2024