Improve TMS Reset & SN76489 Early Init

- The TMS reset function was missing a call to re-initialize the CRT registers.  This has been added.
- The SN76489 powers up in a dreadful state where it is emitting loud noise until initialized.  Added a PREINIT entry point to initialize the registers earlier.  Still not great, but a lot better.
This commit is contained in:
Wayne Warthen
2024-04-01 13:36:59 -07:00
parent 874cc450ba
commit d50593a70e
5 changed files with 17 additions and 6 deletions

View File

@@ -1967,19 +1967,19 @@ HB_CPU1:
LD (RTC_DISPACT),A ; RTC DEVICE
LD (DSKY_DISPACT),A ; DSKY DEVICE
;
#IF (SN76489ENABLE)
CALL SN76489_PREINIT
#ENDIF
#IF (DSRTCENABLE)
CALL DSRTC_PREINIT
#ENDIF
;
#IF (DSKYENABLE)
#IF (ICMENABLE)
CALL ICM_PREINIT
#ENDIF
;
#IF (PKDENABLE)
CALL PKD_PREINIT
#ENDIF
;
#IF (H8PENABLE)
CALL H8P_PREINIT
#ENDIF

View File

@@ -56,6 +56,12 @@ CHANNEL_3_SILENT .EQU $FF
;
#INCLUDE "audio.inc"
;
; BLINDLY RESET THE PSG AS SOON AS WE CAN AFTER BOOT BECAUSE IT
; DOES NOT RESET ITSELF AT POWER ON AND MAKES UGLY NOISE.
;
SN76489_PREINIT:
JR SN7_RESET
;
SN76489_INIT:
LD IY, SN7_IDAT ; POINTER TO INSTANCE DATA
LD BC, SN7_FNTBL ; BC := FUNCTION TABLE ADDRESS

View File

@@ -350,7 +350,12 @@ TMS_VDARES:
#IF (CPUFAM == CPU_Z180)
CALL TMS_Z180IO
#ENDIF
TMS_VDARES1: ; ENTRY POINT TO AVOID TMS_Z180IO RECURSION
CALL TMS_CRTINIT
;
; ENTRY POINT USED BY TMS_INIT TO AVOID DUPLICATE CALL TO TMS_CRTINIT
; AND TMS_Z180IO.
;
TMS_VDARES1:
LD DE,0 ; ROW = 0, COL = 0
CALL TMS_XY ; SEND CURSOR TO TOP LEFT
LD A,' ' ; BLANK THE SCREEN

View File

@@ -2,7 +2,7 @@
#DEFINE RMN 5
#DEFINE RUP 0
#DEFINE RTP 0
#DEFINE BIOSVER "3.5.0-dev.20"
#DEFINE BIOSVER "3.5.0-dev.21"
#define rmj RMJ
#define rmn RMN
#define rup RUP

View File

@@ -3,5 +3,5 @@ rmn equ 5
rup equ 0
rtp equ 0
biosver macro
db "3.5.0-dev.20"
db "3.5.0-dev.21"
endm