From c6d39f81c36544897ff66fba4de34c40a5ec9a74 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 21 Jun 2020 01:08:05 +0200 Subject: [PATCH] Fixed the "has drive selection" array in floppy/fdc.c so the SCAN LOW OR EQUAL and SCAN HIGH OR EQUAL commands are at the correct position, reduced it to 32 entries (maximum number of commands) out of 256, and changed it to uint8_t so it takes even less memory. --- src/floppy/fdc.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/floppy/fdc.c b/src/floppy/fdc.c index 82f5da798..b6f068bc5 100644 --- a/src/floppy/fdc.c +++ b/src/floppy/fdc.c @@ -41,7 +41,7 @@ extern uint64_t motoron[FDD_NUM]; -const int command_has_drivesel[256] = { +const uint8_t command_has_drivesel[32] = { 0, 0, 1, /* READ TRACK */ 0, @@ -61,24 +61,11 @@ const int command_has_drivesel[256] = { 1, /* SCAN EQUAL */ 0, 0, 0, 0, 1, /* VERIFY */ - 0, 0, 0, + 0, 0, 1, /* SCAN LOW OR EQUAL */ 0, 0, 0, 1, /* SCAN HIGH OR EQUAL */ - 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + 0, 0 };