Jump to content
Sign in to follow this  
robotrondev

Robotron 2084 disassembly inspection

Recommended Posts

Hi, I developed a version of Robotron 2084 for the PC a few years back using the Dark GDK and C#.NET . I never finished it though because I couldn't understand how the Enforcers and Tanks worked, their behaviour seemed pretty random.

 

So fast forward a few years to now, I found out that Robotron 2084's Atari 7800 source was released... I took a look. I used to develop in 6502, Z80 and 68000 back in the day so wondered if I could reverse engineer the enforcer & tank logic and finally finish my game.

 

As you probably know the source released on AtariMuseum for Robotron 2084 is *NOT* complete - it looks like an early build, there's a lot of code missing, e.g. the grunt to electrode collision detection.

 

Then I found Dan Boris' disassembly of the final result and that shed a lot of light on the system. It was fantastic, because I couldn't find a 7800 rom disassembler that would deal with the .a78 file I had (I'm new to the Atari 7800). However, it still wasn't complete enough for my needs.

 

So, I decided to reconcile the early source code with the finished source code, and with a bit of deduction work have expounded on Dan's work considerably. Not 100% but....

 

I attach the disassembly file, hopefully this will help others understand and maybe one day a full reverse engineering will be possible.

 

Thanks to Dan Boris for getting the ball rolling and Atarimuseum for the original sources.

ROBOTRON.zip

  • Like 1

Share this post


Link to post
Share on other sites
As you probably know the source released on AtariMuseum for Robotron 2084 is *NOT* complete - it looks like an early build, there's a lot of code missing, e.g. the grunt to electrode collision detection.

 

I looked at that source code a while ago and to me it seems that it was for a version of MARIA (7800 video chip) that was never released in the consumer machine.

 

Thanks for the improved reverse engineering listing. Does it build an exact byte to byte copy of the original?

Share this post


Link to post
Share on other sites
As you probably know the source released on AtariMuseum for Robotron 2084 is *NOT* complete - it looks like an early build, there's a lot of code missing, e.g. the grunt to electrode collision detection.

 

I looked at that source code a while ago and to me it seems that it was for a version of MARIA (7800 video chip) that was never released in the consumer machine.

 

Thanks for the improved reverse engineering listing. Does it build an exact byte to byte copy of the original?

 

As far as I can tell, the updated listing is byte for byte, yes. It covers from $8000 - $FFFF in the address space so, yes I expect so. It's a 32K cart is it not?

 

My next goal with the listing is to understand what the important zero page variables are, and also what some of the magic numbers are, e.g. in the sprite state tables. There are bit flags set which need decrypting.

Edited by robotrondev

Share this post


Link to post
Share on other sites

Hi, I developed a version of Robotron 2084 for the PC a few years back using the Dark GDK and C#.NET . I never finished it though because I couldn't understand how the Enforcers and Tanks worked, their behaviour seemed pretty random.

 

Eugene Jarvis himself said that there was a bug in the AI for them that he left in the code, and that's what created their cool behavior. Hard to reverse engineer something like that :D

Share this post


Link to post
Share on other sites

OK, I've made more progress. In fact, I've made a LOT of progress since last time.

 

The original source code was a boon when working out what the lookup tables are and how they are used. I also managed to find the routines for every entity in the game, and have labelled them.

 

I even have managed to map some of the labels from the original source code to the actual game source..

 

However, I'd really appreciate help here. If some of you guys who are into this as much as I am could peer review what I've written, or maybe fill in the blanks (esp. with respect to I/O port mapping: the sound, joysticks & graphics chips inc DLIs) I'd appreciate it a lot.

 

There's some crazy carry-flag based stuff going on, and BEQs/BNEs where I don't see a zero-flag op before, and all kinds of stuff that needs a 6502 expert.

 

There also are some tables that I don't know the purpose of, and I am sure once their purpose is known the rest will fall into place.

 

If I could play Robotron 2084 on the Atari 7800 then just pause its state and inspect the memory I think I might have more of a fighting chance understanding what some of these magic tables are. But I don't know how.

 

Anyway, I attach the latest source code.

 

Dan Boris, if you want to upload this copy to your museum feel free.

 

Slowly but surely I am getting there.

 

Regards to all,

Scott

ROBOTRON.zip

Edited by robotrondev

Share this post


Link to post
Share on other sites

Hi, I developed a version of Robotron 2084 for the PC a few years back using the Dark GDK and C#.NET . I never finished it though because I couldn't understand how the Enforcers and Tanks worked, their behaviour seemed pretty random.

 

Eugene Jarvis himself said that there was a bug in the AI for them that he left in the code, and that's what created their cool behavior. Hard to reverse engineer something like that :D

 

Yeah, I've taken a look at the 6809 disassembly for the arcade Robotron also. Never been a 6809 programmer so understanding what the code is doing, without comments, isn't easy.

 

I wonder if the Atari 7800 developer had access to Eugene Jarvis' source code???

Share this post


Link to post
Share on other sites

If I could play Robotron 2084 on the Atari 7800 then just pause its state and inspect the memory I think I might have more of a fighting chance understanding what some of these magic tables are. But I don't know how.

 

You could probably do that with a 7800 devcard. I have one but don't have time right now to set it up and mess with it. You may be able to do it with the MESS emulators debug feature as well.

 

Mitch

Share this post


Link to post
Share on other sites

Right, I got MESS front end and MESS set up. It's fantastic to see the registers updating in real time.

 

I hope this will assist my reverse engineering endeavours.....

Share this post


Link to post
Share on other sites

Updated the disassembly and have most of the AI done.

 

Bits left to do, I would still like help with the 7800 specific stuff like DLs, Zones and stamps etc.

 

However, check out the disassembly and enjoy. It's really smart how so much was packed into so little space.

 

If you spot any errors, let me know in this thread and I'll correct them.

 

S.

ROBOTRON.zip

  • Like 1

Share this post


Link to post
Share on other sites

I have to bump this thread.. I used to do a lot of assembly on the C64.. I used a tools cartridge

called warpspeed to inspect and change code.

I will look through the code and see if I can make some discoveries.

 

It would be cool to see one day if I can make my own 7800 cart-rom

Share this post


Link to post
Share on other sites

Hello Robertski,

 

I posted my latest ROBOTRON disassembly recently - not sure you saw it. I am looking to fill in the details on TUNES starting at $E67A and called by DOTUNE $E395, and ultimately looking to port this title to PAL. There is another thread on here 7800 PAL ROBOTRON development .

 

I again attach it here for your reference...

 

NTSC ROBOTRON Disassembly

RobotronDisassy2013.rtf

 

Enjoy!

///BLUEman///

Share this post


Link to post
Share on other sites

Hi, just wanted to comment on this thread in case anyone is still interested in this, don't know if anyone will ever read this but what the heck!

I was the lead programmer on the 7800 Robotron. I just stumbled onto this site and was excited to see my 30 year old source code!

 

Unfortunately as you discovered, the source code is from a development version and is incomplete. I could tell right away because the Wave Table which we laboriously derived from watching videos we made of Robotron arcade machine gameplay, is incomplete - not defining waves 20-40. This table is used to define how many of each object type to spawn for each wave (Robotron waves repeat waves 20-40 once wave 40 is passed).

 

Someone in the thread asked if we had access to the Robotron arcade source code. We did not. We did not take a ROM dump either, in general when we did our conversions since we knew we could only approximate the gameplay we went for reimplementation instead of trying to port the code. In Robotron's case I suppose it would have made our lives easier to have access to their equivalent of the wave table, but it would have been very difficult to disassemble all that on our tight schedule.

 

I got an interesting anecdote from a Williams programmer at a PAX panel we were on. I asked him why source code was not provided, he said that most often when they were getting a new arcade machine ready to ship they were making their final tweaks and patches right in the machine code, and were not changing the source at all, just tweaking tables and constants. When they had it the way they liked it they dumped it and burned it to make the production ROM. So there was no source code in existence that reflected the final game.

 

I may still have listings at home, though that won't do much good, who'd want to retype all that? I still have some 8" floppies that I think have the final source that may or may not be readable if such drives existed anymore and could read the format :)

 

Anyway, wanted to say hi, glad to see there is interest in this. I loved Robotron and it was quite an honor to be able to do the 7800 conversion of it.

  • Like 12

Share this post


Link to post
Share on other sites

Welcome Solrax! While I'm not an assembly programmer myself, it's always exciting to see the old school programmers pop in on the AtariAge forums. Robotron was one of my favorites and your conversion was fantastic. :) I bet there's someone out there that would love to help try and read those old 8" floppies. ;)

  • Like 2

