Esempio n. 1
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. 2
0
static void undump_ciapa(cia_context_t *cia_context, CLOCK rclk, BYTE byte)
{
#ifdef HAVE_RS232
    if (rsuser_enabled) {
        rsuser_set_tx_bit((int)(byte & 4));
    }
#endif
    vbank = (byte ^ 3) & 3;
    mem_set_vbank(vbank);
    iecbus_cpu_undump((BYTE)(byte ^ 0xff));
}
Esempio n. 3
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. 4
0
static void do_reset_cia(cia_context_t *cia_context)
{
    store_userport_pbx(0xff);

    /* The functions below will gradually be removed as the functionality is added to the new userport system. */
#if defined(HAVE_RS232DEV) || defined(HAVE_RS232NET)
    rsuser_write_ctrl((BYTE)0xff);
    rsuser_set_tx_bit(1);
#endif

    vbank = 0;
    mem_set_vbank(vbank);
}
Esempio n. 5
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;

#if defined(HAVE_RS232DEV) || defined(HAVE_RS232NET)
        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);
    }
}
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;
            c64_glue_set_vbank(new_vbank, pa_ddr_change);
        }
        (*iecbus_callback_write)((BYTE)tmp, maincpu_clk + !(cia_context->write_offset));
        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;
}