diff --git a/README b/README index c89fa999..87fe013d 100644 --- a/README +++ b/README @@ -441,9 +441,8 @@ Supported commands: table of common drive-detection addresses and return data that forces most of the supported fast loaders into a compatible mode (e.g. 1541 mode for Dreamload and ULoad Model 3, disabled fastloader - for Action Replay 6). If the address is not recognized, zero will - be returned for the first two bytes and more-or-less random data - beyond. + for Action Replay 6). If the address is not recognized, more-or-less + random data will be returned. This includes basic support for identifying the drive type based on the type of D64 image mounted (1541 for D41, 1571 for D71 and 1581 diff --git a/src/doscmd.c b/src/doscmd.c index ad6c30a4..35cbb5a5 100644 --- a/src/doscmd.c +++ b/src/doscmd.c @@ -203,7 +203,7 @@ static const PROGMEM struct fastloader_crc_s fl_crc_table[] = { #endif #ifdef CONFIG_LOADER_KRILL /* CRCs of the first respective M-W chunk except where noted */ - { 0x8227, FL_KRILL_R58, RXTX_NONE }, // r58/r146 drvchkme + { 0x8667, FL_KRILL_R146, RXTX_NONE }, // r146 drvchkme { 0xe300, FL_KRILL_R186, RXTX_KRILL_CLOCK }, // second chunk { 0x19a4, FL_KRILL_R184, RXTX_KRILL_CLOCK }, // second chunk { 0x741d, FL_KRILL_R184, RXTX_KRILL_CLOCK }, @@ -334,7 +334,7 @@ static const PROGMEM struct fastloader_handler_s fl_handler_table[] = { { 0x020b, FL_NONE, bus_sleep_krill, 1 }, // >= r192 ATN responder #endif #ifdef CONFIG_LOADER_KRILL - { 0x0300, FL_KRILL_R58, drvchkme_krill, 0 }, // <= r146 drvchkme + { 0x0300, FL_KRILL_R146, drvchkme_krill, 0 }, // r146 drvchkme { 0x0209, FL_NONE, load_krill, 0 }, // >= r192 load { 0x0770, FL_KRILL_R186, load_krill, 0 }, { 0x0758, FL_KRILL_R184, load_krill, 0 }, @@ -400,8 +400,8 @@ static const PROGMEM magic_value_t drive_magics[] = { { 0xfea0, { 0x0d, 0xed }, DRIVE_1541|DRIVE_1571 }, /* used by DreamLoad, ULoad Model 3 and Krill's loader */ { 0xe5c6, { 0x34, 0xb1 }, DRIVE_1541 }, - /* Disable AR6 fastloader; entry no longer needed, as 0 is the default now */ - // { 0xfffe, { 0x00, 0x00 }, 0xff }, + /* Disable AR6 fastloader */ + { 0xfffe, { 0x00, 0x00 }, 0xff }, /* used by Krill's loader */ { 0xeaa3, { 0xff, 0x4c }, DRIVE_1541 }, { 0xe5c6, { 0x37, 0xb1 }, DRIVE_1571 }, @@ -1375,11 +1375,6 @@ static void handle_memread(void) { } p++; } - if (check == 0) { - /* use 0 as default */ - error_buffer[0] = 0; - error_buffer[1] = 0; - } } /* This might not work for all scenarios, but for now better be strict */ diff --git a/src/fl-krill.c b/src/fl-krill.c index b0f99878..f9412cb7 100644 --- a/src/fl-krill.c +++ b/src/fl-krill.c @@ -155,15 +155,15 @@ static bool magic_string_matches(void) { } /* Universal handler for possible drvchkme memexecs */ -/* f == 0: drvchkme of <= r146; detected by M-W, no further checks necessary */ -/* f == 1: possible drvchkme of <= r186; check command crc */ -/* f == 2: possible drvchkme of >= r192; check command for magic string */ +/* f == 0: drvchkme of r146; detected by M-W, no further checks necessary */ +/* f == 1: possible drvchkme of <= r186; check command crc */ +/* f == 2: possible drvchkme of >= r192; check command for magic string */ bool drvchkme_krill(uint8_t f) { uint8_t i; uint16_t crc; switch (f) { - case 0: /* <= r146: M-W drvchkme crc matched */ + case 0: /* r146: M-W drvchkme crc matched */ break; case 1: /* check command length and crc for drvchkme */ @@ -191,7 +191,8 @@ bool drvchkme_krill(uint8_t f) { } custom_magic.address = 0x300; - custom_magic.val[0] = ~0; /* the first read will have returned 0 */ + /* the first read will have returned '0' ("00, OK, .." in error_buffer[]) */ + custom_magic.val[0] = ~'0'; custom_magic.val[1] = 0; custom_magic.drives = 0xff; /* applicable for all drive types */