Skip to content

Commit

Permalink
Select transfer method based on CPU type
Browse files Browse the repository at this point in the history
  • Loading branch information
LIV2 committed Nov 28, 2023
1 parent a038535 commit 939f017
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,13 @@ struct Library __attribute__((used, saveds)) * init_device(struct ExecBase *SysB
// This controls which transfer routine is selected for the device by ata_init_unit
//
// See ata_init_unit and device.h for more info
dev->units[i].xfer_method = longword_movem;
if (SysBase->AttnFlags & (AFF_68020 | AFF_68030 | AFF_68040 | AFF_68060)) {
dev->units[i].xfer_method = longword_move;
Trace("Detected 68020 or higher, transfer mode set to move.l\n");
} else {
dev->units[i].xfer_method = longword_movem;
Trace("Detected 68000/68010, transfer mode set to movem.l\n");
}

// Initialize the change int list
dev->units[i].changeInts.mlh_Tail = NULL;
Expand Down

0 comments on commit 939f017

Please sign in to comment.