How a geek copies floppy disks to save old games and applications

Today we will tell a short story of John C. Morris, a programmer and well-known member of the community dedicated to Apple II computers. Realizing that precious data from floppy disks began to be irretrievably lost over time, he decided to create his own way to keep his favorite games and applications intact. John not only developed a device for copying floppy disks as accurately as possible, but also created a specialized application for it and even his own data storage formats. But first things first.

Since the beginning of time, people have preserved memories of themselves and events with the help of drawings, cuneiform writing, hieroglyphs and other ways of recording data on any material. Their efforts were not in vain, and thousands of years later we can better understand how and what our ancient ancestors lived.

The end of the 20th century was one of the turning points, because by this time information from analogue began to massively switch to digital. Software has become a new object of cultural heritage that needs to be preserved somehow. In parallel with the rapid evolution of computer technology, digital data carriers also developed. Alas, most quickly became outdated and were discontinued. This has repeatedly led to unpleasant incidents.

Lost Moon Dust Data

When NASA discussed the possibility of resuming flights to the Moon in 2008, It revealedwhich is 173 (172 according to data in other sources) magnetic tapes with data on lunar dust from three lunar expeditions (Apollo 11, Apollo 12, Apollo 14) were lost. The original data tapes were stored at the University of Perth, Australia. Copies were sent to the NASA archives, the fate of which is unknown. Either it was lost or accidentally erased, the essence does not change.

At that time, people were less interested in lunar dust than in the US victory over the USSR in the “moon race.” So the loss of data was simply not given due importance – the original was intact, and that’s fine. But when the time came to contact them, it became clear that NASA did not have a single streamer IBM 729 Mark V, which these tapes could be read. The situation was saved by the Australian Computer Museum, where one of the non-working streamers of this model was kept.

IBM 729 and IBM 7330 tape drives (image source)

Guy Holmes, CEO of data recovery company SpectrumData, took it upon himself to solve this problem. In agreement with NASA, he removed the tapes from storage at the university, placed them in a special room with an optimal climate, and began restoring the tape drive, kindly provided by the museum. In one of his interviews, he even joked that to start the streamer he had to find a drive belt from a 1970s Toyota Corolla. The story ended well, and the SpectrumData team was able to successfully extract most of the data by heating and slowly unwinding the magnetic tapes one by one.

Similar stories happened with later lunar expeditions, which served as an impetus for more active development of ways to archive digital data. Thus, the Library of Congress of the United States even has a separate division where not data is stored, but devices for reading data from outdated drives.

Corporations such as Microsoft are developing exotic methods of long-term storage, and non-profit organizations like Internet Archive allow any person on planet Earth to access accumulated data.

Data recorded inside quartz glass (image source)

But what to do if you are a fan of retro Apple II computers and you have a huge collection of magnetic disks with programs and games that are gradually becoming unusable? That’s right – copy. And here a lot of problems arise, such as the presence of copy protection. The technology designed to protect copyrights plays a cruel joke in this case, not allowing legal copies to be made from protected media.

In most countries of the world, a work can only enter the public domain after 70 years. Magnetic disks will not last that long, and valuable digital artifacts may well be lost forever. If you contact official organizations, this process will take an prohibitively long time, which simply does not exist. Faced with this problem, John C. Morris decided that it was not worth waiting for weather at the sea and that he had to act on his own.

Applesauce controller

For most floppy disks, protection is based on deliberately damaging certain areas. During normal copying on another medium, these sections will be intact, which will allow the resident program to recognize the replacement of the medium.

Another commonly used method is to split the application into two parts. The first part (bootloader) is located on a standard formatted portion of the media that is accessible to the operating system. Another section of the media is formatted in a non-standard way, and the protected program is located there. Thus, only the bootloader knows in what order to read the application data, and to the operating system it will simply be an unstructured jumble of ones and zeros.

Of course, there are more sophisticated security methods, but they all rely in one way or another on the software or standard behavior of the floppy drive controller. So to smoothly copy any disks, it was necessary to come up with something at the lowest level. So John C. Morris designed his own disk controller for the standard Apple II floppy disk drive and called it Applesauce.

One of the first Applesauce prototypes (image source)

But the drive controller itself is useless. To make it work, we also needed to write our own software. The same principle was used here that is actively used in modern digital photography. Instead of relying on the camera’s internal processing algorithms, professional photographers prefer to shoot in RAW, preserving the raw data from the sensor. Processing occurs later, using third-party software.

