Slashdot Mirror


Atari 2600 Programming Tutorial

An anonymous reader writes "Anyone want to learn how to program the Atari 2600? 128 bytes of RAM, and you feed the TV each scanline yourself! There's a tutorial running on AtariAge. So far, its being updated every day. Good stuff." Sure, it might not be the most practical of platforms, but what other 20 year old platform is so dear to our hearts?

37 comments

  1. Re:OK, a little nostalgia is fine by pr0c · · Score: 1

    But walking and trying finding a cure for cancer is older than an atari2600!

  2. Nintendo! by Tom7 · · Score: 2, Insightful

    > ... but what other 20 year old platform is so dear to our hearts?

    Um, Nintendo?

  3. Answer to CoboyNeal's question by peel · · Score: 4, Funny
    "Sure, it might not be the most practical of platforms, but what other 20 year old platform is so dear to our hearts?"

    Well the NES only has two years to go and it will be 20 years old. In three years it will legally be able to drink in the US. -peel

  4. Commodore by rogerl · · Score: 3, Insightful

    ...but what other 20 year old platform is so dear to our hearts?

    Commodore VIC 20, 64, and 128.

    Decent graphics and good sound for the times.

    1. Re:Commodore by zonker · · Score: 0

      colecovision, introduced in '82. had better games than an atari 2600, better ports of arcade games and with an expansion unit, you could play 2600 games on it. until nintendo released the nes, it was the best game system on the block, and it sat in my living room. it is still near and dear to my heart (and still works, along with about 20 games!). :)

    2. Re:Commodore by DeeBye · · Score: 1

      Hell, yeah!

      When I was a wee lad, my parents bought me a Colecovision ADAM computer. It was basically a Colecovision attached to a keyboard and tape drive, which ran a version of Apple's BASIC (called SmartBASIC, IIRC). It even had a daisywheel printer, and was a pretty nifty word processor/electronic typewriter. The case of the ADAM was pretty big. There was one tape drive included, and there was a space for an expansion drive right next to it.

      The games were pretty damned good, as I recall. The graphics were easily 4x better than the Atari 2600. I even liked the funky controller, which consisted of a joystick, 2 "fire" buttons, and a numeric keypad all in a handheld unit.

      My ADAM came bundled with a cartridge game called "BC's Quest for Tires", based on the newspaper comic strip. Great game -- I wasted away many hours playing it.

      It also came with a tape game (ADAM only -- no Coleco cartidge version) based on Buck Rodgers. I can't recall the exact name of the game, though it might simply have been "Buck Rodgers". It was your basic 3/4 view scrolling space shoot 'em up, and had more levels than I had ever seen on any game at the time. The sound was superb, and the graphics were great.

      I had a friend who also owned an ADAM, and he was lucky enough to own "Donkey Kong jr." (also on tape). It was, bar none, the BEST game I ever played up to that point. I simply could not believe that SO MUCH GAMEPLAY could be packed into a little tape. It was better than 99% of the arcade games at the time.

      I'm not sure what happened to that ADAM, but I suspect that it was sold to a lucky person during one of my family's many garage sales (knowing my dad ~~ probably for the measly sum of $5).

  5. How to transfer to ROM cartrige?? by mnmn · · Score: 1


    It would be nice to find programmable ROM cartriges for the 2600. It would be great to develop new-name games for it, like Matrix, TuxRacer.

    Even a PC-XT 8086 can be used to host static webpages using Minix, I wonder if a serial protocol can be used for one of the connectors (joystick? expansion slot?) and static ROM-based http pages sent out on basic requests. That would be a world record. Possibly also a record for the most slashdottable site.

    Another interesting idea is for some small company to develop gameboy-size atari 2600 pads with most of the games built in. Could even be incorporated into cell phones, now that I would buy.

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
    1. Re:How to transfer to ROM cartrige?? by lightspawn · · Score: 4, Informative

      t would be nice to find programmable ROM cartriges for the 2600.

      Sorry, but the Cuttle Cart has been discontinued. I'm sure there are alternatives, though.

      Another interesting idea is for some small company to develop gameboy-size atari 2600 pads with most of the games built in. Could even be incorporated into cell phones, now that I would buy.

      Go ahead.

      But if we could only combine current media (an 8/16 MB compactflash card could hold every version of every game ever written for this machine) you'd have something. Especially now that Sean Kelly doesn't seem to be able to offer his carts for sale any more. Sorry.

      I should really have split this to 3 different posts to max the karma benefits. Oh, well. Maybe I'll get the rest in offline karma.

    2. Re:How to transfer to ROM cartrige?? by DeadMeat+(TM) · · Score: 1
      But if we could only combine current media (an 8/16 MB compactflash card could hold every version of every game ever written for this machine) you'd have something.
      Ask and ye shall receive.

      Unfortunately, it's not cheap, and it requires a much-harder-to-find Atari 7800, but it's a big step in the right direction.

    3. Re:How to transfer to ROM cartrige?? by TheAlchemist · · Score: 1

      There actually is a great deal of homebrew development going on for the 2600 right now. In fact, quite a few games have already been released in cartridge form. We use new circuit boards, create high-quality labels and manuals, and only have to recycle cartridge shells. There are some fantastic homebrew games on the 2600 that easily rival the best commercial releases of the past. Some info about our homebrew services can be gleaned here.

  6. Don't bother unless you're REALLY interested by lightspawn · · Score: 4, Informative

    The '2600 has only one line of video memory (to oversimplify the architecture). This means that you have to count clock cycles exactly and do most of your work between the last pixel of one line and the first pixel of the next, or between one frame and the next.

    Bottom line: This machine is harder to program than probably anything else you've ever worked on, and not necessarily in a good way.

    Even if you're interested in classic gaming, wouldn't you rather spend your own clock cycles, say, porting some classic games to your favourite current architectures? If you can really use the challenge, maybe you should study the '2600, and reverse engineer them to make sure the conversion is accurate...

    1. Re:Don't bother unless you're REALLY interested by david+duncan+scott · · Score: 3, Interesting

      It wasn't all that hard. I'd wager any good programmer could pick it up, and I know at least one not-so-good programmer who managed to get out a game.

      --

      This next song is very sad. Please clap along. -- Robin Zander

    2. Re:Don't bother unless you're REALLY interested by ClosedSource · · Score: 1

      Hard or not, it makes programming games on other systems trivial by comparison (Obviously the amount of code in a modern game is orders of magnitude larger so I'm not talking about size or development time).

      Name any other software you're aware of that requires software timing accuracy down to 1 CPU cycle (Certainly no software running on a PC since that kind of software timing accuracy is impossible). That isn't necessary for all 2600 games, but it is for some.

      Remember that the system has only 128 bytes of RAM, no interrupts, and horizontal positioning is performed by timing rather than by value.

      Writing for the 2600 was a worthwhile challenge in its day. It strikes me as a rather academic challenge now.

      Perhaps the state-of-the-art in games is so good now that players don't get blown away anymore no matter how well programmed they are. If so, it's too bad.

      On the other hand, today's games are more about the art and less about the technology and I suppose that's the way it should be.

    3. Re:Don't bother unless you're REALLY interested by zonker · · Score: 0

      On the other hand, today's games are more about the art and less about the technology and I suppose that's the way it should be.

      gee, and i thought it was about the gameplay. silly me.

    4. Re:Don't bother unless you're REALLY interested by david+duncan+scott · · Score: 1
      Remember that the system has only 128 bytes of RAM, no interrupts, and horizontal positioning is performed by timing rather than by value.

      Trust me, I remember.
      --

      This next song is very sad. Please clap along. -- Robin Zander

    5. Re:Don't bother unless you're REALLY interested by ClosedSource · · Score: 1

      Well, at least I gave you an excuse for a little self-promotion.

    6. Re:Don't bother unless you're REALLY interested by ClosedSource · · Score: 1

      I guess we're both silly, then. I thought gameplay was part of the art.

    7. Re:Don't bother unless you're REALLY interested by david+duncan+scott · · Score: 1
      Well, there's a reason that the game gets a "very rare" -- it wasn't all that good then and certainly nobody much cares now.

      I'm just saying that it wasn't Mel-like work. It helped to be clever, of course, but if I could get something to run then almost anybody could.

      I mean, on the bright side, the "manual" that we used at Avalon Hill was about twenty pages long. There was no need for 500-page guidebooks that are yet incomplete for such a brutally simple platform.

      --

      This next song is very sad. Please clap along. -- Robin Zander

  7. Re:OK, a little nostalgia is fine by mnmn · · Score: 3, Interesting

    A little nostalgia is fine, any more is not?

    I used to try and program my Commodore 64. Now I sometimes develop for embedded applications. Its nice to go back to old game consoles which some people still use, and develop something for it. For our expertise, the 2600 is quite easy and a nice way to relax for embedded developers, who knows, maybe it would be incorporated into cell phones.

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
  8. Was that a rhetorical question? by Anonymous Coward · · Score: 0

    what other 20 year old platform is so dear to our hearts?

    The Spectrum.

  9. Great! by Randolpho · · Score: 1

    Maybe now somebody will come up with a decent version of pacman.

    --
    "Times have not become more violent. They have just become more televised."
    -Marilyn Manson
    1. Re:Great! by lightspawn · · Score: 1

      Maybe now somebody will come up with a decent version of pacman.

      Too late.

    2. Re:Great! by david+duncan+scott · · Score: 1
      Everybody hates the flicker, but it's hard to do three ghosts and Pacman himself without screen flipping. You've only got two players to work with, and even with the double and triple modes it gets pretty hairy.

      Personally I though they probably should have swallowed hard and just screen-flipped all the time. At least then the annoying flicker would have been omni-present, instead of kicking in and out.

      --

      This next song is very sad. Please clap along. -- Robin Zander

    3. Re:Great! by lightspawn · · Score: 2, Funny

      It's OK if the ghosts flicker. That's what ghosts do, you know.

    4. Re:Great! by TheAlchemist · · Score: 1

      You mean like this? This is a hacked version of Atari's Ms. Pac-Man, and is a much better version of Pac-Man than the one Atari originally released. There is also a version of Pac-Man programmed from scratch by Ebisoft, but only a few copies were made.

    5. Re:Great! by TheAlchemist · · Score: 1

      Ebivision, even, not Ebisoft. D'oh!

    6. Re:Great! by david+duncan+scott · · Score: 4, Informative
      Well, the ghosts, sure. Problem is that the whole screen flickers.

      The thing is that on any given scan line one can draw two independent objects, two players. Either can be doubled or even tripled, but then they need to be identical in color and shape (barring some very clever, very tight programming), which doesn't work for the ghosts. So, they drew two ghosts on one screen, then the remaining ghost and Pacman on the other, alternating this way and hoping that persistance of vision would make it all OK, but they only did this when the various objects fell on the same scan line. As a result, the screen will be just fine until three objects lie in the same row, and then it begins to flicker until they separate.

      --

      This next song is very sad. Please clap along. -- Robin Zander

    7. Re:Great! by ClosedSource · · Score: 3, Informative

      They were willing to sacrifice the appearence of the game in order to make the gameplay more like the original. The could have taken the approach that many other companies did with their 2600 maze games - make sure that there were never more than two objects on the same line at the same time. But then the ghosts wouldn't behave the way you'd expect.

      As you mentioned, it might have been possible to use doubling and tripling, but I suspect that there wouldn't be enough time on the scan line to do all the repositioning (Assuming you don't want your ghosts to be limited to a fixed distance apart).

      Repositioning on the current scan line for the current scan line is tough to accomplish (I used to think it was impossible until I saw Galaxian).

  10. Re:OK, a little nostalgia is fine by MojoMonkey · · Score: 1

    postin Slashdot is fine, but come on... couldn't your time be better spent taking a walk or finding a cure for cancer?

    Who are you to tell people how to better spend their time?

    --

    ----- "Blame the guy who doesn't speak English." -- Homer J. Simpson
  11. Well... by cbiffle · · Score: 1

    > what other 20 year old platform is so dear to our hearts?

    Ha! I spend much of my day developing software for a 26-year-old platform! Beat that!

    And that's just BSD. You Linux folks could probably claim 30 years, back to ye olde UNIX. :-)

  12. Interesting. by SynapseLapse · · Score: 1

    I will never again in my life program in Assembly (Too much peeking and poking for my tastes.) But still a very intersting read.

    It finally answered a question I'd been wondering.
    Namely, why is it the 2600 seems to be able to display a lot more colors then the NES/Master System.
    But apprently if it's drawing each line individually, as it only has one [scan] line of video memory. It would only have to hold that one palete in memory for that moment. Intersting.

  13. Peeking and poking by GuyMannDude · · Score: 2, Funny

    I will never again in my life program in Assembly (Too much peeking and poking for my tastes.)

    Too bad we can't get some of those Japanese subway molesters to follow your example. From what I've heard, these guys spend the entire ride peeking up girls' skirts and poking them in naughty places.

    GMD

  14. Damn... by PinkX · · Score: 1

    If I would have checked slashdot twenty years ago, this could have been really useful!

    1. Re:Damn... by Anonymous Coward · · Score: 0

      Funny, same thing could be said about Unix and Unix wannabes (wannabees = Linux users)....

  15. This ought to be good by Rellik66 · · Score: 1

    For programming mods for Duke Nukem Forever for the 2600

    --

    Too many zeros, not enough ones