Esempio n. 1
0
static void store_ciapb(cia_context_t *cia_context, CLOCK rclk, BYTE byte)
{
    printer_userport_write_data(byte);
    printer_userport_write_strobe(0);
    printer_userport_write_strobe(1);

    /* FIXME: in the upcoming userport system this call needs to be conditional */
    userport_joystick_store_pbx(byte);
}
Esempio n. 2
0
static void reset(via_context_t *via_context)
{
    /* set IEC output lines */
    parallel_cpu_set_atn(0);
    parallel_cpu_set_nrfd(0);

    printer_userport_write_data(0xff);
    printer_userport_write_strobe(1);
}
Esempio n. 3
0
static void reset(via_context_t *via_context)
{
/*    iec_pa_write(0xff);*/

    printer_userport_write_data(0xff);
    printer_userport_write_strobe(1);
#ifdef HAVE_RS232
    rsuser_write_ctrl(0xff);
    rsuser_set_tx_bit(1);
#endif
}
Esempio n. 4
0
static void do_reset_cia(cia_context_t *cia_context)
{
    printer_userport_write_strobe(1);
    printer_userport_write_data((BYTE)0xff);
#ifdef HAVE_RS232
    rsuser_write_ctrl((BYTE)0xff);
    rsuser_set_tx_bit(1);
#endif

    vbank = 0;
    mem_set_vbank(vbank);
}
Esempio n. 5
0
static BYTE store_pcr(via_context_t *via_context, BYTE byte, WORD addr)
{
#if 0
    if (byte != via_context->via[VIA_PCR]) {
        register BYTE tmp = byte;
        /* first set bit 1 and 5 to the real output values */
        if ((tmp & 0x0c) != 0x0c) {
            tmp |= 0x02;
        }
        if ((tmp & 0xc0) != 0xc0) {
            tmp |= 0x20;
        }
        crtc_set_char(byte & 2); /* switching PET charrom with CA2 */
                                 /* switching userport strobe with CB2 */
        printer_userport_write_strobe(byte & 0x20);
    }
#endif
    petsound_store_manual((byte & 0xe0) == 0xe0);   /* Manual control of CB2 sound */
    return byte;
}
Esempio n. 6
0
static void store_ciapa(cia_context_t *cia_context, CLOCK rclk, BYTE byte)
{
    if (cia_context->old_pa != byte) {
        BYTE tmp;
        int new_vbank;

#ifdef HAVE_RS232
        if (rsuser_enabled && ((cia_context->old_pa ^ byte) & 0x04)) {
            rsuser_set_tx_bit(byte & 4);
        }
#endif
        tmp = ~byte;
        new_vbank = tmp & 3;
        if (new_vbank != vbank) {
            vbank = new_vbank;
            mem_set_vbank(new_vbank);
        }
        (*iecbus_callback_write)((BYTE)tmp, maincpu_clk);
        printer_userport_write_strobe(tmp & 0x04);
    }
}
Esempio n. 7
0
static BYTE store_pcr(via_context_t *via_context, BYTE byte, WORD addr)
{
    /* FIXME: should use via_set_ca2() and via_set_cb2() */
    if (byte != via_context->via[VIA_PCR]) {
        register BYTE tmp = byte;
        /* first set bit 1 and 5 to the real output values */
        if ((tmp & 0x0c) != 0x0c)
            tmp |= 0x02;
        if ((tmp & 0xc0) != 0xc0)
            tmp |= 0x20;

    datasette_set_motor(!(byte & 0x02));

#ifdef HAVE_RS232
        /* switching userport strobe with CB2 */
        if (rsuser_enabled) {
            rsuser_set_tx_bit(byte & 0x20);
        }
#endif
        printer_userport_write_strobe(byte & 0x20);
    }
    return byte;
}
Esempio n. 8
0
static void do_reset_cia(cia_context_t *cia_context)
{
    printer_userport_write_strobe(1);
    printer_userport_write_data(0xff);
}
Esempio n. 9
0
/* switching userport strobe with CB2 */
static void set_cb2(via_context_t *via_context, int state)
{
    printer_userport_write_strobe(state);
}