dive into mark

You are here: dive into markArchivesAugust 2006PR#6

Tuesday, August 22, 2006

PR#6

Mark with Apple //e

The thing I remember most about the Apple ][ was the sound of the disk drive as it was booting up. It had this wonderful [d-d-d-d-r-r-r-r] sound and then it sort of… well, of course it depended on the bootloader. For Apple DOS, it would load up the disk operating system from the first three tracks, tracks 0 through 2. It would only do about half of track 2, and then track 1, and then half of track 0, and then it would seek all the way out to track $11. (And by “track $11″ I mean 17. $11 in hex. 1-1.) It sounded like [doot-doooot-doot-chhhhhh].

I recently came across a PDF of a scan of a book called “Beneath Apple DOS” which was the seminal book. I had long since lost track of my copy. It’s just amazing. It has all the info about what happens when you first load up a disk. Obviously, you can turn the computer on, or you can hit open-apple + control + reset (now called “command + control + reset”). You could type PR#6 and that would load the bootstrap code for Slot 6, which was the disk drive, the 5.25-inch disk drive slot. Of course, if you were already in the assembler, then you could type C600G, which would start loading the same bootstrap code as PR#6.

The very first byte of track 0 sector 0 of every 5.25-inch Apple ][ disk was a sector count for how many sectors the ROM in Slot 6 at C600 should load off the disk before handing off control. Usually it would just load the first sector, and then it would pass control to that which would be sort of a primary bootstrap to load about 8 more sectors off of track 0, and then that would be enough to load the rest of the operating system off of track 2 and track 1 and the rest of track 0, and that would be enough to load up the disk catalog or run the start program or whatever.

Beagle Brothers came out with Pronto-DOS, which was some patches against Apple's DOS 3.3, which was much faster. It only used one sector out of track 2, and so when it booted up it went [d-d-d-d-r-r-r-r] [dt-doooot-doot-chhhhhh] It was like a grace note. In fact, it was a grace note. It was a sixteenth note. If you think of each sector read as a sixteenth note, it was reading one sector off track 2, and then going back and reading all of track 1, and then all of track 0, and then seeking out again to the disk catalog on track $11.

Of course, retail games, most of them had their own bootloaders that weren’t based on Apple DOS because they didn’t need all of the functions that DOS provided like loading and saving programs. They needed the memory. It took several pages of memory and it stayed memory-resident the whole time you had the disk loaded. And they needed that memory for their games and their data and such.

They usually had custom bootloaders so they sounded like all kinds of things. They had all sorts of funky things centered around copy protection where they would write data to the disk in strange ways. There were things called half tracks and quarter tracks. Things like Karateka by Broderbund stored everything on quarter tracks and it was the most amazing sound to listen to the original disk boot up.

And of course, in lots of cases pirates would come and interrupt the bootloader on the game and seek out to maybe the end of track $22 or $21 where the original game hadn’t stored any data and they would go store their own picture or crack screen or whatever. So you would hear, when the disk booted up, you would hear just a little bit of [dt dt] loading the initial bootloader and then it would seek all the way out to the end of the disk and it would go [dt dt chhhhhhhhhhhhhhhhhhhhhh dt] and then show the crack screen and then come all the way back and load the rest of the game.

A lot of what I did was hacking on stuff, and the ultimate hacking tool for poking around — not for cracking, but for just fiddling around and seeing experimenting with bootloaders and stuff — the ultimate tool was Copy ][+ by Central Point Software. Just an amazing program. And it had a disk editor that would let you see individual sectors of individual tracks and then disassemble them and show you the machine code listing, the 6502 assembly language listing, of the programs on those tracks. So I spent a lot of time in Copy ][+, hacking around and fiddling with bits and disassembling things and seeing how it worked.

Of course, you could only boot a disk off of one drive, even if you had two disk drives, you could only boot off one of them. And so you had to boot Copy ][+, and it would go [dt dt dt dt dt dt dt dt dt] and then come up with its main menu. And then at that point you could take the disk out, and you could put whatever other disk you wanted to play with, and you could load up the disk editor. Copy ][+ was all stored in memory. You could load up the disk editor, and if it was a DOS 3.3 formatted, Apple DOS formatted disk, you could get a catalog listing and you could follow individual files around as they were stored on the disk. You could go to the next sector of this particular file, or you could go to an absolute track and an absolute sector. So I spent a lot of time in track 0, sector 0, fiddling with things and looking at bootstrap code and bootloader code.

Filed under , ,

12 comments

  1. Dude, I thought you were a Ubuntu guy. Why did you dedicate a whole episode to the Apple ][? I need to get the latest Ubuntu fix or I’m gonna go loco on OS X designers. I’m away from my Ubuntu PC till next Monday, so in the mean time, I need you to obviscate all the Ubuntu news and make it into something I can watch while I drink my coffee. (this vacation’s been hell without my trusty Ubuntu PC). Eh, Mark, what kind of camcorder do you use to record these shows anyway? Would a $20 webcam provide enough quality for me to start video blogging? When you pick yourself up off the floor from laughing, I’d like to know why your updates to this site are so random… what happened to daily video blogging? I mean, it’s not like you have a life outside of video blogging… ;-)

    Comment by Wili — Tuesday, August 22, 2006 @ 3:38 am

  2. I can’t stop LAUGHING on this one, man!

    Comment by angelday true — Tuesday, August 22, 2006 @ 3:46 am

  3. What’s the noise in the background? Vacuum cleaner? Air conditioning? Computer’s fan?

    Comment by Giulio Piancastelli — Tuesday, August 22, 2006 @ 4:42 am

  4. > what kind of camcorder do you use to record these shows anyway

    I have a Sony MiniDV TRV 19, which I bought in 2003 and has been perfectly adequate for my home video needs. I have no idea what the market looks like these days though.

    > Would a $20 webcam provide enough quality for me to start video blogging

    Only if you are a teenage girl with a button nose and a monkey puppet.

    Comment by Mark — Tuesday, August 22, 2006 @ 5:01 pm

  5. You sound just like my father:

    - “In the old days there was no GUI stuff and 5.25″ floppy disks were heaven. Real men used Assembly!”

    Of course, by the time he starts talking about the Commodore 64, VIC-20’s and IBM PC-AT’s I’ve already left the room…

    Old people and their ramblings…

    Comment by Marco J. Campos — Tuesday, August 22, 2006 @ 5:18 pm

  6. > Old people and their ramblings…

    Fast forward 20 years. “In the old days there were no 3D holographic computers or neural interfaces. Real men used Keyboards!”

    Just wait until that crunk jam you blast on your iPod on infinite repeat until 3 AM ends up on the muzak channel at your local grocery store. Look around and see which of the other shoppers are humming it, bob your head with them in silent acknowledgment of your shared cultural experience from the 00’s (THE BEST MUSIC DECADE EVER), and think of me.

    Comment by Mark — Tuesday, August 22, 2006 @ 5:35 pm

  7. Mark, I will! ;)

    Nah, my dad is great and everything I know is thanks to him. I’m old enough to remember our IBM PC-AT and the funky Sinclair ZX Spectrum 128 (not very popular in the US I think). The 128 also had a strange sound loading the software (from audio tapes), very similar to a analog modem. It would take around 2 minutes to load something. Imagine the trouble people had in developing decent software for it when you only have 128K RAM running under a 3MHz (the Z80) cpu. Kids from my street would gather at our house and do long runs playing Manic Miner. Those were the days!

    BTW, I don’t own an iPod. I prefer the El-Cheapo $30 digital player that plays MP3 and OGG. Steve Jobs isn’t getting any of my money as long has they sell audio files with DRM and the iPod doesn’t play FLAC and OGG.

    Comment by Marco J. Campos — Tuesday, August 22, 2006 @ 7:00 pm

  8. Eh, Mark, Ubuntu ‘Edgy’ for PPC now has working wireless! The driver for the broadcom chipset works! Wow, and to think I almost spent $10 on a PCMCIA wireless card! You have to install wifi-radar to configure the wireless interface though, the included gnome utility doesn’t work.

    Comment by Wili — Tuesday, August 22, 2006 @ 7:08 pm

  9. Pingback by Mark Pilgrim’s Apple ][. at William T. Foxtrot
  10. Impressive. The extent of my Apple II hacking was editing games written in Basic– most notably changing a horse racing simulation so the horses were named after people I didn’t like.

    I was a lonely, lonely child.

    Comment by Ross M Karchner — Wednesday, August 23, 2006 @ 10:20 pm

  11. I like your disk drive sound impressions. Ellen Feiss has nothing on you when it comes to computer impersonation.

    You were a cute kid. I suspect I’ll have similar pictures of my boys in a year or two, except the Apple logos surrounding them will be monochromatic.

    Comment by Dan Ridley — Thursday, August 24, 2006 @ 12:02 pm

  12. “Imagine the trouble people had in developing decent software for it when you only have 128K RAM running under a 3MHz (the Z80) cpu.”

    Actually my Spectrum had 48K and people were able to program the most amazing, playable games with just that.

    Comment by Chris Hester — Friday, August 25, 2006 @ 10:46 am

Respond privately

I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)



Recent Stuff For You, Special Price Stay Here
  • Greasemonkey Hacks
Good Stuff Buy The Cow Go Away
Dive Into Python
Powered by Google Drink The Milk Don't Steal

 

posts / comments
© 2001-8 Mark Pilgrim