Jump to content
IGNORED

CENTIPEDE 7800 disassembly...


Blue Azure

Recommended Posts

The long-awaited Centipede is now here. What's the big hoopla about this? The game is great, a super port from the arcade. Atari's CX7801, the first of all ProSystem games. Probably the grand-daddy of all 7800 games. But did it ever receive the attention that its cousin Asteroids received? I don't think so. How many people do you see playing 7800 Centipede today? None. It's laid in the dust for decades at my home. Although Centipede was rumored to be one of two choices to be the internal cart ("pack-in" instead of "pack-out" as they say) vs. the other candidate Pole Position 2 (and Asteroids in PAL), that never happened. In the mid 1980s people seemed more captivated with the tumbling boulders in Asteroids - it was quite a piece of work. But now Centipede steps up with the newly-released disassembly and new-era sample game. ENJOY!!!

 

ABOUT THE DISASSEMBLY…

 

Beware if you go to print this beast, it's about 110 pages for every 16 kilobytes of game code. A tree grows in Brooklyn, so a tree can fall in Brooklyn. A recommended trick is if there's interesting piece(s) of code to look at, copy and paste these section(s) into another file and print those out. The format I use is .rtf (rich text format) which readable by just about every word app on the planet, even Word 6.0.1 on OS9. This is for the people who don't have the tools or the patience to try to read source code listings. I use the Courier font as it is has fixed column spacing, or you could change to the Menlo font if you prefer slashes through your zeroes. As you'll eventually see, you don't have to be a degreed engineer to read the code. In fact, the way to start to read the code is to go to the bottom of the Centipede disassembly document (below) and read the second to last pair of bytes. In Centipede it's $04, $D8. The 6502 microprocessor is hard-wired to read addresses $FFFC and $FFFD to fetch the vector where the code begins to execute. These bytes are read-in backwards, so the vector address for Centipede is D804. Scroll up the disassembly document to address D804 and sure enough, this is where the game begins. For further info, search the internet for 6502 programming, and gain a further understanding of what goes into these Atari games. Look out, you could be programming 7800 games some day!

 

This disassembly was particularly difficult as the source list we have on file apparently was a much earlier version than was released to cartridge. Also it was clear in the early stages of research and development at GCC in Cambridge Mass, the code on the cartridge went through several iterations, in fact this unused code is still on the cartridge!!! This added confusion as I thought I was disassembling one section of code only to find I was somewhere else on the cartridge. Specifically, $F800 is very similar to $E800, but $F800 contains illegal codes and therefore obviously not used during the execution of code in the Centipede game. I never recommend shipping code this way, so my code sample (below) has this block of code zeroed out, and we gained more than a kilobyte of excess space. There is another bug in the code at $CF35, but I ran out of time to study this section of code, which clearly isn't executed during the course of Centipede game play. Also, obviously in the very early stages everyone lent their hands at coding this game. It was too big a job for one person to do everything quickly enough and like at any other start-up company, everyone wanted their chance to showcase their programming skills. The source list shows this, although I've done a lot to make things look universal and added a lot of color, etc, so that the 7800 Centipede can finally gain the recognition that it could have had almost 30 years ago. Usually when I disassemble 16K of code I have about 2 dozen errors detected during cross-check. As I went through so many gyrations to complete this project, there were over 70 errors detected. So this was a big deal to complete this one. Now we have it for all-time, the original code at its complete glory…

 

A WORD ABOUT TRAKBALL GAMES…

The original 1984 Centipede code has some (all?) Trakball code resident in the game. In this case it's been bypassed for Joystick input only. Eventually the Centipede Trakball version was developed and released. Does anyone know who/where this came from? Just curious. I recommend when we build 7800 Millipede that there's a select for Trakball and/or Joystick input on the game set-up screen. Millipede probably won't cram on a 16K cart, so just like the 5200, the Centipede was 16K and the Millipede was 32K. Just dreaming...

 

CENTIPEDE disassembly

Centipede 78 Disassembly7.rtf

 

