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

upd765: Drive busy bits should not be cleared until a SIS is executed #12585

Merged
merged 1 commit into from
Jul 21, 2024

Conversation

brijohn
Copy link
Contributor

@brijohn brijohn commented Jul 16, 2024

The upd765 does not clear the drive busy bits until you issue a sense interrupt status command. Without this fix CP/M Plus on the QX-10 gives disk I/O errors because it expects the busy bit to stay set until it has a chance to issue the SIS command.

I have verified this is the correct behavior on a real QX-10, which uses a NEC D765AC as its floppy controller. Regarding the cpc6128, this fix does not seem to cause an issues with accessing a disk, I can run cat from basic and get a directory as well load files from the disk. Same thing with the specpl3e, loading programs from disk appears to work fine.

@angelosa
Copy link
Member

This needs to be tested with pc88 & pc98 line of computers, which are known to be picky to changes in 765 core.

@rb6502
Copy link
Contributor

rb6502 commented Jul 17, 2024

He said the behavior is verified on hardware, so I wouldn't expect it to cause problems with pc88/pc98. But I would also like to see a few more systems tested before applying it.

The upd765 does not clear the drive busy bits until you issue a sense
interrupt status command. Without this fix CP/M Plus on the QX-10 gives
disk I/O errors because it expects the busy bit to stay set until it has
a chance to issue the SIS command.
@cuavas
Copy link
Member

cuavas commented Jul 17, 2024

Yeah, code looks OK in principle, but let’s wait for some more testing.

@brijohn
Copy link
Contributor Author

brijohn commented Jul 17, 2024

Ok so I found a minor issue with the PC98 computers, its easily fixed by moving the following code back to be i82072 specific. This was preventing the pc98 from handling multiple SIS commands and causing boot failure. I'm not 100% sure it makes sense for the i82072 controller either, but since it was there originally I'm leaving it there. With this fix QX-10, cpc6128,specpl3e,and pc98 computers seem to work correctly. I tried the pc88 line as well, but i could not get it booting the d88 disk images i tried even without this patch installed.

       for(floppy_info &fi : flopi) {
                fi.st0_filled = false;
       }

@brijohn
Copy link
Contributor Author

brijohn commented Jul 19, 2024

Ok so i found a combination of working disk image and oc88 machine that i could verify worked before this patch and it still loads correctly afterwards as well. So the current state is that this fixes CP/M plus on the QX-10, and the cpc6128, specpl3e, pc88, and pc98 still load disks afterwards as well.

@rb6502 rb6502 merged commit b6131c2 into mamedev:master Jul 21, 2024
5 checks passed
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.

4 participants