The AppleIISd gets smart

It seems impossible that almost exactly six month have passed since my last blog entry and contribution to my AppleIISd project!

On the start of the new year I joined the choir of a professional production of Disney's The Hunchback of Notre Dame and was busy rehearsing all of January and February. Since then I have had a show at least twice a week. 🎵
In March and April I was busy moving flats and had been unpacking and rearranging stuff. I have only had time to get back to the Apple II in the last couple of weekends. However, I tried up a Smartport driver implementation for the AppleIISd using the very little information that is available: 

The name Smartport stands for both hardware and software. The hardware part is what most Apple II users are familiar with: it manifests itself as the disk port on the IIc, IIc+ and the IIgs. It is capable of talking to dumb 5.25" drives as the UniDisk and the DuoDisk, as well as both intelligent and unintelligent 3.5" drives. Theoretically, up to 127 devices may be hooked up to a Smartport controller. Lately there have been some Flash-based solutions developed for it. It seems that it was originally intended for printers and modems, as well, since there is a "character device" class defined, but this is "currently" not supported in either ProDOS or GS/OS. The AppleIISd is, like all other devices, a block device. I am not concerned about the hardware, as the AppleIISd is not a device, but a Smartport controller, itself.

Being a Smartport controller means that it must provide the software part and that is what I guess you could call a device driver protocol. The driver interface is an extension to the ProDOS device driver interface, providing information on both the controller and the connected devices. The most important feature is the use of 24-bit (or 32-bit) addresses for both buffer and blocks, instead of the 16-bit addresses in ProDOS. With this it is possible to use the full address space of the IIgs and access larger volumes than the 32 MB ProDOS volumes, e.g. the Macintosh's HFS volumes.

Status commands return, as one might have guessed, the controller's or device's status. Most of this information is static, only the card-detect and write-protect state are reflected. Control command may for example, eject a disk from a drive, reset an SCSI bus or attempt to take over the world. Currently the AppleIISd does not support any control commands.

Internally, the Smartport read and write commands are wrappers for the ProDOS read and write commands, as they are using the same 512-bytes-per-block approach. Each 32 MB ProDOS partition is represented by a device on the Smartport bus. Addressing a block on a device is done by adding a static offset to the block address, as was done previously in the ProDOS part when accessing the second "drive".

So far, the card supports four 32 MB ProDOS partitions that are "phantom-slotted" on ProDOS 8 and are directly accessibly on GS/OS. I plan to support two additional partitions and/or an additional, larger HFS volume.

My rather quick attempt to support the Smartport protocol seems to work, but there are two issues, at the moment. In the previous version it was possible to remove the SD card from the slot and GS/OS noticed this. The drive symbol was grayed out, just like when removing a 3.5" disk from a drive without dragging it to the trash (ejecting), first. Now, GS/OS only crashes.

The second issue involves the AppleShare FST. When it is loaded on startup, GS/OS crashes, too. This behavior may be due to memory reasons, as my GS only has 1.75 MB of RAM, which is supposedly barely enough for GS/OS 6 and AppleShare. I am working on that!

Check out the latest versions of my repo on GitHub in the "Smartport" branch. 

Comments

Popular posts from this blog

How to prepare SD cards for the AppleIISd

Prebuilt AppleIISD V1.2.1 finally available

Prototypes for the new AppleIISd hardware V1.2