sound chips added to pld file and added sn76489 test

This commit is contained in:
Joppe Blondel
2026-10-17 13:30:54 +02:00
parent 55012d8b7b
commit ebf409745d
20 changed files with 2972 additions and 264 deletions
+22
View File
@@ -145,6 +145,7 @@ init:
ei
call tape_init
call psg_silence
; Print header message
ld hl,msg_header
@@ -272,6 +273,13 @@ release_daisy_chain:
ctc_uart_init:
; Reset CTC channels
ld a,003h
; A channel may still be waiting for a time constant after a warm boot.
; In that state the first byte is consumed as the constant, so send the
; reset control word again to guarantee the unused channel is disabled.
out (CTC_CHANNEL_0),a
out (CTC_CHANNEL_1),a
out (CTC_CHANNEL_2),a
out (CTC_CHANNEL_3),a
out (CTC_CHANNEL_0),a
out (CTC_CHANNEL_1),a
out (CTC_CHANNEL_2),a
@@ -557,6 +565,20 @@ delay_ms:
jp nz,1$ ; 10T
ret
; -------------------------------------------------------
; Silence all audio generators
; -------------------------------------------------------
psg_silence:
ld a,0x9f ; mute tone 0
out (SN_PORT),a
ld a,0xbf ; mute tone 1
out (SN_PORT),a
ld a,0xdf ; mute tone 2
out (SN_PORT),a
ld a,0xff ; mute noise
out (SN_PORT),a
ret
; -------------------------------------------------------
; Strings
; -------------------------------------------------------