Added instruction cycle counting to new Z80 core

This commit is contained in:
Nik Henson 2011-07-26 21:47:59 +00:00
parent 79e8172340
commit 62f695cc96
2 changed files with 608 additions and 23 deletions

File diff suppressed because it is too large Load diff

View file

@ -27,7 +27,6 @@
*
* Known inaccuracies:
*
* - No timing. Each instruction takes one "cycle".
* - Interrupts are accepted immediately after EI instruction. In reality,
* interrupts become enabled after the instruction following EI. This
* could be implemented with a state machine in Run() if needed.
@ -73,19 +72,17 @@ class CZ80
{
public:
/*
* Run(numOps):
* Run(numCycles):
*
* Runs the Z80 for the specified number of instructions.
* Runs the Z80 for the specified number of instruction cycles.
*
* Parameters:
* numOps Number of instructions to execute. Cycle-accurate timing
* is not yet supported.
* numCycles Number of instruction cycles to execute.
*
* Returns:
* Number of instructions actually executed. For now, this will not
* differ from numOps.
* Number of instruction cycles actually executed.
*/
int Run(int numOps);
int Run(int numCycles);
/*
* TriggerNMI(void):