Vista Normal

Hay nuevos artículos disponibles. Pincha para refrescar la página.
AnteayerSalida Principal

Exploring PC Floppy Protection: Formaster Copy-Lock

28 Agosto 2024 at 05:00

[GloriousCow] has started working on a series of investigations into the various historical floppy disk copy protection schemes used in the early days of the IBM PC and is here with the first of these results, specifically Formaster’s Copy-Lock.

This is the starting sector of track 6. It looks empty, but it’s not quite.

The game in question is King’s Quest by Sierra Entertainment, which used a ‘booter disk’ with the Copy-Lock protection scheme. Instead of having to boot DOS separately, you could just insert this disk and the game would launch automatically. Early copy protections often used simple methods, like adding sectors with non-standard sizes or tampering with sector CRC values to create disk errors. Copy-Lock employed several such tricks together, making it challenging for standard floppy disk hardware to replicate. In the case of Copy-Lock, Sector 1 on track 6 was intentionally written as only 256 bytes, with a 256-byte blank section to fill the gap. Additionally, the CRC was also altered to add another layer of protection.

When attempting to read the disk, the PC BIOS interrupt routine assumes it’s looking for a standard 512-byte sector, so when a “read sector” command is issued to locate the sector, it never finds it. To detect a dodgy copy, the game bypasses the BIOS and talks directly to the floppy disk controller using some custom code. The first part of the code uses the standard INT 13h routine to seek to track 6, sector 1, where it expects a fail since there is no valid sector there. Next, the floppy controller sends the “read track” command to perform a raw dump of all 512 bytes at this address and looks for a magic number, 0xF7, sitting in the final byte. That empty second half of the short sector is indeed not empty and is the check the game makes to determine if it was written with the Copy-Lock capable hardware. That last point is pertinent; you can’t create this disk structure with a standard IBM PC floppy disk controller; you need specialised hardware that can write different-sized sectors and incorrect CRCs, and that costs money to acquire.

We recently covered the copy protection scheme used for Dungeon Master on the Atari ST and the Amiga. If you’re thinking less about how a floppy got cracked and copied and more about how to preserve these digital relics, check this out!

Everything You Wanted to Know about Early Macintosh Floppies

26 Agosto 2024 at 08:00

Using a disk drive today is trivial. But back “in the day,” it was fairly complex both because the drives were simple and the CPUs were not powerful by today’s standards. [Thomas] has been working on a 68000 Mac emulator and found that low-level floppy information was scattered in different places. So he’s gathered it all for us in one place.

Low-level disk access has a lot of subtle details. For example, the Mac calibrates its speed control on boot. If your emulated drive just sets the correct speed and doesn’t respond to changes during calibration, the system will detect that as an error. Other details about spinning disks include the fact that inner tracks are shorter than outer track and may require denser recordings. Laying out sectors can also be tricky since you will lose performance if you, for example, read sector one and then miss sector two and have to wait for it to come back around. Disk sectors are often staggered for this reason.

Adding to the complexity is the controller — the IWM or Integrated Woz Machine — which has an odd scheme for memory mapping I/O. You should only access the odd bytes of the memory-mapped I/O. The details are all in the post.

In a way, we don’t miss these days, but in other ways, we do. It wasn’t that long ago that floppies were king. Now it is a race to preserve the data on them while you still can.

❌
❌