Note: You should really be listening to this youtube video while reading this article. It’s just like a mixtape from ’83!
’79-’84. I got my start in software as a gamer in the 80’s. We had an Apple II clone called the Pineapple … but it was an Apple II in every way. My friends (a shout out to Derek Bailey, Antony Butler and Anthony Davis) and I would play games for hours on end and the sounds and images from these games are burnt into my memory.
Eventually playing the games became dull and repetitive, and I became curious about how they were structured and what made them work. I started creating sprite tables, disassembled BASIC and restructured the operating system to create hidden files … all of this in 6502 assembler. I had time to do these things then!
Some of the classic games that first made their appearance on the Apple II include Castle Wolfenstien (precursor to Wolfenstein 3D), and the Prince of Persia. After being lost for about 30 years, the original PoP source code was only just released as open source and you can find it here: https://github.com/jmechner/Prince-of-Persia-Apple-II
Wired magazine wrote a terrific article about how it was saved: http://www.wired.com/gamelife/2012/04/prince-of-persia-source-code/
The Apple II floppies were all of 5.25″, with the write protect slot on the left hand side. And, when the boot sector become corrupted (which they did with wear and age … the magnetic surface would frequently flake) the floppy drives would enter an endless loop of seeking the boot sector, and then returning to the first sector. [Specifically, the reading head of the floppy drive would start at the innermost sector of the floppy drive and search outwards. If the boot sector had not been found by the time the reading head reached the outer most sector, it would be re-wound and the process would be restarted all over again.] This let to the classic sound of a failed Apple II disk that went something like: Chug-chug-chug-chug-chug-brrrrrrrrrrrt-chug-chug-chug-chug-chug-brrrrrrrrrrrt …
The second site is particularly relevant to this post but we’ll get to that in a minute.
Around ’84, Dad left the Apple II word behind and opted for an IBM PC clone … and that was the end of my golden era of gaming. I had very fond memories of those days but my life moved in a different direction. I started to write code for a living and it was all about the business. First it was C and PL/SQL, then Smalltalk, PowerBuilder, Java, EJB’s, ORDBM’s, Web Services, SOA …
Although my early gaming days were brought to a close by an IBM PC clone, it came with something equally fascinating … a modem! At first it was only 1200 bps but soon we moved up to a blazing 2400 bps. And with the modem came my discovery of bulletin boards and online communities. But, that’s a story for another day.
Fast forward 30 years.
In the 30 years since, everything has changed. Games are now fully rendered immersive environments with deformable topology. The *icons* on my phone have more screen information then that old Apple II, but I still fondly remember the simplicity of the old games and a moment that only exists in a handful of memories.
All the while a community of people we keeping the Apple II games alive. They produced an emulator for the Apple II GS which the created as a browser plugin. It’s basically a software model of the Apple II GS machines, and running the plugin allows a modern machine to pretend it’s an old arcade machine and hence run the original software. A machine, emulating a machine, running the original software. It’s turtles all the way down!!
The plugin was wonderful! Now I could play original Apple II games in a browser.
Sweet, it’s just like 1983 all over again! But wait! Oh, it gets better. In 2011 they released the plugin embedded in an iOS application. They disguised in enough to have it released on the App Store (but not well enough apparently … Sad Panda, can no longer find it!) and with a bit of editing and moving of files I’m now able to play the old classic games on my iPhone and iPad! Without further delay, here are some of the original games that I played about 30 years ago.
Amazingly the gameplay and sounds are just as I remember them. Now, where did I put my mix tape with Hall and Oates, and Toto? Ah, this will do … https://www.youtube.com/watch?v=onm1UX9J_CA
 Most early games we written in assembler which is a symbolic version of the byte code executed by the CPU. I’ve included a sample below. It’s pretty terse and dense, but I’m pleasantly surprised to discover I still understand it!
This particular sample was taken from the January, 1983 edition of the Apple Assembly Line … a popular newsletter at the time. The Apple Assembly Line has been archived and is available online at: http://www.txbobsc.com/aal/
1000 *SAVE SUPER SCROLL GENERATOR
1030 * APPLE SUPER SCROLLER
1060 * PROGRAM TO CREATE A FAST SCROLLER
1080 * CREATES AN ALL “IN-LINE” SCROLL ROUTINE
1090 * WHICH MAY BE CALLED AS A SUBROUTINE.
1110 * WILL SCROLL LINES 2-24 UP TO LINES 1-23
1120 * IN ONLY 7.6 MILLISECONDS.
1140 * BOTTOM LINE IS LEFT UNCHANGED; YOU MAY
1150 * WISH TO ADD MORE CODE TO BLANK BOTTOM LINE.
1180 PGM.START.IN.RAM .EQ $4000
1190 PROGRAM .EQ $02 – $03
1200 UPPER.LINE .EQ $04 – $05
1210 LOWER.LINE .EQ $06 – $07
1230 .MA SCRN
1240 .DA ]1,]1+$80,]1+$100,]1+$180
1250 .DA ]1+$200,]1+$280,]1+$300,]1+$380
1290 >SCRN $400 LINES 1-8
1300 >SCRN $428 LINES 9-16
1310 >SCRN $450 LINES 17-24
1350 LDA #PGM.START.IN.RAM
1360 STA PROGRAM
1370 LDA /PGM.START.IN.RAM
1380 STA PROGRAM+1
1400 LDX #0 FOR LINE = 1 TO 23
1410 .1 LDA APPLE.SCREEN.ADDRESSES,X
1420 STA UPPER.LINE
1430 LDA APPLE.SCREEN.ADDRESSES+1,X
1440 STA UPPER.LINE+1
1460 LDA APPLE.SCREEN.ADDRESSES+2,X
1470 STA LOWER.LINE
1480 LDA APPLE.SCREEN.ADDRESSES+3,X
1490 STA LOWER.LINE+1
1510 TXA SAVE LINE #