In the case of copying magnetic disks, it was necessary to force the drive to read magnetic charges without any processing and store them in a “raw” form. In addition, it was necessary to solve the problem of synchronization, that is, the controller had to uniquely determine where the floppy disk was located in relation to the drive. This would greatly simplify the controller architecture and overcome some particularly tricky copy protection methods. Both of these problems were brilliantly solved by John and the programmers from the community he organized.

Current version of the Applesauce controller (image source)

The final product is a custom board-based controller Teensy v3.2 with drive-mounted timing sensor, which allows you to connect your native Apple II drive via USB to any computer. Drives with a native 20-pin interface and those connected via DB-19 are supported. There is also support for conventional floppy drives that work with a 32-pin Shugart-compatible interface. The software was initially planned to be made for Mac, and subsequently ported to x86 and Raspberry Pi single boards.

A drive equipped with this controller can easily copy any magnetic disks, not being limited to supporting only disks from the Apple II. Floppy disks for Commodore 64 and 8-bit Atari game consoles are also perfectly readable and can be saved intact without the need for software hacking.

Applesauce app

At the time of writing this article, only the version is available for macOS 64-bit versions starting from 10.11. The application will work natively – both on Intel-based Macs and on more modern ones based on the M1 processor. The lack of other versions is explained by the fact that modern versions of macOS run easily on hypervisors like VMware Player and Oracle VirtualBox. But the reason is most likely more prosaic – the author does not have free time or resources for porting.

Main application window

Main application window

This application is actually a harvester that allows you to perform all service operations, such as updating the controller firmware, diagnosing and testing individual drive parts. In addition to working with the disk controller, Applesauce has a number of useful capabilities for analyzing, editing and converting formats. The bonus is that it is completely free and open source. But it is not exactly.

Morris developed two new data formats: A2R and WOZ. The first one is just that “raw” RAW. The average size of received files is 20 MB. The second format, named after Stephen Gary Wozniak, contains only the data itself and a small amount of metadata such as information about tracks and sectors. It is designed to reduce the overhead of emulators, and the resulting files are small in size, averaging 250 KB.

For ease of analysis, the application builds a visual representation of the data on disk and allows you to export it to the PNG graphic format:

Disk analyzer with loaded floppy disk image

Disk analyzer with loaded floppy disk image

Along with the streaming data presentation, it is possible to switch to the sector-by-sector information display mode:

Physical Sectors View

Physical Sectors View

The disk analyzer also has a truly killer feature – visualization of individual magnetic charges linked to a time scale. In some cases, this allows you to recover hard-to-read data:

Representation of magnetic charges

Representation of magnetic charges

A disc copied in this way can be saved not only in the formats listed above. John added to the application the ability to export to formats that modern emulators, such as MAME, understand:

The author of this article decided to understand from his own experience how the application works and downloaded an A2R image of a floppy disk with the game Chess. Next, I converted it to WOZ format and directly launched it in an open-source emulator AppleWin. The result is in front of you:

AppleWin emulator running Chess game

AppleWin emulator running Chess game

Since the creation of the first prototypes of the device, more than 1,000 images of the original floppy disks for the Apple II have been digitized. Some rare games, such as Paddle Fun (1979) and Skybombers II (1980), only saw the light of day thanks to the Applesauce project. Individual copies of the device went to avid collectors and are currently helping to digitize the software heritage of the Apple II era.

Instead of a conclusion

John was not a pioneer in this area and did not “reinvent the wheel.” Similar projects had already been proposed before him. For example, the German company Individual Computers developed the Catweasel controller back in 1996, which allows you to connect to standard drives and expands the range of supported formats. The latest version of the device was released in 2004 and is no longer produced.

A second attempt to do something similar was made in 2010 by the KryoFlux project. They also developed their own disk controller, but decided that hard coin was more important to them than the opportunity to help humanity preserve its cultural heritage.

In any case, “digital archeology” projects exist and work. Artifacts obtained by geeks continue to live and delight, for which thanks to these specialists. What cases of saving digital heritage have you heard of?

KryoFlux controller (image source)

KryoFlux representatives conduct background checks on potential buyers. If they find out that you work at a school or museum, then you won’t see the controller. Instead, you will be offered digitization “services.” Add to this poor support for floppy drives, a small number of supported emulators, as well as closed source firmware and software. This prodigy works poorly with Apple II discs, so Applesauce remains the only accessible and open alternative.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *