Updates and bug fixes. DASM fix still outstanding

This commit is contained in:
Philip Smart
2026-01-07 09:17:16 +00:00
parent a0bcabb125
commit 517ee7cf88
29 changed files with 1838 additions and 1111 deletions

View File

@@ -46,13 +46,21 @@ HWSEL1: LD A,(BNKCTRLRST)
LD (BNKSELUSER),A ; and start up - ie. SA1510 Monitor - this occurs as User Bank 0 is enabled and the jmp to 0 is coded in it.
ENDIF ; 22 bytes.
; MODE_MZ1200 0
; MODE_MZ80A 0
; MODE_MZ700 1
; MODE_MZ80B 2
; MODE_MZ800 3
; MODE_MZ1500 4
; MODE_MZ2000 5
; MODE_MZ2200 6
IF BUILD_SFD700 = 1
IN A,(SFD700_MODE)
OR A
LD A,BNKDEFMROM_MZ80A ; Setup default MROM for an MZ80A, this is a 4K Window into the UROM at F000.
JR HWSEL11
HWSEL11: LD A,BNKDEFMROM_MZ700 ; Setup default MROM for an MZ700, this is a 4K Window into the UROM at F000.
OUT (REG_FXXX),A
JR Z, HWSEL11
LD A,BNKDEFMROM_MZ700 ; Setup default MROM for an MZ700, this is a 4K Window into the UROM at F000.
HWSEL11: OUT (REG_FXXX),A
LD (ROMBK1),A
LD A,BNKDEFUROM ; Setup default UROM, this is a 2K Window into the UROM at E800 and contains the RFS.
OUT (REG_EXXX),A
@@ -60,6 +68,7 @@ HWSEL11: LD A,BNKDEFMROM_MZ700 ; Setup default MROM
NOP
ENDIF
ENDM
HWSELROM2: MACRO
IF BUILD_ROMDISK = 1
LD B,16 ; If we read the bank control reset register 15 times then this will enable bank control and then the 16th read will reset all bank control registers to default.
@@ -81,7 +90,7 @@ HWSEL2: LD A,(BNKCTRLRST)
IN A,(SFD700_MODE)
OR A
LD A,BNKDEFMROM_MZ80A ; Setup default MROM for an MZ80A, this is a 4K Window into the UROM at F000.
JR HWSEL21
JR Z,HWSEL21
LD A,BNKDEFMROM_MZ700 ; Setup default MROM for an MZ700, this is a 4K Window into the UROM at F000.
HWSEL21: OUT (REG_FXXX),A
LD A,BNKDEFUROM ; Setup default UROM, this is a 2K Window into the UROM at E800 and contains the RFS.
@@ -118,10 +127,10 @@ BNKSWSEL: MACRO
LD (BNKSELUSER),A
ENDIF
IF BUILD_SFD700 = 1
OUT (REG_EXXX),A ; Execute active bank switch.
OUT (REG_EXXX),A ; Execute active bank switch for E000:EFFF.
CP ROMBANK6 ; ROMBANK6/7 page in ROM from E300:FFFF
JR C,BNKSWJMP
INC A
INC A ; FXXX are 4K banks, EXXX are 2K banks.
JR BNKSWJMP2
BNKSWJMP: LD A,(ROMBK1) ; All other banks place the current active ROM into F000:FXXX space.
BNKSWJMP2: OUT (REG_FXXX),A

View File

