Monday, October 12, 2020

The Beginner's Guide to Running an Apple //e

The Apple II platform lasted a very long time.  The first Apple IIs were released in June of 1977 and the last Apple //e systems were last sold by Apple in November of 1993. No other non-PC compatible home computer had as long an official lifespan.  Unlike its early home computer competitors, Apple is still in business, still independent and still highly relevant to the consumer today.  Apple first entered the public consciousness with the Apple II and II Plus computers, and its Apple //e computers were many, many schoolchildren's first encounter with a computer. The Apple II was the first computer with some attention given to playing games, and over a fifteen year period thousands of games were released for it. There are several emulators for the system and some emulate the system to a very advanced degree, but the hardware is also fairly easy to use.  Here I am going to give a beginner's guide into using Apple //e hardware.

The first question one should ask, when looking into Apple II hardware, is what system should I buy?  For the beginner, you should stay away from the original Apple II and II+.  An original Apple II goes for very high collector's prices and an Apple //e can do anything a II+ can and more.  So that leaves you with the intermediate systems, the //e, the //c and the //gs.  The //c is the epitome of the common Apple II experience, but you may find its limitations irritating, it cannot (easily) use sound cards or hard drives and has no ports for cassette tapes.  The //gs is a fine system in its own right and it can use better form-factor keyboards than any other Apple II, but its 16-bit capabilities tend to distract from the pure 8-bit experience of the Apple II.  So I suggest the Apple //e, the systems are fairly common and about as affordable as you get for an Apple II.  Plus it is what I have, so I can speak to the practicalities of using it.

Introduction to the Apple //e

So with an Apple //e, what do you get and what do you need for a minimum functional machine?  The Apple //e came in three varieties :

1.  The original Apple //e which came with the 6502 processor in 1983; 

2.  The Apple //e Enhanced came with the 65C02 processor and updated ROMs in 1985; and

3.  The Apple //e Enhanced Platinum which came with a numeric keypad in 1986.

All Apple //e systems come with at least :

CPU : 6502 (Apple //e) or 65C02 (Apple Enhanced //e and Apple Platinum //e) running at 1.02MHz

RAM : 64KiB (Apple //e or Apple //e Enhanced) or 128KiB (Apple //e Enhanced Platinums came from the factory with 128KiB but the expansion card may have been stripped)

Expansion : Auxillary Slot and Slots 1-7

Video : 280x192 High Resolution Graphics (HGR) Mode (monochrome or six colors at 140x192), 40x48 Low Resolution Graphics (GR) Mode (fifteen colors), 40x24 Column/Row Text Mode (7x8 pixel text cells in monochrome, hybrid HGR and GR modes with four rows of text are available)

Sound : Direct-drive 8 Ohm impedance Speaker (affixed to the bottom of the case)

Ports : Cassette In, Cassette Out, Joystick, Video Out, Numeric Keypad, Game I/O internal and external connectors

Keyboard : 62 Keys (80 keys for //e Platinums)

Power : 38W Internal Switching Power Supply

The above is the minimum configuration of a //e that will allow it to do everything it could as purchased from a computer dealer.  Unfortunately, in this state with no expansion cards, the //e is limited to typing in BASIC programs and saving them to and loading programs off cassette tapes.  If any black sockets do not have chips in them, you will need to replace the IC in that socket, so take care when shopping for a system.

An Enhanced //e will have a sticker over the power LED on the keyboard with the word "Enhanced".  A non-Enhanced //e should not have this sticker.  A system which was Enhanced manually by the user may or may not have the Enhanced sticker, but will have a 65C02 CPU.

The power switch is on the back of the system by the power plug, this is how you turn the system on and off.  The power cable is an ordinary 3-prong cable that PC power supplies use, even today.  The video cable is a standard RCA video cable with a yellow jack, and the cassette input and output use standard 3.5" mono minj-jacks.

Opening the Apple //e could not be any easier.  The top lid is held together by friction and can be pulled right off by pulling up on the tabs on the back of the lid.  Unlike the Apple II and II+, there are no velcro-like fasteners which tend to get displaced and lost.  Also, there is no need for tools to insert and remove cards, although for securing port connectors to the rear you will need a socket bit.  A chip puller may come in handy if you need to remove ICs or a device which attaches to the Game I/O internal socket.

Essential Upgrades

The expansion card that every Apple II computer needs is the Disk II Interface card, later cosmetically resdesigned as the 5.25" Drive I/O Controller.  95% of all Apple II software was released only on 5.25" disk. The first card connects to the Disk II floppy drive, the second card connects the DuoDisk, UniDisk 5.25" and Apple 5.25 Drive.  The original Disk II card and drive connected by a 20-pin IDC cable, the later interface and drives use a DB-19 connector.  The DuoDisk has a detachable DB-19 cable, so if you are looking to buy one of those, then if it is not offered with the cable be prepared to pay extra for the cable.  Also, you may need to perform one of these mods to the DuoDisk's analog board.  

If you use an original Disk II card, you must align the connector correctly, it is not keyed, or you will likely destroy an IC on the card or the drive.  Remember the edge of the ribbon with the color designates pin 1 and must be plugged into pin 1 on the card.  If the drive cable uses a rainbow cable or a gray cable with no pin 1 color marking, then insert it so that the cable travels away from the card, not crossing over the board.  Also make very sure that both rows of pins are connected, not just one, and that all pins are connected.  Insert the card into slot 6 in the Apple //e, this is the de-facto slot for Disk II cards.

The second card you should obtain, in case your system did not come with one, is an Expanded 80-Column Text card.  This card goes into the Auxillary Slot in the Apple //e and adds 64KiB of RAM to the 64KiB of RAM on the //e's mainboard.  This card allows the user to display text in 80 columns by 24 rows.  For all but the earliest Apple //e mainboards, it also allows for Double High Resolution Graphics (DHGR) Mode, with a monochrome resolution of 560x192 and display of fifteen colors (at 140x192).  Support for DHGR Mode will allow you to run many later games for the Apple //e that an Apple II or II+ cannot run like Airheart, Dragon Wars, Might & Magic II and Prince of Persia. There is also an unofficial Double Low Resolution Graphics Mode with an effective resolution of 80x48, but it is rarely used.

To ensure you get a DHGR capable mainboard, avoid the Apple //e systems with the double shot injection keyboards (brown with white text).  Look for the dye sublimated keyboards (beige with black text).  More specifically, you want to avoid the mainboards with the 820-0064-A marking above Slots 3 and 4.  820-0064-A mainboards also lack jumper pads X3 and X7.  All Apple //e Enhanced and Platinums come with DHGR capable mainboards.  There are other memory expansions like the RAMWorks cards which can offer much, much more RAM, but the RAM is not used by games or many productivity programs.  To use 80-column text mode on an Apple //e, type PR#3 at the BASIC prompt.  

The Extended 80-column card comes in two varieties from Apple, one with ten chips and one with five chips.  They are functionally identical, but if you get the ten-chip card, you must have the jumper closed on the card to enable DHGR.  The five-chip card always has it enabled.  Make sure you do not buy the 80-column only-card if you want DHGR graphics.  The Apple //e 80-Column Card has five chips but only provides 1KiB of RAM, just enough for the 80-column text mode but not enough for DHGR. It has the Apple part number 820-0066 written in the solder mask and has a wide SRAM 6115 chip on the card.  

The last thing you need is a monitor.  An Apple //e only displays composite video, and the method it uses to generate color in HGR and DHGR modes cannot not display color with a higher quality video signal (unless simulated).  RF Switchboxes also existed which can convert composite video into RF video and were very common during the Apple IIs' early years, but pure RCA composite video gives better video quality.  Text in Text mode is in monochrome but with the split GR and HGR modes, the text will have green and purple fringing.

European Apple //e systems, using the PAL color system, can display color like their NTSC counterparts.  By comparison, a Euroapple (European Apple II+) required a special graphics card to display color in HGR mode.  A CRT TV is an ideal solution for the display of color graphics, but text will be sharpest with a monochrome monitor.  Apple released a Composite//e Color Monitor with a B&W/Color switch which shows excellent text, but color is a bit stripey.  Consumer TVs tend not do 80-column text justice, so a composite monochrome computer monitor, which usually comes with green (Apple's Monitor II or Monitor III) or amber phosphors, would be best for 80-column text.  Many modern LCD TVs will balk at displaying the Apple II's 240p signal or will display it very poorly. 

Working with Disks, Disk Drives and DOS 3.3

Each Disk II Controller card can support two disk drives, and a lot of software can support two disk drives.  Apple II 5.25" disk drives only can read one side of a disk at a time.  You can usually use both sides of a disk, but to do so you had to eject and flip the disk over and put it back into the drive.  With a real disk, you can cut a notch into each side of the disk to enable writing to that side.  Some disks are only single sided and cannot be read or written reliably on the flip side, so be careful for those disks.  The drive controller provides power to the disk drives.  A floppy disk formatted in an IBM PC's drive can work in an Apple II's drive, it just needs to be reformatted by the Apple II.  The Apple II can only use 5.25" single or double density disks, it cannot use the high density disks used by 1.2MiB IBM PC AT drives.  If a disk has no label, you can tell double density disks from high density disks because double density disks have a brownish disk surface while high density disks use a jet black surface.  If you see a 5.25" disk marked "single density", they can be used with Apple II disk drives.  "Single density" refers to the drive, not the disk.  The Disk II is completely soft-sectored, it does not care how many sector index holes you may have punched onto your disk from the factory.

The usable capacity of each side of an Apple II disk is 35 tracks x 16 sectors x 256 bytes per sector, which equals 143,360 bytes.  Apple II supplied a Disk Operating System, and the standard version used is DOS 3.3.  DOS 3.3 had basic commands and programs to manipulate disks and the files on them: formatting new disks, copying files from one disk to another disk, duplicating disks, deleting files from a disk, protecting and unprotecting files from deletion, saving BASIC programs to disk, loading them from disk and running BASIC programs and binary assembly language programs.

If you have used MS-DOS on an IBM PC Compatible, working with DOS 3.3 is very similar to working with MS-DOS, but there are a few differences.  First, in MS-DOS, BASIC is separate from the DOS, in the Apple II, DOS is an expansion to BASIC.  BASIC, which is built into every Apple II-compatible machine in ROM, without an Disk Controller expansion card can only save and load programs from cassette up to and including the //e.  The Disk II Controller expansion card allows the system to boot from a floppy disk.  DOS 3.3, once loaded off a disk, then provides the commands and programs needed to handle disks and files.

If you do not have a Disk II Controller in the Apple //e, the machine will boot to a BASIC prompt, which looks like a ].  If you have a Disk II Controller card in the Apple //e but no disk to boot, then the screen will seem to "freeze" and only show "Apple ][" or "Apple //e".  This is because the Disk II Controller's firmware is waiting for a disk to boot and will wait forever.  You can press Ctrl+Reset to get to the BASIC prompt.

DOS 3.3 was designed only to handle Apple's 5.25" drives.  It does not support 3.5" drives, hard drives, RAM drives, tape drives or anything else.  To start DOS 3.3 you must insert the disk in the drive, turn on the power and wait for the disk to finish reading.  You can also soft reboot the system by pressing Ctrl+Open Apple+Reset. When you see the BASIC prompt then you are good to start using DOS.

From the BASIC Prompt you can either start typing in a BASIC program or using DOS commands.  The first DOS 3.3 command that you should learn is CATALOG.  This is equivalent to the MS-DOS DIR command.  Most files have a type which will be displayed with the CATALOG command, usually I, A, T or B.  I designates programs for Integer BASIC, A designates programs for Applesoft BASIC, B is used for binary machine-code programs and T signifies text files.  The number next to each file indicates how many sectors that program takes on the disk.  1 sector = 256 bytes.

DELETE and RENAME behave similarly to the equivalently named MS-DOS commands.  SAVE, LOAD and RUN commands operate on BASIC programs with the A or I type.  To RUN a BASIC program on a disk, type RUN [program name].  BSAVE, BLOAD and BRUN operate on binary programs with the B type. To see the listing for a BASIC program, use the LIST command.

To format a disk, remove your DOS 3.3 Master Disk, insert the disk you want to format and type in the command INIT with a name like HELLO.  The drive will then format the disk automatically without any further warning or prompting from the user, which is why we removed the DOS 3.3 Master Disk first.

To change the active drive, if you are on Drive 1 and want to go to Drive 2, then type in CATALOG D2.  That will list the programs on the disk in Drive 2 and all further commands will operate on Drive 2.  To go back to Drive 1, type CATALOG D1.  Other commands can also use the D1 or D2 flag.  Disks can only boot from Drive 1, not Drive 2.  If you wish to boot a disk while in BASIC, type PR#6.

COPYA is the official program to duplicate a disk.  Naturally it will be foiled by even the simplest copy protection schemes.  However, many games have a (hopefully write-protected) master disk that is intended to be copied using this program so you can make a play disk. COPYA can use one or two disk drives, with two disk drives being much more convenient to use.  If you have only one floppy drive you will have to swap disks four times!

In DOS 3.3, all commands must be entered in Capital Letters, so keep the Caps Lock key down. File names can be up to 30 characters in length. There are three versions of DOS 3.3, one dated August 25, 1980 and two dated January 1, 1983 with an immaterial difference between them regarding a rarely used command.  I would recommend the one of the later versions, they boot faster, but the older version has more programs like Little Brick Out.

Getting Programs onto your Apple //e

Let me address the most important question a user will have at this point, how do they get programs onto a disk drive?  The Apple II disk system revolves around disk images.  Programs came on floppy disks and were usually copy protected so they could only be run on the disks that was included in the box or package.  Floppy disks were almost completely controlled by software in the Apple II, so a disk often has its own file system which cannot be read by a DOS 3.3 CATALOG command.  The site ftp.apple.asimov.net is the central repository of Apple II software and most programs there can be found as disk images.  Archive.org is another major source for Apple II disk images.

The standard 5.25" floppy disk image format is the .dsk format.  .dsk format images are 143,360 in size and only contain the data within the defined sectors of the disk.  There is a lot of information about a disk which is not contained with the .dsk format, and which lead to the .nib format which can represent that more of information.  However, the lowest level imaging of a disk is at the flux level which preserves the most information about a disk's layout and structure, and the relatively recent .woz format has been designed to handle the more advanced copy-protections that the .nib format cannot by summarizing the flux level read of the disk.

For the beginner to get the most use out of his Apple //e today, unless he has a large archive of original disks, he will want to be able to use disk images.  There are two easy ways to get disk images onto your Apple //e.  The first is to use a real Disk II drive, real floppy disks and the ADTPro disk transfer program.  This program lets you transfer disk images from your PC to your Apple II and does not need any specialized hardware.  It can transfer software via the Apple //e's cassette port, a Super Serial Card or an Ethernet Card.  The latter two methods are more expensive but are faster and much faster (serial and ethernet) compared to the cassette port.  Most PCs these days do not come with Serial Ports, but a USB to Serial Port adapter should work.

The other method is to use a disk drive simulator.  Several such products exist, including the wDrive and Floppy Emu.  These external devices load disk images off SD cards and are far more convenient when playing large, multiple disk Apple II games which were never converted to a hard drive/mass storage friendly format.  They also support the more copy-protection aware disk image formats like nib and woz and can handle hard-drive sized image formats, making loading smaller games extremely convenient with the likes of the Total Replay pack, but only if you have the Apple II UniDisk 3.5 Controller (a.k.a the "Liron").

If you would like to bypass the comparatively slow Disk II interface, you can get a hard drive simulator that plugs directly into the expansion bus.  Popular options include the CFFA 3000 (CF cards and USB drives), the ReActive Micro Drive (CF cards), the SD Disk II Plus (SD cards) and the BOOTI (USB drives). Delving into hard drive interfaces for the Apple //e is beyond a beginner's guide, but know there are plenty of options not even considering the vintage SCSI interfaces that can also interact with more modern storage solutions.

Expanding the Possibilities : ProDOS

If you are new to the Apple II, you may now ask how a disk drive which supports only 143KiB can support disk image several megabytes in size? This is where ProDOS comes in, Apple's replacement for DOS 3.3.  Introduced in 1984, ProDOS was designed to be flexible, supporting disk drives far larger than the 143KiB Disk II. It can support 400KiB and 800KiB 3.5" floppy disk drives, RAM disks as well hard disk drives up to 32MiB with ease. It supports a real time clock, time stamped files and subdirectories. When the Apple //gs was released ProDOS became ProDOS 8 to distinguish it from the //gs ProDOS 16.

The last official version of ProDOS 8 is v2.0.3, however it requires a 65C02 CPU.  ProDOS 8 v1.9 is the last official version of ProDOS 8 which works with a 6502 CPU. In the last few years, fans have been updating ProDOS, the current unofficial version is v2.4.2 and is highly recommended for its usability and the utilities included.  Get it here.

Even though DOS and ProDOS have very little compatibility between each other, using ProDOS is like using DOS.  The basic commands are mostly the same, except you use CAT instead of CATALOG when you are in 40-column text mode. .dsk disk images with a ProDOS order sector format sometimes use .po while disks with a DOS sector order format sometimes use .do.  A ProDOS formatted 5.25" disk is the same size as a DOS formatted 5.25" disk.  Instead of 256-byte sectors, ProDOS uses 512-byte blocks.  The number next to a file on a ProDOS disk tells the user how many blocks on the disk it uses.  1 block = 512 bytes.  File types use slightly more descriptive three letters, BAS for Applesoft BASIC files, BIN for Binary files, TXT for Text files and SYS for System files.

One difference between DOS and ProDOS is how it formats disks. When you format a disk in DOS 3.3 with the INIT command, you will not only make that disk readable to DOS and other programs but also make it bootable.  When you insert this newly initialized disk into a drive and boot the system you can use DOS commands and do not have to wait for Integer BASIC to load into memory.  You will still need to copy over any useful programs from the DOS System Master disk if you want to use them.

Formatting in ProDOS works a little differently.  There is a utility on the ProDOS system master to format a disk, (Copy II Plus v8.4 in ProDOS 8 v2.4.2).  However, the resulting formatted disk will be usable as a data disk but not bootable because the ProDOS system files have not been transferred.  These files, PRODOS.SYSTEM and BASIC.SYSTEM, take up a lot of space and must be manually copied over to the formatted disk before it will boot.

If you wish to list the contents of a ProDOS subdirectory by the BASIC prompt, type CAT or CATALOG [SUBDIRECTORY NAME].  If you wish to execute a program, then type BRUN [SUBDIRECTORY NAME]/[PROGRAM NAME].  

Sound Cards and Game Controllers

As you probably will be buying an Apple //e to play games, you should probably consider picking up a joystick at some point.  Some games will refuse to load or run without a joystick, and games that were made before the Apple //e will probably not recognize the Up and Down arrows on the keyboard because the Apple II and II+ did not have them.  Apple II joysticks are analog using a 150KOhm potentiometer for each axis.  Paddle controllers can also be attached, but they are rather rare.  Older joysticks plug into the internal Game I/O connector on the mainboard but newer joysticks use the DE-9 external Game I/O connector on the //e or //c.  It is quite possible to modify an analog PC gameport joystick to work as an Apple II joystick, and there is even a converter that lets you plug in a PC gameport joystick into an Apple II joystick port without modding.  The keyboard's Open Apple and Closed Apple/Option keys correspond to joystick buttons 1 and 2.

There is only one sound card that ever found support in games, the Mockingboard.  This card supported one or two AY-3-891x sound chips and a Votrax SC-01-A or SSI-263 speech chip.  One Mockingboard with two sound chips will allow you hear superior music with any Apple II game which supports the card, with the exception of Ultima V.  Ultima V can support two Mockingboards or a single Phasor sound card (which is essentially two Mockingboards) or MIDI music output via a Passport MIDI interface.  The Mockingboard should go in Slot 4 for maximum compatibility. Almost forty games support the Mockingboard.  

Only about twenty Apple II games support a mouse, but the Mouse Interface Card is not too difficult to find.  The Mouse Interface Card can use essentially any of the boxy Apple Mice with a DE-9 connector except the Lisa mouse (which are rare as hen's teeth).  About fifteen games support a printer, and Apple's own printers were serial based, so a Super Serial Card would be useful.  Two games support modem play, and while analog modems tend to be less than reliable with the VoIP technology used by the phone lines these days, 300 baud should be possible.  

Diagnostics and Preventive Maintenance

The Apple //e is a fairly robust machine if treated right.  A dirty mainboard traps in heat, so you should clean the dust off the board as well as you can.  Early Apple //e mainboards have fully socketed chips, later boards only partially socketed chips.  All Apple //e computers have a built in self-test program which can be activated by holding Open Apple and Closed Apple/Option on starting the system.  If you have bad RAM, the self test program can tell you where you can find the bad chip.  The Apple //e uses standard 64Kbit x 1 DRAM chips except for the //e Platinum, which uses 64Kbit x 4 DRAM chips.  If your system is good then the diagnostic will report "KERNEL OK" or "System OK" and then you can reboot. The Apple //e Diagnostic v2.1 disk can be used to test all aspects of the system more thoroughly than the built-in diagnostic.

If you get old cards, either inside the case or purchased separately, be sure to clean the pins with isoprophyl alcohol, 91% is good and available at stores but 99.99% which can be bought from MG Chemicals is the best you can get.  Use a Q-Tip and swab both sides of the card edge until no more dirt comes off the Q-Tip.  You can and should clean the slots with alcohol.  Take a plastic credit or gift card, wrap one of the shorter edges in paper and apply a decent amount of alcohol onto both sides of the paper-wrapped edge.  Then insert and remove the wetted-paper edge into the slot.  Cover the edge with dry paper and repeat.  This should reduce any flaky operation attributable to expansion cards.  Contact cleaner can be used with stubborn cards and slots, but do not expect miracles if your card has bad ICs or broken pins or cracked traces.

One thing that we tend to take for granted is the power supply.  The Apple //e uses a switching power supply full of components.  One component in particular, the RIFA capacitor, has been known to fail.  When it fails, it lets out a lot of smoke and a very unpleasant smell that lingers.  You should at least check your power supply and look for cracked RIFA caps.  If you see cracked, worn or leaking RIFA caps, go here and get a replacement.  Eventually you may want to go for a full power supply replacement, but the RIFA capacitor replacement is much more of an immediate issue.

The Apple //e computer can have its plastic case yellow over time if exposed to direct sunlight over time, so you should keep your machine out of direct sun.  The //e Platinum can show more profound yellowing because its color was off-white compared to the beige of the earlier models.  

Enhancing the //e

The Apple IIe came with four main varieties of motherboards, the "rev A" boards which lack DHGR capability, the "rev B" boards which support DHGR, the Enhanced //e boards and the Platinum //e boards.  For the beginner, the Enhanced and Platinum //e boards, which I will hereafter refer to as the Enhanced boards, are functionally identical.  If you obtain an unenhanced IIe, should you enhance it?

The Enhanced boards support several features lacking in the non-Enhanced boards.  First there is the 65C02 CPU which has additional instructions over the original 6502 CPU and runs cooler than the old chip.  Second is the Character Generator ROM, which add "Mouse Text" character support for that software which needs it.  Third is the Firmware ROM, which adds support for lowercase text in BASIC and reintroduces the mini-assembler lost with the Apple II+ Firmware.  

The good news is that you can enhance any "rev. B" motherboard by swapping out these chips, and they are invariably socketed on these boards.  You can burn your own EPROMs for the ROMs and the sockets accept standard 2764 and 2732 EPROMs.  You can use most 65C02s, but if you want to use a W65C02, you must follow the instructions here.

Unless you have an EPROM burner and some spare EPROMs, I would suggest simply buying the Enhancement Kit from ReactiveMicro.  It has all the EPROMs and the right 65C02, so you should just grab your chip puller and you should be all set.  

Should you upgrade?  Only a very few commercial games released during the IIe's lifetime required a 65C02, Champions of Krynn and John Carmack's Catacomb are the only ones I've found.  A homebrew game, Oubliette 2021, will crash without a 65C02.  If you want to run the latest official ProDOS 8 or are into late Apple II application software or wish to use a mouse with your Apple IIe, like Mouse Desk, MousePaint, and some later versions of AppleWorks, you will need the 65C02 or the Character ROM with Mouse Text.  

With every upgrade comes the potential to break something in terms of compatibility.  The original Ultima cannot register ships being destroyed in Space and One on One hangs if a Mockingboard is present if a 65C02 CPU is present.  Uncracked games like Choplifter "whitelist" the firmware and do not load if they do not recognize the firmware.  I am sure there is at least one program which will unintentionally show mouse text characters because they intended to show the characters which were replaced by Mouse Text.  

2 comments:

  1. Minor typo: “ The last official version of ProDOS 8 is v2.0.3, however it requires a 65C02 CPU. ProDOS 8 v1.9 is the last official version of ProDOS 8 which works with a 65C02 CPU”; that second 65C02 should probably be a vanilla 6502?

    Great article otherwise!

    ReplyDelete