BMOW title
Floppy Emu banner

Floppy Emu Adds .WOZ Support

Good news, Apple II fans – support for .WOZ disk images is now available on the BMOW Floppy Emu disk emulator!

The .WOZ disk image format is an exciting newcomer to the vintage computing world. First released in 2018, it was developed by John K. Morris with the goal of being the most accurate possible representation of data encoded on an Apple II floppy disk. Other disk image formats omit certain “unimportant” data like sector headers, or make other simplifications and assumptions about the disk data. These assumptions are fine for standard software, but they fail for vintage copy-protected software that intentionally violates the standards. Some formats like NIB come closer to capturing all the low-level details of the floppy data, but still fall short. With the WOZ format, it’s possible for the first time to run heavily copy-protected vintage Apple II software directly from a disk emulator, without the need to “crack” the protection. This includes software using copy-protection techniques like cross-track synchronization, intentional invalid or blank regions of the disk, and even the dreaded Spiradisc spiral data tracks.

WOZ format caught my attention when it was first announced last year, and I read through the documentation, but concluded it would be too time-consuming and difficult to add to the Floppy Emu. I was skeptical that some of the timing requirements for cross-track synchronization and other WOZ featues could be met without pre-loading the entire disk image into RAM. The Emu hardware doesn’t have enough RAM to pre-load a full disk image, so the idea looked like a non-starter, and I shelved it. But after a steady trickle of inquiries I finally took a second look at WOZ a couple of weeks ago, and was able to make it work. I was right about the time-consuming part, but wrong about the rest – I eventually found solutions to the technical challenges that worked on the existing hardware. The result is worth it. Many thanks to John for answering my questions and providing sample disk images for testing.

About Floppy Emu: Floppy Emu is an external disk emulator for classic Apple II, Macintosh, and Lisa computers. Using disk images stored on an SD card, it can emulate 5.25 and 3.5 inch floppy disks, Smartport hard disks, Unidisks, and HD20-type hard disks.

 
Apple II Copy Protection Tricks

I discussed Apple II copy protection techniques a couple of years ago here. The WOZ format addresses three major areas:

 

Non-standard data (example: Rescue Raiders) – Normal Apple II floppy disks have 16 sectors per track, 256 bytes per sector, with a standardized sector header beginning with the famous D5 AA 96 byte sequence. Copy-protected disks throw all the standards out the window. To avoid any possible confusion, WOZ stores each track as a single very long bit sequence, without making any assumptions about what the bits mean, or how many bits there are. The track can even have fractional bytes, with a bitsteam size that’s not a multiple of eight.

 

Fake random bits (example: Print Shop Companion) – Normal floppies have data on every track. Even if there’s unused space on the disk, valid sectors will still be present – they’ll just be marked as unused. Copy-protected disks may have tracks that are truly blank, with no magnetic flux transitions. A true blank track is different than an empty/unused track. The drive hardware goes slightly haywire when attempting to read blank tracks, turning up its auto-gain control until it begins to see flux transitions that aren’t really there. The result is that reading a blank track will return a random sequence of bits that’s different each time it’s read. Copy-protected software can check for this. Because there’s no way to write a truly blank track on a standard Apple II floppy drive, this is an effective method of copy-protection.

A related protection technique is to include disk bytes with three or more consecutive zero bits. These can’t be read reliably by Apple II floppy drives, and they appear as random bits, similar to blank tracks. Copy-protected games can read the same bytes multiple times, to verify that random bits appear where they should.

The WOZ format solves both problems by specifically marking tracks and bits that should be treated as random, rather than as standard zero bits. The Floppy Emu firmware can then use a pseudo-random number sequence to generate such bits when needed.

 

Synchronized tracks (examples: Take 1, Archon, Frogger) – On a normal floppy disk, each track is a narrow ring of bits on the magnetic media, and the ring can be rotated at any angle relative to its neighbors without affecting the software. But some copy-protected disks rely on a specific rotational synchronization between neighboring tracks. For example they may require that sector 0 of the first track is physically adjacent to sector 0 of the next track. Because Apple II disk drives ignore the disk’s index hole, this track-to-track rotational synchronization is impossible to achieve when writing disks on a standard drive, and requires special mastering disk hardware. “Take 1” is a good example of software that relies on this type of cross-track synchronization.

WOZ format stores each track’s bitstream relative to the same reference angle. That preserves the cross-track synchronization information. But it’s up to the Floppy Emu to maintain a consistent rotational angular velocity for the emulated spinning floppy disk while stepping between tracks or performing other operations that temporarily interrupt the bitstream. This was the most difficult part of getting WOZ working on the Floppy Emu hardware. It required maintaining microsecond-level timing information about the current state of the bitstream, even while servicing hardware interrupts, reading data from the SD card, or updating the display.

Some copy-protected games take cross-track synchronization even further. They include a double-wide track that spans the width of two normal tracks. The software starts reading from the first track, and then steps to the next track while reading. Reading and stepping at the same time – that’s just evil. “Archon” is one example of this double-wide synced track protection method.

The ultimate in synchronized track copy protection for Apple II is Spiradisc, as found in “Frogger”. The data begins on track 0, but after less than a full disk rotation, the data jumps to track 0.25 and immediately continues. From there it follows the same pattern, with a short data section on each quarter track before jumping to the next track, spiraling all the way through the disk. Once I got Spiradisc working on the Floppy Emu hardware, I knew things were looking good.

 

And more – Other copy-protection tricks that are addressed by the WOZ format include monkeying with the soft switches, resetting the latch midway through a byte, and storing data on quarter and half tracks (The Bilestoad). It’s a jungle out there!

