Sound working at very low cpu frequencies

This commit is contained in:
Daniele Verducci su MatissePenguin
2020-12-05 12:45:18 +01:00
parent 7c6300af8a
commit 3d4d5360c1
4 changed files with 106 additions and 32 deletions

View File

@ -0,0 +1,19 @@
; Time library
; @author Daniele Verducci
; Duration (change these values based on CPU frequency)
TIME_DUR_SECOND: EQU 255
; Wait bc * 55 states
; Use 1 iteration as delay between I/O bus writes
; @param bc The number of iterations. Each iteration is 55 states long.
Time_delay55:
bit 0,a ; 8
bit 0,a ; 8
bit 0,a ; 8
and a,255 ; 7
dec bc ; 6
ld a,c ; 4
or a,b ; 4
jp nz,Time_delay55 ; 10, total = 55 states/iteration
ret