Whilst going through the Phoenix code for the high score save I'm currently working on, I came across a bit of code that was put in there presumably to try to stop bootlegging (obviously the plan didn't work, and it's a shame they didn't spend more time on cleaning up the main game code to make it work properly...)
When on the demo screen with the big "Phoenix" text (below), the game executes some code to ensure the 2nd line of text at the bottom of the screen is intact (" Amstar Electronics Corp. ")
It calls the below code every frame whilst this screen is displayed,
and if not it corrupts the highest 2 numbers of the high score:-
1EE0 LXI D,#433D ;DE->Start of text on screen
1EE3 LXI B,#001A ;B->checksum counter, C->Number of characters to check
1EE6 LDAX D ;Get character from screen
1EE7 ADD B ;Add to checksum counter
1EE8 MOV B,A ;And store back in A
1EE9 CALL #0217 ;Recalculate DE to next character on screen
1EEC DCR C ;decrease number of characters to check
1EED JNZ #1EE6 ;loop back if not finished
1EF0 LDAX D ;Get final character
1EF1 ADD B ;Add to checksum counter
1EF2 ADI #27 ;Add #27 (if all ok then this makes A=0)
1EF4 LXI H,#4389 ;HL->high score MSB
1EF7 ADD M ;Add A to the high score MSB- if all ok then A=0, if not, corrupt the high score
1EF8 MOV M,A ;And save it in the MSB for the high score
1EF9 NOP ;Padding (there's lots of this in Phoenix)
1EFA RET ;And return
So if anything other than the proper copyright message is shown on the screen, the game corrupts the high score to something other than what it should be.
I guess it would have made the game a bit annoying, (and definitely not as bad as the Williams and Atari hidden code that eventually causes a number of their games to crash), and it didn't stop the bootleggers at all, but nonetheless quite interesting that it's in there.
When on the demo screen with the big "Phoenix" text (below), the game executes some code to ensure the 2nd line of text at the bottom of the screen is intact (" Amstar Electronics Corp. ")
It calls the below code every frame whilst this screen is displayed,
and if not it corrupts the highest 2 numbers of the high score:-
1EE0 LXI D,#433D ;DE->Start of text on screen
1EE3 LXI B,#001A ;B->checksum counter, C->Number of characters to check
1EE6 LDAX D ;Get character from screen
1EE7 ADD B ;Add to checksum counter
1EE8 MOV B,A ;And store back in A
1EE9 CALL #0217 ;Recalculate DE to next character on screen
1EEC DCR C ;decrease number of characters to check
1EED JNZ #1EE6 ;loop back if not finished
1EF0 LDAX D ;Get final character
1EF1 ADD B ;Add to checksum counter
1EF2 ADI #27 ;Add #27 (if all ok then this makes A=0)
1EF4 LXI H,#4389 ;HL->high score MSB
1EF7 ADD M ;Add A to the high score MSB- if all ok then A=0, if not, corrupt the high score
1EF8 MOV M,A ;And save it in the MSB for the high score
1EF9 NOP ;Padding (there's lots of this in Phoenix)
1EFA RET ;And return
So if anything other than the proper copyright message is shown on the screen, the game corrupts the high score to something other than what it should be.
I guess it would have made the game a bit annoying, (and definitely not as bad as the Williams and Atari hidden code that eventually causes a number of their games to crash), and it didn't stop the bootleggers at all, but nonetheless quite interesting that it's in there.