Archive for November, 2022
An Idea for Macintosh Disk Daisy-Chaining
The Apple II family of computers supports daisy chaining disk drives, but the classic Macintosh family sadly does not. This means it’s impossible to create a Mac equivalent of Floppy Emu‘s Apple II Dual 5.25 Inch Floppy emulation mode, or its four-disk Smartport hard disk mode. Apple II computers have two separate ENABLE signals on the disk I/O connector, as well as an ENABLE35 signal, which allows for directly addressing four separate drives on the same connector. This can be expanded to even larger numbers of drives through additional tricks. In contrast, the Mac only has a single ENABLE signal and no ENABLE35, so it’s physically impossible to address more than one disk drive. Unless… I recently had an exciting shower idea (my best place for inspiration) that might offer a solution.
Dual Macintosh Hard Disk
Floppy Emu can emulate an HD20-type hard disk, which is an older type of non-SCSI hard disk that connects to the computer’s floppy port. A real HD20 hard disk actually does support daisy chaining: you can plug a second one into the back of the first. The computer uses an HD20-specific mechanism for addressing the desired disk. When ENABLE is asserted, the first HD20 is selected. If PHASE3 (also called LSTROBE) is toggled while ENABLE remains asserted, logic inside the HD20 drive will deselect the first drive and select the second. Each additional PHASE3 toggle selects the next disk in the chain.
You probably didn’t know that Floppy Emu already supports this, in a limited way. At the lower-left corner of the board, there’s an unpopulated footprint labeled J7, which provides a decoded enable signal for the next HD20 hard disk in the chain. You’ll have to kluge together your own custom cable for connecting the daisy-chained HD20, but it works. I even designed a hardware adapter to make this easier, but never sold it. And now that I’ve told you about this, I’ll also tell you that I plan to break this undocumented J7 signal in a future firmware release.
You know what would be better than daisy-chaining a second physical HD20 hard disk? Making Floppy Emu emulate two separate HD20 hard disks at the same time. This is such an obvious idea that I’m unsure why I never thought of it before. Emulating two hard disks simultaneously would be fantastic for booting one and formatting the other, or copying files between the two. Both of those jobs are currently impossible with the Floppy Emu, and require using additional disks or PC-based disk image editors. It should be fairly simple to make it happen: instead of using that J7 signal to enable a second external HD20 hard disk, use the same signal to enable a second emulated disk. The necessary UI and dual-disk guts could be borrowed from the Apple II version of Floppy Emu firmware.
Dual Macintosh Floppy Drives
The PHASE3 toggling trick works for HD20 hard disks because the Macintosh ROM already contains the necessary code. But could the same trick be used to select multiple daisy-chained floppy disks? This would require a Macintosh INIT or System Extension that patches the floppy disk controller code in ROM, fools the computer into thinking there are three floppy drives (one internal and two external), and performs the PHASE3 toggling every time it accesses the floppy drive. On a real floppy drive this wouldn’t do anything, and attempting to select the second external drive would simply select the first one again. But on a Floppy Emu with appropriate firmware support, it should theoretically work as intended. This ROM patch would also need some way of detecting whether the external drive were a dual-drive capable Floppy Emu, or a single-drive Floppy Emu, or a real floppy drive.
The floppy disk controller code in ROM would also need to be reviewed to look for existing places where PHASE3 might be changed while ENABLE is asserted. These would act as false positives, triggering unwanted selection of the second drive. I’m unsure if the existing code does this, or if it does, how difficult it might be to change. Maybe a different selection mechanism than PHASE3 toggling would be required. Maybe all the disk I/O signals are already overloaded during floppy disk I/O and there’s no practical way of using them to select a second drive. More research is needed.
Whatever the final selection mechanism is, this kind of INIT-based ROM patching is far beyond my Mac programming skill level, and also beyond my interest level. But I’m hoping that somebody reading this might have interest and the necessary skills. I think there would need to be a separate patch for each unique Macintosh ROM: one for the Mac 128K and 512K, another for the Mac 512Ke and Plus, another for the Mac SE, another for each of the Macintosh II models… a lot. The necessary changes would be mostly the same in each case, but the patch location and details would differ. If this makes sense to you, and you think you have the knowledge to make an INIT patch like this, please let me know!
Assuming that ROM is patched somehow, and there now exists a way to physically select a second floppy drive, there’s still a question whether Floppy Emu could actually emulate two 3.5 inch floppy drives. There are major reasons to think it might not be possible. Although the hardware can emulate two 5.25 inch floppy drives for the Apple II, 3.5 inch floppy drives are much more complicated. 3.5 inch drives have 10 internal 1-bit state registers for tracking things like which direction to step tracks, and Floppy Emu maintains this state entirely within its CPLD logic chip. The chip doesn’t have enough logic resources to store two copies of these state registers, and there’s no mechanism for the microcontroller to directly query or set this state. Making this work for two 3.5 inch floppy drives would therefore require some creative solutions that I can’t see right now. But this is ultimately an emulator hardware limitation, and dual 3.5 is at least theoretically possible with a patched ROM.
Read 4 comments and join the conversationFloppy Emu Update: Odds and Ends
Here’s one more firmware update for the BMOW Floppy Emu disk emulator for classic Apple computers. This update resolves some minor problems and inconsistencies that were discovered in the previous version, but don’t get too excited because it’s all small stuff.
Macintosh/Lisa
- Fixed a bug that broke the display type setting when selecting a Macintosh Hard Disk image
Apple II
- Back-ported the past year’s worth of updates to the Floppy Emu Model A
- Added a new start-up screen for the LCD display on the Model A and Model B
- Fixed more bugs that could prevent firmware updates from completing successfully when Emu is in Smartport mode
- Implemented a buffer overflow check for non-standard WOZ disk images (max size is 9216 bytes per track)
- ProDOS volume names are now displayed for raw disk images whenever possible, in addition to the disk image name
Download the latest Floppy Emu firmware from the project page, or buy a new Floppy Emu Model C at the BMOW Store.
Read 2 comments and join the conversationFloppy Emu: New Smartport UI and Settings Menu
I’m squeezing in one more big firmware update for the BMOW Floppy Emu disk emulator before the Thanksgiving break. This update brings a major improvement for Smartport hard disk selection and management, as well as a new settings menu that combines all of the Floppy Emu’s various user preferences. Based on the suggestions and questions I’ve received in the past, I think this update is going to make a lot of people happy.
Disk Image Selection UI for Smartport Hard Disks
For Apple II computers, Floppy Emu offers a Smartport hard disk emulation mode, providing up to four simultaneously-available hard disks to your computer. Today’s firmware update introduces a new UI for dynamically managing and selecting the desired disk images, entirely within the Floppy Emu menus, and without needing to rename any files on the SD card. After pressing a button to pause the Smartport disk emulation, a setup screen appears. For each of the four hard disk slots, you can view or change the associated disk image, or remove the disk image and leave the slot empty. Disk images are selected through the the same file browser menus as in other emulation modes.
It sounds simple, it was a bit of a bear to implement, but it was worth it. The new interface is a much more flexible and intuitive way of configuring Smartport hard disks, and it’s no longer necessary to name or rename the disk images using a fixed naming convention like smart0-gsos-6.0.2.po.
System Settings Menu
This update also introduces a new system settings menu for all Macintosh, Lisa, and Apple II firmware versions. Press SELECT when prompted during Floppy Emu’s startup, and you’ll arrive at this new top-level menu. From here you can change the current emulation mode, adjust the display type and brightness, view software version information, and more. This menu replaces the scattered settings interfaces that existed before, each requiring a different hard-to-remember button combination to reach.
The Jumbo OLED option that appears in the settings menu is for a 2.4 inch display that was previously discussed in 2019. A few people have since built custom Floppy Emu enclosures using this OLED, but the standard firmware doesn’t work quite right with it: text and images appear shifted two pixels out of position. Beginning today, the jumbo OLED is graduating from a fun experiment into an officially-supported option, and changing the display type to jumbo adjusts the image position as need.
Update Now
Download the latest Floppy Emu firmware from the project page, or buy a new Floppy Emu Model C at the BMOW Store.
I’ve also prepared this video demo of the new one-step process for firmware updates, which was introduced last week.
Read 15 comments and join the conversationFloppy Emu Update: UI Goodies and More
Please enjoy this new update for the BMOW Floppy Emu disk emulator as we head into the Thanksgiving holiday week. The new firmware brings a UI refresh, scrolling of long filenames, bug fixes, performance tweaks, a couple of new disk formats, and a simplified naming scheme and update process. I think you’re going to like it. Here’s a look at what’s changed.
UI Graphics Galore
For the Floppy Emu Model C, the user interface has been overhauled to take better advantage of the extra display resolution (compared to the previous generation of hardware). There’s a new start-up screen to replace the old smiley-face, and improvements to how the current emulation mode is displayed. I sometimes hear from customers who are confused about which disk emulation mode they’ve chosen, or how to change the emulation mode, and this UI should help with both. The active emulation mode is now displayed in both text and graphics during startup, along with a prompt “press SELECT to open emulation mode menu”. If you can’t remember that you chose Lisa 3.5 inch floppy disk emulation, now you’ll see a bitmapped Lisa logo and a 3.5 inch disk icon. All of the references to the PREV, SELECT, and NEXT buttons have also been enhanced with triangle and square icons to match the legend on the Emu’s acrylic case. It looks slick.
The new UI extends to the main disk emulation display as well. You’ll see one or two icons depicting the types of disks that Floppy Emu is currently emulating. Read-only disks are displayed with a padlocked icon, and in Dual 5.25 Inch Floppy mode the icons are also numbered for Drive 1 and Drive 2. It may be eye candy, but it’s so much better than boring text.
Long Filename Scrolling and Size Display
Do you have a file or directory name that’s too long to fit the Floppy Emu’s display? The new firmware also implements filename scrolling in the menus and disk emulation screens. It’s hard to capture in a photo, but it’s a smooth pixel-by-pixel scrolling and it looks great. This features was suggested several times in the past, but I used to believe it wasn’t necessary. The firmware truncates long filenames by omitting the middle section, rather than the end, so “Welcome Aboard – Disk 1, Size A.woz” becomes “Welcome Aboard ..de A”. That’s enough to tell apart side A, B, and C, but now that I’ve seen filename scrolling in action, I have to admit it’s much nicer. The original method is still used when you’re quickly scrolling through a menu listing, but if you pause for a second, the highlighted menu entry begins to scroll and reveal the full name of the file or directory.
For technical reasons, long filename scrolling isn’t available for Unidisk 3.5 disk emulation. Whomp whomp.
Filename scrolling also creates an opportunity to show more information about the highlighted item in disk selection menus. If Floppy Emu recognizes the disk image as a supported type, it’ll show the size/type as a suffix on the filename, right in the menu! Imagine you’ve got your Floppy Emu connected to a Macintosh Plus, which supports 400K and 800K floppies only. If you scroll through a directory listing and see “Stuffit Expander 5.5.dsk 1440K” then you’ll immediately know the Mac Plus can’t read it. With the earlier firmware, you had to guess at this, and try inserting the disk before you could learn its size and type.
Bug Fixes and Enhancements
The new Apple II firmware fixes a rare bug that occurred when Dual 5.25 Floppy mode was used with a Yellowstone universal disk controller card, and Drive 2 was empty. Why would you run Dual 5.25 Floppy mode but leave one of the drives empty? I don’t know, but it’s fixed now.
For Macintosh/Lisa users, menu scrolling and alphabetic sorting have been sped up to match the behavior of the Apple II firmware. There are also three new floppy disk type variations, which I’m calling Small 400K, Small 800K, and Small 1440K. These are standard raw floppy disk images, except instead of filling empty sectors with zeros at the end of the disk image, the image file is simply truncated. You might recognize these as a disk image like “Tools.dsk” that’s 717K instead of 800K. It’s rare, but I’ve run across a few examples.
New Firmware System
The final change is the one I’m most excited about: an all-new system for naming and applying firmware updates. Before now the firmware versions had complex names like “Mac-Lisa-0.8H-F15”, which made sense to me but confused everybody else. The firmware was also distributed as two separate data files, one for the AVR microcontroller chip and another for the CPLD logic chip, and both parts needed to be installed separately.
No more. Beginning with this version, I’m moving to a simplified naming scheme using the date in YYMMDD format, with an A or M suffix to indicate the Apple II or Macintosh/Lisa version of the firmware. I’ve also merged the two data files into a single unified file, requiring only a single step to perform the update. If you’re familiar with the old update process, make sure to view the README file since the process has changed. Behind the scenes the AVR can now detect when it’s just been updated, and it automatically unpacks and applies the CPLD update too. I should have done this years ago.
Download the latest Floppy Emu firmware from the project page, or buy a new Floppy Emu Model C at the BMOW Store.
Read 2 comments and join the conversationNoisy Disk 5.25 Inch Mechanical Sound Maker
The Noisy Disk is back in stock at the BMOW store, after a manufacturing delay. Do you miss the iconic sounds of mechanical click-clacking from original Apple II floppy drives? Does the familiar rattling of a boot floppy bring a smile to your face? This board uses a mechanical relay to create authentic-sounding disk head movements for the BMOW Floppy Emu disk emulator. Sure it’s useless, but it’s useless fun.
The Noisy Disk board attaches inline with your existing Floppy Emu cable. When Floppy Emu is configured to emulate a 5.25 inch Apple II floppy drive, the Noisy Disk onboard relay snaps open and shut whenever the emulated disk steps from one track to the next. It creates a symphony of disk noise that will bring back memories of 1979.
Noisy Disk is available now at the BMOW Store.
Read 2 comments and join the conversation