diff options
author | Ian C <ianc@noddybox.co.uk> | 2021-08-03 20:26:23 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2021-08-03 20:26:23 +0000 |
commit | b7e8b634595445325d10f8fcddcb7d6cdaa8a922 (patch) | |
tree | 7ecd54e8539cbe1abd37ffda8d3fcd9eb0ddf258 /include/z80.h | |
parent | 30c4591b629bb96e9ff99aca24d0e0e51cedbf23 (diff) |
First attempt at sound
Diffstat (limited to 'include/z80.h')
-rw-r--r-- | include/z80.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/z80.h b/include/z80.h index ef24fd0..ab095d8 100644 --- a/include/z80.h +++ b/include/z80.h @@ -134,13 +134,23 @@ typedef int (*Z80Callback)(Z80 *cpu, Z80Val data); */ typedef enum { - eZ80_Instruction, /* data = no cycles since reset */ + eZ80_Instruction, /* data = cycles as returned by Z80Cycles */ eZ80_EDHook, /* data = byte after ED opcode (only for NOP opcodes) */ eZ80_Halt, /* data = 1 halt raised, 0 halt cleared by int */ eZ80_RETI, /* data = ignored */ eZ80_NO_CALLBACK /* leave at end */ } Z80CallbackReason; +/* Defines cycle timers +*/ +typedef enum +{ + Z80_TIMER_1, + Z80_TIMER_2, + Z80_TIMER_3, + Z80_NO_TIMERS +} Z80Timer; + /* Flags in the F register */ @@ -235,6 +245,11 @@ void Z80Exec(Z80 *cpu); Z80Val Z80Cycles(Z80 *cpu); void Z80ResetCycles(Z80 *cpu, Z80Val cycles); +/* Timers that count in cycle counts +*/ +Z80Val Z80GetTimer(Z80 *cpu, Z80Timer timer); +void Z80SetTimer(Z80 *cpu, Z80Timer timer, Z80Val cycles); + /* Set address to label mappings for the disassembler */ |