Hack56.Become an Apple Guru

Hack 56. Become an Apple Guru

Read the right books and sites to become an Apple ][ master .

A lot of people can have fun with an old Apple ][ or Apple ][ emulator just by putting disks or disk images into the emulator and booting into games. There's nothing wrong with this, but there's a lot more that you can do if you like, from looking around old disks to programming in BASIC to crafting new games in 6502 machine language.

5.5.1. First Steps: poking around DOS

Apple produced three versions of DOS which are still in common use. DOS 3.x was the primary version used during the Apple ][ through //e and //c period, supporting only 5.25" floppy disks, with DOS 3.3 becoming the effective standard after its 1980 introduction. ProDOS, which added speed and greater device independence as well as new features like support for directories, first appeared in 1983, and bifurcated into 8-bit and 16-bit versions in 1986. The 16-bit line of ProDOS evolved into OS/GS, a GUI-based environment for the Apple IIgs, which ran from 1987 to its final version, 6.0.1, in 1992. Later versions of OS/GS also had the advantage of being able to read both DOS 3.3 and ProDOS disks, finally breaking a large compatibility barrier .

If you encounter DOS 3.2 disks, also called 13-sector disks, you can use the MUFFIN program on the DOS 3.3 master disk to convert them to 16-sector DOS 3.3 disks.


While DOS 3.3's master disk includes a FID file utility program, and ProDOS and OS/GS come with applications that let you look around your disks in a more GUI-like environment, a basic understanding of the command line is very useful, especially if you're poking around old DOS 3.3 game disks. Once you've booted from a DOS or ProDOS disk, a few simple commands can take you a long way. The core set I recommend learning includes:



CATALOG (or CAT , in ProDOS)

The CATALOG command shows you a list of the files on the current disk. In DOS 3.3, an asterisk will indicate locked files, a type indicator (A for Applesoft, I for Integer Basic, T for text, or B for binary) will give the type of the file, you'll see the size of the file in sectors, and then you'll see the name of the file. In ProDOS, CATALOG produces 80-column results with a lot more information, but if you're on a 40-column screen, CAT produces an abbreviated version.



BRUN filename

The BRUN command lets you run binary files directly. You can also BLOAD and then call binary files, but BRUN is generally much simpler, sparing you the need for a lot of details about where to put the binary files and where to call them.



RUN filename

The RUN command is familiar from BASIC, but if you add a filename to it, DOS will load the program from the floppy drive and then run it. You can also LOAD files from the floppy and then type RUN , but unless you plan to edit them, running them directly is much more convenient .



SAVE filename

If you want to write your own BASIC programs, the SAVE command will let you store them to disk.



PREFIX directoryname

In ProDOS and its descendants, the PREFIX command lets you see the current directory if used without a directory name, or change to the directory specified if a name is provided.



-filename

In ProDOS and its descendants, you can use - to execute Applesoft, binary, text, or system files in place of RUN, BLOAD , or EXEC .

In DOS 3.3, all commands must be entered in uppercase. ProDOS and its descendants let you use lowercase for commands.

If you want to get extra geeky , there are a few operating systems for the Apple ][ that I haven't mentioned, including CP/M, Apple Pascal, and a number of accelerated versions of DOS 3.3 from various vendors .


5.5.2. Next Steps: learning about the Apple

When I went back to my old Ace 1000, I was lucky, because I'd kept my old books, manuals, and reference cards with the computer. The Beagle Brothers Peeks, Pokes, and Pointers poster listed all kinds of internal addresses, and my Nanos Systems Corp. Reference Card for the Apple II & II Plus still provided a complete list of commands and codes. The Creative Apple , a collection of articles edited by Mark Pelczarski and Joe Tate in 1983, does a great job of getting me back into that early-80's "Apple ][ is cool" frame of mind. The critical book for getting me back up and running, though, was the Apple II User's Guide , written by Lon Poole with Martin McNiff and Steven Cook back in 1981.

If you don't have a huge trove of books, don't panic. There's lots and lots of information about the Apple ][ family available on the Web. The Apple II FAQs, available at http://home.swbell.net/rubywand/A2FAQs2CONTENT.html, include a tremendous amount of information about the computers, accessories, and games for the Apple ][. In particular, I recommend the DOS & ProDOS section at http://home.swbell.net/rubywand/Csa2DOSMM.html if you need to figure out more than the basics of getting around Apple disks.

The history of the Apple ][ may seem arcane, but it can be critical if you're trying to figure out which pieces of hardware and software can fit together. One entertaining and detailed telling is at http://apple2history.org/index.html. The second half of Steven Levy's classic Hackers: Heroes of the Computer Revolution (Penguin, 1984) tells the story of Apple's founding as well as of the development of the gaming industry surrounding it. The Little Kingdom: The Private Story of Apple Computer (William Morrow, 1984), is long out of print but tells the early story in detail. Finally, for a very different perspective on the Apple ][ and where it led, see Andy Hertzfeld's Revolution in the Valley (O'Reilly, 2004), which tells a fair amount about creative Apple ][ use on the way to building the first Macintosh.

To see what's still happening on the Apple ][ platform today, I heartily recommend http://a2central.com/, offering the latest news updated close to daily, as well as archives of older discussions at http://lamp.a2central.com/. The bulletin boards there cost $35 a year, unfortunately , but include key people still working regularly on the system. The Usenet comp.sys.apple2 newsgroup is still functioning, and if you need to read the archives, you can visit http://groups.google.com/ group /comp.sys.apple2.

5.5.3. Driving the Apple

It's great to know all the Apple trivia out there, but the best feature of the Apple ][ series was its approachability. Want to write a program? Start typing. Want to create some hardware? Start wire-wrapping. Need to connect hardware and software? You can do that directly. By modern standards everything in the Apple ][ is dangerously exposed and written far too close to the hardware, but that same exposure makes it a delightful environment in which to work.

The first step in any Apple programming experience should probably be BASIC, most likely Applesoft. If you really want, Integer BASIC is an option (and has some funky features, like a GOTO that accepts variables specifying its target), or you can use the old Apple Pascal system. There were a lot of small languages published for the Apple ][, including Logo, FORTRAN, and PILOT, as well as enhancements to Applesoft, like Beagle Basic. The Apple II User's Guide I mentioned earlier got me through learning Applesoft, but How to Write an Apple Program by Ed Faulk (Datamost, 1982) and David Heiserman's Intermediate-Level Apple II Handbook helped push me further along.

I should probably mention that I was in middle school and high school when I wrote my Apple programs, so my taste in books didn't reflect the full range of possibilities out there.


BASIC will get you started, but at some point you may well want to transition to machine language. There were lots of assemblers out there, including a mini-assembler built into some versions of the Apple ROM, but I tended to use the EDASM assembler that came with Apple's DOS Toolkit.

It's probably fair to say that I didn't know any better, and I had it, so I used it. More powerful and more popular assemblers include the TED, Merlin, and ORCA/M. I still enjoy perusing Marvin DeJong's Apple II Assembly Language (Blacksburg, 1982), which goes beyond the programming and takes a look at creating accessory cards as well.

There are two parts of the Apple ][ system that deserve special attention, as both of them reflect ingenious hardware solutions by Steve Wozniak which have befuddled many a programmer ever since. The Apple Disk Operating System did an amazing job of making the most of the limited capabilities of the Disk ][ drive, but there are some perhaps excessively creative angles to it. Apple's DOS Manual (1980) explains a lot of it, but if you feel like writing code against DOS, you'll probably want a copy of Don Worth and Peter Lechner's Beneath Apple DOS (1981), or the additional material in Beneath Apple ProDOS (1984).

Once you've (re-)learned all about the Apple ][, you'll of course want to start writing some games for it. Wozniak's mapping of the high-resolution graphics memory in the Apple made great sense to the video controller but has left many programmers scratching their heads ever since. To get beyond that confusion and to learn how to handle the challenges of creating flicker-free animation using the Apple ][ family's limited processing power, I recommend Jeffrey Stanton's classic Apple Graphics and Arcade Game Design (Book Company, 1984).

Although you can't make the Apple ][ into a 4 GHz speed-demon with accelerated graphics, it offers a set of challenges to make you a better programmer. With any luck, and a lot of time, you'll find your own name listed on a2central.com as the proud author of a new game for old hardware.

Simon St.Laurent



Retro Gaming Hacks
Retro Gaming Hacks: Tips & Tools for Playing the Classics
ISBN: 0596009178
EAN: 2147483647
Year: 2003
Pages: 150
Authors: Chris Kohler

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net