Skip to content

Allow new sectors to start in the data region of existing sectors. #552

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tdaede
Copy link
Contributor

@tdaede tdaede commented Aug 10, 2022

Allow new sectors to start in the data region of existing sectors.
Fixes #551.
This is important for some copy protection schemes.

@tdaede tdaede force-pushed the allow_overlapping_sectors branch from 755e2a1 to 36d865b Compare August 10, 2022 06:16
@tdaede tdaede changed the title allow overlapping sectors Allow new sectors to start in the data region of existing sectors. Aug 10, 2022
@tdaede tdaede force-pushed the allow_overlapping_sectors branch from 36d865b to 1bfface Compare August 12, 2022 03:38
@davidgiven
Copy link
Owner

Sadly, this won't work --- seeking requires resetting the fluxmap reader state and causes data loss. This doesn't matter for architectures like the IBM where each record is distinct from the next but it caused a lot of problems on architectures like the Amiga where it's all one continuous data stream, so I had to rework it not to do that.

I think the only way to make this work is to try and detect a sync marker in the bitstream while reading the data and terminate the current record. That would simulate what a real FDC does, but FluxEngine's not really designed for that and it would be hard to do. In general I find that copy protected disks just aren't worth the effort...

@tdaede
Copy link
Contributor Author

tdaede commented Aug 12, 2022

Oh, I see. I guess I haven't done Amiga disks much but I would have expected them to appear as "one big sector" to this layer.

The actual FDC really doesn't look in the data stream either - for the ReadTrack command it's only reading record headers and skipping the body of the data.

Perhaps an easier fix is just for the Decoder to tell us whether its Records are individually seekable or not.

Note that tests actually pass here, which means we're probably missing some Amiga ones?

I am primarily working on copy protected disks now, if you consider those out of scope of the project it'd be good to know.

Fixes davidgiven#551.

This is important for some copy protection schemes.
@tdaede tdaede force-pushed the allow_overlapping_sectors branch from 1bfface to 877052a Compare August 16, 2022 06:05
@tdaede
Copy link
Contributor Author

tdaede commented Aug 16, 2022

I implemented the "simple" fix. I disabled seeking for Amiga, though I could do it the other way around and only enable it for IBM.

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

Successfully merging this pull request may close these issues.

mfm decoder misses overlapped sectors
2 participants