Share this post


Link to post
Share on other sites

Hi, just wanted to comment on this thread in case anyone is still interested in this, don't know if anyone will ever read this but what the heck!

I was the lead programmer on the 7800 Robotron. I just stumbled onto this site and was excited to see my 30 year old source code!

I may still have listings at home, though that won't do much good, who'd want to retype all that? I still have some 8" floppies that I think have the final source that may or may not be readable if such drives existed anymore and could read the format :)

 

Anyway, wanted to say hi, glad to see there is interest in this. I loved Robotron and it was quite an honor to be able to do the 7800 conversion of it.

 

If you still have the printouts and can scan them that would be great! OCR can do pretty good now, though you still have to go through it to verify it. Several people have done this for some old 2600 games.

 

I think Glenn Bruner used to be able to pull data off of 8 inch floppies, but I haven't seen him around recently.

 

Mitch

Share this post


Link to post
Share on other sites

Wow, threads like this are what make AtariAge so great. The original programmer shows up!

 

I'm surprised that Williams didn't help out more with developing ports of their games, considering a good port would reflect well on them and they'd want to keep their IP from being tarnished.

 

But I guess time is what no one had enough of back in the day.

  • Like 1

Share this post


Link to post
Share on other sites

Robotron in the arcades is one of my all time favorite arcade games with awesome action.

