Fix overlapping CS for IDE and Floppy #105
Merged
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.
This is a partial fix for #103 and allows reading of floppy disks under Windows NT.
I have found that the CS signals for ide0 and floppy0 were overlapping, and this was blocking the system from properly accessing the floppy controller's "Digital Input Register" (at 0x3F7) where the "disk changed" flag is read from. This flag is not used by DOS or Windows 95, but is used by NT and Linux. I have updated the mappings of the CS signals to match that expected by the original hardware.
Old I/O mappings:
IDE0: 0x1F0-0x1F7 and 0x3F6-0x3F7
IDE1: 0x170-0x177 and 0x376-0x377
Floppy: 0x3F0-0x3F7
New I/O mappings:
IDE0: 0x1F0-0x1F7 and 0x3F6
IDE1: 0x170-0x177 and 0x376
Floppy: 0x3F0-0x3F5 and 0x3F7
Note that further work is needed around reset_changeline in floppy.v, as the flag is still not being set high by an image change (image ejection seems to be fine though). This is why this is only a partial fix for #103.