fdc: take side count into account
Floppies can be simple or double-sided. However, current codewas only taking the common case into account (ie 2 sides).
This repairs single-sided floppies, which where totally brokenbefore this patch : for track > 0, wrong sector number was...
fdc: set busy bit when starting a command
This bit must be active while a command is currently executed.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
fdc: most control commands do not generate interrupts
In fact, only three control commands generate an interrupt:read_id, recalibrate and seek
fdc: handle read-only floppies (abort early on write commands)
A real floppy doesn't attempt to write to read-only media either.
fdc: add CCR (Configuration Control Register) write register
DIR and CCR registers share the same address ; DIR is read-onlywhile CCR is write-only
CCR register is used to change media transfer rate, which will bechecked in following changes.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>...
block: add a transfer rate for floppy types
Floppies must be read at a specific transfer rate, depending of its own format.Update floppy description table to include required transfer rate.
fdc: add a 'check media rate' property. Not used yet
Set it to true for current Qemu versions, and false for previous ones
fdc: check if media rate is correct before doing any transfer
The programmed rate has to be the same as the required rate for thefloppy format ; if that's not the case, the transfer should abort.This check can be disabled by using the 'check_media_rate' property....
fdc: fix seek command, which shouldn't check tracks
The seek command just sends step pulses to the drive and doesn't care ifthere is a medium inserted of if it is banging the head against the drive.
Merge remote-tracking branch 'aneesh/for-upstream' into staging
View revisions
Also available in: Atom