Last night I got to wave 10 and around 200k points with the standard Atari controller.

Robotron 7800 is the killer app for the platform.

 

you should also know people are paying around 150 dollars for a dual controller just to play your game

http://www.edladdin.com/Super-Twin-78-ec-1-002.htm

 

Thank you for a superb game. Is there anything you would have changed / added / improved if you had been given more time?

Share this post


Link to post
Share on other sites

Solrax, I purchased one of those $175 dual stick controllers just to play your great game. It is one of the best games I have ever played. Thanks for porting this to the 7800! Its an honor to have you on the forums.

  • Like 1

Share this post


Link to post
Share on other sites

Hi, just wanted to comment on this thread in case anyone is still interested in this, don't know if anyone will ever read this but what the heck!

I was the lead programmer on the 7800 Robotron. I just stumbled onto this site and was excited to see my 30 year old source code!

 

Unfortunately as you discovered, the source code is from a development version and is incomplete. I could tell right away because the Wave Table which we laboriously derived from watching videos we made of Robotron arcade machine gameplay, is incomplete - not defining waves 20-40. This table is used to define how many of each object type to spawn for each wave (Robotron waves repeat waves 20-40 once wave 40 is passed).

 

Someone in the thread asked if we had access to the Robotron arcade source code. We did not. We did not take a ROM dump either, in general when we did our conversions since we knew we could only approximate the gameplay we went for reimplementation instead of trying to port the code. In Robotron's case I suppose it would have made our lives easier to have access to their equivalent of the wave table, but it would have been very difficult to disassemble all that on our tight schedule.

 

I got an interesting anecdote from a Williams programmer at a PAX panel we were on. I asked him why source code was not provided, he said that most often when they were getting a new arcade machine ready to ship they were making their final tweaks and patches right in the machine code, and were not changing the source at all, just tweaking tables and constants. When they had it the way they liked it they dumped it and burned it to make the production ROM. So there was no source code in existence that reflected the final game.

 

I may still have listings at home, though that won't do much good, who'd want to retype all that? I still have some 8" floppies that I think have the final source that may or may not be readable if such drives existed anymore and could read the format :)

 

Anyway, wanted to say hi, glad to see there is interest in this. I loved Robotron and it was quite an honor to be able to do the 7800 conversion of it.

 

Solrax, thank you so much for the 7800 version. It was the version I grew up with other than playing it in the arcades and it is awesome. It's an honor being in your online presence!

 

I like it so much that it's the main reason why I have the 7800 ProLine Joystick Coupler [only 2 are known to exist still] in my possession. Man, I wish Tramiel's Atari Corp would've produced it although it's questionable they would've spent the money to do so had they a.) had these 2 production models in their possession, or b.) had the actual design drawings in their possession as well. After all, they certainly never brought out the High Score Cartridge and that like the Coupler would've been something I would've bought as a kid! Forgot about the GUMBY chip too although most of us have heard that was barely worked on.

 

Did you do any other 7800 titles? How about 2600 or 5200 titles?

 

While you're here, do you know who at GCC did 7800 Elevator Action? If so, do they still have a copy of it? :) Most of the other "lost" 7800 games were long after GCC's involvement although some believe GCC worked on - or was planning to work on - Tempest, Crystal Castles, Moon Patrol, Millipede, and Demolition Derby.

 

Thanks again… Robotron: 2084 is definitely one of the best titles in the 7800's library, both from the original commercial library and all of the home brews that have been created ever since! Please check out the home brew titles that have been developed since the 00s.

Edited by Lynxpro

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...