BYTE cia1_read(WORD addr) { #ifdef DEBUG_CIA1 static int olddata, oldaddr; BYTE data; data = ciacore_read(machine_context.cia1, addr); /* if (!((addr >= 0x08) && (addr <= 0x0b))) { */ if ((oldaddr != addr) || (olddata != data)) { DBG(("cia1_read: %04x %02x", addr, data)); oldaddr = addr; olddata = data; } return data; #else return ciacore_read(machine_context.cia1, addr); #endif }
BYTE cia1_read(WORD addr) { /* disable TOD & serial */ if (((addr & 0xf) >= 8) && ((addr & 0xf) <= 0xc)) { return 0xff; } return ciacore_read(machine_context.cia1, addr); }
BYTE cia2_read(WORD addr) { BYTE retval = 0xff; if ((addr & 0x1f) == 1) { /* FIXME: in the upcoming userport system this call needs to be conditional */ retval = userport_joystick_read_pbx(retval); if (ps2mouse_enabled) { retval &= (ps2mouse_read() | 0x3f); } if (c64dtv_hummer_adc_enabled) { retval &= (hummeradc_read() | 0xf8); } return retval; } /* disable TOD & serial */ if (((addr & 0xf) >= 8) && ((addr & 0xf) <= 0xc)) { return 0xff; } return ciacore_read(machine_context.cia2, addr); }
BYTE cia2_read(WORD addr) { BYTE retval = 0xff; if ((addr & 0x1f) == 1) { retval = read_userport_pbx(0x1f, retval); /* The functions below will gradually be removed as the functionality is added to the new userport system. */ if (ps2mouse_enabled) { retval &= (ps2mouse_read() | 0x3f); } if (c64dtv_hummer_adc_enabled) { retval &= (hummeradc_read() | 0xf8); } return retval; } /* disable TOD & serial */ if (((addr & 0xf) >= 8) && ((addr & 0xf) <= 0xc)) { return 0xff; } return ciacore_read(machine_context.cia2, addr); }
BYTE cia1_read(WORD addr) { return ciacore_read(machine_context.cia1, addr); }
BYTE cia1571_read(drive_context_t *ctxptr, WORD addr) { return ciacore_read(ctxptr->cia1571, addr); }
BYTE REGPARM1 cia2_read(WORD addr) { return ciacore_read(machine_context.cia2, addr); }
uint8_t cia1_read(uint16_t addr) { return ciacore_read(machine_context.cia1, addr); }