Upon developing my "invincible" version it was found that the game hiccups if you start with 0 (zero) extra lives or more than 31 extra lives. In the 0 extra lives case, there's a zillion mushrooms placed at the top of the screen which you can't shoot and "kill" (actually there are 7 rows of 31 mushrooms and one row of 13 mushrooms for a total of 230 mushrooms). When you lose your first life, the mushrooms are converted to 5 points per mushroom bonus and then you die and then - game over - nothing you can do about it. Starting the game with over 31 lives results with a crazy situation as well. The game begins with 2 rows of 31 mushrooms and 1 row of 12 mushrooms at the top which you can't shoot/kill. At the first death, you get 5 points bonus for each mushroom at the top of the screen and at re-rack you go invisible and you're trapped at the top of the screen in a jungle of mushrooms, at the 2nd level. You start shooting and work your way to the bottom of the screen, and everything is normal except you're invisible, or actually 1 pixel wide so you're not invincible. At the second death your shooter is back to normal and the game returns to normal, sort of. I didn't opt to use either of these versions. Given the mod instructions given below, you could easily create these sample programs and view their operation for yourself.

 

Introducing…CENTIPEDE+…an all-new game, and yet the same old game built-in.

 

CENTIPEDE+ FEATURES…

 

* Starts with 1 extra life instead of 2 in the original game. You will not need to start with any more extra lives.

* Additional Life added at 12,000 points just like the original game, and every 12,000 points thereafter, up to 31 lives, instead of 6 in the original game.

* New concept - when you die, you don't lose a life. I kinda like that.

 

HOW IT WAS DONE…

 

First the game was disassembled so we know what happens where and when. For a 16K game, the 27128 EPROM spans from $0000-$3FFF, and when the cartridge is installed the code is mapped to $C000-$FFFF.

 

CODE CHANGES FOR CENTIPEDE+

$DE3A changes from $C9 $06 to $C9 $1F (maximum of 31 extra lives)

