/* called by c64.c:machine_specific_init */ void cartridge_init(void) { cart_init(); cartridge_nmi_alarm = alarm_new(maincpu_alarm_context, "Cartridge", cart_nmi_alarm_triggered, NULL); cartridge_freeze_alarm = alarm_new(maincpu_alarm_context, "Cartridge", cart_freeze_alarm_triggered, NULL); cartridge_int_num = interrupt_cpu_status_int_new(maincpu_int_status, "Cartridge"); }
void tpi1_init(tpi_context_t *tpi_context) { tpi_context->log = log_open(tpi_context->myname); tpi_context->tpi_int_num = interrupt_cpu_status_int_new(maincpu_int_status, tpi_context->myname); }
void vicii_irq_init(void) { vicii.int_num = interrupt_cpu_status_int_new(maincpu_int_status, "VICII"); vicii.raster_irq_alarm = alarm_new(maincpu_alarm_context, "VicIIRasterIrq", vicii_irq_alarm_handler, NULL); }
void c64dtvblitter_init(void) { if (c64dtvblitter_log == LOG_ERR) c64dtvblitter_log = log_open("C64DTVBLITTER"); /* init Blitter IRQ */ c64dtv_blitter_int_num = interrupt_cpu_status_int_new(maincpu_int_status, "C64DTVBLITTER"); }
/*! \brief initialize the ACIA */ void myacia_init(void) { acia.int_num = interrupt_cpu_status_int_new(maincpu_int_status, MYACIA); acia.alarm_tx = alarm_new(mycpu_alarm_context, MYACIA, int_acia_tx, NULL); acia.alarm_rx = alarm_new(mycpu_alarm_context, MYACIA, int_acia_rx, NULL); clk_guard_add_callback(mycpu_clk_guard, clk_overflow_callback, NULL); if (acia.log == LOG_ERR) { acia.log = log_open(MYACIA); } }
void midi_init(void) { midi_int_num = interrupt_cpu_status_int_new(maincpu_int_status, "MIDI"); midi_alarm = alarm_new(maincpu_alarm_context, "MIDI", int_midi, NULL); clk_guard_add_callback(maincpu_clk_guard, clk_overflow_callback, NULL); if (midi_log == LOG_ERR) { midi_log = log_open("MIDI"); } mididrv_init(); midi_reset(); }
void c64keyboard_init(void) { c64keyboard_int_num = interrupt_cpu_status_int_new(maincpu_int_status, "RestoreKEY"); switch (machine_class) { case VICE_MACHINE_C64: case VICE_MACHINE_C64SC: case VICE_MACHINE_SCPU64: case VICE_MACHINE_C128: keyboard_register_machine(c64keyboard_machine_func); joystick_register_machine(c64joystick_machine_func); break; default: /* No lightpen in x64dtv */ break; } }
void viacore_init(via_context_t *via_context, alarm_context_t *alarm_context, interrupt_cpu_status_t *int_status, clk_guard_t *clk_guard) { char *buffer; if (via_context->log == LOG_ERR) via_context->log = log_open(via_context->my_module_name); buffer = lib_msprintf("%sT1", via_context->myname); via_context->t1_alarm = alarm_new(alarm_context, buffer, viacore_intt1, via_context); lib_free(buffer); buffer = lib_msprintf("%sT2", via_context->myname); via_context->t2_alarm = alarm_new(alarm_context, buffer, viacore_intt2, via_context); lib_free(buffer); via_context->int_num = interrupt_cpu_status_int_new(int_status, via_context->myname); clk_guard_add_callback(clk_guard, viacore_clk_overflow_callback, via_context); }
void riot2_setup_context(drive_context_t *ctxptr) { riot_context_t *riot; driveriot2_context_t *riot2p; ctxptr->riot2 = lib_malloc(sizeof(riot_context_t)); riot = ctxptr->riot2; riot->prv = lib_malloc(sizeof(driveriot2_context_t)); riot2p = (driveriot2_context_t *)(riot->prv); riot2p->number = ctxptr->mynumber; riot2p->drivenumberjumper = ctxptr->mynumber & 0x07; /* 3 bits */ riot->context = (void *)ctxptr; riot->rmw_flag = &(ctxptr->cpu->rmw_flag); riot->clk_ptr = ctxptr->clk_ptr; riotcore_setup_context(riot); riot->myname = lib_msprintf("RIOT2D%d", ctxptr->mynumber); riot2p->drive = ctxptr->drive; riot2p->r_atn_active = 0; riot2p->int_num = interrupt_cpu_status_int_new(ctxptr->cpu->int_status, ctxptr->riot2->myname); riot->undump_pra = undump_pra; riot->undump_prb = undump_prb; riot->store_pra = store_pra; riot->store_prb = store_prb; riot->read_pra = read_pra; riot->read_prb = read_prb; riot->reset = reset; riot->set_irq = set_irq; riot->restore_irq = restore_irq; }
void mypia_init(void) { mypia_log = log_open(MYPIA_NAME); pia_int_num = interrupt_cpu_status_int_new(mycpu_int_status, MYPIA_NAME); }
void vicii_irq_init(void) { vicii.int_num = interrupt_cpu_status_int_new(maincpu_int_status, "VICII"); }