[C64] 1541 disk drive emulation facelift #4192
Open
+572
−512
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alright friends, this one's been on my to-do list for a long time and I've made a push to fix some of the more notoriously picky disk loaders. The disk changes from here on out will likely be far less substantial (though there will be a few odd cases yet to fix- those will get their own work later.)
Disk checking utilities will now work and you can also run format commands without it erroring out now. This came down to how sparse we were putting the bits on the magnetic media. There's a neat little "feature" of the drive hardware where if you space your bits too far apart, you can get ghost bits clocked into the shift register. It's a bug that has been emulated, but it was being triggered on media that was properly formatted in the first place.
The quick and dirty changelog:
[C64] Disk: 1541 drive saveram now works properly when rewind is disabled
[C64] Disk: Use raw track capacity values per the G64 file format specification, should fix some disk loaders that are expecting data not to be so sparse (Spindle demos in D64 format particularly)
[C64] Disk: fix 1541 drive address decodes (RAM and timers are supposed to be mirrored every 0x2000 bytes in the 0x0000-0x7FFF range)
[C64] VIA: 6522 core facelift, shift register and use of low-order timer latches implemented, should fix some disk loaders ("Sprite B*****e 2" demo plays, yes they called it that, and it's not what it sounds like)
[C64] CIA: fix PB6/PB7 outputs when enabled on CRA/CRB
Check if completed: