mirror of
https://github.com/holub/mame
synced 2025-05-02 12:36:41 +03:00
m6502: put back get_cycle() since OG says it'll be needed in future, but compile-time disable the slow precalculation/caching (nw)
This commit is contained in:
parent
eea3dca4ad
commit
9ac4a5762d
@ -129,6 +129,7 @@ void m6502_device::init()
|
|||||||
inst_substate = 0;
|
inst_substate = 0;
|
||||||
inst_state_base = 0;
|
inst_state_base = 0;
|
||||||
sync = false;
|
sync = false;
|
||||||
|
end_cycles = 0;
|
||||||
inhibit_interrupts = false;
|
inhibit_interrupts = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,6 +143,7 @@ void m6502_device::device_reset()
|
|||||||
apu_irq_state = false;
|
apu_irq_state = false;
|
||||||
irq_taken = false;
|
irq_taken = false;
|
||||||
v_state = false;
|
v_state = false;
|
||||||
|
end_cycles = 0;
|
||||||
sync = false;
|
sync = false;
|
||||||
sync_w(CLEAR_LINE);
|
sync_w(CLEAR_LINE);
|
||||||
inhibit_interrupts = false;
|
inhibit_interrupts = false;
|
||||||
@ -398,8 +400,18 @@ UINT8 m6502_device::do_asr(UINT8 v)
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT64 m6502_device::get_cycle()
|
||||||
|
{
|
||||||
|
return end_cycles == 0 || icount <= 0 ? machine().time().as_ticks(clock()) : end_cycles - icount;
|
||||||
|
}
|
||||||
|
|
||||||
void m6502_device::execute_run()
|
void m6502_device::execute_run()
|
||||||
{
|
{
|
||||||
|
// get_cycle() is currently unused, and this precalculation
|
||||||
|
// enormously slows down drivers with high interleave
|
||||||
|
#if 0
|
||||||
|
end_cycles = machine().time().as_ticks(clock()) + icount;
|
||||||
|
#endif
|
||||||
if(inst_substate)
|
if(inst_substate)
|
||||||
do_exec_partial();
|
do_exec_partial();
|
||||||
|
|
||||||
@ -412,6 +424,7 @@ void m6502_device::execute_run()
|
|||||||
}
|
}
|
||||||
do_exec_full();
|
do_exec_full();
|
||||||
}
|
}
|
||||||
|
end_cycles = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void m6502_device::execute_set_input(int inputnum, int state)
|
void m6502_device::execute_set_input(int inputnum, int state)
|
||||||
|
@ -61,6 +61,7 @@ public:
|
|||||||
DECLARE_WRITE_LINE_MEMBER( irq_line );
|
DECLARE_WRITE_LINE_MEMBER( irq_line );
|
||||||
DECLARE_WRITE_LINE_MEMBER( nmi_line );
|
DECLARE_WRITE_LINE_MEMBER( nmi_line );
|
||||||
|
|
||||||
|
UINT64 get_cycle();
|
||||||
bool get_sync() const { return sync; }
|
bool get_sync() const { return sync; }
|
||||||
void disable_direct() { direct_disabled = true; }
|
void disable_direct() { direct_disabled = true; }
|
||||||
|
|
||||||
@ -200,6 +201,7 @@ protected:
|
|||||||
int icount;
|
int icount;
|
||||||
bool nmi_state, irq_state, apu_irq_state, v_state;
|
bool nmi_state, irq_state, apu_irq_state, v_state;
|
||||||
bool irq_taken, sync, direct_disabled, inhibit_interrupts;
|
bool irq_taken, sync, direct_disabled, inhibit_interrupts;
|
||||||
|
UINT64 end_cycles;
|
||||||
|
|
||||||
static const disasm_entry disasm_entries[0x100];
|
static const disasm_entry disasm_entries[0x100];
|
||||||
|
|
||||||
|
@ -77,6 +77,7 @@ void m740_device::device_reset()
|
|||||||
apu_irq_state = false;
|
apu_irq_state = false;
|
||||||
irq_taken = false;
|
irq_taken = false;
|
||||||
v_state = false;
|
v_state = false;
|
||||||
|
end_cycles = 0;
|
||||||
sync = false;
|
sync = false;
|
||||||
inhibit_interrupts = false;
|
inhibit_interrupts = false;
|
||||||
SP = 0x00ff;
|
SP = 0x00ff;
|
||||||
|
Loading…
Reference in New Issue
Block a user