static void friskyt_portB_w(int offset,int data) { //if (errorlog) fprintf(errorlog,"PC %04x: 8910 port B = %02x\n",cpu_get_pc(),data); /* bit 0 is IRQ enable */ interrupt_enable_w(0,data & 1); /* bit 1 flips screen */ /* bit 2 resets the microcontroller */ if (((portb & 4) == 0) && (data & 4)) { /* reset and start the protection mcu */ cpu_set_reset_line(1, PULSE_LINE); cpu_set_halt_line(1, CLEAR_LINE); } /* other bits unknown */ portb = data; }
static void scanline_callback(int scanline) { /* update the video */ beathead_scanline_update(scanline); /* on scanline zero, clear any halt condition */ if (scanline == 0) cpu_set_halt_line(0, CLEAR_LINE); /* wrap around at 262 */ scanline++; if (scanline >= MAX_SCANLINES) scanline = 0; /* set the scanline IRQ */ irq_state[2] = 1; update_interrupts(); /* set the timer for the next one */ timer_set(cpu_getscanlinetime(scanline) - hblank_offset, scanline, scanline_callback); }
static void friskyt_init_machine(void) { /* start with the protection mcu halted */ cpu_set_halt_line(1, ASSERT_LINE); }
void phozon_init_machine( void ) { credits = coincounter1 = coincounter2 = 0; cpu_set_halt_line(1, CLEAR_LINE); cpu_set_halt_line(2, CLEAR_LINE); }