Exemple #1
0
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);
}
Exemple #2
0
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);
}