Browse Source

Minors

pull/206/head
b1ackmai1er 5 years ago
parent
commit
1e1ad94b6d
  1. 2
      Source/HBIOS/nascom.asm
  2. 4
      Source/HBIOS/pio.asm
  3. 57
      Source/HBIOS/sn76489.asm

2
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

4
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:

57
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

Loading…
Cancel
Save