Beispiel #1
0
static void perform_vbank_switch(int vbank)
{
    if (c64_256k_enabled) {
        c64_256k_cia_set_vbank(vbank);
    } else {
        mem_set_vbank(vbank);
    }
}
Beispiel #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;
    if (c64_256k_enabled)
        c64_256k_cia_set_vbank(vbank);
    else
        mem_set_vbank(vbank);
    iecbus_cpu_undump((BYTE)(byte ^ 0xff));
}
Beispiel #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;
    if (c64_256k_enabled)
        c64_256k_cia_set_vbank(vbank);
    else
        mem_set_vbank(vbank);
}
Beispiel #4
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;
            if (c64_256k_enabled)
                c64_256k_cia_set_vbank(new_vbank);
            else
                mem_set_vbank(new_vbank);
        }
        (*iecbus_callback_write)((BYTE)tmp, maincpu_clk);
        printer_userport_write_strobe(tmp & 0x04);
    }
}