void CPU::enter() { while(true) { if(scheduler.sync == Scheduler::SynchronizeMode::CPU) { scheduler.sync = Scheduler::SynchronizeMode::All; scheduler.exit(Scheduler::ExitReason::SynchronizeEvent); } if(status.interrupt_pending) { status.interrupt_pending = false; if(status.nmi_pending) { status.nmi_pending = false; status.interrupt_vector = (regs.e == false ? 0xffea : 0xfffa); op_irq(); } else if(status.irq_pending) { status.irq_pending = false; status.interrupt_vector = (regs.e == false ? 0xffee : 0xfffe); op_irq(); } else if(status.reset_pending) { status.reset_pending = false; add_clocks(186); regs.pc.l = bus.read(0xfffc); regs.pc.h = bus.read(0xfffd); } } op_step(); } }
void CPU::enter() { while(true) { if(scheduler.sync == Scheduler::SynchronizeMode::CPU) { // we can only stop if there's enough time for at least one more event // on both the PPU and the SMP if (smp.clock < 0 && ppu.clock < 0) { scheduler.sync = Scheduler::SynchronizeMode::All; scheduler.exit(Scheduler::ExitReason::SynchronizeEvent); } } if(status.interrupt_pending) { status.interrupt_pending = false; if(status.nmi_pending) { status.nmi_pending = false; regs.vector = (regs.e == false ? 0xffea : 0xfffa); op_irq(); debugger.op_nmi(); } else if(status.irq_pending) { status.irq_pending = false; regs.vector = (regs.e == false ? 0xffee : 0xfffe); op_irq(); debugger.op_irq(); } else if(status.reset_pending) { status.reset_pending = false; add_clocks(186); regs.pc.l = bus.read(0xfffc); regs.pc.h = bus.read(0xfffd); } } op_step(); } }
void SMP::enter() { while(sample_buffer < sample_buffer_end) { clock -= (int64_t)((double)(sample_buffer_end - sample_buffer) * 24.0 * 16.0 * tempo); while(status.clock_speed != 2 && clock < 0) op_step(); if(status.clock_speed == 2) step(-clock); synchronize_dsp(); } }
void SMP::enter() { while(true) { if(scheduler.sync == Scheduler::SynchronizeMode::All) { scheduler.exit(Scheduler::ExitReason::SynchronizeEvent); } op_step(); } }
void SMP::enter() { while(true) { if(scheduler.sync == Scheduler::SynchronizeMode::All) { scheduler.exit(Scheduler::ExitReason::SynchronizeEvent); } debugger.op_exec(regs.pc); op_step(); } }
void CPU::enter() { while(true) { if(scheduler.sync == Scheduler::SynchronizeMode::CPU) { scheduler.sync = Scheduler::SynchronizeMode::All; scheduler.exit(Scheduler::ExitReason::SynchronizeEvent); } if(status.nmi_pending) { status.nmi_pending = false; op_irq(regs.e == false ? 0xffea : 0xfffa); } if(status.irq_pending) { status.irq_pending = false; op_irq(regs.e == false ? 0xffee : 0xfffe); } op_step(); } }
void SMP::enter() { while(clock < 0) op_step(); }