$E478 changes from $A2 $02 to $A2 $01 (# of extra lives at start of single-player game)

$E488 changes from $A2 $04 to $A2 $02 (# of extra lives at start of dual-player game)

$E628 changes from $DE $0E $21 to $EA $EA $EA (we don't want GAME OVER)

$E6E7 changes from $20 $D9 $E7 $CE $0E $21 to $EA $EA $EA $EA $EA $EA

$E717 changes from $20 $D9 $E7 $CE $0F $21 to $EA $EA $EA $EA $EA $EA

$E722 changes from $20 $D9 $E7 $DE $0E $21 to $EA $EA $EA $EA $EA $EA

 

CODE CHANGES FOR TRAKBALL CENTIPEDE+

$DE36 changes from $C9 $06 to $C9 $1F (maximum of 31 extra lives)

$E46B changes from $A2 $02 to $A2 $01 (# of extra lives at start of single-player game)

$E47B changes from $A2 $04 to $A2 $02 (# of extra lives at start of dual-player game)

$E616 changes from $DE $0E $21 to $EA $EA $EA (we don't want GAME OVER)

$E6D4 changes from $20 $C7 $E7 $CE $0E $21 to $EA $EA $EA $EA $EA $EA (no GAME OVER)

$E705 changes from $20 $C7 $E7 $CE $0F $21 to $EA $EA $EA $EA $EA $EA (no GAME OVER)

$E710 changes from $20 $C7 $E7 $DE $0E $21 to $EA $EA $EA $EA $EA $EA (no GAME OVER)

 

There was once, and always will be a PacMan Plus. Now there's a Centipede Plus. New for 2013.

 

NTSC Centipede+

CENTIPEDEPLUS_NTSC_C5BC.bin

CentipedePlus_NTSC_16K.a78

PAL Centipede+

(There was no PAL Centipede according to my records. If you have it, gimme it and I'll "fix" it).

 

Centipede+'s brother, Trakball Centipede+

CENTIPEDEPLUS_TBALL_NTSC_6FDB.bin

CentipedePlusTball_NTSC_16K.a78

Does this work on SDL/MESS? Trakball emulation isn't on the ProSystem Emulator.

 

Whew, that was a lot of work.

 

NEXT UP> 7800 GALAGA

Link to comment
Share on other sites

True. And over 300,000,000 Americans (and Canadians) can't read those files.

 

But 3,770,000 Atari 7800 owners can read my files. And then what happens?

 

Build it and they will come...

Can't read them why?

 

Anyhow - this must be a huge amount of work, so thanks for spending the time and for sharing.

Link to comment
Share on other sites

I don't think much of the source code Curt posted was complete. Thanks for B.A. It will be fun to look at the code and nice to have a cheater Centipede to play the higher levels.

 

Allan

 

I can't speak to most of the games but I can say that Digdug is complete and nearly final. For my Digdug project I pieced together all the files, assembled it and found only a handfull of bytes that didn't match the production rom. I updated those so the source code is now an exact match to the production code. Took all of an hour. Guess I was lucky. :)

Link to comment
Share on other sites

 

 

I can't speak to most of the games but I can say that Digdug is complete and nearly final. For my Digdug project I pieced together all the files, assembled it and found only a handfull of bytes that didn't match the production rom. I updated those so the source code is now an exact match to the production code. Took all of an hour. Guess I was lucky. :)

Hi Perry

Is your Dig Dug project available for download?

greetings Walter

Link to comment
Share on other sites

Yo Perry, can you "gift" DIG DUG to us? Complete (as it sounds like) or incomplete it's OK. You'll get FULL credit, unless you don't want it. One less title for me to do, that's what I'm looking at. The longer the delay on this, the longer delay on other projects...

 

Herr Walter, I'll be in Germany in July. I'll probably be flying into Dusseldorf (cheapest way there) and have an office in Emden and relatives in Dresden. Where are you? I picked up a copy of PAL Centipede today, and assuming it's functioning, I can post up probably by tomorrow.

 

Now I remember it was Kenfused that did T-ball for Centipede. Major THX to you. From what I can see the binary was majorly scrubbed from the original, so thanks for that as well. By the by, did anyone test my version of Centipede+ with a trakball? My trakball is still missing...somewhere.

 

To my awareness, the missing source lists for the original 11 +/- games are CX7808 PolePosition2 and CX7815 Ballblazer. Or maybe I'm wrong, anyone have those?

 

To answer the other question, most people can't read the original source files because I thought you need a special tool to read them. I use things like BBedit. The source lists have sat for years and I wasn't sure anyone was looking at them. My thought was to bring these back to the 4front and stimulate some action. And action we do have...

 

"Keep releasing trainers!!" You haven't seen the 7800 in full action until you see the all-new CX78109 7800 Robotron X for 2013. I quit my first non-stop game play verification session at level 262 because my hand/wrist was hurting so bad. Due to be released by next week. And Galaga the week after. It's all happening right here and right now.

Link to comment
Share on other sites

Yo Perry, Thanks for your DIG DUG "gift." It has been received super happily. I'm happy, my dog is happy, etc. Now the question is, have you or anyone we know re-constructed ROBOTRON? This is one big mess. I was able to cook up a cool mod without doing a complete disassembly, of course. But now the disassembly lay in wait, cuz I know I can't do it, or should not do it with my current procedures. There's just way too much variance from the original ROBOTRON.

 

The CENTIPEDE+ for PAL modification is ready. The changes from the released CENTIPEDE to CENTIPEDE+ are identical to the NTSC (non-Trakball) version. Which prompts me to ask, what makes the PAL different from NTSC? Probably colors? There must be a PAL Maria vs. an NTSC Maria, and shouldn't that handle everything? Just a dumb question, I just don't know.

 

In basic terms, as in the NTSC version, this version allows you to play CENTIPEDE forever. You're not invincible, however, you will die, but you will not lose lives, and you will receive a bonus jingle and added life at every 12,000 points up to a total up to 31 lives. I could have created an invincible version, but it seemed like it would be too much like "cheating." I prefer to promote training aspects for each game, so you can improve your skills and return to the original game and see how your scores improve. At least now you can play CENTIPEDE without worrying about dying.

 

 

PAL Centipede+

CENTIPEDEPLUS_PAL_0F89.bin

CentipedePlusPAL_16K.a78

 

This closes my activity on 7800 CENTIPEDE for now. Hope you all enjoyed.

Link to comment
Share on other sites

There's just way too much variance from the original ROBOTRON.

 

If you search the 7800 programming section you'll find a thread containing somebody else's reverse engineering and source code commenting work on Robotron (from last year). The source code that Curt provided to the community for Robotron is not for the version of MARIA that shipped in the consumer units. Its for an earlier revision of the silicon so its no surprise to me that that there are a ton of differences ;).

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...