@@ -48,7 +48,7 @@
; BASIC_build.asm which configures the equates below for the correct build.
BUILD_KUMA EQU 1 ; Enable support for Kuma 40/80 column upgrade.
; NZ-80A Build
; MZ-80A Build
IF BUILD_VERSION = 0
BUILD_MZ80A EQU 1 ; Build for the standard Sharp MZ80A, no lower memory. Manually change MAXMEM above.
BUILD_RFS EQU 0 ; Build for standard RFS with SD enhancements.
@@ -124,6 +124,11 @@ CTAPESAVE EQU 4
; Debugging
ENADEBUG EQU 0 ; Enable debugging logic, 1 = enable, 0 = disable
; RFS ROM addresses.
UROMADDR EQU 0E800H ; Start of User ROM Address space.
UROMBSTBL EQU UROMADDR + 020H ; Entry point to the bank switching table.
RFSJMPTABLE EQU UROMADDR + 000B0H ; Start of jump table.
;-----------------------------------------------
; CMT Object types.
;-----------------------------------------------
@@ -151,13 +156,13 @@ QVRFY EQU 0002Dh
;-------------------------------------------------------
; Function entry points in the RFS ROM.
;-------------------------------------------------------
CMT_RDINF EQU 0E886H ; UROMADDR+86H - Tape/SD intercept handler - Read Header
CMT_RDDATA EQU 0E889H ; UROMADDR+89H - Tape/SD intercept handler - Read Data
CMT_WRINF EQU 0E88CH ; UROMADDR+80H - Tape/SD intercept handler - Write Header
CMT_WRDATA EQU 0E88FH ; UROMADDR+8FH - Tape/SD intercept handler - Write Data
CMT_VERIFY EQU 0E892H ; UROMADDR+92H - Tape/SD intercept handler - Verify Data
CMT_DIR EQU 0E895H ; UROMADDR+95H - SD directory command.
CNV_ATOS EQU 0E898H ; UROMADDR+98H - Convert an ASCII string into Sharp ASCII
CMT_RDINF EQU RFSJMPTABLE + 06H ; UROMADDR+86H - Tape/SD intercept handler - Read Header
CMT_RDDATA EQU RFSJMPTABLE + 09H ; UROMADDR+89H - Tape/SD intercept handler - Read Data
CMT_WRINF EQU RFSJMPTABLE + 0CH ; UROMADDR+80H - Tape/SD intercept handler - Write Header
CMT_WRDATA EQU RFSJMPTABLE + 0FH ; UROMADDR+8FH - Tape/SD intercept handler - Write Data
CMT_VERIFY EQU RFSJMPTABLE + 12H ; UROMADDR+92H - Tape/SD intercept handler - Verify Data
CMT_DIR EQU RFSJMPTABLE + 15H ; UROMADDR+95H - SD directory command.
CNV_ATOS EQU RFSJMPTABLE + 18H ; UROMADDR+98H - Convert an ASCII string into Sharp ASCII
;-----------------------------------------------
; BASIC ERROR CODE VALUES

View File

@@ -19,6 +19,9 @@
;- March 2021- Updates to accommodate the RFS v2.1 board along with back porting TZFS
;- developments.
;- May 2023 - Updates to accommodate RFS use on a FusionX board.
;- Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
;- RFS is built for the SFD700.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
@@ -62,7 +65,7 @@ FDCROMADDR EQU 0F000H
IF BUILD_SFD700 = 1
BNKDEFMROM_MZ80A EQU 0 ; Default MROM (FDC) selected, 1st 4k slot..
BNKDEFMROM_MZ700 EQU 1 ; Default MROM (FDC) selected, 1st 4k slot..
BNKDEFMROM_MZ700 EQU 1 ; Default MROM (FDC) selected, 2nd 4k slot..
BNKDEFUROM EQU 2 ; Default UROM (RFS) selected, starts at 8K.
ENDIF
@@ -373,7 +376,12 @@ MROMLOAD: EQU MROMJMPTBL + 00006H
; 8-15 are reserved for CPM code in
; the User ROM bank.
;-----------------------------------------------
MROMPAGES EQU 8
IF BUILD_ROMDISK = 1
MROMPAGES EQU 8
ENDIF
IF BUILD_SFD700 = 1
MROMPAGES EQU 12 ; 10 Pages (8 but Bank6/7 are 2 pages) + 2 pages for ROMs
ENDIF
USRROMPAGES EQU 12 ; Monitor ROM : User ROM
IF BUILD_ROMDISK = 1
ROMBANK0 EQU 0 ; MROM SA1510 40 Char : RFS Bank 0 - Main RFS Entry point and functions.
@@ -398,7 +406,7 @@ ROMBANK4 EQU 4 + BNKDEFUROM ;
ROMBANK5 EQU 5 + BNKDEFUROM ; : RFS Bank 5
ROMBANK6 EQU 6 + BNKDEFUROM ; : RFS Bank 6
ROMBANK7 EQU 8 + BNKDEFUROM ; : RFS Bank 7 - Memory and timer test utilities.
ROMBANK8 EQU 10 + BNKDEFUROM ; : CBIOS Bank 1 - Utilities
ROMBANK8 EQU 10 + BNKDEFUROM ; : CBIOS Bank 1 - Utilities
ROMBANK9 EQU 11 + BNKDEFUROM ; : CBIOS Bank 2 - Screen / ANSI Terminal
ROMBANK10 EQU 12 + BNKDEFUROM ; : CBIOS Bank 3 - SD Card
ROMBANK11 EQU 13 + BNKDEFUROM ; : CBIOS Bank 4 - Floppy disk controller.