]> xenbits.xensource.com Git - seabios.git/commitdiff
floppy: Support up to 4 floppy drives when turning on the floppy motor
authorNikolay Nikolov <nickysn@users.sourceforge.net>
Sat, 10 Feb 2018 11:52:15 +0000 (13:52 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 15 Feb 2018 05:18:14 +0000 (00:18 -0500)
The previous version allowed for only two floppies.

Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
src/hw/floppy.c

index 5a7e6b9794b6dc42da4033780041b4f419a213df..730aadc0178eac7f2516a5b7e22808a5af6dd016 100644 (file)
@@ -358,7 +358,7 @@ floppy_drive_pio(u8 floppyid, int command, u8 *param)
     SET_BDA(floppy_motor_counter, 255);
 
     // Turn on motor of selected drive, DMA & int enabled, normal operation
-    floppy_dor_write((floppyid ? FLOPPY_DOR_MOTOR_B : FLOPPY_DOR_MOTOR_A) | FLOPPY_DOR_IRQ | FLOPPY_DOR_RESET | floppyid);
+    floppy_dor_write((FLOPPY_DOR_MOTOR_A << floppyid) | FLOPPY_DOR_IRQ | FLOPPY_DOR_RESET | floppyid);
 
     // Send command.
     int ret = floppy_pio(command, param);