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

Disk II: Swapping disks should not swap drive's motor/spinning state #543

Closed
tomcw opened this issue Feb 24, 2018 · 2 comments
Closed

Disk II: Swapping disks should not swap drive's motor/spinning state #543

tomcw opened this issue Feb 24, 2018 · 2 comments

Comments

@tomcw
Copy link
Contributor

tomcw commented Feb 24, 2018

@audetto said in #539:

I've realised one thing as well. If I swap while one drive is spinning, then which drive should be spinning after the swap? Is spinning a property of the disk or the drive?

It's a property of the drive, so this is a (current) bug in AppleWin.

tomcw added a commit that referenced this issue Feb 25, 2018
Changed struct Disk_t:
. Added new struct Drive_t with "has-a" relationship to Disk_t
. Split properties of drive into Drive_t and properties of disk into Disk_t
@tomcw tomcw closed this as completed in e1286de Feb 25, 2018
@tomcw tomcw added this to the 1.28 milestone Feb 25, 2018
@tomcw
Copy link
Contributor Author

tomcw commented Apr 2, 2018

Reopening, as Ansi Story can hang at the end of side-2, when you press F5 (Swap Disks) to restart the demo.

I can't repro with 1.27.0, so am guessing it's to do with this refactor/change.

@tomcw tomcw reopened this Apr 2, 2018
@tomcw
Copy link
Contributor Author

tomcw commented Apr 2, 2018

Need to invalidate the trackimage buffers so that a read latch will re-read the track for the new floppy.

This was happening for Ansi Story:

  • At end of side-1, track-1 was the last track read
  • Swap disks: now floppy in drive-2 contains a trackimage for track-1
  • At end of side-2, seek to track-0, then display message: "Turn the disk over"
  • Swap disks: now floppy in drive-1 contains a trackimage for track-1, but drive's track=0
  • DiskII firmware seeks to track-0 (ie. not change in track), so trackimage is not re-read, so firmware will keep reading track-1 data forever looking for track-0!

@tomcw tomcw closed this as completed in 2ba55e0 Apr 2, 2018
@tomcw tomcw modified the milestones: 1.28, 1.27.1 Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant