From e25107309b9fff449e8bbeba23d9d9ec87d8ba08 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 6 Nov 2022 10:17:28 +0800 Subject: [PATCH 01/12] SYSCHK changes Display the error code of syschk enabled --- Source/HBIOS/dsrtc.asm | 8 ++--- Source/HBIOS/hbios.asm | 72 +++++++++++++++++++----------------------- Source/HBIOS/md.asm | 8 ++--- Source/HBIOS/ppide.asm | 4 +-- Source/HBIOS/sio.asm | 4 +-- 5 files changed, 38 insertions(+), 58 deletions(-) diff --git a/Source/HBIOS/dsrtc.asm b/Source/HBIOS/dsrtc.asm index c4e8608b..be29dc5e 100644 --- a/Source/HBIOS/dsrtc.asm +++ b/Source/HBIOS/dsrtc.asm @@ -247,9 +247,7 @@ DSRTC_DISPATCH: JP Z,DSRTC_SETALM ; SET ALARM DEC A JP Z,DSRTC_DEVICE ; REPORT RTC DEVICE INFO - CALL SYSCHK - LD A,ERR_NOFUNC - OR A + SYSCHKERR(ERR_NOFUNC) RET ; ; NVRAM FUNCTIONS ARE NOT AVAILABLE IN SIMULATOR @@ -258,9 +256,7 @@ DSRTC_GETBLK: DSRTC_SETBLK: DSRTC_GETALM: DSRTC_SETALM: - CALL SYSCHK - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) RET ; ; RTC GET TIME diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index 4bb00aa7..9fa24610 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -132,6 +132,11 @@ MODCNT .SET MODCNT + 1 #DEFINE LED(N) \; #ENDIF ; +#DEFINE SYSCHKERR(HB_ERR) \ + #DEFCONT \ CALL SYSCHKA + #DEFCONT \ LD A,HB_ERR + #DEFCONT \ OR A +; ; ; #IF (INTMODE == 0) @@ -3128,7 +3133,7 @@ HB_DISPATCH: PUSH AF LD A,(HB_STACK - HB_STKSIZ + $08) CP $FF - CALL SYSCHK + SYSCHKERR(ERR_INTERNAL) LD A,$FF LD (HB_STACK - HB_STKSIZ + $08),A POP AF @@ -3156,9 +3161,7 @@ HB_DISPATCH1: ; FALL THRU ; HB_DISPERR: - CALL SYSCHK - LD A,ERR_NOFUNC - OR A + SYSCHKERR(ERR_NOFUNC) RET ; ;================================================================================================== @@ -3620,9 +3623,7 @@ RTC_DISPATCH: RET ; RTC_DISPERR: - CALL SYSCHK - LD A,ERR_NOHW - OR A + SYSCHKERR(ERR_NOHW) RET ; ; SET RTC DISPATCH ADDRESS, USED BY RTC DRIVERS DURING INIT @@ -3820,9 +3821,7 @@ SYS_RESET: JR Z,SYS_RESCOLD CP BF_SYSRES_USER JR Z,SYS_RESUSER - CALL SYSCHK - LD A,ERR_NOFUNC - OR A ; SIGNAL ERROR + SYSCHKERR(ERR_NOFUNC) RET ; ; SOFT RESET HBIOS, RELEASE HEAP MEMORY NOT USED BY HBIOS @@ -4026,9 +4025,7 @@ SYS_ALLOC: ; ALL OTHER REGISTERS PRESERVED ; SYS_FREE: - CALL SYSCHK ; NOT YET IMPLEMENTED - LD A,ERR_NOTIMPL ; NOT YET INMPLEMENTED - OR A ; SET FLAGS + SYSCHKERR(ERR_NOTIMPL) ; NOT YET INMPLEMENTED RET ; ; GET SYSTEM INFORMATION @@ -4068,9 +4065,7 @@ SYS_GET: JP Z,SYS_GETBNKINFO CP BF_SYSGET_CPUSPD JP Z,SYS_GETCPUSPD - CALL SYSCHK - LD A,ERR_NOFUNC ; SIGNAL ERROR - OR A ; SET FLAGS + SYSCHKERR(ERR_NOFUNC) ; SIGNAL ERROR RET ; ; GET TIMER @@ -4157,7 +4152,7 @@ SYS_GETBNKINFO: XOR A RET ; -; GET SYSTEM CPU SPEED ORMANCE ATTRIBUTES +; GET SYSTEM CPU SPEED PERFORMANCE ATTRIBUTES ; RETURNS: ; L: CLOCK MULT (0:HALF, 1:FULL, 2: DOUBLE) ; D: MEMORY WAIT STATES @@ -4362,9 +4357,7 @@ SYS_SET: JR Z,SYS_SETBOOTINFO CP BF_SYSSET_CPUSPD JR Z,SYS_SETCPUSPD - CALL SYSCHK - LD A,ERR_NOFUNC ; SIGNAL ERROR - OR A ; SET FLAGS + SYSCHKERR(ERR_NOFUNC) ; SIGNAL ERROR RET ; ; SET BOOT INFORMATION @@ -4725,9 +4718,7 @@ SYS_INT: JR Z,SYS_INTGET CP BF_SYSINT_SET JR Z,SYS_INTSET - CALL SYSCHK - LD A,ERR_NOFUNC ; SIGNAL ERROR - OR A ; SET FLAGS + SYSCHKERR(ERR_NOFUNC) ; SIGNAL ERROR RET ; ; GET INTERRUPT SYSTEM INFORMATION @@ -4753,9 +4744,7 @@ SYS_INTINFO: ; SYS_INTVECADR: #IF (INTMODE == 0) - CALL SYSCHK ; INVALID FOR INT MODE 0 - LD A,ERR_BADCFG ; SIGNAL ERROR - OR A ; SET FLAGS + SYSCHKERR(ERR_BADCFG) ; SIGNAL ERROR. INVALID FOR INT MODE 0 RET #ENDIF #IF (INTMODE == 1) @@ -4769,9 +4758,7 @@ SYS_INTVECADR: LD A,E ; INCOMING INDEX POSITION TO A CP C ; COMPARE TO VECTOR COUNT JR C,SYS_INTGET1 ; CONTINUE IF POSITION IN RANGE - CALL SYSCHK ; ELSE ERROR - LD A,ERR_RANGE ; SIGNAL ERROR - OR A ; SET FLAGS + SYSCHKERR(ERR_RANGE) ; ELSE ERROR RET SYS_INTGET1: OR A ; CLEAR CARRY @@ -5252,15 +5239,11 @@ HB_DISPCALC: RET ; JUMP TO DRIVER FUNC ADR ON TOS ; HB_FUNCERR: - CALL SYSCHK - LD A,ERR_NOFUNC ; SIGNAL ERROR - OR A ; SET FLAGS + SYSCHKERR(ERR_NOFUNC) ; SIGNAL ERROR RET ; HB_UNITERR: - CALL SYSCHK - LD A,ERR_NOUNIT ; SIGNAL ERROR - OR A ; SET FLAGS + SYSCHKERR(ERR_NOUNIT) ; SIGNAL ERROR RET ; ; ADD AN ENTRY TO THE UNIT TABLE AT ADDRESS IN HL @@ -5347,9 +5330,7 @@ HB_ALLOC: HB_ALLOC1: ; ERROR RETURN POP DE ; RESTORE INCOMING DE - CALL SYSCHK - LD A,ERR_NOMEM ; SIGNAL ERROR - OR A ; SET FLAGS + SYSCHKERR(ERR_NOMEM) ; SIGNAL ERROR RET ; HB_TMPSZ .DW 0 @@ -6337,12 +6318,12 @@ HB_RDSEC: ; ; SYSTEM CHECK: DUMP MACHINE STATE AND CONTINUE? ; -SYSCHK: +SYSCHKA: ; CHECK DIAG LEVEL TO SEE IF WE SHOULD DISPLAY PUSH AF ; PRESERVE INCOMING AF VALUE LD A,(CB_DIAGLVL) ; GET DIAGNOSTIC LEVEL CP DL_ERROR ; >= ERROR LEVEL - JR C,SYSCHK1 ; IF NOT, GO HOME +; JR C,SYSCHK1 ; IF NOT, GO HOME POP AF ; RESTORE INCOMING AF VALUE ; ; DISPLAY SYSCHK MESSAGE @@ -6351,6 +6332,17 @@ SYSCHK: CALL WRITESTR ; PRINT IT POP DE ; RESTORE DE VALUE CALL XREGDMP ; DUMP REGISTERS + + ; DISPLAY ERROR CODE. IT IS AT RETURN ADDRESS+1 .. LD A,XX + EX (SP),HL ; GET RETURN ADDRESS + INC HL ; POINT TO THE ERROR CODE + PUSH AF + LD A,(HL) ; DISPLAY + CALL PRTHEXBYTE + POP AF + DEC HL ; RESTORE RETURN ADDRESS + EX (SP),HL +; JR CONTINUE ; CHECK W/ USER ; SYSCHK1: diff --git a/Source/HBIOS/md.asm b/Source/HBIOS/md.asm index f96a782c..8277468e 100644 --- a/Source/HBIOS/md.asm +++ b/Source/HBIOS/md.asm @@ -157,9 +157,7 @@ MD_FNTBL: MD_VERIFY: MD_FORMAT: MD_DEFMED: - CALL SYSCHK ; INVALID SUB-FUNCTION - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; INVALID SUB-FUNCTION RET ; ; @@ -182,9 +180,7 @@ MD_CAP: ; ASSUMES THAT UNIT 0 IS RAM, UNIT 1 IS ROM JR Z,MD_CAP0 ; UNIT 0 DEC A ; TRY UNIT 1 JR Z,MD_CAP1 ; UNIT 1 - CALL SYSCHK ; INVALID UNIT - LD A,ERR_NOUNIT - OR A + SYSCHKERR(ERR_NOUNIT) ; INVALID UNIT RET MD_CAP0: LD A,(HCB + HCB_RAMBANKS) ; POINT TO RAM BANK COUNT diff --git a/Source/HBIOS/ppide.asm b/Source/HBIOS/ppide.asm index 2b18f519..fd55cb1c 100644 --- a/Source/HBIOS/ppide.asm +++ b/Source/HBIOS/ppide.asm @@ -470,9 +470,7 @@ PPIDE_FNTBL: PPIDE_VERIFY: PPIDE_FORMAT: PPIDE_DEFMED: - CALL SYSCHK ; NOT IMPLEMENTED - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; NOT IMPLEMENTED RET ; ; diff --git a/Source/HBIOS/sio.asm b/Source/HBIOS/sio.asm index f1de029c..4342d9f2 100644 --- a/Source/HBIOS/sio.asm +++ b/Source/HBIOS/sio.asm @@ -843,9 +843,7 @@ SIO_INITGO: LD L,SIO1_VEC ; ASSUME CHIP 1 DEC A ; CHIP 1? JR Z,SIO_INITIVT ; IF SO, DO IT - CALL SYSCHK ; IMPOSSIBLE SITUATION - LD A,ERR_NOUNIT - OR A + SYSCHKERR(ERR_NOUNIT) ; IMPOSSIBLE SITUATION RET SIO_INITIVT: LD A,L ; VALUE TO A From 590dcd0b4fe5d9302987258cb36e3ec4aeb12b41 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 6 Nov 2022 10:46:46 +0800 Subject: [PATCH 02/12] SYSCHK driver syncing --- Source/HBIOS/bqrtc.asm | 8 ++------ Source/HBIOS/cvdu.asm | 4 +--- Source/HBIOS/fd.asm | 8 ++------ Source/HBIOS/gdc.asm | 4 +--- Source/HBIOS/ide.asm | 4 +--- Source/HBIOS/ppp.asm | 8 ++------ Source/HBIOS/prp.asm | 8 ++------ Source/HBIOS/rf.asm | 4 +--- Source/HBIOS/sd.asm | 8 ++++---- Source/HBIOS/tms.asm | 4 +--- Source/HBIOS/vga.asm | 4 +--- 11 files changed, 18 insertions(+), 46 deletions(-) diff --git a/Source/HBIOS/bqrtc.asm b/Source/HBIOS/bqrtc.asm index 5bb10ec4..ce0daeb5 100644 --- a/Source/HBIOS/bqrtc.asm +++ b/Source/HBIOS/bqrtc.asm @@ -161,9 +161,7 @@ BQRTC_DISPATCH: JP Z, BQRTC_SETALM ; Set Alarm DEC A JP Z, BQRTC_DEVICE ; Report RTC device info - CALL SYSCHK - LD A,ERR_NOFUNC - OR A + SYSCHKERR(ERR_NOFUNC) RET ; @@ -173,9 +171,7 @@ BQRTC_GETBYT: BQRTC_SETBYT: BQRTC_GETBLK: BQRTC_SETBLK: - CALL SYSCHK - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) RET ; RTC Get Time diff --git a/Source/HBIOS/cvdu.asm b/Source/HBIOS/cvdu.asm index e2dcc4aa..b0dd0b7b 100644 --- a/Source/HBIOS/cvdu.asm +++ b/Source/HBIOS/cvdu.asm @@ -171,9 +171,7 @@ CVDU_VDADEV: RET CVDU_VDASCS: - CALL SYSCHK ; NOT IMPLEMENTED (YET) - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; NOT IMPLEMENTED (YET) RET CVDU_VDASCP: diff --git a/Source/HBIOS/fd.asm b/Source/HBIOS/fd.asm index 3e7bd1c0..17de8693 100644 --- a/Source/HBIOS/fd.asm +++ b/Source/HBIOS/fd.asm @@ -490,9 +490,7 @@ FD_FNTBL: FD_VERIFY: FD_FORMAT: FD_DEFMED: - CALL SYSCHK ; INVALID SUB-FUNCTION - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; INVALID SUB-FUNCTION RET ; ; @@ -1149,9 +1147,7 @@ FD_RUN1: JR Z,FC_WRITE CP DOP_READID JR Z,FC_READID - CALL SYSCHK - LD A,ERR_NOFUNC - OR A + SYSCHKERR(ERR_NOFUNC) RET FD_RUNCHK: diff --git a/Source/HBIOS/gdc.asm b/Source/HBIOS/gdc.asm index 1bd57ce4..8ddd7603 100644 --- a/Source/HBIOS/gdc.asm +++ b/Source/HBIOS/gdc.asm @@ -157,9 +157,7 @@ GDC_VDADEV: ; VIDEO DEVICE INFORMATION RET ; GDC_VDASCS: ; SET CURSOR STYLE - CALL SYSCHK ; NOT IMPLEMENTED (YET) - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) RET GDC_VDASCP: ; SET CURSOR POSITION diff --git a/Source/HBIOS/ide.asm b/Source/HBIOS/ide.asm index f43e4468..582ade02 100644 --- a/Source/HBIOS/ide.asm +++ b/Source/HBIOS/ide.asm @@ -461,9 +461,7 @@ IDE_FNTBL: IDE_VERIFY: IDE_FORMAT: IDE_DEFMED: - CALL SYSCHK ; NOT IMPLEMENTED - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; NOT IMPLEMENTED RET ; ; diff --git a/Source/HBIOS/ppp.asm b/Source/HBIOS/ppp.asm index 7926da76..b5d740e6 100644 --- a/Source/HBIOS/ppp.asm +++ b/Source/HBIOS/ppp.asm @@ -338,9 +338,7 @@ PPPCON_OST: ; ; PPPCON_INITDEV: - CALL SYSCHK - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) RET ; ; @@ -504,9 +502,7 @@ PPPSD_FNTBL: PPPSD_VERIFY: PPPSD_FORMAT: PPPSD_DEFMED: - CALL SYSCHK ; INVALID SUB-FUNCTION - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; INVALID SUB-FUNCTION RET ; ; diff --git a/Source/HBIOS/prp.asm b/Source/HBIOS/prp.asm index 0f7f48bc..92bea67a 100644 --- a/Source/HBIOS/prp.asm +++ b/Source/HBIOS/prp.asm @@ -211,9 +211,7 @@ PRPCON_OST1: ; ; PRPCON_INITDEV: - CALL SYSCHK - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) RET ; ; @@ -401,9 +399,7 @@ PRPSD_FNTBL: PRPSD_VERIFY: PRPSD_FORMAT: PRPSD_DEFMED: - CALL SYSCHK ; INVALID SUB-FUNCTION - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; INVALID SUB-FUNCTION RET ; ; diff --git a/Source/HBIOS/rf.asm b/Source/HBIOS/rf.asm index 47d78238..17aa5305 100644 --- a/Source/HBIOS/rf.asm +++ b/Source/HBIOS/rf.asm @@ -138,9 +138,7 @@ RF_FNTBL: RF_VERIFY: RF_FORMAT: RF_DEFMED: - CALL SYSCHK ; INVALID SUB-FUNCTION - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; INVALID SUB-FUNCTION RET ; ; diff --git a/Source/HBIOS/sd.asm b/Source/HBIOS/sd.asm index e81baf5d..360e823b 100644 --- a/Source/HBIOS/sd.asm +++ b/Source/HBIOS/sd.asm @@ -710,9 +710,7 @@ SD_FNTBL: SD_VERIFY: SD_FORMAT: SD_DEFMED: - CALL SYSCHK ; INVALID SUB-FUNCTION - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; INVALID SUB-FUNCTION RET ; ; @@ -1131,7 +1129,9 @@ SD_INITCARD5: JR SD_INITCARD6 ; HANDLE MMC OR SDSC ; SD_INITCARD5A: - CALL SYSCHK + PUSH AF + SYSCHKERR(ERR_NOMEDIA) + POP AF JP SD_NOMEDIA ; ; CAPACITY CALCULATION FOR MMC OR SDSC (V1) CARDS: diff --git a/Source/HBIOS/tms.asm b/Source/HBIOS/tms.asm index 7282c8d7..90a7832f 100644 --- a/Source/HBIOS/tms.asm +++ b/Source/HBIOS/tms.asm @@ -298,9 +298,7 @@ TMS_VDADEV: RET TMS_VDASCS: - CALL SYSCHK ; NOT IMPLEMENTED (YET) - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; NOT IMPLEMENTED (YET) RET TMS_VDASCP: diff --git a/Source/HBIOS/vga.asm b/Source/HBIOS/vga.asm index 61832ff4..d072711b 100644 --- a/Source/HBIOS/vga.asm +++ b/Source/HBIOS/vga.asm @@ -211,9 +211,7 @@ VGA_VDADEV: RET VGA_VDASCS: - CALL SYSCHK ; NOT IMPLEMENTED (YET) - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; NOT IMPLEMENTED (YET) RET VGA_VDASCP: From a7853fe6d060d8c8ff0652a4303c0de4828a06ee Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 6 Nov 2022 11:12:14 +0800 Subject: [PATCH 03/12] SYSCHK driver syncing --- Source/HBIOS/ds7rtc.asm | 7 ++----- Source/HBIOS/hdsk.asm | 4 +--- Source/HBIOS/intrtc.asm | 10 +++------- Source/HBIOS/rp5rtc.asm | 8 ++------ Source/HBIOS/simrtc.asm | 8 ++------ 5 files changed, 10 insertions(+), 27 deletions(-) diff --git a/Source/HBIOS/ds7rtc.asm b/Source/HBIOS/ds7rtc.asm index 262ca0af..ed33e638 100644 --- a/Source/HBIOS/ds7rtc.asm +++ b/Source/HBIOS/ds7rtc.asm @@ -101,8 +101,7 @@ DS7_DISPATCH: DEC A JP Z, DS7_DEVICE ; REPORT RTC DEVICE INFO CALL SYSCHK - LD A,ERR_NOFUNC - OR A + SYSCHKERR(ERR_NOFUNC) RET ; ;----------------------------------------------------------------------------- @@ -269,9 +268,7 @@ DS7_GETBLK: DS7_SETBLK: DS7_SETALM DS7_GETALM - CALL SYSCHK - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) RET ;----------------------------------------------------------------------------- ; REPORT RTC DEVICE INFO diff --git a/Source/HBIOS/hdsk.asm b/Source/HBIOS/hdsk.asm index 3526e330..172595a6 100644 --- a/Source/HBIOS/hdsk.asm +++ b/Source/HBIOS/hdsk.asm @@ -121,9 +121,7 @@ HDSK_FNTBL: HDSK_VERIFY: HDSK_FORMAT: HDSK_DEFMED: - CALL SYSCHK ; INVALID SUB-FUNCTION - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) ; INVALID SUB-FUNCTION RET ; ; diff --git a/Source/HBIOS/intrtc.asm b/Source/HBIOS/intrtc.asm index 6602b3a3..cbb2184f 100644 --- a/Source/HBIOS/intrtc.asm +++ b/Source/HBIOS/intrtc.asm @@ -56,9 +56,7 @@ INTRTC_DISPATCH: JP Z,INTRTC_SETALM ; SET ALARM DEC A JP Z,INTRTC_DEVICE ; REPORT RTC DEVICE INFO - CALL SYSCHK - LD A,ERR_NOFUNC - OR A + SYSCHKERR(ERR_NOFUNC) RET ; ; NVRAM FUNCTIONS ARE NOT AVAILABLE IN SIMULATOR @@ -69,9 +67,7 @@ INTRTC_GETBLK: INTRTC_SETBLK: INTRTC_GETALM: INTRTC_SETALM: - CALL SYSCHK - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) RET ; ; RTC GET TIME @@ -205,7 +201,7 @@ INTRTC_INT2: JR NZ,INTRTC_INTX ; NOPE, DONE LD (HL),0 ; BACK TO YEAR ZERO INTRTC_INTX: - JP SYSCHK + JP PANIC INTRTC_VEC .EQU $-2 ; ; CONVERT FROM BINARY BUF (HL) TO BCD BUF (DE) diff --git a/Source/HBIOS/rp5rtc.asm b/Source/HBIOS/rp5rtc.asm index 4fe0a677..df74a42d 100644 --- a/Source/HBIOS/rp5rtc.asm +++ b/Source/HBIOS/rp5rtc.asm @@ -159,9 +159,7 @@ RP5RTC_DISPATCH: JP Z,RP5RTC_SETALM ; SET ALARM DEC A JP Z,RP5RTC_DEVICE ; REPORT RTC DEVICE INFO - CALL SYSCHK - LD A, ERR_NOFUNC - OR A + SYSCHKERR(ERR_NOFUNC) RET ; ; RTC GET NVRAM BYTE @@ -240,9 +238,7 @@ RP5RTC_GETBLK: RP5RTC_SETBLK: RP5RTC_GETALM: RP5RTC_SETALM: - LD A, ERR_NOTIMPL - CALL SYSCHK - OR A + SYSCHKERR(ERR_NOTIMPL) RET ; ; RTC GET TIME diff --git a/Source/HBIOS/simrtc.asm b/Source/HBIOS/simrtc.asm index f144d1aa..3a562f18 100644 --- a/Source/HBIOS/simrtc.asm +++ b/Source/HBIOS/simrtc.asm @@ -55,9 +55,7 @@ SIMRTC_DISPATCH: JP Z,SIMRTC_SETALM ; SET ALARM DEC A JP Z,SIMRTC_DEVICE ; REPORT RTC DEVICE INFO - CALL SYSCHK - LD A,ERR_NOFUNC - OR A + SYSCHKERR(ERR_NOTFUNC) RET ; ; NVRAM FUNCTIONS ARE NOT AVAILABLE IN SIMULATOR @@ -68,9 +66,7 @@ SIMRTC_GETBLK: SIMRTC_SETBLK: SIMRTC_GETALM: SIMRTC_SETALM: - CALL SYSCHK - LD A,ERR_NOTIMPL - OR A + SYSCHKERR(ERR_NOTIMPL) RET ; ; RTC GET TIME From 6e510705904979412904e4446dd1b006b15a9598 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 6 Nov 2022 11:18:05 +0800 Subject: [PATCH 04/12] SYSCHK driver syncing --- Source/HBIOS/ds7rtc.asm | 1 - Source/HBIOS/hbios.asm | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/HBIOS/ds7rtc.asm b/Source/HBIOS/ds7rtc.asm index ed33e638..34333554 100644 --- a/Source/HBIOS/ds7rtc.asm +++ b/Source/HBIOS/ds7rtc.asm @@ -100,7 +100,6 @@ DS7_DISPATCH: JP Z, DS7_SETALM ; SET ALARM DEC A JP Z, DS7_DEVICE ; REPORT RTC DEVICE INFO - CALL SYSCHK SYSCHKERR(ERR_NOFUNC) RET ; diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index 9fa24610..73c09b57 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -6323,7 +6323,7 @@ SYSCHKA: PUSH AF ; PRESERVE INCOMING AF VALUE LD A,(CB_DIAGLVL) ; GET DIAGNOSTIC LEVEL CP DL_ERROR ; >= ERROR LEVEL -; JR C,SYSCHK1 ; IF NOT, GO HOME + JR C,SYSCHK1 ; IF NOT, GO HOME POP AF ; RESTORE INCOMING AF VALUE ; ; DISPLAY SYSCHK MESSAGE From 5cc85e0444bbc032a69aba224bc8ed1cd8f5308f Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 6 Nov 2022 17:44:26 +0800 Subject: [PATCH 05/12] Update Architecture.md To reflect changes to syschk routine --- Source/Doc/Architecture.md | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/Source/Doc/Architecture.md b/Source/Doc/Architecture.md index 9b11978c..5a533ddc 100644 --- a/Source/Doc/Architecture.md +++ b/Source/Doc/Architecture.md @@ -2236,6 +2236,7 @@ Possible reasons a PANIC may occur are: - RAM Bank range error when attempting a read or write to a RAM disk. - Sector read function has not been setup but a read was attempted. +- An interrupt vector has not been set up when an interrupt was received. - There was an attempt to add more devices than the device table had room for. - An illegal SD card command was encountered. @@ -2244,21 +2245,30 @@ which section of the software or hardware caused the fault. ### SYSCHK -A syschk error is reported when an internal error is detected. The key differance -to the PANIC error is that execution may be continued. In which case an error -code is returned to the calling routine. The error code is not displayed at the console. +A syschk error is identified when an internal error is detected. When this +occurs an error code is returned to the calling program in the A register. +A non-zero result indicates an error. + +Syschk errors may be reported to the console. Whether this occurs depends on +the value of the diagnosis level equate CB_DIAGLVL. By default syschk errors +are not reported to the console. + +If the diagnosis level is set to display the diagnosis information, then +memory address, register dump and error code is displayed. +A key differance with the PANIC error is that execution may be continued. Example error message: -\>>> SYSCHK: @06C4[DFA3:DFC3:0100:F103:04FC:0000:2B5E] Continue (Y/N) +\>>> SYSCHK: @06C4[DFA3:DFC3:0100:F103:04FC:0000:2B5E] FD +Continue (Y/N) -The format of the information provided is the same as with the PANIC report. +The format of the information provided is similar the PANIC report. -@XXXX [-AF-:-BC-:-DE-:-HL-:-SP-:-IX-:-IY-] +@XXXX [-AF-:-BC-:-DE-:-HL-:-SP-:-IX-:-IY-] YY -Syschk error codes are returned in the A register. +The syschk error codes YY is returned in the A register. -| Error | Code | +| Error | Code YY | | ----------------------------------- | -------- | | Success | 0x00 | | Undefined Error | 0xFF | @@ -2305,7 +2315,7 @@ ROMWBW can be configured to display boot progress with the assistance of additio hardware. This take the form of an LED breakout debugging board connected to an 8-bit output port. As the boot code executes, the LED output display is updated. -To us an LED breakout board, it must be connected the computers data, reset and port +To use a LED breakout board, it must be connected the computers data, reset and port select lines. To enable the DIAG option the following settings must be made in the systems .ini From dd47283fdaa2b2c7de2428b42486125db979b6c5 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 6 Nov 2022 18:24:32 +0800 Subject: [PATCH 06/12] minors --- Source/Doc/Architecture.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Doc/Architecture.md b/Source/Doc/Architecture.md index 5a533ddc..54d6548a 100644 --- a/Source/Doc/Architecture.md +++ b/Source/Doc/Architecture.md @@ -2168,7 +2168,7 @@ IM1, the size of the table is the number of vectors chained together. For IM2, the size of the table is the number of slots in the vector table. -#### SYSINT Subfunction 0x10) -- Get Interrupt (INTGET) +#### SYSINT Subfunction 0x10 -- Get Interrupt (INTGET) | _Entry Parameters_ | BC: 0xFC10 @@ -2182,7 +2182,7 @@ On entry, register E must contain an index into the interrupt vector table. On return, HL will contain the address of the current interrupt vector at the specified index. -#### SYSINT Subfunction 0x20) -- Set Interrupt (INTSET) +#### SYSINT Subfunction 0x20 -- Set Interrupt (INTSET) | _Entry Parameters_ | BC: 0xFC20 From a77744d8e608afab09bd23efa86505bb75e48903 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 6 Nov 2022 19:57:02 +0800 Subject: [PATCH 07/12] Move diaglvl to config files --- Source/HBIOS/cfg_dyno.asm | 1 + Source/HBIOS/cfg_ezz80.asm | 1 + Source/HBIOS/cfg_master.asm | 1 + Source/HBIOS/cfg_mbc.asm | 1 + Source/HBIOS/cfg_mk4.asm | 1 + Source/HBIOS/cfg_n8.asm | 1 + Source/HBIOS/cfg_rcz180.asm | 1 + Source/HBIOS/cfg_rcz280.asm | 1 + Source/HBIOS/cfg_rcz80.asm | 1 + Source/HBIOS/cfg_rph.asm | 1 + Source/HBIOS/cfg_sbc.asm | 1 + Source/HBIOS/cfg_scz180.asm | 1 + Source/HBIOS/cfg_una.asm | 2 ++ Source/HBIOS/cfg_zeta.asm | 1 + Source/HBIOS/cfg_zeta2.asm | 1 + Source/HBIOS/hbios.asm | 2 +- Source/HBIOS/std.asm | 5 ----- 17 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Source/HBIOS/cfg_dyno.asm b/Source/HBIOS/cfg_dyno.asm index 85454e5a..15434743 100644 --- a/Source/HBIOS/cfg_dyno.asm +++ b/Source/HBIOS/cfg_dyno.asm @@ -66,6 +66,7 @@ WDOGMODE .EQU WDOG_NONE ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] DIAGENABLE .EQU FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED (SINGLE LED) LEDMODE .EQU LEDMODE_STD ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_ezz80.asm b/Source/HBIOS/cfg_ezz80.asm index 3b92f06d..ac048f40 100644 --- a/Source/HBIOS/cfg_ezz80.asm +++ b/Source/HBIOS/cfg_ezz80.asm @@ -67,6 +67,7 @@ WDOGIO .EQU $6F ; WATCHDOG REGISTER ADR DIAGENABLE .EQU FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED (SINGLE LED) LEDMODE .EQU LEDMODE_STD ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_master.asm b/Source/HBIOS/cfg_master.asm index f9058025..699b1059 100644 --- a/Source/HBIOS/cfg_master.asm +++ b/Source/HBIOS/cfg_master.asm @@ -98,6 +98,7 @@ WDOGIO .EQU $6F ; WATCHDOG REGISTER ADR DIAGENABLE .EQU FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED (SINGLE LED) LEDMODE .EQU LEDMODE_STD ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_mbc.asm b/Source/HBIOS/cfg_mbc.asm index 2dafc402..efea88c2 100644 --- a/Source/HBIOS/cfg_mbc.asm +++ b/Source/HBIOS/cfg_mbc.asm @@ -63,6 +63,7 @@ WDOGMODE .EQU WDOG_NONE ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] DIAGENABLE .EQU FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU TRUE ; ENABLES STATUS LED LEDMODE .EQU LEDMODE_RTC ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_mk4.asm b/Source/HBIOS/cfg_mk4.asm index 39def02e..45e369e4 100644 --- a/Source/HBIOS/cfg_mk4.asm +++ b/Source/HBIOS/cfg_mk4.asm @@ -69,6 +69,7 @@ WDOGMODE .EQU WDOG_NONE ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] DIAGENABLE .EQU FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED (SINGLE LED) LEDMODE .EQU LEDMODE_STD ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_n8.asm b/Source/HBIOS/cfg_n8.asm index 9e58d617..4f16c6a3 100644 --- a/Source/HBIOS/cfg_n8.asm +++ b/Source/HBIOS/cfg_n8.asm @@ -71,6 +71,7 @@ WDOGMODE .EQU WDOG_NONE ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] DIAGENABLE .EQU FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED LEDMODE .EQU LEDMODE_RTC ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_rcz180.asm b/Source/HBIOS/cfg_rcz180.asm index 691ce1f9..29a5fe22 100644 --- a/Source/HBIOS/cfg_rcz180.asm +++ b/Source/HBIOS/cfg_rcz180.asm @@ -69,6 +69,7 @@ WDOGMODE .EQU WDOG_NONE ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] DIAGENABLE .EQU TRUE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED (SINGLE LED) LEDMODE .EQU LEDMODE_STD ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_rcz280.asm b/Source/HBIOS/cfg_rcz280.asm index d288a4c8..4dd10148 100644 --- a/Source/HBIOS/cfg_rcz280.asm +++ b/Source/HBIOS/cfg_rcz280.asm @@ -74,6 +74,7 @@ WDOGMODE .EQU WDOG_NONE ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] DIAGENABLE .EQU TRUE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED (SINGLE LED) LEDMODE .EQU LEDMODE_STD ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_rcz80.asm b/Source/HBIOS/cfg_rcz80.asm index 559a4987..946de68c 100644 --- a/Source/HBIOS/cfg_rcz80.asm +++ b/Source/HBIOS/cfg_rcz80.asm @@ -68,6 +68,7 @@ WDOGIO .EQU $6E ; WATCHDOG REGISTER ADR DIAGENABLE .EQU TRUE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED (SINGLE LED) LEDMODE .EQU LEDMODE_STD ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_rph.asm b/Source/HBIOS/cfg_rph.asm index 20772210..bdedd3a9 100644 --- a/Source/HBIOS/cfg_rph.asm +++ b/Source/HBIOS/cfg_rph.asm @@ -69,6 +69,7 @@ WDOGMODE .EQU WDOG_NONE ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] DIAGENABLE .EQU FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED LEDMODE .EQU LEDMODE_RTC ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_sbc.asm b/Source/HBIOS/cfg_sbc.asm index b5232098..8ede0b67 100644 --- a/Source/HBIOS/cfg_sbc.asm +++ b/Source/HBIOS/cfg_sbc.asm @@ -63,6 +63,7 @@ WDOGMODE .EQU WDOG_NONE ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] DIAGENABLE .EQU FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED LEDMODE .EQU LEDMODE_RTC ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_scz180.asm b/Source/HBIOS/cfg_scz180.asm index 4f3ae86a..41e72dfb 100644 --- a/Source/HBIOS/cfg_scz180.asm +++ b/Source/HBIOS/cfg_scz180.asm @@ -64,6 +64,7 @@ WDOGMODE .EQU WDOG_NONE ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] DIAGENABLE .EQU TRUE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $0D ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED (SINGLE LED) LEDMODE .EQU LEDMODE_STD ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_una.asm b/Source/HBIOS/cfg_una.asm index 387acc1a..0041d1c8 100644 --- a/Source/HBIOS/cfg_una.asm +++ b/Source/HBIOS/cfg_una.asm @@ -32,3 +32,5 @@ ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) RTCIO .EQU $70 ; RTC LATCH REGISTER ADR ; DSKYENABLE .EQU FALSE ; ENABLES DSKY (DO NOT COMBINE WITH PPIDE) + +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING diff --git a/Source/HBIOS/cfg_zeta.asm b/Source/HBIOS/cfg_zeta.asm index f5c70c5f..afc313b0 100644 --- a/Source/HBIOS/cfg_zeta.asm +++ b/Source/HBIOS/cfg_zeta.asm @@ -55,6 +55,7 @@ WDOGMODE .EQU WDOG_NONE ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] DIAGENABLE .EQU FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED LEDMODE .EQU LEDMODE_RTC ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/cfg_zeta2.asm b/Source/HBIOS/cfg_zeta2.asm index e5a657d7..5567b156 100644 --- a/Source/HBIOS/cfg_zeta2.asm +++ b/Source/HBIOS/cfg_zeta2.asm @@ -66,6 +66,7 @@ WDOGMODE .EQU WDOG_NONE ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] DIAGENABLE .EQU FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS +DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING ; LEDENABLE .EQU FALSE ; ENABLES STATUS LED LEDMODE .EQU LEDMODE_RTC ; LEDMODE_[STD|RTC] diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index 73c09b57..cdfee037 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -6883,7 +6883,7 @@ PS_PRTDEV: CALL PS_PAD ; PAD N SPACES (SPECIFIED IN A) RET ; -; PRINT DEVICE NMEMONIC, DEVTYP/NUM SPECIFIED IN DE +; PRINT DEVICE MNEMONIC, DEVTYP/NUM SPECIFIED IN DE ; PS_PRTNUL: LD HL,PS_STRNUL diff --git a/Source/HBIOS/std.asm b/Source/HBIOS/std.asm index e32a6fac..5bcb465f 100644 --- a/Source/HBIOS/std.asm +++ b/Source/HBIOS/std.asm @@ -56,11 +56,6 @@ BIOS_NONE .EQU 0 ; NO BIOS TYPE DEFINED BIOS_WBW .EQU 1 ; ROMWBW HBIOS BIOS_UNA .EQU 2 ; UNA UBIOS ; -; DEFAULT HBIOS DIAGNOSTIC LEVEL -; WILL ULTIMATELY BE MOVED TO CONFIG FILE -; -DIAGLVL .EQU DL_CRITICAL -; ; MEMORY MANAGERS ; MM_NONE .EQU 0 From 7adf2038f19776cf870eeaf81c6612f3938b0d4b Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 6 Nov 2022 20:21:53 +0800 Subject: [PATCH 08/12] Update hbios.asm --- Source/HBIOS/hbios.asm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index cdfee037..1adc2014 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -53,6 +53,8 @@ ; - build.inc ; - config/_.asm ; - cfg_.asm +; - [z180.inc|z280.inc] +; - [eipc.inc] ; - .asm ; - .asm ; - util.asm @@ -61,7 +63,7 @@ ; - decode.asm ; - encode.asm ; - [xio|mio].asm -; - dsky.asm +; - [dsky.asm|dskyng.asm] ; - unlzsa2s.asm ; ; INCLUDE GENERIC STUFF From 360ba5ca958d080ebede427acb1e992848bbd71f Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Sun, 6 Nov 2022 20:25:49 +0800 Subject: [PATCH 09/12] Update Architecture.md --- Source/Doc/Architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Doc/Architecture.md b/Source/Doc/Architecture.md index 54d6548a..e3a3692d 100644 --- a/Source/Doc/Architecture.md +++ b/Source/Doc/Architecture.md @@ -2250,7 +2250,7 @@ occurs an error code is returned to the calling program in the A register. A non-zero result indicates an error. Syschk errors may be reported to the console. Whether this occurs depends on -the value of the diagnosis level equate CB_DIAGLVL. By default syschk errors +the value of the diagnosis level equate DIAGLVL. By default syschk errors are not reported to the console. If the diagnosis level is set to display the diagnosis information, then From f56c9007bb13ad717874a23b84fbe8c3f5fee59b Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Mon, 7 Nov 2022 17:32:04 +0800 Subject: [PATCH 10/12] Update simrtc.asm --- Source/HBIOS/simrtc.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/HBIOS/simrtc.asm b/Source/HBIOS/simrtc.asm index 3a562f18..521b806d 100644 --- a/Source/HBIOS/simrtc.asm +++ b/Source/HBIOS/simrtc.asm @@ -55,7 +55,7 @@ SIMRTC_DISPATCH: JP Z,SIMRTC_SETALM ; SET ALARM DEC A JP Z,SIMRTC_DEVICE ; REPORT RTC DEVICE INFO - SYSCHKERR(ERR_NOTFUNC) + SYSCHKERR(ERR_NOFUNC) RET ; ; NVRAM FUNCTIONS ARE NOT AVAILABLE IN SIMULATOR From 791fcea4662bbe59d4dc849cbb7b93fd36e28383 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Mon, 7 Nov 2022 20:56:09 +0800 Subject: [PATCH 11/12] Different diag progress bar options --- Source/HBIOS/hbios.asm | 26 +++++----- Source/HBIOS/hbios.inc | 105 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 13 deletions(-) diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index 1adc2014..241f5c92 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -1101,14 +1101,14 @@ HB_START: ; #IFDEF APPBOOT #IF (MEMMGR == MM_Z280) - LD A,%00000001 + LD A,DIAG_01 OUT (DIAGPORT),A LD DE,Z280_BOOTERR LD C,9 - LD A,%00000010 + LD A,DIAG_02 OUT (DIAGPORT),A CALL $0005 - LD A,%00001000 + LD A,DIAG_04 OUT (DIAGPORT),A RET ; @@ -1137,7 +1137,7 @@ Z280_BOOTERR .TEXT "\r\n\r\n*** Application mode boot not supported under Z280 n #ENDIF ; #IF (DIAGENABLE) - LD A,%00000001 + LD A,DIAG_01 OUT (DIAGPORT),A #ENDIF #IF (LEDENABLE) @@ -1247,7 +1247,7 @@ Z280_INITZ: LD A,Z180_BASE OUT0 ($3F),A ; AT RESET, ICR IS AT $3F - DIAG(%00000010) + DIAG(DIAG_02) ; DISABLE REFRESH XOR A @@ -1342,7 +1342,7 @@ Z280_INITZ: ; IS PERFORMED NEXT. ; #IF (DIAGENABLE) - LD A,%00000011 + LD A,DIAG_02 OUT (DIAGPORT),A #ENDIF ; @@ -1670,7 +1670,7 @@ HB_START1: ; BNKCALL ARRIVES HERE, BUT NOW RUNNING IN RAM BANK LD SP,HBX_LOC - 2 ; RESET STACK ; ; NOTIFY THAT WE MADE THE TRANSITION! - DIAG(%00000111) + DIAG(DIAG_03) LED(%00000010) ; ; SET THE IN-RAM FLAG @@ -1797,7 +1797,7 @@ SAVE_REC_M: #ENDIF #ENDIF ; - DIAG(%00001111) + DIAG(DIAG_04) ; #IF (WBWDEBUG == USEMIO) ; BUFFER OUTPUT UNTIL CALL MIO_INIT ; WE GET TO BOOT MESSAGE @@ -1886,7 +1886,7 @@ HB_CPU1: ; #ENDIF ; - DIAG(%00011111) + DIAG(DIAG_05) ; ; INIT OSCILLATOR SPEED FROM CONFIG ; @@ -2178,7 +2178,7 @@ Z280_TC .EQU CPUOSC / 4 / 50 / 2 ; TIME CONSTANT LD A,$FF ; FILL WITH $FF CALL FILL ; DO IT ; - DIAG(%00111111) + DIAG(DIAG_06) ; #IF FALSE ; @@ -2234,7 +2234,7 @@ NOT_REC_M0: ; #ENDIF ; - DIAG(%01111111) + DIAG(DIAG_07) LED(%00000011) ; ; @@ -2322,7 +2322,7 @@ NXTMIO: LD A,(HL) #ENDIF NOT_REC_M2: ; - DIAG(%11111111) + DIAG(DIAG_08) ; ; IO PORT SCAN ; @@ -3504,7 +3504,7 @@ HB_DSKFN: HB_DSKFNADR .EQU $+1 CALL PANIC ; READ ONE SECTOR #IF (DIAGENABLE & DIAGDISKIO) - DIAG(0) ; CLEAR DIAG LEDS + DIAG(DIAG00) ; CLEAR DIAG LEDS #ENDIF #IF (LEDENABLE & LEDDISKIO) LED($00) diff --git a/Source/HBIOS/hbios.inc b/Source/HBIOS/hbios.inc index d5e69636..1931e1db 100644 --- a/Source/HBIOS/hbios.inc +++ b/Source/HBIOS/hbios.inc @@ -156,6 +156,111 @@ ERR_TIMEOUT .EQU -11 ; DEVICE TIMEOUT ERR_BADCFG .EQU -12 ; INVALID CONFIGURATION ERR_INTERNAL .EQU -13 ; INTERNAL ERROR ; +; HBIOS DIAG OPTIONS +; +DIAG_PROG .EQU 0 ; PROGRESS BAR +DIAG_STEP .EQU 1 ; STEP BAR +DIAG_ASCII .EQU 2 ; 8-BIT ASCII 30H - 39H +DIAG_BINARY .EQU 3 ; BINARY 00H - 09H +DIAG_7SEG .EQU 4 ; 7-SEGMENT +DIAG_FLASH .EQU 5 ; FLASH +DIAG_TRIG .EQU 6 ; TRIGGER +; +DIAG_DISP .EQU DIAG_PROG ; DEFAULT +; +#IF (DIAG_DISP == DIAG_PROG) +DIAG_00 .EQU 00000000B +DIAG_01 .EQU 00000001B +DIAG_02 .EQU 00000011B +DIAG_03 .EQU 00000111B +DIAG_04 .EQU 00001111B +DIAG_05 .EQU 00011111B +DIAG_06 .EQU 01111111B +DIAG_07 .EQU 11111111B +DIAG_08 .EQU 11111111B +DIAG_09 .EQU 11111111B +#ENDIF +; +#IF (DIAG_DISP == DIAG_STEP) +DIAG_00 .EQU 00000000B +DIAG_01 .EQU 00000001B +DIAG_02 .EQU 00000010B +DIAG_03 .EQU 00000100B +DIAG_04 .EQU 00001000B +DIAG_05 .EQU 00010000B +DIAG_06 .EQU 00100000B +DIAG_07 .EQU 01000000B +DIAG_08 .EQU 10000000B +DIAG_09 .EQU 11111111B +#ENDIF +; +#IF (DIAG_DISP == DIAG_ASCII) +DIAG_00 .EQU '0' +DIAG_01 .EQU '1' +DIAG_02 .EQU '2' +DIAG_03 .EQU '3' +DIAG_04 .EQU '4' +DIAG_05 .EQU '5' +DIAG_06 .EQU '6' +DIAG_07 .EQU '7' +DIAG_08 .EQU '8' +DIAG_09 .EQU '9' +#ENDIF +; +#IF (DIAG_DISP == DIAG_BINARY) +DIAG_00 .EQU 0 +DIAG_01 .EQU 1 +DIAG_02 .EQU 2 +DIAG_03 .EQU 3 +DIAG_04 .EQU 4 +DIAG_05 .EQU 5 +DIAG_06 .EQU 6 +DIAG_07 .EQU 7 +DIAG_08 .EQU 8 +DIAG_09 .EQU 9 +#ENDIF +; +#IF (DIAG_DISP == DIAG_7SEG) +; abcdefg +DIAG_00 .EQU 00000000B ; BLANK +DIAG_01 .EQU 01111110B ; 0 +DIAG_02 .EQU 00110000B ; 1 +DIAG_03 .EQU 01101101B ; 2 +DIAG_04 .EQU 01111001B ; 3 +DIAG_05 .EQU 00110011B ; 4 +DIAG_06 .EQU 01011011B ; 5 +DIAG_07 .EQU 00011111B ; 6 +DIAG_08 .EQU 01110000B ; 7 +DIAG_09 .EQU 01111111B ; 8 +DIAG_10 .EQU 01110011B ; 9 +#ENDIF +; +#IF (DIAG_DISP == DIAG_FLASH) +DIAG_00 .EQU 00000000B ; OFF +DIAG_01 .EQU 11111111B ; ON +DIAG_02 .EQU 00000000B ; OFF +DIAG_03 .EQU 11111111B ; ON +DIAG_04 .EQU 00000000B ; OFF +DIAG_05 .EQU 11111111B ; ON +DIAG_06 .EQU 00000000B ; OFF +DIAG_07 .EQU 11111111B ; ON +DIAG_08 .EQU 00000000B ; OFF +DIAG_09 .EQU 11111111B ; ON +#ENDIF +; +#IF (DIAG_DISP == DIAG_TRIG) +DIAG_00 .EQU 11111111B ; ON +DIAG_01 .EQU 11111111B ; ON +DIAG_02 .EQU 11111111B ; ON +DIAG_03 .EQU 11111111B ; ON +DIAG_04 .EQU 11111111B ; ON +DIAG_05 .EQU 11111111B ; ON +DIAG_06 .EQU 11111111B ; ON +DIAG_07 .EQU 11111111B ; ON +DIAG_08 .EQU 11111111B ; ON +DIAG_09 .EQU 11111111B ; ON +#ENDIF +; ; MEDIA ID VALUES ; MID_NONE .EQU 0 From eeff03c7aa367b07c4e2af7a3ddc56646b8c0828 Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Tue, 8 Nov 2022 02:35:55 +0800 Subject: [PATCH 12/12] diag led fixups --- Source/HBIOS/hbios.asm | 2 +- Source/HBIOS/hbios.inc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index 241f5c92..d640c3ed 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -3504,7 +3504,7 @@ HB_DSKFN: HB_DSKFNADR .EQU $+1 CALL PANIC ; READ ONE SECTOR #IF (DIAGENABLE & DIAGDISKIO) - DIAG(DIAG00) ; CLEAR DIAG LEDS + DIAG(DIAG_00) ; CLEAR DIAG LEDS #ENDIF #IF (LEDENABLE & LEDDISKIO) LED($00) diff --git a/Source/HBIOS/hbios.inc b/Source/HBIOS/hbios.inc index 1931e1db..d0d59a42 100644 --- a/Source/HBIOS/hbios.inc +++ b/Source/HBIOS/hbios.inc @@ -175,8 +175,8 @@ DIAG_02 .EQU 00000011B DIAG_03 .EQU 00000111B DIAG_04 .EQU 00001111B DIAG_05 .EQU 00011111B -DIAG_06 .EQU 01111111B -DIAG_07 .EQU 11111111B +DIAG_06 .EQU 00111111B +DIAG_07 .EQU 01111111B DIAG_08 .EQU 11111111B DIAG_09 .EQU 11111111B #ENDIF