Previous 199869 Revisions Next

r31161 Wednesday 2nd July, 2014 at 06:36:51 UTC by Alex Jackson
m6502: put back get_cycle() since OG says it'll be needed in future, but compile-time disable the slow precalculation/caching (nw)
[src/emu/cpu/m6502]m6502.c m6502.h m740.c

trunk/src/emu/cpu/m6502/m6502.c
r31160r31161
129129   inst_substate = 0;
130130   inst_state_base = 0;
131131   sync = false;
132   end_cycles = 0;
132133   inhibit_interrupts = false;
133134}
134135
r31160r31161
142143   apu_irq_state = false;
143144   irq_taken = false;
144145   v_state = false;
146   end_cycles = 0;
145147   sync = false;
146148   sync_w(CLEAR_LINE);
147149   inhibit_interrupts = false;
r31160r31161
398400   return v;
399401}
400402
403UINT64 m6502_device::get_cycle()
404{
405   return end_cycles == 0 || icount <= 0 ? machine().time().as_ticks(clock()) : end_cycles - icount;
406}
407
401408void m6502_device::execute_run()
402409{
410   // get_cycle() is currently unused, and this precalculation
411   // enormously slows down drivers with high interleave
412#if 0
413   end_cycles = machine().time().as_ticks(clock()) + icount;
414#endif
403415   if(inst_substate)
404416      do_exec_partial();
405417
r31160r31161
412424      }
413425      do_exec_full();
414426   }
427   end_cycles = 0;
415428}
416429
417430void m6502_device::execute_set_input(int inputnum, int state)
trunk/src/emu/cpu/m6502/m6502.h
r31160r31161
6161   DECLARE_WRITE_LINE_MEMBER( irq_line );
6262   DECLARE_WRITE_LINE_MEMBER( nmi_line );
6363
64   UINT64 get_cycle();
6465   bool get_sync() const { return sync; }
6566   void disable_direct() { direct_disabled = true; }
6667
r31160r31161
200201   int icount;
201202   bool nmi_state, irq_state, apu_irq_state, v_state;
202203   bool irq_taken, sync, direct_disabled, inhibit_interrupts;
204   UINT64 end_cycles;
203205
204206   static const disasm_entry disasm_entries[0x100];
205207
trunk/src/emu/cpu/m6502/m740.c
r31160r31161
7777   apu_irq_state = false;
7878   irq_taken = false;
7979   v_state = false;
80   end_cycles = 0;
8081   sync = false;
8182   inhibit_interrupts = false;
8283   SP = 0x00ff;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team