Jump to content
IGNORED

Asteroids Bug


DanBoris

Recommended Posts

John Hardie posted this on the Atari 8-Bit Computer Facebook group, so I thought it would be interested to see why this happens. I downloaded the ROM from Atarimania and was able to reproduce this bug. If you pause the game and wait for it to go into attract mode, when you press the space bar it will un-pause the game, but you will no longer have any control of the your player, and there will be no collision detection. As it says you have to restart the game to fix this. 

 

I disassembled the ROM and the cause was pretty each to find. Memory location $CC is used to keep track of the color cycling during the title page. The title page and gameplay use the same game loop, but if $CC is non-zero the game loop assumes you are on the title screen and skips the player handling code. When you start the game $CC is cleared and the game loop handles the player. The problem comes in when the game goes into attract mode. $CC is once again used for the color cycling, but when you un-pause it never clears this byte, so the game loop now think you are back on the title page and the player handling is skipped. 

 

128145145_10221792434152809_7625945080096801927_o.thumb.jpg.c6e0d0fc9af0b6be1a80ac0b7a8c8f1d.jpg

 

 

  • Like 2
Link to comment
Share on other sites

While looking for this bug I also ran across this interesting piece of code in the display list interrupt handler:

 

B830: AD 0A D2          LDA RANDOM        ;Get a random number
B833: A8                    TAY                      ;
B834: 99 0F B8           STA $B80F,Y          ;Try to write to the cart rom area. 

 

This code gets random number and tries to write it to a random location in the cartridge memory space. I can only assume they were doing this to intentionally crash the game if it is running in RAM instead of on a cartridge. 

 

 

  • Like 2
Link to comment
Share on other sites

4 minutes ago, DanBoris said:

While looking for this bug I also ran across this interesting piece of code in the display list interrupt handler:

 

B830: AD 0A D2          LDA RANDOM        ;Get a random number
B833: A8                    TAY                      ;
B834: 99 0F B8           STA $B80F,Y          ;Try to write to the cart rom area. 

 

This code gets random number and tries to write it to a random location in the cartridge memory space. I can only assume they were doing this to intentionally crash the game if it is running in RAM instead of on a cartridge. 

 

 

Sure looks that way, I remember one disc game that found OmnimonXL and started overwriting itself, I suspect any program at $C000 would have caused this. I seem to remember many carts tried to overwrite themselves as protection.

Edited by Mclaneinc
  • Like 1
Link to comment
Share on other sites

2 hours ago, DanBoris said:

While looking for this bug I also ran across this interesting piece of code in the display list interrupt handler:

 

B830: AD 0A D2          LDA RANDOM        ;Get a random number
B833: A8                    TAY                      ;
B834: 99 0F B8           STA $B80F,Y          ;Try to write to the cart rom area. 

 

This code gets random number and tries to write it to a random location in the cartridge memory space. I can only assume they were doing this to intentionally crash the game if it is running in RAM instead of on a cartridge. 

 

 

Nice work Dan. So the file on Atarimania is an original, unmodified cart dump? Wouldn't it have crashed on you then?

Link to comment
Share on other sites

Likely Atari did their usual trick and ordered 10,000 mask Roms while it was still in Beta, then someone found the bug before (?) the instructions were printed (though that looks like an inserted card and I'm fairly sure Asteroids had a nice A4 sized printed colour manual).

 

Early cartridges had either no or very simple copy protection, I'm fairly sure Star Raiders has something similar.  Most were fairly easy to defeat.

But some later carts, especially 3rd party were much trickier.  I don't think I ever got a Thorn-EMI game to crack and work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...