Notes:Star Battle
This page contains notes for the game Star Battle.
Restoring the Developer Credit
Documenting the developer credit easter egg, adapted from Commodore enthusiast Robin Harbron (aka 8-Bit Show and Tell)'s video in which he restored it.
At 0xA50E is some code which checks memory at 0x1A33. If it does not equal zero, the program branches to 0xA514 to begin the credits routine. Otherwise, it simply returns and continues as normal.
0xA50E AD 33 1A lda $1A33 0xA511 D0 01 bne $A514 0xA513 60 rts
However, there is no longer anywhere in the code which sets this address to a nonzero value, only code which clears it. Still, almost all of the code which originally would have done this remains in the game. At 0xA7EC, after the title screen's input routine has checked for an F1 (one player) or F3 (two player) key press, it continues checking for the Commodore, LeftShift and RightShift keys pressed at the same time.
0xA7EC A2 02 ldx #$02 0xA7EE BD 07 A8 lda $A807,X ; loads in one keycode row from 0xA807 + rX 0xA7F1 8D 20 91 sta $9120 0xA7F4 AD 21 91 lda $9121 ; read back the pressed key 0xA7F7 CD 21 91 cmp $9121 0xA7FA D0 F8 bne $A7F4 0xA7FC 3D 0A A8 and $A80A,X ; bitwise and with the keycode column at 0xA80A + rX 0xA7FF D0 05 bne $A806 ; b to rts if there's no secret key match, or ... 0xA801 CA dex ; decrement rX and ... 0xA802 10 EA bpl $A7EE ; loop back up to load in a different key code 0xA804 A9 01 lda #$01 ; load 01 into rA 0xA806 60 rts ; return to subroutine
Upon returning, the game does nothing with that 01 in rA
, it is never written out to memory and is immediately replaced by another lda
. Harbron suspects that the lda #$01
was originally followed by a sta $1A33
, writing the value out to the secret flag and enabling the credits screen, which was commented out in the final build.
Harbron's patch makes the following adjustments to re-enable the credits screen. Uncommented lines are unchanged from their original code.
0xA7FF D0 8E bne $A78F ; b to earlier rts since original at 0xA806 is gone 0xA801 CA dex 0xA802 10 EA bpl $A7EE 0xA804 4C F0 BD jmp $BDFO ; jump to unused ROM area after graphics data ... 0xBDF0 EE 33 1A inc $1A33 ; increment the secret flag 0xBDF3 60 rts ; return