Home Journal Contact Me Tools Comments

free web page hit counter
free web page counter
Latest

7/30/2010
Making good progress in the Space Invaders dig. My original disassembly comments were not very good and often wrong. The work is slow going ... the code is like spagheti.

7/20/2010
I got an email from Joe Hagan with a code bug he found in Madness. I added that to the code and noted it in the write up. He also pointed out some typos in Madness and Frogger. Thanks Joe.

Journal


The website you are visiting is a tiny kiosk in a busy mall of web pages. All around this mall of sites people surf through store fronts and family picture albums. The computer hosting this mall is a massive city of hardware. Inside the computer case several high-rise processors tower over sprawling disk farms. And this is only a small city connected with bustling interstates to millions of other city systems around the world.

Things were not always so. A long, long time ago a computer system was a tiny one horse town. The address space was small and sparsely populated with only a few K of RAM and ROM scattered about. And hard disks? There were rumors of one or two way off in the big towns, but nobody had ever heard of an interstate.

Those were the ancient days before big government -- before monolithic operating systems like Windows. Programs were small, and they could romp wild and free over the whole system unrestrained by memory management police and big-brother kernel.

In those days there were no compiler-walls between programmers and programmees. Men talked to the computers in the computer’s natural language. Assembly programming is a lost art in modern times. Now we use programs to write assembly for us. For super-large multi-threaded programs that run under the many laws and services of an operating system, a compiler generates smaller and faster assembly than any human could.

I am Christopher Cantrell -- a nerdy Indiana Jones! This site is my journal of archeological exploration of ancient computer cities and the assembly programs that lived there. With technology, “ancient” is only 30 or 40 years, but there are so many forgotten golden programming nuggets waiting to be dusted off and examined.

For instance, there is a famous bug in the arcade game Galaga. Shoot everything in the game except the lower left bee. Then dodge it for fifteen minutes. Eventually it will stop firing, and none of the bees will fire at you again for the rest of the game. Let me lead you into the tomb of Z80 opcodes and show you the mistake in the code.

In the early days of arcade history there were two competing display technologies. We’ll compare and contrast display hardware with two arcade classics: Asteroids (vector graphics) and Space Invaders (raster graphics). Despite its success, the Space Invaders code has several spots that are poorly coded. Let me show you.

I love arcade music and sound effects. In the early 80s, the AY38910 sound chips were popular arcade solutions. The arcade games Moon Patrol and Time Pilot each used a separate sound board with two AY38910 chips. But they took very different approaches to manage the six independent sound voices. Let me show you “threading” and “virtual machines” in assembly language.

Let me take you to the early days of home gaming consoles. Dust off your Atari 2600, and I’ll show you the complete code for Atari Combat. With this system, resource management is the real game. VCS games lived in 4K bytes of ROM and used 128 bytes (that’s BYTES) of RAM. I’ll show you how the Atari 2600 Asteroids game used special bank-switching hardware in the cartridge to extend the program to 8K.

The “text adventure game” genre was very short lived on early home computers. Let me take you on a tour of the TRS80 Color Computer cassette game Pyramid 2000. The game used a generic core to process a very domain specific language. The entire game flow was coded in this language within a language. Let me show you how this adventure game evolved into Raaka Tu and then Bedlam.

Computer viruses are an intriguing part of our computer culture. Let me take you into the assembly workings of two famous but defunct viruses. First I’ll show you the Morris Worm VAX assembly snippet written into a buffer overrun to forge a root shell. Then we’ll look at the PC Stoned boot sector infector. As tiny and efficient as it is, there is always room for improvement. Let me show you!

Nintendo’s Legend of Zelda has long been a favorite of mine. I’ve played most every version from the NES up through the Wii and DS. Let me take you on a tour of the original NES version with its ROM bank switching magic.

If you like Computer Archeology you must visit Don Hodges amazing site. He has a series of digs into Pac Man, Ms Pac Man, Dig Dug, Donkey Kong, and Defender to name a few. Visit his Archive for most of the series.

 


Powered by Disqus blog comments powered by Disqus