Phoenix anti-bootleg code

philmurr

Active member
vacBacker
Feedback
48 (100%)
Credits
2,374CR
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:-

Phoenix_demo_screen.JPG


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.
 

Hurray Banana

Moderator
Staff member
vacBacker
Feedback
8 (100%)
Credits
2,755CR
Nice one phil. It would be nice to hear about the development of phoenix from the developers viewpoint. I wonder how much time pressure they were under
 

philmurr

Active member
vacBacker
Feedback
48 (100%)
Credits
2,374CR
joe34 said:
(made me think of an amiga forum thread about 'messages from game coders to crackers'): http://eab.abime.net/showthread.php?t=5040

Nice link that, interesting stuff!

Hurray Banana said:
It would be nice to hear about the
development of phoenix from the developers viewpoint. I wonder how much
time pressure they were under

Agree Eric, there's some clever stuff in the code, plus some horrible stuff too. I think they were up against it and were forced into releasing a substandard game just to get it out there. It looks like they didn't have great tools available during the programming, a lot seems to have been done by hand and there are a lot of patches in there.

It seems odd that it's such a fondly remembered game considering all of its faults. If only they'd had the chance to get it right...
 
Top