News for hackers. Stuff that matters.
Re:The Grind a Day: thousands of Apple II floppy disks archived by ajross on Tuesday March 07, 2023 @06:36PM (#35062981)
> 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.

Re:The Grind a Day: thousands of Apple II floppy disks archived by TacticalCoder on Tuesday March 07, 2023 @06:59PM (#35063229)
> 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?

Re:The Grind a Day: thousands of Apple II floppy disks archived by EvanAnderson on Tuesday March 07, 2023 @07:40PM (#35063615)
Sometimes called a "weak sector".
Re:The Grind a Day: thousands of Apple II floppy disks archived by Meic on Tuesday March 07, 2023 @07:01PM (#35063250)
Exactly that.
Re:The Grind a Day: thousands of Apple II floppy disks archived by TMWNN on Tuesday March 07, 2023 @09:26PM (#35064428)
>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.

Re:The Grind a Day: thousands of Apple II floppy disks archived by TheLocksmith on Wednesday March 08, 2023 @04:47AM (#35067070)
This 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. :)
Re:The Grind a Day: thousands of Apple II floppy disks archived by TMWNN on Wednesday March 08, 2023 @04:53AM (#35067113)
Thank 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.
Re:The Grind a Day: thousands of Apple II floppy disks archived by TheLocksmith on Wednesday March 08, 2023 @05:10AM (#35067216)
My copy protection was made for a niche high quality Atari ST graphics program that only got sold in very small numbers. The developer (my customer) want to get sure he really get money for every copy. And I put a lot of effort into randomization of my copy protection detection software. I want get sure nobody developed an automatic cracking program for my copy protection. But I left a easy to find exit point where cracker could easy remove my copy protection detection software. Manually. That worked. Everything can be cracked. But my copy protection got never in deep analysed because I made it really really hard to do it.
Re:The Grind a Day: thousands of Apple II floppy disks archived by TheLocksmith on Wednesday March 08, 2023 @06:06AM (#35067571)
The developer (my customer) of the Atari ST graphics program was wicked :) When he detected (in runtime at random places) that the program was cracked, he added a invisible watermark to the output of the graphics program. When someone produced public, commercial work with a cracked version of his software, he could prove it was done with a non-paid cracked version of his software. He could "convince" several user to pay him retrospective.
Re:The Grind a Day: thousands of Apple II floppy disks archived by myself248 on Friday March 10, 2023 @02:45AM (#35091614)
I think "gate" here is being used to mean "gate off", or "inhibit".

The writer would simply refrain from writing anything for a moment, leaving the original bulk-erased magnetic nothingness in the middle of a sector.

Re:The Grind a Day: thousands of Apple II floppy disks archived by EvanAnderson on Tuesday March 07, 2023 @07:39PM (#35063610)
There 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

Re:The Grind a Day: thousands of Apple II floppy disks archived by EvanAnderson on Tuesday March 07, 2023 @11:45PM (#35065367)
Since 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-l...

The comments have some good links and background:

https://news.ycombinator.com/item?id=27187435

Re:The Grind a Day: thousands of Apple II floppy disks archived by funstuff007 on Tuesday March 07, 2023 @07:59PM (#35063764)
Yes, 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.
Re:The Grind a Day: thousands of Apple II floppy disks archived by KerrAvon on Tuesday March 07, 2023 @08:02PM (#35063785)
I'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/

Re:The Grind a Day: thousands of Apple II floppy disks archived by ajross on Tuesday March 07, 2023 @10:31PM (#35064879)
An 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.

Re:The Grind a Day: thousands of Apple II floppy disks archived by textfiles on Tuesday March 07, 2023 @10:56PM (#35065034)
[ Willy Wonka puts his head on his fist and looks back and forth excitedly ]
Re:The Grind a Day: thousands of Apple II floppy disks archived by dylan604 on Wednesday March 08, 2023 @01:08AM (#35065810)
yes, 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
Re:The Grind a Day: thousands of Apple II floppy disks archived by ajross on Wednesday March 08, 2023 @08:26AM (#35068700)
You're aware you can ask questions instead of just pointing and laughing at the ridiculous nerds, right? Is there something you're confused about regarding floppy drives?
Re:The Grind a Day: thousands of Apple II floppy disks archived by dylan604 on Wednesday March 08, 2023 @09:40AM (#35069475)
who is pointing and laughing? i gave an honest description of how i felt after reading that jumble of words that looked like an answer to something. it read as if it came from ChatGPT. obviously, more than one person was left confused after reading it. clear as mud one might say.

>Is there something you're confused about regarding floppy drives?

after reading all of that, i'm so confused i no longer even know what a floppy drive is or what it was meant to do

Re:The Grind a Day: thousands of Apple II floppy disks archived by ajross on Wednesday March 08, 2023 @09:52AM (#35069649)
This is just bullying. Please stop.
Re:The Grind a Day: thousands of Apple II floppy disks archived by textfiles on Wednesday March 08, 2023 @10:54AM (#35070549)
I am happy for you, as it is clear you've never experienced actual bullying.
Re:The Grind a Day: thousands of Apple II floppy disks archived by EvanAnderson on Tuesday March 07, 2023 @11:52PM (#35065412)
The Applesauce is at the mercy of the analog board in the drive. Artifacts of the signal processing done there are going to be reflected in the data stream the Applesauce receives from the drive.

A more authentic representation of the flux on the disk could be made by amplifying and sampling the analog waveform straight off the drive heads. A variety of signal processing functions could be applied to that waveform vs. what the electronics on the drive will do.

Re:The Grind a Day: thousands of Apple II floppy disks archived by wiz21c on Wednesday March 08, 2023 @03:46AM (#35066728)
Yep, I always have wondered why AppleSauce did it the way it did. but TBH I didn't read all of their quite comprehensive documentation...