Added Kuma80 and updates for MZ700

This commit is contained in:
Philip Smart
2023-07-14 22:14:53 +01:00
parent 4bbccf56fd
commit 942782091b
30 changed files with 1912 additions and 541 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -16,6 +16,10 @@
;- additional and different hardware. The SPI is now onboard the PCB and
;- not using the printer interface card.
;- Mar 2021 - Updates for the RFS v2.1 board.
;- Jun 2023 - Updates to accommodate the Kuma 40/80 upgrade. INTEN is permanently
;- enabled as PC2 is requisitioned to act as the 40/80 switch so ?MODE adjusted
;- to setup the 8253 timer with a long 655 second interrupt to get around the
;- problem where ?PRNT enables interrupts prior to the hook being setup.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
@@ -348,8 +352,18 @@ OPTBL: DB 001H
LD (HL),E ; Place current time in Counter 2
LD (HL),D
DEC HL
LD (HL),03BH ; Place divisor in Counter 1, = 315, thus 31500/315 = 100
LD (HL),001H
IF BUILD_MZ80A = 1
LD (HL),03BH ; Place divisor in Counter 1, = 315, thus 31500/315 = 100
LD (HL),001H
ENDIF
IF BUILD_MZ700 = 1
LD (HL),09CH ; Place divisor in Counter 1, = 156, thus 15611/156 = 100
LD (HL),000H
ENDIF
IF BUILD_MZ1500 = 1
LD (HL),09CH ; Place divisor in Counter 1, = 156, thus 15611/156 = 100
LD (HL),000H
ENDIF
NOP
NOP
NOP
@@ -377,11 +391,35 @@ OPTBL: DB 001H
; START OF KEYBOARD FUNCTIONALITY (INTR HANDLER SEPERATE IN CBIOS)
;-------------------------------------------------------------------------------
?MODE: LD HL,KEYPF
?MODE: ;
; 8255 PPI
;
LD HL,KEYPF
LD (HL),08AH
LD (HL),007H ; Set Motor to Off.
LD (HL),004H ; Disable interrupts by setting INTMSK to 0.
IF BUILD_KUMA = 0
LD (HL),004H ; Disable interrupts by setting INTMSK to 0.
ELSE
IF BUILD_80C = 1
LD (HL),005H ; Kuma upgrade, set display to 80 columns.
ELSE
LD (HL),004H ; Kuma upgrade, set display to 40 columns.
ENDIF
ENDIF
LD (HL),001H ; Set VGATE to 1.
;
; 8253 Timer.
;
LD HL,CONTF
LD (HL),074H ; Set Counter 1, read/load lsb first then msb, mode 2 rate generator, binary
LD (HL),0B0H ; Set Counter 2, read/load lsb first then msb, mode 0 interrupt on terminal count, binary
DEC HL
LD DE,0FFFFH ; 100Hz coming into Timer 2 from Timer 1, set divisor to maximum, ie. set interrupts per second.
LD (HL),E ; Place current time in Counter 2
LD (HL),D
DEC HL
LD (HL),03BH ; Place divisor in Counter 1, = 315, thus 31500/315 = 100Hz
LD (HL),001H
RET
; Method to check if a key has been pressed and stored in buffer..
@@ -451,6 +489,6 @@ GETKY2: LD A,(KEYCOUNT) ; No ke
;-------------------------------------------------------------------------------
; Align to end of bank.
ALIGN UROMADDR + 07F8h
ORG UROMADDR + 07F8h
DB 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh
ALIGN UROMADDR + 07F7h
ORG UROMADDR + 07F7h
DB 021H,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFH

View File

