diff --git a/Source/HBIOS/nascom.asm b/Source/HBIOS/nascom.asm index 6b9e7297..e9f6c1da 100644 --- a/Source/HBIOS/nascom.asm +++ b/Source/HBIOS/nascom.asm @@ -78,7 +78,7 @@ DEL .EQU 7FH ; Delete ; ; 0200H - 2000H BASIC EXECUTABLE ; 2000H - 2090H STACK -; 2090H - 20F8H BASIC EXECUTABLE VARAIABLES / WORKSPACE +; 2090H - 20F8H BASIC EXECUTABLE VARIABLES / WORKSPACE ; 20F9H - BASIC PROGRAM START WRKSPC .EQU BAS_END+90H ; BASIC Work space diff --git a/Source/HBIOS/pio.asm b/Source/HBIOS/pio.asm index c0d230f7..05f3e45b 100644 --- a/Source/HBIOS/pio.asm +++ b/Source/HBIOS/pio.asm @@ -36,7 +36,7 @@ ; Both port interrupt enable flip-flops are reset. ; Both port output registers are reset. ; -; Register addressing for ECB-ZP and ECB-4P assuming base address 90h and 88h respectively. +; Register addressing example for ECB-ZP and ECB-4P assuming base address 90h and 88h respectively. ; ; PIO ----ZP---- ----4P---- ; 0 DATA 0 90h DATA 0 B8h @@ -762,7 +762,7 @@ PPI_OST: RET ; ; PIO_INITDEV - Configure device. -; If DE = FFFF then extract the configuratio information from the table of devices and program the device using those settings. +; If DE = FFFF then extract the configuration information from the table of devices and program the device using those settings. ; Otherwise use the configuration information in DE to program those settings and save them in the device table PPI_INITDEV: diff --git a/Source/HBIOS/sn76489.asm b/Source/HBIOS/sn76489.asm index b65e9f5d..fa544064 100644 --- a/Source/HBIOS/sn76489.asm +++ b/Source/HBIOS/sn76489.asm @@ -15,6 +15,8 @@ SN76489_PORT_LEFT .EQU $FC ; PORTS FOR ACCESSING THE SN76489 CHIP (LEFT) SN76489_PORT_RIGHT .EQU $F8 ; PORTS FOR ACCESSING THE SN76489 CHIP (RIGHT) +;SN76489_PORT_LEFT .EQU $C7 ; PORTS FOR ACCESSING THE SN76489 CHIP (LEFT) +;SN76489_PORT_RIGHT .EQU $C8 ; PORTS FOR ACCESSING THE SN76489 CHIP (RIGHT) SN7_IDAT .EQU 0 SN7_TONECNT .EQU 3 ; COUNT NUMBER OF TONE CHANNELS SN7_NOISECNT .EQU 1 ; COUNT NUMBER OF NOISE CHANNELS @@ -68,6 +70,13 @@ SN7_RESET: SN7_VOLUME_OFF: AUDTRACE(SNT_VOLOFF) + +#IFDEF SBCV2004 + LD A,(RTCVAL) + OR %00001000 ; SBC-V2-004+ CHANGE + OUT (RTCIO),A ; TO HALF CLOCK SPEED +#ENDIF + LD A, CHANNEL_0_SILENT OUT (SN76489_PORT_LEFT), A OUT (SN76489_PORT_RIGHT), A @@ -84,6 +93,12 @@ SN7_VOLUME_OFF: OUT (SN76489_PORT_LEFT), A OUT (SN76489_PORT_RIGHT), A +#IFDEF SBCV2004 + LD A,(RTCVAL) + OR %11110111 ; SBC-V2-004+ CHANGE TO + OUT (RTCIO),A ; NORMAL CLOCK SPEED +#ENDIF + RET ; BIT MAPPING @@ -237,9 +252,23 @@ SN7_APPLY_VOL: ; APPLY VOLUME TO BOTH LEFT AND RIGHT CHANNELS AUDTRACE_A AUDTRACE_CR +#IFDEF SBCV2004 + PUSH AF + LD A,(RTCVAL) + OR %00001000 ; SBC-V2-004+ CHANGE + OUT (RTCIO),A ; TO HALF CLOCK SPEED + POP AF +#ENDIF + OUT (SN76489_PORT_LEFT), A OUT (SN76489_PORT_RIGHT), A +#IFDEF SBCV2004 + LD A,(RTCVAL) + OR %11110111 ; SBC-V2-004+ CHANGE TO + OUT (RTCIO),A ; NORMAL CLOCK SPEED +#ENDIF + POP AF POP BC RET @@ -268,9 +297,23 @@ SN7_APPLY_PRD: AUDTRACE_A AUDTRACE_CR +#IFDEF SBCV2004 + PUSH AF + LD A,(RTCVAL) + OR %00001000 ; SBC-V2-004+ CHANGE + OUT (RTCIO),A ; TO HALF CLOCK SPEED + POP AF +#ENDIF + OUT (SN76489_PORT_LEFT), A OUT (SN76489_PORT_RIGHT), A +#IFDEF SBCV2004 + LD A,(RTCVAL) + OR %11110111 ; SBC-V2-004+ CHANGE TO + OUT (RTCIO),A ; NORMAL CLOCK SPEED +#ENDIF + LD A, L ; RIGHT SHIFT OUT THE LOWER 4 BITS RRCA RRCA @@ -291,9 +334,23 @@ SN7_APPLY_PRD: AUDTRACE_A AUDTRACE_CR +#IFDEF SBCV2004 + PUSH AF + LD A,(RTCVAL) + OR %00001000 ; SBC-V2-004+ CHANGE + OUT (RTCIO),A ; TO HALF CLOCK SPEED + POP AF +#ENDIF + OUT (SN76489_PORT_LEFT), A OUT (SN76489_PORT_RIGHT), A +#IFDEF SBCV2004 + LD A,(RTCVAL) + OR %11110111 ; SBC-V2-004+ CHANGE TO + OUT (RTCIO),A ; NORMAL CLOCK SPEED +#ENDIF + POP AF POP BC POP DE