Applesauce

From The ReActiveMicro Apple II Wiki
Revision as of 12:43, 21 November 2017 by RMHenry (talk | contribs) (→‎Notes)
Jump to navigation Jump to search
AppleSauce by John K Morris

The Applesauce project was started in March 2017 by John K Morris of EvolutionInteractive.com. John is a well know programmer in his own right, however this is his most important contribution to the Apple II Community to date.


Background

In early 2017 John and Henry S. Courbis from ReActiveMicro were discussing project ideas mostly based around the Raspberry Pi. Henry sent John some hardware and after a few weeks of tinkering and discussing different projects John mentioned an idea he had involving floppy drives and backing up software. John knew Henry had worked on the EDD project and fixed several issue as a consultant for UltimateApple2 and they started to discuss how horrible and unreliable at best the EDD was in its attempt to capture the data which represents "the floppy". John started to talk about what if we attacked the problem of copying protected disks directly from the drive rather than trying to intercept the data stream from the drive under use like the EDD did. This was the start of what would become the Applesauce project.

John discovered it would not be possible to copy disks on-platform as the Apple II is too slow and too dependent on the Disk II Controller card. There would be no way to capture the timing data coming from the drive which occurs every 4 microseconds. In order to fully read a floppy disk as "raw data", also know as the flux patterns, he would need to take the drive off-platform and control it directly. The flux patterns are literally the way the magnetic particles are magnetized on the floppy medium. They are NOT bits of or among themselves. They contain timing information as well as program data.

After some research about how the Apple II encodes floppy disks John found the only one to get things right is Jim Sather in his book Understanding the Apple II. All the other books and resources seem to have major flaws in their interpretation of how things work and plagiarized from one another. It is quite possible that John may be one of the few people besides Wozniak and Sather to actually understand how the whole floppy subsystems actually work.

By March 2017 John had started to look in to how to control the Disk II Drive and its power requirements. After some research he found the drive should be able to be controlled by a microcontroller. However most microcontrollers are not 5v tolerant and would need active and bidirectional level shifting. A proper speed microcontroller would also be needed in order to provide enough resolution to handle all the data being read from the floppy disk and allow enough time to control the drive.

A major issue would also be how to determine where the disk is in relation to the drive. This is called synchronization. IBM PC drives use a sensor to track synchronization which allows for less floppy controller processing requirements and simpler controller design to navigate tracks and sectors. The Disk II drive however does not have any synchronization mechanism which some copy protections relied on and would make copying these protected disks impossible on-platform. In order to over come this issue John designed a sync sensor with the help from Henry and added it to the arbor of the Disk II drive.

The Disk II drive's power requirements also posed some issues as the power supply would need to support universal AC input to allow for international use, and also be tri-output in order to power the Disk II drive and its logic board. John initially used a prebuilt solution (as pictured) in order to reduce prototyping time. Later revisions of the project will use a custom power supply integrated on to the project's PCB.

In April John started in earnest to create the Applesauce User Interface. This will be a GUI based program for the Mac and ported to X86 and Raspberry Pi (ARM). Javier A. Rivera is assisting John with icons and other relates program art work. John has also been looking for programmers to help with different parts of the project so he can better concentrate on the analysis engine which is the heart of Applesauce.

Henry's involvement has been rather limited as John has wanted to get hands on with CAD and circuit design. Henry has advised on several aspects of the project however John has managed to do all the labor and design work in the Proof of Concept and Alpha designs. ReActiveMicro will probably have a hand in a final design review and audit as well as overseeing assembly and distribution.

Applesauce Alpha units have been sent to several test users who have evaluated the hardware and different aspects of the software and file format.

There have been other similar projects such as Kryoflux and Catwheesel, however these projects have fallen short in several areas especially where Apple II is concerned.

What Is Applesauce?

Applesauce comprises two parts - hardware and software.

The hardware component of the project is a "Controller Interface" that allows an Apple II Floppy Drive to be connected via USB to a modern computer.

The software component runs on the modern computer and controls the Floppy Drive and captures a data stream from the inserted disk.

Once this data stream is captured, the Applesauce software can then process the data for saving as disk image files.

Because Applesauce captures the data on the disk at the flux level, it is able to capture Apple II copy-protection schemes "in place".

The resultant disk image could have its copy protection cracked, or it can be written back to a physical disk by the Applesauce software with protection in place, or (subject to emulation hardware or software support) it can be used with copy protection left in place in the disk image in Apple II emulators or solid state Apple II disk drive emulators.

For non-protected (or previously cracked disks), Applesauce is able to capture a .dsk disk image in approximately 11s.

I have also added an expansion port to be able to upgrade the hardware for things like 3.5" disk imaging support.

Teensy

Info on exactly what is the Teensy and what it does.

How it will be updated. make sure that users can painlessly update the firmware on the board so that they won't be left behind as new features are added.

Sync Sensor

What it is and why we need it.


Notes

I have been doing all kinds of crazy analysis R&D work that has been really paying off. I'm currently working on a disk analysis/editor that is similar to the old nibble editors, but will show you the nibbles after the analysis tools have annotated the data. So, you get color-coded hex views that show you the function of every nibble. Every hidden sync bit. It will also point out where things like the copy protection exists and the techniques they are using to accomplish it. It gives you the ability to go "digital spelunking" through the disk. It will also allow you to repair a disk image. Do you have a flawed sector? Open up a different disk image (A2R, EDD, NIB, etc) of the same software and use it to patch the bad data.


One of the main things that Applesauce is bringing to the table is new disk image formats. The formats are completed and work has started with emulator developers to start integrating support for the new formats. The new image formats have been well received by folks as it addresses all of the shortcomings of current disk image formats like DSK and NIB. Talks have also started with some hardware developers to support the new formats within their virtual floppy drive projects. This will allow still copy protected disk images to run on real hardware.

EDD Is Dead

As quoted by Antwion, and why.