mirror of
https://github.com/holub/mame
synced 2025-04-24 01:11:11 +03:00
get rid of old speedup hack (besides, it made halt timing inaccurate on drivers with custom cycletables)
This commit is contained in:
parent
68184de87e
commit
2da493f56d
@ -366,7 +366,6 @@ static const UINT8 cc_ex[0x100] = {
|
||||
|
||||
static void take_interrupt(z80_state *z80);
|
||||
static void take_interrupt_nsc800(z80_state *z80);
|
||||
static CPU_BURN( z80 );
|
||||
|
||||
typedef void (*funcptr)(z80_state *z80);
|
||||
|
||||
@ -477,19 +476,6 @@ PROTOTYPES(Z80ed,ed);
|
||||
PROTOTYPES(Z80fd,fd);
|
||||
PROTOTYPES(Z80xycb,xycb);
|
||||
|
||||
/****************************************************************************/
|
||||
/* Burn an odd amount of cycles, that is instructions taking something */
|
||||
/* different from 4 T-states per opcode (and r increment) */
|
||||
/****************************************************************************/
|
||||
INLINE void BURNODD(z80_state *z80, int cycles, int opcodes, int cyclesum)
|
||||
{
|
||||
if( cycles > 0 )
|
||||
{
|
||||
z80->r += (cycles / cyclesum) * opcodes;
|
||||
z80->icount -= (cycles / cyclesum) * cyclesum;
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* define an opcode function
|
||||
***************************************************************/
|
||||
@ -594,8 +580,6 @@ INLINE void BURNODD(z80_state *z80, int cycles, int opcodes, int cyclesum)
|
||||
#define ENTER_HALT(Z) do { \
|
||||
(Z)->PC--; \
|
||||
(Z)->halt = 1; \
|
||||
if( (Z)->irq_state == CLEAR_LINE ) \
|
||||
CPU_BURN_NAME(z80)( (Z)->device, (Z)->icount); \
|
||||
} while (0)
|
||||
|
||||
/***************************************************************
|
||||
@ -3686,22 +3670,6 @@ static CPU_EXECUTE( z80 )
|
||||
} while (z80->icount > 0);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Burn 'cycles' T-states. Adjust z80->r register for the lost time
|
||||
****************************************************************************/
|
||||
static CPU_BURN( z80 )
|
||||
{
|
||||
z80_state *z80 = get_safe_token(device);
|
||||
|
||||
if( cycles > 0 )
|
||||
{
|
||||
/* NOP takes 4 cycles per instruction */
|
||||
int n = (cycles + 3) / 4;
|
||||
z80->r += n;
|
||||
z80->icount -= 4 * n;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Set IRQ line state
|
||||
****************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user