There’s an incredible variety of copy-protection schemes used by vintage Apple II software. Even with the addition of WOZ support to the Floppy Emu, you may still encounter some protected software that doesn’t work correctly. Some games such as Frogger apparently work only when using a real Disk II controller card, and the built-in disk port of an Apple IIc or IIgs won’t work. A few protected titles may work intermittently or not at all, for reasons that aren’t clear. If a game doesn’t boot on the first attempt, give it a second try. Typically the protection check happens only once during booting, and then you’re good to go.

 
What’s Included

  • support for WOZ1 and WOZ2 format disk images
  • cross-track synchronization capability
  • fake random bits support
  • disks with more than 35 tracks
  • internal upgrade from half-step to quarter-step precision
  • related improvements for NIB support

 
TL,DR

“My God, man! Stop talking and just give me the download link!”

Floppy Emu firmware 0.2G contains all the new features described above. This was a major change to some fundamental parts of the emulation code, and there may be unknown bugs, so this firmware is a “beta” release. If you don’t have a specific need to use .WOZ disk images, then stick with the previous firmware version for now. But for those who like to live life on the edge, here it is:

for Floppy Emu Model A – apple-II-0.2G-F22
for Floppy Emu Model B – apple-II-0.2G-F23

You can also download some sample WOZ disk images. All of these have been tested successfully with Floppy Emu using the 0.2G firmware. – WOZ sample disks

Read 15 comments and join the conversation 

15 Comments so far

  1. xot January 24th, 2019 9:52 pm

    Exciting news! Thanks for giving .WOZ a second look.

  2. MGS2600 January 24th, 2019 10:29 pm

    This is great!! Just purchased a Floppy Emu a week or two ago and this just makes it all the more exciting!!! I can’t wait to get this firmware loaded onto it and check out some .WOZ on my IIC!!!

  3. EMU January 25th, 2019 12:00 am

    nice news, but now i cant remember what version of emu i have? any way to see what model emu i have? Ha!

  4. Dillon Nichols January 25th, 2019 4:12 am

    Great job. I don’t know if I could’ve pulled this off. Problems that like really put me off a project.

  5. Antoine Vignau January 25th, 2019 6:12 am

    Nice work, congrats.

    On the reason why some games require a Disk II controller card, if my memory serves me well, the reason is that the Disk II controller card leaves phase 0 on whereas the controller boot code on others (IIc, IIgs) leaves phase off.
    I once wrote a short comment about that on my crack of Outpost in 2007 at http://www.hackzapple.com/phpBB2/viewtopic.php?t=166, see the LDA $C080,X ; Remember what Apple said. I just cannot find the source.

    I just tried booting Frogger (the Sega version) on my IIgs using the Disk II controller code at $4600 and it booted not far, as it uses false opcodes) but it booted.

    Antoine

  6. Evan Anderson January 28th, 2019 6:31 pm

    I really appreciate the continued work you’re putting into Floppy Emu, Steve. It has already proven very valuable to me, and this makes it even more valuable.

  7. qwj February 6th, 2019 4:40 am

    I updated the firmware to support WOZ format, but not PO format and other 160K formats. What’s the reason?

  8. Steve February 6th, 2019 7:58 am

    Sorry, I don’t understand your question. WOZ is a new format. Support for PO and other 140K formats is unchanged from the previous firmware.

  9. qwj February 6th, 2019 5:38 pm

    I mean: My emulation floppy driver firmware has been upgraded to the latest version, but it still does not support PO format. What’s the reason? Old firmware without upgrade does not support PO format.

  10. qwj February 6th, 2019 5:46 pm

    ERROR:disk image type is not supported in the current emu mode

  11. Steve February 6th, 2019 5:58 pm

    QWJ, please see the instruction manual here: https://www.bigmessowires.com/femu-instructions.pdf . PO disk images are supported by the Apple II firmware for 5.25 inch, 3.5 inch, Smartport, and Unidisk emulation modes. If you’re having problems with a specific disk image, please contact me directly using the “Contact” link at the top of the page.

  12. Jason Heiser July 5th, 2019 4:33 pm

    Do you have any plans to add WOZ support to the Mac firmware for Floppy Emu? I’ve been imaging copy-protected software from the Mac’s earliest years with an Applesauce. So far no Mac emulators support WOZ. I’m hoping that will change eventually. Floppy Emu support would be terrific and help rescue these Mac programs from being lost and unusable.

  13. Steve July 6th, 2019 10:04 am

    I’ve never seen a Macintosh disk with media-level copy protection – is this what you’re referring to? For Macintosh I don’t believe there’s much benefit to WOZ over other existing formats, but there are several drawbacks. I recommend sticking with existing Mac formats like raw DSK or DiskCopy 4.2 IMG.

  14. Jason Heiser July 7th, 2019 11:49 am

    If you’re interested, there are some A2R disk images I uploaded to the Macintosh Garden. All of them have media-level copy protection. Some of the titles include Lode Runner, Hacker 2: The Doomsday Papers, and Star Trek: The Kobayashi Alternative.

    http://macintoshgarden.org/games/lode-runner
    http://macintoshgarden.org/games/hacker-ii-the-doomsday-papers
    http://macintoshgarden.org/games/star-trek-the-kobayashi-alternative

  15. Chris M. July 7th, 2019 5:00 pm

    Steve,

    VERY early Macintosh software from 1984-86 had media-level copy protection. It wasn’t limited to games either as my copy of Microsoft Multiplan is clearly copy protected and came with a backup disk! Central Point even released “Copy II Mac” to allow one to make backups of this software. The practice ended quickly though as changes to the floppy hardware on later machines broke the copy protection routines. I don’t think any 800k HFS disks had protection, it was likely limited to 400k MFS disks.

Leave a reply. For customer support issues, use the Contact page instead of comments.