4 A GOOD TIME JSR 91BDAtari's Super Pac-Man Easter Eggby Don Hodges 7/12/2009
The 1982 arcade game, Super Pacman, was ported to the Atari 8 bit systems by Landon Dyer in 1984. In his blog post about the development of the game, he writes:
At the Digital Press web site, they are offering a bounty of $75 for whoever can figure out what this Easter egg is and how to trigger it. No other information is given about what it might be. Even the game's author had forgotten everything about it, except that it was there, in the final version of the game. I am pleased to announce that I have found this Easter Egg. Here is how to trigger it: 1. Play a game and finish a stage. 2. After the stage is complete, the screen will flash a few times. 3. Press reset when the screen is flashing the yellow color. [On the Atari home computers, you can press OPTION or SELECT. On Atari 5200, press * or # on the controller pad] 4. You will see the following text scroll across the bottom of the screen: 4 A GOOD TIME JSR 91BD. Look sharp! The text will scroll away quickly, and will not return until the egg is triggered again.
A video of this feat being accomplished is here:
What does the text mean?"4 A GOOD TIME JSR 91BD" Obviously this is a play on the old, "For a good time, call 123-4567". In the Atari systems, the main CPU is a 6502 and contains an instruction named JSR. This stands for Jump to SubRoutine - it is the computer assembly language equivalent of "CALL". The final "91BD" is a computer memory address, written in hexadecimal (base 16). In decimal, this number is written 37309. As of the initial writing, I do not yet know what the significance of this number is, if any. In the game's code (see below), memory location 91BD contains data, not instructions, so if you actually did a JSR 91BD in this game, you would not get very far. Maybe the game's designer can shed some more light on this topic, after he reads this article to "refresh his memory" [no pun intended].
Technical DetailsHow did I figure this out? Admittedly, this Easter egg is a lot easier to trigger than the one that the same programmer put into his port of Donkey Kong. I probably could have triggered it by accident, but this was not the way that I found it. As it is, if you press reset randomly at the end of a stage while the screen flashes, 50% of the time (more or less) you can trigger the egg to appear. However, I discovered the egg by digging into the game's 6502 assembly language source code, and using the MESS emulator and the Atari800Win PLus 4.0 emualtor. After decoding the text that normally scrolls across the bottom, we find the following starting at memory #99B5 99B5: 00 00 14 00 21 00 27 2F 2F 24 00 34 29 2D 25 00 2A 33 32 00 19 11 22 24 The zero's are blank spaces, and each byte represents a letter or number, with numbers 0-9 represented by #10-#19, and letters A-Z represented by #21-#3A. With this scheme, the code translates into " 4 A GOOD TIME JSR 91BD" After finding this, it was a relatively simple matter to find where it is triggered: 92E4: AD 43 8A LDA $8A43 ; load A with data from ROM, value is always #88 92E7: CD C6 02 CMP $02C6 ; == COLOR2 register ? 92EA: F0 0E BEQ $92FA ; yes, branch ahead, no Easter egg for you! ; Easter egg code follows 92EC: 8D C6 02 STA $02C6 ; store A into COLOR2 92EF: A2 17 LDX #$17 ; for X := #17 to 0 92F1: BD B5 99 LDA $99B5,x ; load a character of the Easter egg text 92F4: 9D 16 05 STA $0516,x ; store it into scroll text RAM 92F7: CA DEX ; X-- 92F8: 10 F7 BPL $92F1 ; Next X 92FA: ... This code is run once after every reset. Normally, the COLOR2 register at memory location #02C6 has the value of #88, for regular screen colors. So, usually at line #92E7 when the check is done against the value in ROM, they are the same and the egg remains hidden. During the flashing at the end a stage, this memory location is toggled between #88 and #0C to achieve the flashing effect. So, if the game is reset while the screen is flashed yellow, the Easter Egg will be triggered to appear.
Comments & ConclusionsFinding this Easter egg was pretty daunting. First, I did not know what I was looking for, or how it might be triggered. Early attempts to isolate the trigger focused on joystick movements, player score values, high score values, and so on, with no success. The text in the game was pretty hard to decode - it is not just stuck in there as ASCII text which would easily show up in a memory dump. It had to be decoded by hand. I figured that if I could decode the text, I might run across a hidden message - and this is exactly what eventually happened. It took a long time, and I was beginning to suspect that the egg did not exist, or was somehow not inside the code that I was looking into. This was a pretty satisfying find, and one that will require some follow-up with Landon Dyer to see if there is any significance to the hexadecimal number, 91BD. Any ideas?
Updates7/12/2009: I have received email from Landon Dyer and he has posted about this to his blog. Part of his message addresses my question. He writes, in part, At one point the code at that address did put up a message or something. ... ... So all I did was to repurpose some display code I already had around, and stuck that scrolling message in. 91BD was supposed to do something more interesting (I dunno, maybe a shower of pacmen or ghosts or something), but I didn’t finish it up. So there you have it. Mystery solved?
|
In accordance with Title 17 U.S.C. Section 107, some of the material on this site is distributed without profit to those who have expressed a prior interest in receiving the included information for research and educational purposes. For more information go to: http://www.law.cornell.edu/uscode/17/107.shtml. If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner. |
|
|
|