33 ms·
> Applesauce pushes out three general types of disk images in its work. Fluxes, which are to-the-bit accurate portrayals of the magnetic flux of the floppy disk
by ajross 4y ago
> Applesauce pushes out three general types of disk images in its work. Fluxes, which are to-the-bit accurate portrayals of the magnetic flux of the floppy disks.
This is a distressingly common misperception. In fact the flux stream that you get out of a reader like a Greaseweazle is the TTL-level signal from the drive. This is the output of a differential amplifier and crossing detector. In theory, the raw drive head will show zero volts when nothing is changing under the read head, a very small positive voltage when the magnetic flux reverses in one direction, and a symmetric negative signal when it shifts the other way.
What you get out of the amplifier is a digital (!) pulse of ~1us when the signal shifts in either direction. And due to the way the amplifier works, when "nothing is changing" it tends to just amplify noise in the environment and invent fictitious transitions. Proper disk encodings limit the distance between transitions (generally to no more than three bit cells) to deal with this.
This behavior was actually a core copy protection trick. The custom drive writing the commercial software would gate the transitions in the middle of a sector, leading to a region that would read different noise every time. Correct consumer hardware isn't able to do that.
And that's why the flux files are so large: they're storing multiple revolutions of every track, precisely so that tools like the WOZ (Apple) or ATX (Atari) converters can intuit the style of copy protection (there seems to be no clean equivalent in the Commodore world, their "archived" copy protected media tends to be reverse engineered the last I checked?)
A fun project I'd love to see someone try some day would be to wire up a proper analog ADC chain (doesn't need to be more than ~8 bit at 2 Mhz or so) to the unamplified drive head output and see if a cleaner representation of the flux can be read.
- TacticalCoder 4y ago> This behavior was actually a core copy protection trick. The custom drive writing the commercial software would gate the transitions in the middle of a sector, leading to a region that would read different noise every time. Can you explain that a bit more? On the software side, how could you detect if you had a pirated disk or not? Read a few times the same data and make sure it'd always be different?
- Meic 4y agoExactly that.
- EvanAnderson 4y agoSometimes called a "weak sector".
- TMWNN 4y ago>Read a few times the same data and make sure it'd always be different? As EvanAnderso and Meic said, yes. Think of it as the Schrodinger's cat of copy protection; as long as the bad sector is in a state of quantum superposition, the game works. It's when the superposition collapses into a definitive state that the game fails to load.
- TheLocksmith 4y agoThis reminds me about the copy protection I once developed for the Atari ST. The Atari ST had a proper floppy disk controller from Western Digital. They never changed a bit about the WD controller. You could rely on its characteristics. My Schrodinger's cat of copy protection for the Atari ST needed a new, never formatted disk, that gave different track reading data every time you read it to start with. I produced some hundred pseudo random bytes carefully avoiding the magic sync bit sequence to init the read circuit of the controller. At the end of the pseudo random bytes where exact one controller sync sequence following a 32 bit serial number. Than I wrote them as track data. But I exactly timed the write track command and terminated it in the middle of execution to keep the random state of the rest of the floppy track. When you than read the track you got every time different data, except that 32 bit serial number. It worked very reliable. Even if a floppy disk had read errors and you could not read the directory or the program data any more, the copy protection worked still reliable. It was the only floppy disk copy protection for the Atari ST that could never be copied. :)
- TMWNN 4y agoThank you for sharing that. Did Dungeon Master use your copy protection? My understanding is that its protection was so tough that people gave up and actually bought the game.
- EvanAnderson 4y agoThere was a talk at VCF[0] a couple years ago discssing exactly what you're describing in the context of tapes. It was very interesting and some of it has good applicability for floppy disk preservation [0] https://www.youtube.com/watch?v=sKvwjYwvN2U https://www.youtube.com/watch?v=sKvwjYwvN2U
- EvanAnderson 4y agoSince I can't edit anymore: This article re: imaging floppies in the analog domain made the rounds on HN a couple years ago: https://scarybeastsecurity.blogspot.com/2021/05/recovering-lost-treasure-filled-floppy.html https://scarybeastsecurity.blogspot.com/2021/05/recovering-l... The comments have some good links and background: https://news.ycombinator.com/item?id=27187435 https://news.ycombinator.com/item?id=27187435
- funstuff007 4y agoYes, these flux files are yuge (given the amount of actual data they contain). It seems to me they should compress well, but I can't see to remember if tried to do so the last time I fiddled with flux files--during the pandemmy when I thought the world was ending and it was important that my 8th grade book reports be preserved.
- KerrAvon 4y agoI'm confused. You're saying it's portrayal of the magnetic flux of the floppy disks, but you were distressed when someone else said it? What part of Jason Scott's description did you take exception to? Here's Applesauce's author's description, FWIW: > At the lowest level, they are all capturing the amount of time between magnetic flux transitions on the media. The real differentiator comes from what you do with all of these flux timings. https://applesaucefdc.com/what-is-applesauce/ https://applesaucefdc.com/what-is-applesauce/
- ajross 4y agoAn SCP file is NOT a direct measurement or representative capture of the flux transitions on the media. It's the output of a machine that imperfectly tries to measure them and inserts noise and delays into the data instead. And not only in a meaningless "not as accurate" sense -- the drive loses exactly the information that's critical to implementing a working copy. That's why you have to sample a track multiple times for the benefit of downstream analysis/RE tools, and why a naive capture can't be written back to a disk to get the same results. It's not a good situation. A driver reader that *could* measure the actual flux transitions wouldn't have these problems, but we don't have such a device yet. My point was that a true capture is/should-be possible, but not with the hardware as implemented by Greaseweazel et. al.
- textfiles 4y ago[ Willy Wonka puts his head on his fist and looks back and forth excitedly ]
- dylan604 4y agoyes, my impression is i'm really ignorant on the subject, or someone is hoping someone is ignorant while sounding smart on their pet-peeve soap box. either answer is perfectly acceptable to me, but that's a pretty good description of what my brain was going through reading all of that
- 4y ago