@@ -1463,6 +1463,6 @@ RCP: LD HL,(CURSORPSAV) ; (curr
;-------------------------------------------------------------------------------
; Align to end of bank.
ALIGN UROMADDR + 07F8h
ORG UROMADDR + 07F8h
DB 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh
ALIGN UROMADDR + 07F7h
ORG UROMADDR + 07F7h
DB 022H,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFH

View File

@@ -891,7 +891,7 @@ SDC_WRITE1: RET
;-------------------------------------------------------------------------------
; Align to end of bank.
ALIGN UROMADDR + 07F8h
ORG UROMADDR + 07F8h
DB 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh
ALIGN UROMADDR + 07F7h
ORG UROMADDR + 07F7h
DB 023H,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFH

View File

@@ -636,6 +636,6 @@ DATAOVRMSG: DB "DISK ERROR - DATA OVERRUN", CR, NUL
CRCERRMSG: DB "DISK ERROR - CRC ERROR", CR, NUL
; Align to end of bank.
ALIGN UROMADDR + 07F8h
ORG UROMADDR + 07F8h
DB 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh
ALIGN UROMADDR + 07F7h
ORG UROMADDR + 07F7h
DB 024H,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFH

View File

@@ -10,12 +10,13 @@
;- Copyright: (c) 2019-23 Philip Smart <philip.smart@net2net.org>
;-
;- History: Jan 2020 - Initial version.
; May 2020 - Advent of the new RFS PCB v2.0, quite a few changes to accommodate the
; additional and different hardware. The SPI is now onboard the PCB and
; not using the printer interface card.
; Mar 2021 - Changes to work with the RFS v2.1 board.
;- May 2020 - Advent of the new RFS PCB v2.0, quite a few changes to accommodate the
;- additional and different hardware. The SPI is now onboard the PCB and
;- not using the printer interface card.
;- Mar 2021 - Changes to work with the RFS v2.1 board.
;- Apr 2021 - Removed ROM and RAM Drive functionality as it provided no performance or
;- use benefit over SD which are much larger and RW.
;- May 2023 - Updates to accommodate RFS use on a FusionX board.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
@@ -39,13 +40,19 @@ HW_SPI_ENA EQU 1 ; Set t
SW_SPI_ENA EQU 0 ; Set to 1 if software SPI is present on the RFS PCB v2 board.
PP_SPI_ENA EQU 0 ; Set to 1 if using the SPI interface via the Parallel Port, ie. for RFS PCB v1 which doesnt have SPI onboard.
; Build time options, only set to '1' to build, '0' to disable, only 1 can be set to '1'.
; Build time options, only set to '1' to build, '0' to disable, only set one 40C/80C at a time. Set KUMA 80C option if Kuma upgrade being targetted otherwise will default to 40/80 column card.
; IF BUILD_VERSION = 0
BUILD_80C EQU 1 ; Build for an MZ-80A with a 40/80 column card.
BUILD_40C EQU 0 ; Build for a standard 40 column MZ-80A.
BUILD_80C EQU 0 ; Build for an MZ-80A with a 40/80 column card.
BUILD_40C EQU 1 ; Build for a standard 40 column MZ-80A.
BUILD_KUMA EQU 0 ; Enable support for the Kuma 40/80 column upgrade.
BUILD_MZ80A EQU 0 ; Build for the Sharp MZ-80A base hardware.
BUILD_MZ700 EQU 1 ; Build for the Sharp MZ-700 base hardware.
BUILD_MZ1500 EQU 0 ; Build for the Sharp MZ-1500 base hardware.
; ENDIF
; IF BUILD_VERSION = 1
;BUILD_80C EQU 0 ; Build for an MZ-80A with a 40/80 column card.
;BUILD_80C_KUMA EQU 0 ; If set, 80 column mode is provided by the Kuma upgrade and not the 40/80 column card.
;BUILD_40C EQU 1 ; Build for a standard 40 column MZ-80A.
; ENDIF
@@ -79,7 +86,7 @@ MAXDISKS EQU 7 ; Max n
KEYBUFSIZE EQU 16 ; Ensure this is a power of 2, max size 256.
; Debugging
ENADEBUG EQU 0 ; Enable debugging logic, 1 = enable, 0 = disable
ENADEBUG EQU 1 ; Enable debugging logic, 1 = enable, 0 = disable
;-----------------------------------------------

View File

@@ -16,6 +16,8 @@
; Jun 2020 - Copied and strpped from TZFS for BASIC.
; Mar 2021 - Updates to run on v2.1 RFS board and provide SD card CLOAD/CSAVE and DIR
; along with bug fixes.
;- May 2023 - Updates to allow running on a FusionX board.
;- Jun 2023 - Updates to accommodate a Kuma 80 Column upgrade.
;
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
@@ -44,6 +46,9 @@
; Build options. Set just one to '1' the rest to '0'.
; NB: As there are now 4 versions and 1 or more need to be built, ie. MZ-80A and RFS version for RFS, a flag is set in the file
; 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
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.
@@ -52,22 +57,25 @@ BUILD_TZFS EQU 0 ; Build
BUILD_80C EQU 0
INCLUDE_ANSITERM EQU 1 ; Include the Ansi terminal emulation processor in the build.
ENDIF
; RFS 40 Build
IF BUILD_VERSION = 1
BUILD_MZ80A EQU 0
BUILD_RFS EQU 1
BUILD_RFSTZ EQU 0
BUILD_TZFS EQU 0
BUILD_80C EQU 1
INCLUDE_ANSITERM EQU 1 ; Include the Ansi terminal emulation processor in the build.
ENDIF
IF BUILD_VERSION = 2
BUILD_MZ80A EQU 0
BUILD_RFS EQU 1
BUILD_RFSTZ EQU 0
BUILD_TZFS EQU 0
BUILD_80C EQU 0
INCLUDE_ANSITERM EQU 1 ; Include the Ansi terminal emulation processor in the build.
ENDIF
; RFS 80 Build
IF BUILD_VERSION = 2
BUILD_MZ80A EQU 0
BUILD_RFS EQU 1
BUILD_RFSTZ EQU 0
BUILD_TZFS EQU 0
BUILD_80C EQU 1
INCLUDE_ANSITERM EQU 1 ; Include the Ansi terminal emulation processor in the build.
ENDIF
; RFS/TZ Build
IF BUILD_VERSION = 3
BUILD_MZ80A EQU 0
BUILD_RFS EQU 0
@@ -76,6 +84,7 @@ BUILD_TZFS EQU 0
BUILD_80C EQU 1
INCLUDE_ANSITERM EQU 1 ; Include the Ansi terminal emulation processor in the build.
ENDIF
; TZFS Build
IF BUILD_VERSION = 4
BUILD_MZ80A EQU 0
BUILD_RFS EQU 0

View File

@@ -18,6 +18,7 @@
;- processor all operations are done by the Z80 under RFS.
;- 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.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
@@ -41,6 +42,8 @@ HW_SPI_ENA EQU 1 ; Set t
SW_SPI_ENA EQU 0 ; Set to 1 if software SPI is present on the RFS PCB v2 board.
PP_SPI_ENA EQU 0 ; Set to 1 if using the SPI interface via the Parallel Port, ie. for RFS PCB v1 which doesnt have SPI onboard.
FUSIONX_ENA EQU 1 ; Set to 1 if using RFS on the tranZPUter FusionX board.
KUMA80_ENA EQU 0 ; Target has Kuma 40/80 upgrade installed.
VIDEOMODULE_ENA EQU 0 ; Target has 40/80 column colour video module installed.
; Debugging
ENADEBUG EQU 0 ; Enable debugging logic, 1 = enable, 0 = disable

View File

@@ -2,6 +2,8 @@
COLW: EQU 40 ; Width of the display screen (ie. columns).
ROW: EQU 25 ; Number of rows on display screen.
SCRNSZ: EQU COLW * ROW ; Total size, in bytes, of the screen display area.
MODE80C:EQU 0
MODE80C:EQU 0 ; Configure for 80 column mode monitor.
KUMABIN:EQU 0 ; Generate original Kuma Monitor Binary (=1)
KUMA80: EQU 0 ; Kuma upgrade installed, enable 80 column mode.
INCLUDE "1z-013a.asm"

View File

@@ -2,6 +2,8 @@
COLW: EQU 80 ; Width of the display screen (ie. columns).
ROW: EQU 25 ; Number of rows on display screen.
SCRNSZ: EQU COLW * ROW ; Total size, in bytes, of the screen display area.
MODE80C:EQU 1
MODE80C:EQU 1 ; Configure for 80 column mode monitor.
KUMABIN:EQU 0 ; Generate original Kuma Monitor Binary (=1)
KUMA80: EQU 0 ; Kuma upgrade installed, enable 80 column mode.
INCLUDE "1z-013a.asm"

View File

@@ -3,6 +3,8 @@ COLW: EQU 80 ; Width of the display screen (ie. colum
ROW: EQU 25 ; Number of rows on display screen.
SCRNSZ: EQU COLW * ROW ; Total size, in bytes, of the screen display area.
SCRLW: EQU COLW / 8 ; Number of 8 byte regions in a line for hardware scroll.
MODE80C:EQU 1
MODE80C:EQU 1 ; Configure for 80 column mode monitor.
KUMABIN:EQU 0 ; Generate original Kuma Monitor Binary (=1)
KUMA80: EQU 1 ; Kuma upgrade installed, enable 80 column mode.
INCLUDE "sa1510.asm"

View File

@@ -3,6 +3,8 @@ COLW: EQU 80 ; Width of the display screen (ie. colum
ROW: EQU 25 ; Number of rows on display screen.
SCRNSZ: EQU COLW * ROW ; Total size, in bytes, of the screen display area.
SCRLW: EQU COLW / 8 ; Number of 8 byte regions in a line for hardware scroll.
MODE80C:EQU 1
MODE80C:EQU 1 ; Configure for 80 column mode monitor.
KUMABIN:EQU 0 ; Generate original Kuma Monitor Binary (=1)
KUMA80: EQU 0 ; Kuma upgrade installed, enable 80 column mode.
INCLUDE "sa1510_hiload.asm"

View File

@@ -0,0 +1,10 @@
; Configurable parameters.
COLW: EQU 80 ; Width of the display screen (ie. columns).
ROW: EQU 25 ; Number of rows on display screen.
SCRNSZ: EQU COLW * ROW ; Total size, in bytes, of the screen display area.
SCRLW: EQU COLW / 8 ; Number of 8 byte regions in a line for hardware scroll.
MODE80C:EQU 0 ; Configure for 80 column mode monitor.
KUMABIN:EQU 1 ; Generate original Kuma Monitor Binary (=1)
KUMA80: EQU 0 ; Kuma upgrade installed, enable 80 column mode.
INCLUDE "sa1510.asm"

View File

@@ -3,6 +3,8 @@ COLW: EQU 40 ; Width of the display screen (ie. colum
ROW: EQU 25 ; Number of rows on display screen.
SCRNSZ: EQU COLW * ROW ; Total size, in bytes, of the screen display area.
SCRLW: EQU COLW / 8 ; Number of 8 byte regions in a line for hardware scroll.
MODE80C:EQU 0
MODE80C:EQU 0 ; Configure for 80 column mode monitor.
KUMABIN:EQU 0 ; Generate original Kuma Monitor Binary (=1)
KUMA80: EQU 0 ; Kuma upgrade installed, enable 80 column mode.
INCLUDE "sa1510.asm"

View File

@@ -3,6 +3,8 @@ COLW: EQU 40 ; Width of the display screen (ie. colum
ROW: EQU 25 ; Number of rows on display screen.
SCRNSZ: EQU COLW * ROW ; Total size, in bytes, of the screen display area.
SCRLW: EQU COLW / 8 ; Number of 8 byte regions in a line for hardware scroll.
MODE80C:EQU 0
MODE80C:EQU 0 ; Configure for 80 column mode monitor.
KUMABIN:EQU 0 ; Generate original Kuma Monitor Binary (=1)
KUMA80: EQU 0 ; Kuma upgrade installed, enable 80 column mode.
INCLUDE "sa1510_hiload.asm"

View File

@@ -184,11 +184,17 @@ INIT80CHAR: IF BUILD_RFS = 1
LD A, 0FFH
LD (SPAGE), A
; Change to 80 character mode.
LD HL,DSPCTL ; Setup address of display control register latch.
LD A, 128 ; 80 char mode.
LD E,(HL) ; Dummy operation to enable latch write via multivibrator.
LD (HL), A
; 40/80 Column card upgrade?
IF BUILD_KUMA = 0
; Change to 80 character mode.
LD HL,DSPCTL ; Setup address of display control register latch.
LD A, 128 ; 80 char mode.
LD E,(HL) ; Dummy operation to enable latch write via multivibrator.
LD (HL), A
ELSE ; Kuma 80 column upgrade?
LD A, 05H ; Set the INTEN bit to enable 80 column mode.
LD (KEYPF),A
ENDIF
ELSE
LD A, ROMBANK0 ; Switch to 40char monitor SA-1510.
LD (ROMBK1),A
@@ -223,8 +229,11 @@ INITANSI: IF INCLUDE_ANSITERM = 1 ; If the ansi terminal emulator is buil
LD HL,00000H
CALL TIMESET
;
LD A,05H ; Enable interrupts at hardware level, this must be done before switching memory mode.
LD (KEYPF),A
; The Kuma upgrade uses INTEN to switch between 40/80 columns so ignore if target is for a Kuma upgrade.
IF BUILD_KUMA = 0
LD A,05H ; Enable interrupts at hardware level, this must be done before switching memory mode.
LD (KEYPF),A
ENDIF
;
MEMSW1: IF BUILD_TZFS+BUILD_RFSTZ > 0
LD A,TZMM_MZ700_2 ; Enable the full 64K memory range before starting BASIC initialisation.
@@ -6711,7 +6720,15 @@ ADD3216: ADD HL,BC
MODE: LD HL,KEYPF
LD (HL),08AH
LD (HL),007H ; Set Motor to Off.
LD (HL),004H ; Disable interrupts by setting INTMSK to 0.
IF BUILD_KUMA = 0
LD (HL),004H ; Disable interrupts by setting INTMSK to 0.
ELSE
IF BUILD_80C = 1
LD (HL),005H ; Set Kuma display to 80 column mode.
ELSE
LD (HL),004H ; Set Kuma display to 40 column mode.
ENDIF
ENDIF
LD (HL),001H ; Set VGATE to 1.
RET

View File

@@ -21,6 +21,7 @@
; or without the K64 I/O processor. RFS wont use the K64 processor all
; operations are done by the Z80 under RFS.
;- April 2021- Updates for the v2.1 RFS board.
;- June 2023 - Updates for the Kuma 40/80 upgrade.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
@@ -175,22 +176,24 @@ ROMFS_3: LD (BNKSELMROM),A ; start
; Replacement command processor in place of the SA1510 command processor.
;
MONITOR: IF FUSIONX_ENA = 0
IN A,(CPLDINFO) ; See if a tranZPUter board is present.
AND 0E7H ; Mask out the CPLD Version and host HW.
LD C,A
CP 020H ; Upper bits specify the version, should be at least 1.
JR C,CHKTZ1
AND 007H ; Get Hardware, should be an MZ-80A for RFS.
CP MODE_MZ80A
LD A,C
JR Z,CHKTZ1
XOR A
CHKTZ1: AND 0E0H
IN A,(CPLDINFO) ; See if a tranZPUter board is present.
AND 0E7H ; Mask out the CPLD Version and host HW.
LD C,A
CP 020H ; Upper bits specify the version, should be at least 1.
JR C,CHKTZ1
AND 007H ; Get Hardware, should be an MZ-80A for RFS.
CP MODE_MZ80A
LD A,C
JR Z,CHKTZ1
XOR A
CHKTZ1: AND 0E0H
ELSE
XOR A
XOR A
ENDIF
LD (TZPU), A ; Flag = 0 if no tranZPUter present otherwise contains version (1 - 15).
LD HL,DSPCTL ; Setup address of display control register latch.
IF VIDEOMODULE_ENA = 1
LD HL,DSPCTL ; Setup address of display control register latch.
ENDIF
;
XOR A ; Set the initial SDCFS active drive number.
LD (SDDRIVENO),A
@@ -201,15 +204,28 @@ CHKTZ1: AND 0E0H
CP 0
JR NZ, SIGNON
;
SET40CHAR: LD A, 0 ; Using MROM in Bank 0 = 40 char mode.
LD E,(HL) ; Dummy operation to enable latch write via multivibrator.
LD (HL), A
SET40CHAR: IF VIDEOMODULE_ENA = 1
XOR A ; Using MROM in Bank 0 = 40 char mode.
LD E,(HL) ; Dummy operation to enable latch write via multivibrator.
LD (HL), A
ENDIF
IF KUMA80_ENA = 1 ; Kuma modification toggles the INTEN bit PC2 of the 8255 to switch mode, 0 = 40 column.
LD A,04H
LD (KEYPF),A
ENDIF
XOR A
LD (SCRNMODE), A
LD (SPAGE), A ; Allow MZ80A scrolling
JR SIGNON
SET80CHAR: LD A, 128 ; Using MROM in Bank 1 = 80 char mode.
LD E,(HL) ; Dummy operation to enable latch write via multivibrator.
LD (HL), A
SET80CHAR: IF VIDEOMODULE_ENA = 1
LD A, 128 ; Using MROM in Bank 1 = 80 char mode.
LD E,(HL) ; Dummy operation to enable latch write via multivibrator.
LD (HL), A
ENDIF
IF KUMA80_ENA = 1 ; Kuma modification toggles the INTEN bit PC2 of the 8255 to switch mode, 1 = 80 column.
LD A,05H
LD (KEYPF),A
ENDIF
LD A, 1
LD (SCRNMODE), A
LD A, 0FFH
@@ -500,19 +516,31 @@ HIROM: LD A, (MEMSW) ; Swap
SETMODE40: LD A, ROMBANK0 ; Switch to 40Char monitor.
LD (ROMBK1),A
LD (BNKSELMROM),A
LD HL,DSPCTL ; Setup address of display control register latch.
LD A, 0
LD E,(HL) ; Dummy operation to enable latch write via multivibrator.
LD (HL), A
IF VIDEOMODULE_ENA = 1
LD HL,DSPCTL ; Setup address of display control register latch.
LD A, 0
LD E,(HL) ; Dummy operation to enable latch write via multivibrator.
LD (HL), A
ENDIF
IF KUMA80_ENA = 1 ; Kuma80 modification uses INTEN on PC@ of 8255, 0 = 40 column.
LD A,04H
LD (KEYPF),A
ENDIF
JP MONIT
SETMODE80: LD A, ROMBANK1 ; Switch to 80char monitor.
LD (ROMBK1),A
LD (BNKSELMROM),A
LD HL,DSPCTL ; Setup address of display control register latch.
LD A, 128
LD E,(HL) ; Dummy operation to enable latch write via multivibrator.
LD (HL), A
IF VIDEOMODULE_ENA = 1
LD HL,DSPCTL ; Setup address of display control register latch.
LD A, 128
LD E,(HL) ; Dummy operation to enable latch write via multivibrator.
LD (HL), A
ENDIF
IF KUMA80_ENA = 1 ; Kuma80 modification uses INTEN on PC@ of 8255, 0 = 40 column.
LD A,05H
LD (KEYPF),A
ENDIF
JP MONIT
NOTZPU: LD DE,MSGNOTZINST ; No tranZPUter installed.

View File

@@ -455,7 +455,7 @@ ATBL: DB 0CCH ; NUL '\0' (null character)
;
;--------------------------------------
MSGSONTZ: DB "+ TZ" ; Version 2.x with version 2.1+ of tranZPUter board installed.
MSGSON: DB "+ RFS ", 0ABh, "2.1b **", 00DH, 000H ; Version 2.x-> as we are now using the v2.x PCB with 4 devices on-board
MSGSON: DB "+ RFS ", 0ABh, "2.2 **", 00DH, 000H ; Version 2.x-> as we are now using the v2.x PCB with 4 devices on-board
MSGNOTFND: DB "Not Found", 00DH, 000H
MSGRDIRLST: DB "ROM Directory:", 00DH, 000H
MSGTRM: DB 00DH, 000H

View File

@@ -42,10 +42,14 @@ START: LD SP,STACK
CALL ?CLER ; Clear 256 bytes from NAME 10F1h to 11F0h
LD A,016H
CALL PRNT
IF MODE80C = 0
LD A,007H ; Black background, white characters. Bit 7 is clear as a write to bit 7 @ DFFFH selects 40Char mode.
IF KUMABIN = 1
LD A,0CFH
ELSE
LD A,017H ; Blue background, white characters in colour mode. Bit 7 is set as a write to bit 7 @ DFFFH selects 80Char mode.
IF MODE80C+KUMA80 = 0
LD A,007H ; Black background, white characters. Bit 7 is clear as a write to bit 7 @ DFFFH selects 40Char mode.
ELSE
LD A,017H ; Blue background, white characters in colour mode. Bit 7 is set as a write to bit 7 @ DFFFH selects 80Char mode.
ENDIF
ENDIF
LD HL,ARAM
JR STRT1
@@ -61,7 +65,7 @@ STRT1: CALL CLR8
CALL NL
LD DE,00100H
RST 018H
IF MODE80C = 0 ; For 80 char mode we need a hook to setup SPAGE mode.
IF MODE80C+KUMA80 = 0 ; For 80 char mode we need a hook to setup SPAGE mode.
CALL ?BEL
ELSE
CALL HOOK ; Call new routine to setup SPAGE.
@@ -130,53 +134,88 @@ LOAD: CALL ?RDI
JR C,ST1
JP (HL)
; LOADING
MSG?2: DB 04CH, 0B7H, 0A1H, 09CH
DB 0A6H, 0B0H, 097H, 020H
DB 00DH
; SIGN ON BANNER
MSG?3: DB "** MONITOR SA-1510 **", 0DH
; SIGN ON BANNER - Different for Kuma 80 BIOS
MSG?3: IF KUMABIN = 0
DB "** MONITOR SA-1510 **", 0DH
ELSE
DB "*K",0A5H,0B3H,0A1H," MZ-80A M",0B7H,0B0H,0A6H
DB 096H,0B7H,09DH,"*",00DH,"*",00DH
ENDIF
; For 80 Character mode we need some space, so shorten the Check Sum Error message.
;
; CHECK SUM ERROR
MSGE1: IF MODE80C = 0
MSGE1: IF MODE80C+KUMA80 = 0
DB 043H, 098H, 092H, 09FH, 0A9H, 020H, 0A4H, 0A5H
DB 0B3H, 020H, 092H, 09DH, 09DH, 0B7H, 09DH, 00DH
ELSE
DB "CK SUM?", 0DH
ENDIF
; Hook = 7 bytes.
HOOK: IF MODE80C = 1
; Hook = 7 bytes using space taken from Check Sum message.
HOOK: IF MODE80C+KUMA80 > 0
LD A,0FFH
LD (SPAGE),A
JP ?BEL ; Original called routine
ENDIF
; CR PAGE MODE1
.CR: CALL .MANG
RRCA
JP NC,CURS2
LD L,000H
INC H
CP ROW - 1 ; End of line?
JR Z,.CP1
INC H
JP CURS1
.CR: IF KUMABIN = 1
LD HL,(DSPXY)
JP CURS2
ELSE
CALL .MANG
RRCA
JP NC,CURS2
LD L,000H
INC H
CP ROW - 1 ; End of line?
JR Z,.CP1
INC H
JP CURS1
ENDIF
.CR1: IF KUMABIN = 1
NEG
LD (SPAGE),A
ADD A,004H
LD (KEYPF),A
RET
DB 00EH
ENDIF
.CP1: LD (DSPXY),HL
; SCROLLER
.SCROL: LD BC,SCRNSZ - COLW ; Scroll COLW -1 lines
.SCROL: IF KUMABIN = 1
LD BC, 0780H
ELSE
LD BC,SCRNSZ - COLW ; Scroll COLW -1 lines
ENDIF
LD DE,SCRN ; Start of the screen.
LD HL,SCRN + COLW ; Start of screen + 1 line.
IF KUMABIN = 1
LD HL,0D050H
ELSE
LD HL,SCRN + COLW ; Start of screen + 1 line.
ENDIF
LDIR
EX DE,HL
LD B,COLW ; Clear last line at bottom of screen.
IF KUMABIN = 1
LD B, 050H
ELSE
LD B,COLW ; Clear last line at bottom of screen.
ENDIF
CALL ?CLER
LD BC,0001AH
IF KUMABIN = 1
JP ?RSTR
ELSE
LD BC,0001AH
ENDIF
LD DE,MANG
LD HL,MANG + 1
LDIR
@@ -450,7 +489,7 @@ L02DB: LD A,(SUNDG)
RET
?BEL: PUSH DE
LD DE,00DB1H
LD DE,?BELD ;00DB1H
RST 030H
POP DE
RET
@@ -587,22 +626,46 @@ TIMIN: PUSH AF
EI
RET
.DSP03: EX DE,HL
LD (HL),001H
INC HL
LD (HL),000H
JP CURSR
.MANG2: LD A,(DSPXY + 1)
ADD A,L
LD L,A
LD A,(HL)
INC HL
RL (HL)
OR (HL)
RR (HL)
RRCA
EX DE,HL
LD HL,(DSPXY)
.DSP03: IF KUMABIN = 1
LD A,(SPAGE)
OR A
LD A,027H
RET Z
ADD A,A
INC A
RET
L03A7: PUSH BC
CALL .DSP03
LD B,A
LD A,L
CP B
POP BC
RET
L03B0: CALL .DSP03
LD L,A
XOR A
DEC H
RET
ELSE
EX DE,HL
LD (HL),001H
INC HL
LD (HL),000H
JP CURSR
.MANG2: LD A,(DSPXY + 1)
ADD A,L
LD L,A
LD A,(HL)
INC HL
RL (HL)
OR (HL)
RR (HL)
RRCA
EX DE,HL
LD HL,(DSPXY)
ENDIF
RET
LD C,H
@@ -1141,7 +1204,11 @@ L0743: DEC H
?MODE: LD HL,KEYPF
LD (HL),08AH
LD (HL),007H
LD (HL),005H
IF KUMABIN+KUMA80 > 0
LD (HL),005H
ELSE
LD (HL),004H
ENDIF
LD (HL),001H
RET
@@ -1264,13 +1331,17 @@ GETL5: CALL ?DPCT
JR AUTO2
CHGPA: XOR A
IF MODE80C = 1
IF MODE80C+KUMA80 > 0
JR CHGPK
ELSE
JR CHGPK1
ENDIF
CHGPK: LD A,0FFH
CHGPK1: LD (SPAGE),A
CHGPK1: IF KUMABIN = 1
CALL .CR1
ELSE
LD (SPAGE),A
ENDIF
LD A,0C6H
CALL ?DPCT
CHGP1: JP GETL0
@@ -1581,7 +1652,12 @@ REV2: JP ?RSTR
.MANG: LD HL,MANG
LD A,(SPAGE)
OR A
JP NZ,.MANG2
IF KUMABIN = 1
JR NZ,.MANG1 ; (+018H)
NOP
ELSE
JP NZ,.MANG2
ENDIF
LD A,(MGPNT)
.MANG3: SUB 008H
INC HL
@@ -2407,14 +2483,24 @@ DLY12A: CALL DLY3
CALL ?PONT
LD (HL),B
LD HL,(DSPXY)
LD A,L
DSP01: CP COLW - 1 ; End of line.
IF KUMABIN = 1
CALL L03A7
ELSE
LD A,L
ENDIF
DSP01: IF KUMABIN = 0
CP COLW - 1 ; End of line.
ENDIF
JR NZ,DSP04
CALL .MANG
JR C,DSP04
LD A,(SPAGE)
OR A
JP NZ,.DSP03
IF KUMABIN = 1
JP NZ,CURSR
ELSE
JP NZ,.DSP03
ENDIF
EX DE,HL
LD A,B
CP 007H
@@ -2535,8 +2621,12 @@ CURSU1: CALL MGP.D
JR CURS3
CURSR: LD HL,(DSPXY)
LD A,L
CP COLW - 1 ; End of line
IF KUMABIN = 1
CALL L03A7
ELSE
LD A,L
CP COLW - 1 ; End of line
ENDIF
JR NC,CURS2
INC L
JR CURS3
@@ -2555,8 +2645,12 @@ CURSL: LD HL,(DSPXY)
JR Z,CURS5A
DEC L
JR CURS3
CURS5A: LD L,COLW - 1 ; End of line
DEC H
CURS5A: IF KUMABIN = 1
CALL L03B0
ELSE
LD L,COLW - 1 ; End of line
DEC H
ENDIF
JP P,CURSU1
LD H,000H
LD (DSPXY),HL
@@ -2643,13 +2737,24 @@ INST: CALL .MANG
RRCA
LD L,COLW - 1 ; End of line
LD A,L
JR NC,INST1A
INC H
INST1A: CALL ?PNT1
PUSH HL
LD HL,(DSPXY)
JR NC,INST2
LD A,(COLW*2)-1 ; 04FH
IF KUMABIN = 1
JR NC,INST1B
LD A,028H
ADD A,L
LD L,A
INST1B: CALL ?PNT1
PUSH HL
LD HL,(DSPXY)
NOP
ELSE
JR NC,INST1A
INC H
INST1A: CALL ?PNT1
PUSH HL
LD HL,(DSPXY)
JR NC,INST2
LD A,(COLW*2)-1 ; 04FH
ENDIF
INST2: SUB L
LD B,A
POP DE
@@ -2720,16 +2825,30 @@ ROLU1: CALL MGP.I
PUSH HL
POP BC
LD DE,COLW
LD HL,SCRN - COLW
LD A,(SPAGE)
OR A
JR NZ,?PNT2
LD HL,(PAGETP)
SBC HL,DE
?PNT2: ADD HL,DE
DEC B
JP P,?PNT2
LD B,000H
IF KUMABIN = 1
LD HL,(PAGETP)
INC B
LD A,(SPAGE)
OR A
JR Z,L0FCE ; (+008H)
LD HL,0D000H
LD E,050H
JR L0FCE ; (+001H)
L0FCD: ADD HL,DE
L0FCE: DJNZ L0FCD ; (-003H)
NOP
ELSE
LD HL,SCRN - COLW
LD A,(SPAGE)
OR A
JR NZ,?PNT2
LD HL,(PAGETP)
SBC HL,DE
?PNT2: ADD HL,DE
DEC B
JP P,?PNT2
LD B,000H
ENDIF
ADD HL,BC
RES 3,H
POP DE

Binary file not shown.

BIN
roms/cbios.rom vendored

Binary file not shown.

BIN
roms/cbios_bank1.rom vendored

Binary file not shown.

BIN
roms/cbios_bank2.rom vendored

Binary file not shown.

BIN
roms/cbios_bank3.rom vendored

Binary file not shown.

BIN
roms/cbios_bank4.rom vendored

Binary file not shown.

BIN
roms/monitor_1z-009b.rom vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
roms/rfs.rom vendored

Binary file not shown.

View File

@@ -14,6 +14,7 @@
## History: August 2018 - Initial script written.
## March 2021 - Updated to compile different versions of Microsoft BASIC.
## February 2023 - Updated as RFS extracted into seperate repository.
## June 2023 - Updated to build KUMA version of monitor.
##
#########################################################################################################
## This source file is free software: you can redistribute it and#or modify
@@ -34,6 +35,7 @@ ROOTDIR=`pwd | sed 's/\/tools//g'`
TOOLDIR=${ROOTDIR}/tools
JARDIR=${ROOTDIR}/tools
ASM=glass.jar
# NB Kuma version of SA1510 monitor rom is enabled within the monitor_sa1510.asm or monitor_80c_sa1510.asm file.
#BUILDROMLIST="MZ80AFI rfs rfs_mrom IPL monitor_SA1510 monitor_80c_SA1510 monitor_mz-1r12 quickdisk_mz-1e05 quickdisk_mz-1e14 monitor_1Z-013A monitor_80c_1Z-013A"
BUILDROMLIST="monitor_sa1510_hiload monitor_80c_sa1510_hiload monitor_80c_sa1510 mz80afi monitor_sa1510 monitor_80c_sa1510 monitor_1z-013a monitor_80c_1z-013a ipl"
#BUILDMZFLIST="hi-ramcheck sharpmz-test"
@@ -62,19 +64,19 @@ do
# Special handling for the 4 version of MS BASIC.
if [[ ${SRCNAME} = "msbasic_mz80a" ]]; then
ASMNAME="msbasic.asm"
echo "BUILD_VERSION EQU 0" > ${INCDIR}/MSBASIC_BuildVersion.asm
echo "BUILD_VERSION EQU 0" > ${INCDIR}/msbasic_buildversion.asm
elif [[ ${SRCNAME} = "msbasic_rfs40" ]]; then
ASMNAME="msbasic.asm"
echo "BUILD_VERSION EQU 1" > ${INCDIR}/MSBASIC_BuildVersion.asm
echo "BUILD_VERSION EQU 1" > ${INCDIR}/msbasic_buildversion.asm
elif [[ ${SRCNAME} = "msbasic_rfs80" ]]; then
ASMNAME="msbasic.asm"
echo "BUILD_VERSION EQU 2" > ${INCDIR}/MSBASIC_BuildVersion.asm
echo "BUILD_VERSION EQU 2" > ${INCDIR}/msbasic_buildversion.asm
elif [[ ${SRCNAME} = "msbasic_rfstz" ]]; then
ASMNAME="msbasic.asm"
echo "BUILD_VERSION EQU 3" > ${INCDIR}/MSBASIC_BuildVersion.asm
echo "BUILD_VERSION EQU 3" > ${INCDIR}/msbasic_buildversion.asm
elif [[ ${SRCNAME} = "msbasic_tzfs" ]]; then
ASMNAME="msbasic.asm"
echo "BUILD_VERSION EQU 4" > ${INCDIR}/MSBASIC_BuildVersion.asm
echo "BUILD_VERSION EQU 4" > ${INCDIR}/msbasic_buildversion.asm
fi
# Assemble the source.

View File

@@ -18,6 +18,7 @@
## April 2021 - Removed the CPM ROM Drive functionality as it provided no benefit
## over SD card and SD cards are larger.
## February 2023 - Updated as RFS extracted into seperate repository.
## June 2023 - Updated to make the Kuma version of the monitor.
##
#########################################################################################################
## This source file is free software: you can redistribute it and#or modify