Пример #1
0
/* read_* functions must return 0xff if nothing to read!!! */
static BYTE read_ciapb(cia_context_t *cia_context)
{
    BYTE byte;
#ifdef HAVE_RS232
    if (rsuser_enabled) {
        byte = rsuser_read_ctrl();
    } else 
#endif
    byte = parallel_cable_cpu_read(DRIVE_PC_STANDARD);

    byte = (byte & ~(cia_context->c_cia[CIA_DDRB]))
           | (cia_context->c_cia[CIA_PRB] & cia_context->c_cia[CIA_DDRB]);
    return byte;
}
Пример #2
0
/* read_* functions must return 0xff if nothing to read!!! */
static BYTE read_ciapb(cia_context_t *cia_context)
{
    BYTE byte;
#ifdef HAVE_RS232
    if (rsuser_enabled) {
        byte = rsuser_read_ctrl();
    } else
#endif
    byte = parallel_cable_cpu_read(DRIVE_PC_STANDARD);

    /* FIXME: in the upcoming userport system this call needs to be conditional */
    byte = userport_joystick_read_pbx(byte);
    byte = userport_rtc_read(byte);

    byte = (byte & ~(cia_context->c_cia[CIA_DDRB])) | (cia_context->c_cia[CIA_PRB] & cia_context->c_cia[CIA_DDRB]);
    return byte;
}
Пример #3
0
/* read_* functions must return 0xff if nothing to read!!! */
static BYTE read_ciapb(cia_context_t *cia_context)
{
    BYTE byte = 0xff;

    byte = read_userport_pbx(0x1f, byte);

    /* The functions below will gradually be removed as the functionality is added to the new userport system. */
#if defined(HAVE_RS232DEV) || defined(HAVE_RS232NET)
    if (rsuser_enabled) {
        byte = rsuser_read_ctrl(byte);
    } else
#endif
    byte = parallel_cable_cpu_read(DRIVE_PC_STANDARD, byte);

    byte = (byte & ~(cia_context->c_cia[CIA_DDRB]))
           | (cia_context->c_cia[CIA_PRB] & cia_context->c_cia[CIA_DDRB]);
    return byte;
}
Пример #4
0
BYTE pio1_read(WORD addr)
{
    BYTE pio1_value = 0xff;

    /*  Correct clock */
    ted_handle_pending_alarms(0);

    /* The functions below will gradually be removed as the functionality is added to the new userport system. */
    if (drive_context[0]->drive->parallel_cable
        || drive_context[1]->drive->parallel_cable) {
        pio1_value = parallel_cable_cpu_read(DRIVE_PC_STANDARD, pio1_value);
    } else {
        pio1_value = pio1_data;
    }

    pio1_value = read_userport_pbx(0xff, pio1_value);

    if (tape_sense) {
        pio1_value &= ~4;
    }

    return pio1_value;
}