Skip to content

upd765: why do we invert the drive ready_r() (and external_ready) here? #2611

Open
@pmackinlay

Description

@pmackinlay

As far as I've been able to figure out, the floppy_info ready field is a simple bool indicating true when the drive is ready. There are many cases in this driver where the value of get_ready() is tested, with a false creating an error or status to indicating the drive is not ready.

Similarly, the floppy.cpp ready_r() method returns a simple true/false indicating that the drive is ready or not ready. The actual input line on the upd765 is active high, so I think that rules out chip-based factors (and the fact that all the relevant values/functions are typed as bool does too).

This problem is masked in the later chips which have drive polling disabled by default, but the symptom in my case was a lack of interrupts (caused by drive ready state change) after a reset. Removing this inversion has fixed a number of symptoms I experienced.

Can someone who knows this device better than me comment?

bool upd765_family_device::get_ready(int fid)
{
if(ready_connected)
return flopi[fid].dev ? !flopi[fid].dev->ready_r() : false;
return !external_ready;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions