Fixup channel detection some more...

This commit is contained in:
Matt Harlum 2023-08-11 21:42:19 +00:00
parent 58d8e9a524
commit f23a5fc4d3
2 changed files with 6 additions and 1 deletions

1
ata.h
View File

@ -29,6 +29,7 @@
#define ata_reg_devHead 0xC00
#define ata_reg_status 0xE00
#define ata_reg_command 0xE00
#define ata_reg_altStatus 0x1C00
#define drv_sel_secondary (1<<4)

View File

@ -244,7 +244,11 @@ struct Library __attribute__((used, saveds)) * init_device(struct ExecBase *SysB
UBYTE channels = 2;
UBYTE *status = cd->cd_BoardAddr + CHANNEL_0 + ata_reg_status;
UBYTE *alt_status = cd->cd_BoardAddr + CHANNEL_1; // Alt status register
UBYTE *alt_status = cd->cd_BoardAddr + CHANNEL_0 + ata_reg_altStatus;
UBYTE *drvsel = cd->cd_BoardAddr + CHANNEL_0 + ata_reg_devHead;
*drvsel = 0xE0;
// On the AT-Bus 2008 (Clone) the ROM is selected on the lower byte when IDE_CS1 is asserted
// Not a problem in single channel mode - the drive registers there only use the upper byte