HectorTelloc's Feed

HectorTelloc
08-17-2019 at 09:33 PM
10 Comments
Rate this Entry

Dragster Analysis: Progress!

This is the most craziest project I have ever took on because I have never done it before. Dissemble a rom and figure out how it works. This is the beginning of my analysis of Dragster for the Atari 2600. At the moment I'm documenting a function that is responsible for drawing the Dragracers. This function is likely reused during the race, and for the second player.

What's interesting is every trick you could possibly think of is employed, like cloning the player one and two sprites, and using them to draw objects on the screen. That's right, the Dragracer are made up of both player 1 and 2 sprites, which have been both cloned 3 times. Using what appears to be a streaming buffer, the clones can be updated to have their own unique look. In this case, the Dragracer is built through this method.

The timing with this buffer has to be accurate as well, I noticed what I believe to be alot of dummy opcodes, and filler code (which may or may not have a purpose) that are used to kill time. The buffer that draws the player sprite has to be ordered correctly as well, so that the graphics are drawn at the right time. There is more to it than that, of which I am still trying to figure out but for the most part I think I got it. However I won't know as I keep analyzing the rom and watching this function at work. More or less, what it does is documented.

Also another point of interest is how the background colors are switched instantaneously while a scanline draws the over all picture. The playfield which is pretty much your barriers and background objects is tweaked alot to do different things, like creating a unique background with different colors. (Even though Dragster doesn't have alot of colors, it does alot to achieve the few it puts on screen.) More or less, I got this down! What amazes even me is I'll be doing more in my spare time. For now I think I made my point.

Eventually I'll get to the heart of the program where the actual algorithm that calculates scores is stored. For now I got all the time in the world to complete this.

Comments
  1. Barthax's Avatar

    The passion to follow through is great if it's your own interest. I thought I'd follow that up as a job a couple of decades back & soon realised doing someone else's work carries little satisfaction. It's great to see the interest spark!

    ThanksHectorTelloc thanked this post
    LikesHectorTelloc liked this post
  2. HectorTelloc's Avatar

    Just to clarify some things about how the 2600 draws to the screen:

    The 2600 has to draw to the screen one scan line at a time. Everything has to be timed perfectly as the cpu is three clocks slower than the televisions electron beam, hence the term racing the beam. The 2600 doesn't have a video buffer, you literally program it to display graphics directly to the tv, you don't have pixels either, what we assume as pixels are stretched out color encoded scanline portions. It's pretty interesting stuff, and for such a small program it is extremely complicated and well thought out and sloppy at the same time. The person who coded this was likely extremely smart. Because everything had to be timed perfectly otherwise things would be out of place.


    In fact portions of the background are out of place, from what I can see on the emulator, but that could just be a Stella quirk.

    Updated 08-18-2019 at 03:57 AM by HectorTelloc
  3. HectorTelloc's Avatar

    Quote Originally Posted by Barthax

    The passion to follow through is great if it's your own interest. I thought I'd follow that up as a job a couple of decades back & soon realised doing someone else's work carries little satisfaction. It's great to see the interest spark!


    As a programmer I have done it all, designed a game engine, worked with databases, built a prototype social network, programmed in assembly, but I have never disassembled a game and reverse engineered it before. I also have never fully taken a project to the polished, final phase. I hope to do that here. There is alot I want to look for to see if a better time is possible on the game. I feel there might be a way.


    But...through this process I am learning and gathering alot of info on how a 2600 game is designed and evolving further as a programmer. Everytime I ever picked apart a project this happens.


    There is ALOT that can be learned from doing this, so for those who have discouraged me from doing so who are actual programmers, it says alot about them. And to others, well, I don't expect them to understand.


    However after this I plan to take my 6502 programming to the next level. I might as well make a game!

    ThanksRogerpoco thanked this post
    LikesRogerpoco, Barthax liked this post
  4. GibGirl's Avatar

    There's a video available of a David Crane talk on programming the 2600 available that goes over all the ridiculous tricks they used to make the games they did.

    ThanksRogerpoco, HectorTelloc thanked this post
  5. datagod's Avatar

    Keep all your notes. This is fascinating, and you definitely have talent. Maybe after this is over you can write a book about 6502 and Atari.

    I worked for a company a few years ago that specialied in "communication interception". They had a guy working in the basement who was a ASM guru and he wrote the low level drivers for hardware. He made a LOT of money.

    I say keep sharpening your ASM. There is work out there that pays top dollar.

    ThanksHectorTelloc thanked this post
    LikesHectorTelloc liked this post
  6. HectorTelloc's Avatar

    Documented two more functions on Dragster (Atari 2600) today. $F4E5 - Which appears to set the placement of the gear shift digits as well as some updates to the background, and $F0A7:F167 - Which loads the gear shift digits to be displayed on screen. Once again the buffers that draw the graphics appear to be a streaming buffer.

    Likesdatagod liked this post
  7. HectorTelloc's Avatar

    Quote Originally Posted by GibGirl

    There's a video available of a David Crane talk on programming the 2600 available that goes over all the ridiculous tricks they used to make the games they did.


    I'll have to find it, I'd love to hear about it. Some of the things they do in this game are amazing considering this isn't that great of a game. They have the whole drawing to the screen down like a science. I have no doubt there was nothing they couldn't do. (Although I think it was David Crane himself who programmed this).

  8. HectorTelloc's Avatar

    Quote Originally Posted by datagod

    Keep all your notes. This is fascinating, and you definitely have talent. Maybe after this is over you can write a book about 6502 and Atari.


    It's funny but, that's actually my end goal for this whole project. What I'm doing here I hope to package and polish into possibly a book. How I'd go about it I'm not sure, or if I would have to break it up. But I plan to publish my analysis, and the documented ROM online for anyone to download, and if I can get away with a book dedicated to this subject than I'll do that as well, or break it up into a free online PDF and book removing all the legal crap.

    Likesdatagod liked this post
  9. GibGirl's Avatar

    Quote Originally Posted by HectorTelloc

    I'll have to find it, I'd love to hear about it. Some of the things they do in this game are amazing considering this isn't that great of a game. They have the whole drawing to the screen down like a science. I have no doubt there was nothing they couldn't do. (Although I think it was David Crane himself who programmed this).

    I was able to find it:



    ThanksHectorTelloc, Snowflake thanked this post
    Likesdatagod, Kelly Kerr liked this post
  10. HectorTelloc's Avatar

    Thanks I bookmarked it, will probably watch it after I take care of some things.

Join us