Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple II spectre.nib does not load #1274

Open
ryandesign opened this issue Dec 16, 2023 · 1 comment
Open

Apple II spectre.nib does not load #1274

ryandesign opened this issue Dec 16, 2023 · 1 comment

Comments

@ryandesign
Copy link
Contributor

Despite the recent improvements in reading nib files, spectre.nib does not load at all in Clock Signal; it just stays on the "Apple ][" boot screen. It's encountering a checksum problem on the last sector of the track here:

// Undo the XOR step on sector contents, then check and discard the checksum.
for(std::size_t c = 1; c < sector->data.size(); ++c) {
sector->data[c] ^= sector->data[c-1];
}
if(sector->data.back()) return nullptr;

MAME, Virtual ][ and OpenEmulator can load this disk image.

@TomHarte
Copy link
Owner

TomHarte commented Dec 26, 2023

All I've figured out so far is that I don't understand how that NIB can be a valid disk; in particular from byte offset 2022 it has a run of bytes of the form C0C0C0... which really shouldn't be possible. Cf. the WOZ write-up on weak bits:

One very popular copy protection is referred to as “fake bits” or “weak bits” – this technique is actually an exploit against the MC3470. It comes from the idea of what happens when we make it read more than two 0 bits in a row. What happens is that our poor MC3470 thinks that it is doing a bad job reading the disk and keeps trying to turn up its amp to find the flux signal. It does this until it gets to the point that it amplifies background electrical noise so much that it thinks that it sees a transition and sends out a false pulse, which the computer happily records as a 1 bit.

Switching off noise generation didn't solve the problem, so this isn't necessarily a good lead but it possibly indicates that either:

  1. NIB files are actually not just a capture of what the Disk II saw when reading a disk during capture (with a bunch of redundancy to pad out the track size); or
  2. there's some way to encode C0s that is beyond my comprehension.

Or a third option I haven't thought of yet.

Regardless, this is mystery #1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants