David Crane's 2600 Magic

A place where you can chat about anything that isn't to do with games!
Post Reply
User avatar
louisg
Posts: 2897
Joined: Wed Jul 20, 2005 7:27 pm
Location: outer richmond
Contact:

David Crane's 2600 Magic

Post by louisg »

I recently got two eBooks by David Crane: 2600 Magic and Dragster Magic. The first is an introduction to 2600 programming, and then the second is an in-depth look at some of the techniques touched upon in the first volume. Both are fairly short for the price, but are detailed and include interactive examples as well as interesting anecdotes.

Where I think the series falls down so far is that it can't seem to decide who it's aimed at. One minute it's explaining a concept in basic terms, and at the bottom of the page a paragraph of 6502 assembly is dumped on the reader. The code is fairly straightforward, but the book doesn't really teach non-programmers enough assembly to understand them. Though the code is fully commented, it's not quite a substitute for explaining what the code does in English. And, understanding some of the code is crucial to appreciating or even understanding the tactics presented.

Once understood, however, the tricks explained are mind blowing. The timing is so incredibly precise that programming a routine that rendered just one line of the display was like figuring out an intricate jigsaw puzzle. In the days when system resources were so limited, you didn't just have to be a good by-the-book programmer; you had to be wicked clever too.

Almost paradoxically, in contrast to modern programming which requires mastery of many different concepts to understand, I think a beginner could jump into oldschool assembly programming and learn a good chunk of it pretty fast-- even if it is harder to write a complete and useful program in it.

Still, I can't say if a non-programmer could get all that much out of the series by itself-- especially the second volume. But, combined with AtariAge's introductory 2600 programming tutorials-- or the awesome and completely-readable-by-normal-people Racing the Beam book-- it's an eye-opener. If David Crane had thrown in a one or two-page assembly crash course (or avoided relying on assembly altogether), I think the book would be more interesting to a wider audience.

Anyway, I just wanted to write up a mini-review of this =)
Humans, think about what you have done
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Re: David Crane's 2600 Magic

Post by antron »

louisg wrote:Once understood, however, the tricks explained are mind blowing. The timing is so incredibly precise that programming a routine that rendered just one line of the display was like figuring out an intricate jigsaw puzzle.
My attempt at a game had been on pause for several years now. Once I had my line kernel working and knew it could make the game I was imagining I was so proud that I stopped. I'll pick it back up one day. I learned everything from AtariAge forums.

My favorite trick was calling a command that uses the next byte just to get rid of it, instead of jumping over it. I also did a lot of bitwise shifting to get bits into the proper place to use the 2600's crazy registers. I saved tons of space.
User avatar
louisg
Posts: 2897
Joined: Wed Jul 20, 2005 7:27 pm
Location: outer richmond
Contact:

Re: David Crane's 2600 Magic

Post by louisg »

antron wrote: My attempt at a game had been on pause for several years now. Once I had my line kernel working and knew it could make the game I was imagining I was so proud that I stopped. I'll pick it back up one day. I learned everything from AtariAge forums.

My favorite trick was calling a command that uses the next byte just to get rid of it, instead of jumping over it. I also did a lot of bitwise shifting to get bits into the proper place to use the 2600's crazy registers. I saved tons of space.
As someone with a couple half-finished C64 projects on his hard drive, I feel your pain :) Someday I will have the time and patience. Maybe. Was your 2600 kernel a one-line or two-line kernel? I haven't done much more than the basics with the 2600, but it seems like 73 cycles *should* be enough to get a couple player objects + missiles onto the screen in time.
Humans, think about what you have done
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Re: David Crane's 2600 Magic

Post by antron »

It's a 2 line. It allows for single pixel horizontal scrolling of the playfield. The playfield blocks are 4 pixels wide, so I used a player to buffer the motion.

It's a metroid clone.
This demo image shows what it can do. The player is fixed in the center of the screen. The purple would be wider and the same color as the playfield to make motion smooth. The green is the "monster", it is very limited in complexity (can change width and H position only)
Image
User avatar
louisg
Posts: 2897
Joined: Wed Jul 20, 2005 7:27 pm
Location: outer richmond
Contact:

Re: David Crane's 2600 Magic

Post by louisg »

antron wrote:It's a 2 line. It allows for single pixel horizontal scrolling of the playfield. The playfield blocks are 4 pixels wide, so I used a player to buffer the motion.

It's a metroid clone.
This demo image shows what it can do. The player is fixed in the center of the screen. The purple would be wider and the same color as the playfield to make motion smooth. The green is the "monster", it is very limited in complexity (can change width and H position only)
Image
Whoa, that looks pretty promising. A Metroid clone for 2600 is pretty ambitious too, but I kind of see how it could work. I guess I'm off to try an experiment right now to see why the designers went for VDEL and the 2-line kernel support. :)
Humans, think about what you have done
User avatar
BryanM
Posts: 6411
Joined: Thu Feb 07, 2008 3:46 am

Re: David Crane's 2600 Magic

Post by BryanM »

Dead things like the Homestar Runner RPG kind of kill my enthusiasm for Atari programming.

Didn't uh, some fan write a much more superior version of Pac-Man for the system?
PSX Vita: Slightly more popular than Color TV-Game system. Almost as successful as the Wii U.
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Re: David Crane's 2600 Magic

Post by antron »

@louis
thanks, I hope I can finish it someday.
BryanM wrote:Dead things like the Homestar Runner RPG kind of kill my enthusiasm for Atari programming.

Didn't uh, some fan write a much more superior version of Pac-Man for the system?
That's correct about Pac-Man, I found it somewhere at AtariAge. Many projects do die. Some make it after years though, like Incoming!. A few Shmups have been completed recently, like Lead. Halo 2600 looks cool.
User avatar
louisg
Posts: 2897
Joined: Wed Jul 20, 2005 7:27 pm
Location: outer richmond
Contact:

Re: David Crane's 2600 Magic

Post by louisg »

antron wrote:@louis
thanks, I hope I can finish it someday.
BryanM wrote:Dead things like the Homestar Runner RPG kind of kill my enthusiasm for Atari programming.

Didn't uh, some fan write a much more superior version of Pac-Man for the system?
That's correct about Pac-Man, I found it somewhere at AtariAge. Many projects do die. Some make it after years though, like Incoming!. A few Shmups have been completed recently, like Lead. Halo 2600 looks cool.
Yeah, I hope to do something really modest and simple, just knowing how quickly 2600 projects become complex. I'll have to check out Lead- I can always use more 2600 shmups.

BTW antron, I found that thread about your game on AtariAge just browsing topics on kernels. That assembly trick is awesome! Right after reading that, I also noticed that the 6502 reference I use also mentions the trick when describing the BIT instruction, so it must be a fairly often-used tactic.
Humans, think about what you have done
Post Reply