#define DEBUG_IDE 0
+#define DEBUG_IDE_MASK 0xf800
+#define DEBUG_IDE_MASK_VAL 0x0800
+
#define DEBUG_IDE_GVP 0
#define DEBUG_IDE_ALF 0
#define DEBUG_IDE_APOLLO 0
return 0;
}
-static uae_u32 ide_read_byte(struct ide_board *board, uaecptr addr)
+static uae_u32 ide_read_byte2(struct ide_board *board, uaecptr addr)
{
uaecptr oaddr = addr;
uae_u8 v = 0xff;
addr &= board->mask;
-#if DEBUG_IDE
- if (0 || !(addr & 0x8000))
- write_log(_T("IDE IO BYTE READ %08x %08x\n"), addr, M68K_GETPC);
-#endif
-
if (addr < 0x40 && !board->flashenabled && (!board->configured || board->keepautoconfig))
return board->acmemory[addr];
return v;
}
+static uae_u32 ide_read_byte(struct ide_board *board, uaecptr addr)
+{
+ uae_u32 v = ide_read_byte2(board, addr);
+#if DEBUG_IDE
+ if ((addr & DEBUG_IDE_MASK) == DEBUG_IDE_MASK_VAL) {
+ write_log(_T("IDE IO BYTE READ %08x=%02x %08x\n"), addr & board->mask, v & 0xff, M68K_GETPC);
+ }
+#endif
+ return v;
+}
+
static uae_u32 ide_read_word(struct ide_board *board, uaecptr addr)
{
uae_u32 v = 0xffff;
}
#if DEBUG_IDE
- if (0 || !(addr & 0x8000))
+ if ((addr & DEBUG_IDE_MASK) == DEBUG_IDE_MASK_VAL) {
write_log(_T("IDE IO WORD READ %08x %04x %08x\n"), addr, v, M68K_GETPC);
+ }
#endif
return v;
addr &= board->mask;
#if DEBUG_IDE
- if (0 || !(addr & 0x8000))
+ if ((addr & DEBUG_IDE_MASK) == DEBUG_IDE_MASK_VAL) {
write_log(_T("IDE IO BYTE WRITE %08x=%02x %08x\n"), addr, v, M68K_GETPC);
+ }
#endif
if (!board->configured) {
addr &= board->mask;
#if DEBUG_IDE
- if (0 || !(addr & 0x8000))
+ if ((addr & DEBUG_IDE_MASK) == DEBUG_IDE_MASK_VAL) {
write_log(_T("IDE IO WORD WRITE %08x=%04x %08x\n"), addr, v, M68K_GETPC);
+ }
#endif
if (board->configured) {