void minx_cpu_device::execute_run() { do { m_curpc = GET_MINX_PC; debugger_instruction_hook(this, m_curpc); if ( m_interrupt_pending ) { m_halted = 0; if ( ! ( m_F & 0xc0 ) && m_U == m_V ) { //logerror("minx_execute(): taking IRQ\n"); PUSH8( m_V ); PUSH16( m_PC ); PUSH8( m_F ); /* Set Interrupt Branch flag */ m_F |= 0x80; m_V = 0; m_PC = rd16( standard_irq_callback( 0 ) << 1 ); m_icount -= 28; /* This cycle count is a guess */ } } if ( m_halted ) { m_icount -= insnminx_cycles_CE[0xAE]; } else { execute_one(); } } while ( m_icount > 0 ); }
void minx_cpu_device::device_reset() { m_SP = m_BA = m_HL = m_X = m_Y = 0; m_U = m_V = m_F = m_E = m_I = m_XI = m_YI = 0; m_halted = m_interrupt_pending = 0; m_PC = rd16( 0 ); }
static CPU_RESET( minx ) { minx_state *minx = get_safe_token(device); minx->SP = minx->BA = minx->HL = minx->X = minx->Y = 0; minx->U = minx->V = minx->F = minx->E = minx->I = minx->XI = minx->YI = 0; minx->halted = minx->interrupt_pending = 0; minx->PC = rd16( minx, 0 ); }
static CPU_EXECUTE( minx ) { // UINT32 oldpc; UINT8 op; minx_state *minx = get_safe_token(device); do { debugger_instruction_hook(device, GET_MINX_PC); // oldpc = GET_MINX_PC; if ( minx->interrupt_pending ) { minx->halted = 0; if ( ! ( minx->F & 0xc0 ) && minx->U == minx->V ) { //logerror("minx_execute(): taking IRQ\n"); PUSH8( minx, minx->V ); PUSH16( minx, minx->PC ); PUSH8( minx, minx->F ); /* Set Interrupt Branch flag */ minx->F |= 0x80; minx->V = 0; minx->PC = rd16( minx, minx->irq_callback( minx->device, 0 ) << 1 ); minx->icount -= 28; /* This cycle count is a guess */ } } if ( minx->halted ) { minx->icount -= insnminx_cycles_CE[0xAE]; } else { op = rdop(minx); insnminx[op](minx); minx->icount -= insnminx_cycles[op]; } } while ( minx->icount > 0 ); }