From c527acfc79f3bda8cfe13a7b51b0b16a32683960 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 29 Jun 2026 09:41:42 +0900 Subject: First partial working attempt at sound. Producing output, but very distorted --- src/z80.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/z80.h') diff --git a/src/z80.h b/src/z80.h index 66385e7..601127d 100644 --- a/src/z80.h +++ b/src/z80.h @@ -151,6 +151,16 @@ typedef struct } Z80Label; +/* The Z80 provides a number of cycle timers +*/ +typedef enum +{ + eZ80_Timer_1, + eZ80_Timer_2, + eZ80_Timer_3 +} Z80Timer; + + /* ---------------------------------------- INTERFACES */ @@ -230,6 +240,12 @@ void Z80GetState(Z80 *cpu, Z80State *state); void Z80SetState(Z80 *cpu, const Z80State *state); +/* 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 */ void Z80SetLabels(Z80Label labels[]); -- cgit v1.3