diff options
| author | Ian C <ianc@noddybox.co.uk> | 2026-06-29 09:41:42 +0900 |
|---|---|---|
| committer | Ian C <ianc@noddybox.co.uk> | 2026-06-29 09:41:42 +0900 |
| commit | c527acfc79f3bda8cfe13a7b51b0b16a32683960 (patch) | |
| tree | e5bbd119a070848301a03b52f1232a797b35c119 /src/z80.c | |
| parent | c31b779c20638ce25f11489c445a53798a663b13 (diff) | |
First partial working attempt at sound. Producing output, but very distorted
Diffstat (limited to 'src/z80.c')
| -rw-r--r-- | src/z80.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -149,9 +149,15 @@ Z80 *Z80Init(Z80ReadMemory read_memory, void Z80Reset(Z80 *cpu) { + int f; + cpu->cycle=0; cpu->PC=0; + cpu->timer[eZ80_Timer_1] = 0; + cpu->timer[eZ80_Timer_2] = 0; + cpu->timer[eZ80_Timer_3] = 0; + cpu->AF.w=0xffff; cpu->BC.w=0xffff; cpu->DE.w=0xffff; @@ -362,4 +368,17 @@ const char *Z80Disassemble(Z80 *cpu, Z80Word *pc) #endif } + +Z80Val Z80GetTimer(Z80 *cpu, Z80Timer timer) +{ + return cpu->timer[timer]; +} + + +void Z80SetTimer(Z80 *cpu, Z80Timer timer, Z80Val value) +{ + cpu->timer[timer] = value; +} + + /* END OF FILE */ |
