Updates to support an assembler/disassembler and new commands.
This commit is contained in:
@@ -10,10 +10,11 @@
|
||||
;- I/O processor in the K64F/ZPU.
|
||||
;-
|
||||
;- Credits:
|
||||
;- Copyright: (c) 2019-21 Philip Smart <philip.smart@net2net.org>
|
||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||
;-
|
||||
;- History: May 2020 - Branch taken from RFS v2.0 and adapted for the tranZPUter SW.
|
||||
;- July 2020 - Updates to accommodate v2.1 of the tranZPUter board.
|
||||
;- Feb 2023 - TZFS now running on FusionX. Small changes to ensure compatibility.
|
||||
;-
|
||||
;--------------------------------------------------------------------------------------------------------
|
||||
;- This source file is free software: you can redistribute it and-or modify
|
||||
@@ -33,9 +34,10 @@
|
||||
;-----------------------------------------------
|
||||
; Features.
|
||||
;-----------------------------------------------
|
||||
BUILD_MZ80A EQU 0 ; Build for the standard Sharp MZ80A, no lower memory.
|
||||
BUILD_MZ700 EQU 1 ; Build for the Sharp MZ-700 base hardware.
|
||||
BUILD_MZ80A EQU 1 ; Build for the standard Sharp MZ80A, no lower memory.
|
||||
BUILD_MZ700 EQU 0 ; Build for the Sharp MZ-700 base hardware.
|
||||
BUILD_MZ2000 EQU 0 ; Build for the Sharp MZ-2000 base hardware.
|
||||
BUILD_FUSIONX EQU 1 ; Build for the set host using the FusionX board.
|
||||
|
||||
; Debugging
|
||||
ENADEBUG EQU 0 ; Enable debugging logic, 1 = enable, 0 = disable
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
;- This file contains the SA-1510/1Z-013A monitor specific definitions.
|
||||
;-
|
||||
;- Credits:
|
||||
;- Copyright: (c) 2019-21 Philip Smart <philip.smart@net2net.org>
|
||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||
;-
|
||||
;- History: May 2020 - Branch taken from RFS v2.0 and adapted for the tranZPUter SW.
|
||||
;- July 2020 - Updates to accommodate v2.1 of the tranZPUter board.
|
||||
;- Feb 2023 - TZFS now running on FusionX. Small changes to ensure compatibility.
|
||||
;-
|
||||
;--------------------------------------------------------------------------------------------------------
|
||||
;- This source file is free software: you can redistribute it and-or modify
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
;- This file holds the TZFS service structure definition.
|
||||
;-
|
||||
;- Credits:
|
||||
;- Copyright: (c) 2019-21 Philip Smart <philip.smart@net2net.org>
|
||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||
;-
|
||||
;- History: May 2020 - Branch taken from RFS v2.0 and adapted for the tranZPUter SW.
|
||||
;- July 2020 - Updates to accommodate v2.1 of the tranZPUter board.
|
||||
;- Feb 2023 - TZFS now running on FusionX. Small changes to ensure compatibility.
|
||||
;-
|
||||
;--------------------------------------------------------------------------------------------------------
|
||||
;- This source file is free software: you can redistribute it and-or modify
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
;- I/O processor in the K64F/ZPU.
|
||||
;-
|
||||
;- Credits:
|
||||
;- Copyright: (c) 2019-20 Philip Smart <philip.smart@net2net.org>
|
||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||
;-
|
||||
;- History: May 2020 - Branch taken from RFS v2.0 and adapted for the tranZPUter SW.
|
||||
;- Feb 2023 - TZFS now running on FusionX. Small changes to ensure compatibility.
|
||||
;-
|
||||
;--------------------------------------------------------------------------------------------------------
|
||||
;- This source file is free software: you can redistribute it and-or modify
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
;- This file holds the TZFS variable definitions.
|
||||
;-
|
||||
;- Credits:
|
||||
;- Copyright: (c) 2019-21 Philip Smart <philip.smart@net2net.org>
|
||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||
;-
|
||||
;- History: May 2020 - Branch taken from RFS v2.0 and adapted for the tranZPUter SW.
|
||||
;- July 2020 - Updates to accommodate v2.1 of the tranZPUter board.
|
||||
;- Feb 2023 - TZFS now running on FusionX. Small changes to ensure compatibility.
|
||||
;-
|
||||
;--------------------------------------------------------------------------------------------------------
|
||||
;- This source file is free software: you can redistribute it and-or modify
|
||||
|
||||
@@ -126,10 +126,10 @@ QWRD EQU CMT_WRDATA
|
||||
; Declare the MZF header to bootstrap BASIC from tape/SD.
|
||||
BOOTATRB: DB 01h ; Code Type, 01 = Machine Code.
|
||||
BOOTNAME: IF BUILD_ORIG = 1
|
||||
DB "BASIC SA-5510 ", 0Dh ; Title/Name (17 bytes).
|
||||
DB "BASIC-SA-5510 ", 0Dh ; Title/Name (17 bytes).
|
||||
ENDIF
|
||||
IF BUILD_TZFS = 1
|
||||
DB "BASIC SA-5510-TZ", 0Dh ; Title/Name (17 bytes).
|
||||
DB "BASIC-SA-5510-TZ", 0Dh ; Title/Name (17 bytes).
|
||||
ENDIF
|
||||
BOOTSIZE: DW BASICEND - TAPECOPY ; Size of program.
|
||||
BOOTDTADR: DW TAPECOPY ; Load address of program.
|
||||
|
||||
@@ -667,16 +667,16 @@ HOM0: LD HL,00000H
|
||||
INC L
|
||||
|
||||
HLHEX: PUSH DE
|
||||
CALL L041F
|
||||
CALL _2HEX
|
||||
JR C,L041D
|
||||
LD H,A
|
||||
CALL L041F
|
||||
CALL _2HEX
|
||||
JR C,L041D
|
||||
LD L,A
|
||||
L041D: POP DE
|
||||
RET
|
||||
|
||||
L041F: PUSH BC
|
||||
_2HEX: PUSH BC
|
||||
LD A,(DE)
|
||||
INC DE
|
||||
CALL HEX
|
||||
|
||||
264
asm/tzfs.asm
264
asm/tzfs.asm
@@ -10,25 +10,28 @@
|
||||
;- I/O processor in the K64F/ZPU.
|
||||
;-
|
||||
;- Credits:
|
||||
;- Copyright: (c) 2018-2020 Philip Smart <philip.smart@net2net.org>
|
||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||
;-
|
||||
;- History: May 2020 - Branch taken from RFS v2.0 and adapted for the tranZPUter SW.
|
||||
;- July 2020 - Not many changes but updated version to v1.1 to coincide with the
|
||||
;- hardware v1.1 version, thus differentiating between v1.0 board and v1.1.
|
||||
;- July 2020 - Updates to accomodate the v2.1 hardware. Additional commands and fixed a
|
||||
;- few bugs like the load from card by name!
|
||||
;- Dec 2020 - Updates to accommodate v1.3 of the tranZPUter SW-700 board where soft
|
||||
;- CPU's now become possible.
|
||||
;- Jan 2021 - Additional changes to accommodate soft CPU's.
|
||||
;- Mar 2021 - Bug fixes - MZ-700/MZ-80A address differences.
|
||||
;- - Added optional machine model code on load command to enable 700/800
|
||||
;- programs to be loaded without changing the MZ800 mode switch.
|
||||
;- Apr 2021 - Added 40/80 Colour Card control. Reorganised to free up space.
|
||||
;- Apr 2021 - Updated to add ?RDI/?RDD/?WRI/?WRD/DIR/CD methods to ease conversion of
|
||||
;- programs from cassette storage to SD storage, first conversion being
|
||||
;- BASIC SA-5510.
|
||||
;- Jul 2021 - Updated the CMT routines to now be configurable so that all MZ series
|
||||
;- are catered for, ie. read/write 80B machines.
|
||||
;- History: May 2020 v1.0 - Branch taken from RFS v2.0 and adapted for the tranZPUter SW.
|
||||
;- July 2020 v1.1 - Not many changes but updated version to v1.1 to coincide with the
|
||||
;- hardware v1.1 version, thus differentiating between v1.0 board and v1.1.
|
||||
;- July 2020 - Updates to accomodate the v2.1 hardware. Additional commands and fixed a
|
||||
;- few bugs like the load from card by name!
|
||||
;- Dec 2020 - Updates to accommodate v1.3 of the tranZPUter SW-700 board where soft
|
||||
;- CPU's now become possible.
|
||||
;- Jan 2021 - Additional changes to accommodate soft CPU's.
|
||||
;- Mar 2021 - Bug fixes - MZ-700/MZ-80A address differences.
|
||||
;- - Added optional machine model code on load command to enable 700/800
|
||||
;- programs to be loaded without changing the MZ800 mode switch.
|
||||
;- Apr 2021 - Added 40/80 Colour Card control. Reorganised to free up space.
|
||||
;- Apr 2021 v1.5 - Updated to add ?RDI/?RDD/?WRI/?WRD/DIR/CD methods to ease conversion of
|
||||
;- programs from cassette storage to SD storage, first conversion being
|
||||
;- BASIC SA-5510.
|
||||
;- Jul 2021 v1.6 - Updated the CMT routines to now be configurable so that all MZ series
|
||||
;- are catered for, ie. read/write 80B machines.
|
||||
;- Feb 2023 v1.7 - TZFS now running on FusionX. Changes to ensure compatibility and
|
||||
;- addition of new commands, assemble, disassemble, fill, write I/O,
|
||||
;- read I/O.
|
||||
;-
|
||||
;--------------------------------------------------------------------------------------------------------
|
||||
;- This source file is free software: you can redistribute it and-or modify
|
||||
@@ -129,17 +132,28 @@ SET_FREQ: JP ?SETFREQ ; UROMA
|
||||
?PRTSTR: CALLBNK PRTSTR, TZMM_TZFS2
|
||||
?HELP: CALLBNK HELP, TZMM_TZFS2
|
||||
?MCORX: CALLBNK MCORX, TZMM_TZFS3
|
||||
?COPYM: CALLBNK COPYM, TZMM_TZFS4
|
||||
?WRITEIO: CALLBNK WRITEIO, TZMM_TZFS4
|
||||
?READIO: CALLBNK READIO, TZMM_TZFS4
|
||||
?DUMPBC: CALLBNK DUMPBC, TZMM_TZFS3
|
||||
?DUMPX: CALLBNK DUMPX, TZMM_TZFS3
|
||||
?DUMP: CALLBNK DUMP, TZMM_TZFS3
|
||||
?INITMEMX: CALLBNK INITMEMX, TZMM_TZFS3
|
||||
?FILL: CALLBNK FILL, TZMM_TZFS3
|
||||
?GETMEM: CALLBNK GETMEM, TZMM_TZFS
|
||||
?SETMEM: CALLBNK SETMEM, TZMM_TZFS
|
||||
?DASM: CALLBNK DASM_MAIN, TZMM_TZFS4
|
||||
?ASM: CALLBNK ASM_MAIN, TZMM_TZFS4
|
||||
IF BUILD_FUSIONX = 0
|
||||
?SETVMODE: CALLBNK SETVMODE, TZMM_TZFS4
|
||||
?SETVGAMODE:CALLBNK SETVGAMODE, TZMM_TZFS4
|
||||
?SETVBORDER:CALLBNK SETVBORDER, TZMM_TZFS4
|
||||
ENDIF ; BUILD_FUSIONX
|
||||
?SETFREQ: CALLBNK SETFREQ, TZMM_TZFS4
|
||||
IF BUILD_FUSIONX = 0
|
||||
?SETT80: CALLBNK SETT80, TZMM_TZFS4
|
||||
?SETZ80: CALLBNK SETZ80, TZMM_TZFS4
|
||||
?SETZPUEVO: CALLBNK SETZPUEVO, TZMM_TZFS4
|
||||
ENDIF ; BUILD_FUSIONX
|
||||
?TIMERTST: CALLBNK TIMERTST, TZMM_TZFS3
|
||||
?PTESTX: CALLBNK PTESTX, TZMM_TZFS3
|
||||
?GETMODEL: CALLBNK GETMODEL, TZMM_TZFS3
|
||||
@@ -149,6 +163,7 @@ CNV_ATOS: CALLBNK CNVSTR_AS, TZMM_TZFS2 ;
|
||||
?RDDTZFS: CALLBNK RDDTZFS, TZMM_TZFS3
|
||||
?WRITZFS: CALLBNK WRITZFS, TZMM_TZFS3
|
||||
?WRDTZFS: CALLBNK WRDTZFS, TZMM_TZFS3
|
||||
IF BUILD_FUSIONX = 0
|
||||
?SETMZ80K: CALLBNK SETMZ80K, TZMM_TZFS4
|
||||
?SETMZ80C: CALLBNK SETMZ80C, TZMM_TZFS4
|
||||
?SETMZ1200: CALLBNK SETMZ1200, TZMM_TZFS4
|
||||
@@ -160,6 +175,7 @@ CNV_ATOS: CALLBNK CNVSTR_AS, TZMM_TZFS2 ;
|
||||
?SETMZ2000: CALLBNK SETMZ2000, TZMM_TZFS4
|
||||
?SETMZ2200: CALLBNK SETMZ2200, TZMM_TZFS4
|
||||
?SETMZ2500: CALLBNK SETMZ2500, TZMM_TZFS4
|
||||
ENDIF ; BUILD_FUSIONX
|
||||
;-----------------------------------------
|
||||
|
||||
|
||||
@@ -284,8 +300,10 @@ SIGNON1: CALL DPCT
|
||||
IN A,(CPUSTATUS) ; Check to see if the T80 is running.
|
||||
AND CPUMODE_IS_T80 ; T80 running?
|
||||
JR Z,SIGNON2
|
||||
LD DE,MSGSONT80
|
||||
CALL ?PRINTMSG
|
||||
IF BUILD_FUSIONX = 0
|
||||
LD DE,MSGSONT80
|
||||
CALL ?PRINTMSG
|
||||
ENDIF ; BUILD_FUSIONX
|
||||
SIGNON2: LD DE,MSGSONEND
|
||||
CALL ?PRINTMSG
|
||||
|
||||
@@ -527,6 +545,14 @@ GOTOX: CALL HEXIYX
|
||||
JP (HL)
|
||||
|
||||
|
||||
; Method to read a byte out of main memory when configured in default TZFS1 mode.
|
||||
GETMEM: LD A,(HL)
|
||||
RET
|
||||
; Method to write a byte into main memory when configured in default TZFS1 mode.
|
||||
SETMEM: LD (HL),A
|
||||
RET
|
||||
|
||||
|
||||
;====================================
|
||||
;
|
||||
; Screen Width and Mode Commands
|
||||
@@ -558,12 +584,18 @@ SETMODE80: IN A,(CPLDINFO) ; Get c
|
||||
SETMODE40A: IN A,(CPLDINFO) ; Get configuration of hardware.
|
||||
BIT 3,A
|
||||
LD A,MODE_MZ80A ; Set the tranZPUter CPLD hardware translation to MZ80A mode.
|
||||
JR Z,SETMODE40_1
|
||||
LD A,VMMODE_MZ80A ; Setup the display to 40 char MZ80A mode.
|
||||
JR NZ,SETMODE40_0
|
||||
LD HL,DSPCTL ; Assume the 40/80 card is installed, switch to 40char mode.
|
||||
XOR A
|
||||
LD E,(HL)
|
||||
LD (HL),A
|
||||
JR SETMODE40_2
|
||||
;
|
||||
SETMODE40_0:LD A,VMMODE_MZ80A ; Setup the display to 40 char MZ80A mode.
|
||||
OUT (VMCTRL),A ; Activate.
|
||||
LD A, MODE_MZ80A + MODE_VIDEO_FPGA ; Set the tranZPUter CPLD hardware translation to MZ80A mode with FPGA video enabled.
|
||||
SETMODE40_1:OUT (CPLDCFG),A ;
|
||||
XOR A
|
||||
SETMODE40_2:XOR A
|
||||
LD (SPAGE), A ; Allow MZ80A scrolling
|
||||
LD A,(SCRNMODE)
|
||||
RES 0, A
|
||||
@@ -572,11 +604,11 @@ SETMODE40_1:OUT (CPLDCFG),A ;
|
||||
IN A,(CPLDINFO) ; Check to see if this is an MZ700, if it is not, setup the correct frequency.
|
||||
AND 007H
|
||||
CP MODE_MZ80A
|
||||
JR Z,SETMODE40_2
|
||||
JR Z,SETMODE40_3
|
||||
LD A,SYSMODE_MZ80A ; Setup the board to run at 2MHz
|
||||
OUT (SYSCTRL),A ; Activate
|
||||
|
||||
SETMODE40_2:LD A,TZSVC_CMD_LOAD40ABIOS ; Request the I/O processor loads the SA1510 40column BIOS into memory.
|
||||
SETMODE40_3:LD A,TZSVC_CMD_LOAD40ABIOS ; Request the I/O processor loads the SA1510 40column BIOS into memory.
|
||||
SETBIOS: CALL SVC_CMD ; And make communications wit the I/O processor, returning with the result of load operation.
|
||||
OR A
|
||||
JP Z,MROMADDR
|
||||
@@ -588,13 +620,18 @@ SETBIOS: CALL SVC_CMD ; And m
|
||||
SETMODE80A: IN A,(CPLDINFO) ; Get configuration of hardware.
|
||||
BIT 3,A
|
||||
LD A, MODE_MZ80A ; Set the tranZPUter CPLD hardware translation to MZ80A mode.
|
||||
JR Z,SETMODE40_1 ; No hardware so cannot do 80 char mode.
|
||||
JR NZ,SETMODE80_0
|
||||
LD HL,DSPCTL ; Assume the 40/80 card is installed, switch to 80char mode.
|
||||
LD A,128
|
||||
LD E,(HL)
|
||||
LD (HL),A
|
||||
JR SETMODE80_2
|
||||
;
|
||||
LD A,VMMODE_MZ80A + MODE_80CHAR ; Setup the display to 80 char MZ80A mode.
|
||||
SETMODE80_0:LD A,VMMODE_MZ80A + MODE_80CHAR ; Setup the display to 80 char MZ80A mode.
|
||||
OUT (VMCTRL),A ; Activate.
|
||||
LD A, MODE_MZ80A + MODE_VIDEO_FPGA ; Set the tranZPUter CPLD hardware translation to MZ80A mode with FPGA video enabled.
|
||||
SETMODE80_1:OUT (CPLDCFG),A ;
|
||||
LD A, 0FFH
|
||||
SETMODE80_2:LD A, 0FFH
|
||||
LD (SPAGE), A ; MZ80K Scrolling in 80 column mode for time being.
|
||||
LD A,(SCRNMODE)
|
||||
SET 0, A ; Indicate 80 column mode for startup.
|
||||
@@ -603,11 +640,11 @@ SETMODE80_1:OUT (CPLDCFG),A ;
|
||||
IN A,(CPLDINFO) ; Check to see if this is an MZ700, if it is not, setup the correct frequency.
|
||||
AND 007H
|
||||
CP MODE_MZ80A
|
||||
JR Z,SETMODE80_2
|
||||
JR Z,SETMODE80_3
|
||||
LD A,SYSMODE_MZ80A ; Setup the board to run at 2MHz
|
||||
OUT (SYSCTRL),A ; Activate
|
||||
|
||||
SETMODE80_2:LD A,TZSVC_CMD_LOAD80ABIOS ; Request the I/O processor loads the SA1510 80column BIOS into memory.
|
||||
SETMODE80_3:LD A,TZSVC_CMD_LOAD80ABIOS ; Request the I/O processor loads the SA1510 80column BIOS into memory.
|
||||
JR SETBIOS
|
||||
|
||||
|
||||
@@ -1271,11 +1308,23 @@ DIRSD4: RET
|
||||
;
|
||||
|
||||
; Quick method to load the basic interpreter. So long as the filename doesnt change this method will load and boot Basic.
|
||||
LOADBASIC: LD DE,BASICFILENM
|
||||
LOADBASIC:
|
||||
IF BUILD_MZ80A > 0
|
||||
LD DE,BASICFNM80A
|
||||
ENDIF
|
||||
IF BUILD_MZ700 > 0
|
||||
LD DE,BASICFNM700
|
||||
ENDIF
|
||||
JR LOADSDCARD
|
||||
|
||||
; Quick method to load CPM. So long as the filename doesnt change this method will load and boot CPM.
|
||||
LOADCPM: LD DE,CPMFILENAME
|
||||
LOADCPM:
|
||||
IF BUILD_MZ80A > 0
|
||||
LD DE,CPMFNAME80A
|
||||
ENDIF
|
||||
IF BUILD_MZ700 > 0
|
||||
LD DE,CPMFNAME700
|
||||
ENDIF
|
||||
JR LOADSDCARD
|
||||
|
||||
; Entry point when copying the SD file. Setup flags to indicate copying to effect any special processing.
|
||||
@@ -2122,10 +2171,12 @@ L0300: IN A,(0D8H) ; State reg
|
||||
; B = Characters copied (ie. B - input B = no characters).
|
||||
;
|
||||
GETSTRING: LD A,(DE) ; Skip white space before copy.
|
||||
CP ' '
|
||||
CP 33
|
||||
JR NC, GETSTR1
|
||||
CP 00DH
|
||||
JR GETSTR2 ; No directory means use the I/O set default.
|
||||
JR Z, GETSTR2 ; No directory means use the I/O set default.
|
||||
OR A
|
||||
JR Z, GETSTR2
|
||||
INC DE
|
||||
JR GETSTRING
|
||||
GETSTR1: LD (HL),A ; Copy the name entered by user. Validation is done on the I/O processor, bad directory name will result in error next read/write.
|
||||
@@ -2314,8 +2365,10 @@ LOCALTEST: LD A,0
|
||||
RET
|
||||
|
||||
; Quick load program names.
|
||||
CPMFILENAME:DB "CPM223 MZ-700-80", 000H
|
||||
BASICFILENM:DB "S-BASIC", 000H
|
||||
CPMFNAME80A:DB "CPM223 MZ-80A-80", 000H
|
||||
BASICFNM80A:DB "BASIC-SA-5510-TZ", 000H
|
||||
CPMFNAME700:DB "CPM223 MZ-700-80", 000H
|
||||
BASICFNM700:DB "S-BASIC", 000H
|
||||
DEFAULTFN: DB "DEFAULT"
|
||||
DEFAULTFNE: EQU $
|
||||
|
||||
@@ -2354,6 +2407,9 @@ CMDTABLE: ;DB 000H | 000H | 000H | 003H
|
||||
;DB 000H | 000H | 000H | 003H
|
||||
;DB "700" ; Switch to 40 column MZ700 mode.
|
||||
;DW SETMODE700
|
||||
DB 000H | 000H | 000H | 003H
|
||||
DB "ASM" ; Assembler.
|
||||
DW ?ASM
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "BASIC" ; Load and run BASIC SA-5510.
|
||||
DW LOADBASIC
|
||||
@@ -2364,11 +2420,14 @@ CMDTABLE: ;DB 000H | 000H | 000H | 003H
|
||||
DB "CPM" ; Load and run CPM.
|
||||
DW LOADCPM
|
||||
DB 000H | 000H | 000H | 002H
|
||||
DB "CP" ; Copy memory
|
||||
DW ?COPYM
|
||||
DB 000H | 000H | 000H | 002H
|
||||
DB "CD" ; SD Card Directory change command.
|
||||
DW CHGSDDIR
|
||||
DB 000H | 000H | 000H | 001H
|
||||
DB 'C' ; Clear Memory.
|
||||
DW ?INITMEMX
|
||||
DB 000H | 000H | 000H | 004H
|
||||
DB "DASM" ; Disassembler.
|
||||
DW ?DASM
|
||||
DB 000H | 000H | 000H | 003H
|
||||
DB "DIR" ; List SD Card directory.
|
||||
DW DIRSDCARD
|
||||
@@ -2382,6 +2441,9 @@ CMDTABLE: ;DB 000H | 000H | 000H | 003H
|
||||
DB "EX" ; Exit out of TZFS to original Monitor.
|
||||
DW EXITTZFS
|
||||
DB 000H | 000H | 000H | 004H
|
||||
DB "FILL" ; Fill Memory.
|
||||
DW ?FILL
|
||||
DB 000H | 000H | 000H | 004H
|
||||
DB "FREQ" ; Set or change the CPU frequency.
|
||||
DW ?SETFREQ
|
||||
DB 000H | 000H | 000H | 001H
|
||||
@@ -2409,42 +2471,44 @@ CMDTABLE: ;DB 000H | 000H | 000H | 003H
|
||||
DB "L" ; Original Load from CMT
|
||||
DW LOADTAPE
|
||||
;
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ80K" ; Invoke MZ80K Hardware Emulation.
|
||||
DW ?SETMZ80K
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ80C" ; Invoke MZ80C Hardware Emulation.
|
||||
DW ?SETMZ80C
|
||||
DB 000H | 000H | 000H | 006H
|
||||
DB "MZ1200" ; Invoke MZ1200 Hardware Emulation.
|
||||
DW ?SETMZ1200
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ80A" ; Invoke MZ80A Hardware Emulation.
|
||||
DW ?SETMZ80A
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ700" ; Invoke MZ700 Hardware Emulation.
|
||||
DW ?SETMZ700
|
||||
DB 000H | 000H | 000H | 006H
|
||||
DB "MZ1500" ; Invoke MZ1500 Hardware Emulation.
|
||||
DW ?SETMZ1500
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ800" ; Invoke MZ800 Hardware Emulation.
|
||||
DW ?SETMZ800
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ80B" ; Invoke MZ80B Hardware Emulation.
|
||||
DW ?SETMZ80B
|
||||
DB 000H | 000H | 000H | 006H
|
||||
DB "MZ2000" ; Invoke MZ2000 Hardware Emulation.
|
||||
DW ?SETMZ2000
|
||||
DB 000H | 000H | 000H | 006H
|
||||
DB "MZ2200" ; Invoke MZ2200 Hardware Emulation.
|
||||
DW ?SETMZ2200
|
||||
DB 000H | 000H | 000H | 006H
|
||||
DB "MZ2500" ; Invoke MZ2500 Hardware Emulation.
|
||||
DW ?SETMZ2500
|
||||
DB 000H | 000H | 000H | 002H
|
||||
DB "MZ" ; Invoke default MZ80A Hardware Emulation.
|
||||
DW ?SETMZ80A
|
||||
IF BUILD_FUSIONX = 0
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ80K" ; Invoke MZ80K Hardware Emulation.
|
||||
DW ?SETMZ80K
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ80C" ; Invoke MZ80C Hardware Emulation.
|
||||
DW ?SETMZ80C
|
||||
DB 000H | 000H | 000H | 006H
|
||||
DB "MZ1200" ; Invoke MZ1200 Hardware Emulation.
|
||||
DW ?SETMZ1200
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ80A" ; Invoke MZ80A Hardware Emulation.
|
||||
DW ?SETMZ80A
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ700" ; Invoke MZ700 Hardware Emulation.
|
||||
DW ?SETMZ700
|
||||
DB 000H | 000H | 000H | 006H
|
||||
DB "MZ1500" ; Invoke MZ1500 Hardware Emulation.
|
||||
DW ?SETMZ1500
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ800" ; Invoke MZ800 Hardware Emulation.
|
||||
DW ?SETMZ800
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "MZ80B" ; Invoke MZ80B Hardware Emulation.
|
||||
DW ?SETMZ80B
|
||||
DB 000H | 000H | 000H | 006H
|
||||
DB "MZ2000" ; Invoke MZ2000 Hardware Emulation.
|
||||
DW ?SETMZ2000
|
||||
DB 000H | 000H | 000H | 006H
|
||||
DB "MZ2200" ; Invoke MZ2200 Hardware Emulation.
|
||||
DW ?SETMZ2200
|
||||
DB 000H | 000H | 000H | 006H
|
||||
DB "MZ2500" ; Invoke MZ2500 Hardware Emulation.
|
||||
DW ?SETMZ2500
|
||||
DB 000H | 000H | 000H | 002H
|
||||
DB "MZ" ; Invoke default MZ80A Hardware Emulation.
|
||||
DW ?SETMZ80A
|
||||
ENDIF
|
||||
;
|
||||
DB 000H | 000H | 000H | 001H
|
||||
DB 'M' ; Edit Memory.
|
||||
@@ -2452,6 +2516,9 @@ CMDTABLE: ;DB 000H | 000H | 000H | 003H
|
||||
DB 000H | 000H | 000H | 001H
|
||||
DB 'P' ; Printer test.
|
||||
DW ?PTESTX
|
||||
DB 000H | 000H | 000H | 003H
|
||||
DB "RIO" ; Read I/O
|
||||
DW ?READIO
|
||||
DB 000H | 000H | 000H | 001H
|
||||
DB 'R' ; Memory test.
|
||||
DW MEMTEST
|
||||
@@ -2476,31 +2543,40 @@ CMDTABLE: ;DB 000H | 000H | 000H | 003H
|
||||
DB 000H | 000H | 000H | 004H
|
||||
DB "T2SD" ; Copy Tape to SD Card.
|
||||
DW TAPE2SD
|
||||
DB 000H | 000H | 000H | 003H
|
||||
DB "T80" ; Switch to soft T80 CPU.
|
||||
DW ?SETT80
|
||||
IF BUILD_FUSIONX = 0
|
||||
DB 000H | 000H | 000H | 003H
|
||||
DB "T80" ; Switch to soft T80 CPU.
|
||||
DW ?SETT80
|
||||
ENDIF
|
||||
DB 000H | 000H | 000H | 001H
|
||||
DB 'T' ; Timer test.
|
||||
DW ?TIMERTST
|
||||
DB 000H | 000H | 000H | 007H
|
||||
DB "VBORDER" ; Set VGA border colour.
|
||||
DW ?SETVBORDER
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "VMODE" ; Set VGA mode.
|
||||
DW ?SETVMODE
|
||||
DB 000H | 000H | 000H | 003H
|
||||
DB "VGA" ; Set VGA mode.
|
||||
DW ?SETVGAMODE
|
||||
IF BUILD_FUSIONX = 0
|
||||
DB 000H | 000H | 000H | 007H
|
||||
DB "VBORDER" ; Set VGA border colour.
|
||||
DW ?SETVBORDER
|
||||
DB 000H | 000H | 000H | 005H
|
||||
DB "VMODE" ; Set VGA mode.
|
||||
DW ?SETVMODE
|
||||
DB 000H | 000H | 000H | 003H
|
||||
DB "VGA" ; Set VGA mode.
|
||||
DW ?SETVGAMODE
|
||||
ENDIF
|
||||
DB 000H | 000H | 000H | 001H
|
||||
DB 'V' ; Verify CMT Save.
|
||||
DW VRFYX
|
||||
DB 000H | 000H | 000H | 003H
|
||||
DB "Z80" ; Switch to soft Z80 CPU.
|
||||
DW ?SETZ80
|
||||
DB 000H | 000H | 000H | 003H
|
||||
DB "ZPU" ; Switch to soft ZPU Evolution CPU.
|
||||
DW ?SETZPUEVO
|
||||
DB 000H | 000H | 000H | 001H
|
||||
DB "WIO" ; Write I/O
|
||||
DW ?WRITEIO
|
||||
IF BUILD_FUSIONX = 0
|
||||
DB 000H | 000H | 000H | 003H
|
||||
DB "Z80" ; Switch to soft Z80 CPU.
|
||||
DW ?SETZ80
|
||||
DB 000H | 000H | 000H | 003H
|
||||
DB "ZPU" ; Switch to soft ZPU Evolution CPU.
|
||||
DW ?SETZPUEVO
|
||||
DB 000H | 000H | 000H | 001H
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
;- I/O processor in the K64F/ZPU.
|
||||
;-
|
||||
;- Credits:
|
||||
;- Copyright: (c) 2018-2020 Philip Smart <philip.smart@net2net.org>
|
||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||
;-
|
||||
;- History: May 2020 - Branch taken from RFS v2.0 and adapted for the tranZPUter SW.
|
||||
;- Dec 2020 - Updates to accommodate v1.3 of the tranZPUter SW-700 board where soft
|
||||
;- CPU's now become possible.
|
||||
;- Feb 2023 - TZFS now running on FusionX. Small changes to ensure compatibility.
|
||||
;-
|
||||
;--------------------------------------------------------------------------------------------------------
|
||||
;- This source file is free software: you can redistribute it and-or modify
|
||||
@@ -141,36 +142,41 @@ PRTMSG: LD A,(DE)
|
||||
PRTMSGE: POP BC
|
||||
RET
|
||||
|
||||
; A modified print string routine with full screen pause to print out the help screen text. The routine prints out true ascii
|
||||
; as opposed to Sharp modified ascii.
|
||||
; A modified print string routine with full screen pause to print out the help screen text or other page text. The routine prints out true ascii
|
||||
; as opposed to Sharp modified ascii. It can be called with a multi line string or many times with single string, pausing if rowcount gets to end of string.
|
||||
; A string is NULL terminated.
|
||||
PRTSTR: PUSH AF
|
||||
PUSH BC
|
||||
PUSH DE
|
||||
LD A,0
|
||||
LD (TMPLINECNT),A
|
||||
PUSH HL
|
||||
LD HL,TMPCNT
|
||||
OR A
|
||||
JR NZ,PRTSTR1 ; Carry set skip row count init, used when calling multiple times.
|
||||
LD (HL),A
|
||||
PRTSTR1: LD A,(DE)
|
||||
CP 000H ; NULL terminates the string.
|
||||
JR Z,PRTSTRE
|
||||
JR Z,PRTSTR3
|
||||
CP 00DH ; As does CR.
|
||||
JR Z,PRTSTR3
|
||||
PRTSTR2: CALL PRINTASCII
|
||||
INC DE
|
||||
JR PRTSTR1
|
||||
JR PRTSTR1
|
||||
;
|
||||
PRTSTR3: PUSH AF
|
||||
LD A,(TMPLINECNT)
|
||||
CP 23 ; Check to see if a page of output has been displayed, if it has, pause.
|
||||
JR Z,PRTSTR5
|
||||
INC A
|
||||
PRTSTR4: LD (TMPLINECNT),A
|
||||
POP AF
|
||||
JR PRTSTR2
|
||||
PRTSTR5: CALL GETKY
|
||||
LD A,(HL)
|
||||
CP 24 ; Check to see if a page of output has been displayed, if it has, pause.
|
||||
JR C,PRTSTR5
|
||||
PRTSTR4: CALL GETKY
|
||||
CP ' '
|
||||
JR NZ,PRTSTR5
|
||||
JR NZ,PRTSTR4
|
||||
XOR A
|
||||
JR PRTSTR4
|
||||
PRTSTRE: POP DE
|
||||
LD (HL),A
|
||||
PRTSTR5: POP AF
|
||||
INC (HL) ; Increment row count, used in repeated calls not clearing rowcount to zero.
|
||||
OR A
|
||||
JR NZ, PRTSTR2
|
||||
POP HL
|
||||
POP DE
|
||||
POP BC
|
||||
POP AF
|
||||
RET
|
||||
@@ -409,9 +415,11 @@ FDCJMPL2: JP (IX)
|
||||
;-------------------------------------------------------------------------------
|
||||
; 0 + <- 39
|
||||
; -----------------------------------------
|
||||
MSGSON: DB "+ TZFS v1.6 ", NULL ; Version 1.0-> first split from RFS v2.0
|
||||
MSGSON: DB "+ TZFS v1.7 ", NULL ; Version 1.0-> first split from RFS v2.0
|
||||
MSGSONEND: DB " **", CR, NULL ; Signon banner termination.
|
||||
IF BUILD_FUSIONX = 0
|
||||
MSGSONT80: DB "(T80)", NULL ; T80 CPU detected.
|
||||
ENDIF ; BUILD_FUSIONX
|
||||
MSGNOTFND: DB "Not Found", CR, NULL
|
||||
MSGBADCMD: DB "???", CR, NULL
|
||||
MSGSDRERR: DB "SD Read error, Sec:",0FBH, NULL
|
||||
@@ -431,7 +439,6 @@ MSGBOOTDRV: DB CR, "Floppy boot drive ?",
|
||||
MSGLOADERR: DB CR, "Disk loading error", CR, NULL
|
||||
MSGIPLLOAD: DB CR, "Disk loading ", NULL
|
||||
MSGDSKNOTMST:DB CR, "This is not a boot disk", CR, NULL
|
||||
MSGINITM: DB "Init memory", CR, NULL
|
||||
MSGREAD4HEX:DB "Bad hex number", CR, NULL
|
||||
MSGT2SDERR: DB "Copy from Tape to SD Failed", CR, NULL
|
||||
MSGSD2TERR: DB "Copy from SD to Tape Failed", CR, NULL
|
||||
@@ -442,6 +449,7 @@ MSGFAILBIOS:DB "Failed to load alternate BIOS!",
|
||||
MSGFAILEXIT:DB "TZFS exit failed, I/O proc error!", CR, NULL
|
||||
MSGFREQERR: DB "Error, failed to change frequency!", CR, NULL
|
||||
MSGBADNUM: DB "Error, bad number supplied!", CR, NULL
|
||||
IF BUILD_FUSIONX = 0
|
||||
MSGNOFPGA: DB "Error, no FPGA video module!", CR, NULL
|
||||
MSGT80ERR: DB "Error, failed to switch to T80 CPU!", CR, NULL
|
||||
MSGZ80ERR: DB "Error, failed to switch to Z80 CPU!", CR, NULL
|
||||
@@ -449,6 +457,7 @@ MSGZPUERR: DB "Error, failed to switch to ZPU CPU!",
|
||||
MSGNOSOFTCPU:DB "No soft cpu hardware!", CR, NULL
|
||||
MSGNOT80CPU:DB "T80 not available!", CR, NULL
|
||||
MSGNOEMU: DB "No Sharp MZ Series Emu hardware!", CR, NULL
|
||||
ENDIF ; BUILD_FUSIONX
|
||||
;
|
||||
OKCHECK: DB ", CHECK: ", CR, NULL
|
||||
OKMSG: DB " OK.", CR, NULL
|
||||
@@ -460,6 +469,8 @@ MSG_TIMERTST:DB "8253 TIMER TEST",
|
||||
MSG_TIMERVAL:DB "READ VALUE 1: ", CR, NULL
|
||||
MSG_TIMERVAL2:DB "READ VALUE 2: ", CR, NULL
|
||||
MSG_TIMERVAL3:DB "READ DONE.", CR, NULL
|
||||
MSGNOINSTR: DB "Bad instruction.", CR, NULL
|
||||
MSGNOPARAM: DB "Bad parameter.", CR, NULL
|
||||
|
||||
|
||||
; The FDC controller uses it's busy/wait signal as a ROM address line input, this
|
||||
@@ -489,58 +500,78 @@ SVCIOERR: DB "I/O Error, time out!",
|
||||
;-------------------------------------------------------------------------------
|
||||
|
||||
; Simple help screen to display commands.
|
||||
HELP: ;CALL NL
|
||||
LD DE, HELPSCR
|
||||
HELP: LD DE, HELPSCR
|
||||
XOR A ; Paging starts at 0.
|
||||
CALL PRTSTR
|
||||
RET
|
||||
|
||||
; Help text. Use of lower case, due to Sharp's non standard character set, is not easy, you have to manually code each byte
|
||||
; hence using upper case.
|
||||
HELPSCR: ; "--------- 40 column width -------------"
|
||||
DB "4 40 col mode.", 00DH
|
||||
DB "8 80 col mode.", 00DH
|
||||
;DB "40A select MZ-80A 40col Mode.", 00DH
|
||||
;DB "80A select MZ-80A 80col Mode.", 00DH
|
||||
;DB "80B select MZ-80B Mode.", 00DH
|
||||
;DB "700 select MZ-700 40col Mode.", 00DH
|
||||
;DB "7008 select MZ-700 80col Mode.", 00DH
|
||||
DB "B toggle keyboard bell.", 00DH
|
||||
DB "BASIC load BASIC SA-5510.", 00DH
|
||||
DB "C[b] clear memory $1200-$D000.", 00DH
|
||||
DB "CD[d] switch to SD directory [d].", 00DH
|
||||
DB "CPM load CPM.", 00DH
|
||||
DB "DXXXX[YYYY] dump mem XXXX to YYYY.", 00DH
|
||||
DB "DIR[wc] SD dir listing, wc=wildcard.", 00DH
|
||||
DB "ECfn erase file, fn=No or Filename", 00DH
|
||||
DB "EX exit TZFS, reset as original.", 00DH
|
||||
DB "Fx boot fd drive x.", 00DH
|
||||
DB "FREQn set CPU to nKHz, 0 default.", 00DH
|
||||
DB "H this help screen.", 00DH
|
||||
DB "JXXXX jump to location XXXX.", 00DH
|
||||
DB "LTfn[,M] load tape, fn=Filename", 00DH
|
||||
DB " M = HW Mode, K=80K,C=80C,1=1200", 00DH
|
||||
DB " A=80A,7=700,8=800,B=80B,2=2000", 00DH
|
||||
DB "LCfn[,M] load from SD, fn=No or FileN", 00DH
|
||||
DB " add NX for no exec, ie.LCNX.", 00DH
|
||||
DB "MXXXX edit memory starting at XXXX.", 00DH
|
||||
DB "MZmc activate hardware emulation.", 00DH
|
||||
DB " mc =80K,80C,1200,80A,700,800,80B,2000", 00DH
|
||||
DB "P test printer.", 00DH
|
||||
DB "R test dram memory.", 00DH
|
||||
DB "SDDd change to SD directory {d}.", 00DH
|
||||
DB "SD2Tfn[,M] copy SD to tape.", 00DH
|
||||
DB "STXXXXYYYYZZZZ[,M] save mem to tape.", 00DH
|
||||
DB "SCXXXXYYYYZZZZ save mem to card.", 00DH
|
||||
DB " XXXX=start, YYYY=end, ZZZZ=exec", 00DH
|
||||
DB "T test timer.", 00DH
|
||||
DB "T2SD[B][,M] copy tape to SD, B=Bulk", 00DH
|
||||
DB "T80 switch to soft T80 CPU.", 00DH
|
||||
DB "V verify tape save.", 00DH
|
||||
DB "VBORDERn set vga border colour.", 00DH
|
||||
DB "VMODEn set video mode.", 00DH
|
||||
DB "VGAn set VGA mode.", 00DH
|
||||
DB "Z80 switch to hard Z80 CPU.", 00DH
|
||||
DB "ZPU switch to ZPU Evo CPU / zOS.", 00DH
|
||||
DB "4 40 col mode", 00DH
|
||||
DB "8 80 col mode", 00DH
|
||||
;DB "40A select MZ-80A 40col Mode", 00DH
|
||||
;DB "80A select MZ-80A 80col Mode", 00DH
|
||||
;DB "80B select MZ-80B Mode", 00DH
|
||||
;DB "700 select MZ-700 40col Mode", 00DH
|
||||
;DB "7008 select MZ-700 80col Mode", 00DH
|
||||
DB "ASMXXXX assemble into dest XXXX", 00DH
|
||||
DB "B toggle keyboard bell", 00DH
|
||||
DB "BASIC load BASIC SA-5510", 00DH
|
||||
DB "CD[d] switch to SD directory [d]", 00DH
|
||||
DB "CPXXXXYYYYZZZZ", 00DH
|
||||
DB " copy XXXX to YYYY of size ZZZZ", 00DH
|
||||
DB "CPM load CPM", 00DH
|
||||
DB "DXXXX[YYYY]", 00DH
|
||||
DB " dump mem XXXX to YYYY", 00DH
|
||||
DB "DASMXXXX[YYYY]", 00DH
|
||||
DB " disassemble XXXX to YYYY", 00DH
|
||||
DB "DIR[wc] SD dir listing, wc=wildcard", 00DH
|
||||
DB "ECfn erase file, fn=No or Filename", 00DH
|
||||
DB "EX exit TZFS, reset as original", 00DH
|
||||
DB "Fx boot fd drive x", 00DH
|
||||
DB "FILLXXXXYYYY[ZZ]", 00DH
|
||||
DB " Fill memory from XXXX to YYYY", 00DH
|
||||
DB "FREQn set CPU to nKHz, 0 default", 00DH
|
||||
DB "H this help screen", 00DH
|
||||
DB "JXXXX jump to location XXXX", 00DH
|
||||
DB "LTfn[,M] load tape, fn=Filename", 00DH
|
||||
DB " M = HW Mode, K=80K,C=80C,", 00DH
|
||||
DB " 1=1200,A=80A,7=700,8=800,", 00DH
|
||||
DB " B=80B, 2=2000", 00DH
|
||||
DB "LCfn[,M] load from SD, fn=No or FileN", 00DH
|
||||
DB " add NX for no exec, ie.LCNX", 00DH
|
||||
DB "MXXXX edit memory starting at XXXX", 00DH
|
||||
IF BUILD_FUSIONX = 0
|
||||
DB "MZmc activate hardware emulation", 00DH
|
||||
DB " mc =80K,80C,1200,80A,700,800,", 00DH
|
||||
DB " 80B,2000", 00DH
|
||||
ENDIF ; BUILD_FUSIONX
|
||||
DB "P test printer", 00DH
|
||||
DB "R test dram memory", 00DH
|
||||
DB "RIOXXXX Read I/O port XXXX and print", 00DH
|
||||
;DB "SDDd change to SD directory {d}", 00DH
|
||||
DB "SD2Tfn[,M] copy SD to tape", 00DH
|
||||
DB "STXXXXYYYYZZZZ[,M]", 00DH
|
||||
DB " save memory to tape", 00DH
|
||||
DB "SCXXXXYYYYZZZZ", 00DH
|
||||
DB " save mem to card, XXXX=start", 00DH
|
||||
DB " YYYY=end, ZZZZ=exec", 00DH
|
||||
DB "T test timer", 00DH
|
||||
DB "T2SD[B][,M]", 00DH
|
||||
DB " copy tape to SD, B=Bulk", 00DH
|
||||
IF BUILD_FUSIONX = 0
|
||||
DB "T80 switch to soft T80 CPU", 00DH
|
||||
ENDIF ; BUILD_FUSIONX
|
||||
DB "V verify tape save", 00DH
|
||||
DB "WIOXXXXYY Write YY to I/O port XXXX", 00DH
|
||||
IF BUILD_FUSIONX = 0
|
||||
DB "VBORDERn set vga border colour", 00DH
|
||||
DB "VMODEn set video mode", 00DH
|
||||
DB "VGAn set VGA mode", 00DH
|
||||
DB "Z80 switch to hard Z80 CPU", 00DH
|
||||
DB "ZPU switch to ZPU Evo CPU / zOS", 00DH
|
||||
ENDIF ; BUILD_FUSIONX
|
||||
; "--------- 40 column width -------------"
|
||||
DB 000H
|
||||
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
;- I/O processor in the K64F/ZPU.
|
||||
;-
|
||||
;- Credits:
|
||||
;- Copyright: (c) 2018-2020 Philip Smart <philip.smart@net2net.org>
|
||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||
;-
|
||||
;- History: May 2020 - Branch taken from RFS v2.0 and adapted for the tranZPUter SW.
|
||||
;- Jul 2021 - Updated to add configurable tape read/write for MZ80K,80B and 800 series
|
||||
;- machines.
|
||||
;- Feb 2023 - TZFS now running on FusionX. Small changes to ensure compatibility.
|
||||
;-
|
||||
;--------------------------------------------------------------------------------------------------------
|
||||
;- This source file is free software: you can redistribute it and-or modify
|
||||
@@ -39,6 +40,7 @@
|
||||
; TZFS BANK 3 - Utilities and additional commands.
|
||||
;
|
||||
;============================================================
|
||||
|
||||
ORG BANKRAMADDR
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
@@ -194,7 +196,6 @@ MCRX3: LD H,B ; memor
|
||||
LD L,C
|
||||
JR MCORX1
|
||||
|
||||
|
||||
; Dump method when called interbank as HL cannot be passed.
|
||||
;
|
||||
; BC = Start
|
||||
@@ -290,28 +291,6 @@ DUMP9: LD (DUMPADDR),HL ; Store
|
||||
CALL NL
|
||||
RET
|
||||
|
||||
|
||||
; Cmd tool to clear memory.
|
||||
; Read cmd line for an init byte, if one not present, use 00H
|
||||
;
|
||||
INITMEMX: CALL _2HEX
|
||||
JR NC,INITMEMX1
|
||||
LD A,000H
|
||||
INITMEMX1: PUSH AF
|
||||
LD DE,MSGINITM
|
||||
CALL ?PRINTMSG
|
||||
LD HL,1200h
|
||||
LD BC,0D000h - 1200h
|
||||
POP DE
|
||||
CLEAR1: LD A,D
|
||||
LD (HL),A
|
||||
INC HL
|
||||
DEC BC
|
||||
LD A,B
|
||||
OR C
|
||||
JP NZ,CLEAR1
|
||||
RET
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; END OF ADDITIONAL TZFS COMMAND METHODS
|
||||
;-------------------------------------------------------------------------------
|
||||
@@ -647,7 +626,11 @@ SLPT: DB 01H ; TEXT
|
||||
;
|
||||
; Example:
|
||||
; 17 + 7 + ((4+10)*x) + 12 + 10 = 564 * 1/3546000 = 159uS + (7 + 13 * (1/3546000)) = 164.5uS
|
||||
CMTSETDLY: LD A,(HWMODEL) ; Get the machine model we are conforming to.
|
||||
; (66 + (14 * x)) / 3540000 = delay
|
||||
; MZ-700 - x = ((delay * 3540000) - 66) / 14
|
||||
; MZ-80A - x = ((delay * 2000000) - 66) / 14
|
||||
CMTSETDLY: IF BUILD_MZ700 > 0
|
||||
LD A,(HWMODEL) ; Get the machine model we are conforming to.
|
||||
CP 5 ; MZ-800 has its own timing.
|
||||
JR Z,CMTSETDLY0
|
||||
CP 6 ; MZ-80B uses 1800 baud settings
|
||||
@@ -656,7 +639,7 @@ CMTSETDLY: LD A,(HWMODEL) ; G
|
||||
JR Z,CMTSETDLY1
|
||||
;
|
||||
; K Series
|
||||
LD A,86 ; Remainder of the machines us a 1200 baud setting,
|
||||
LD A,86 ; Remainder of the machines use a 1200 baud setting,
|
||||
LD (CMTSAMPLECNT),A ; 368uS sample point.
|
||||
LD A,56 ;
|
||||
LD (CMTDLY1CNTM),A ; 240us
|
||||
@@ -690,6 +673,54 @@ CMTSETDLY1: LD A,52 ; 2
|
||||
LD (CMTDLY2CNTM),A ;
|
||||
LD A,80 ; + 334uS = 667uS
|
||||
LD (CMTDLY2CNTS),A ;
|
||||
ENDIF
|
||||
; The values below are for an MZ-80A running at 2MHz under the FusionX board.
|
||||
; If TZFS runs on more platforms then a table will be the best method forward.
|
||||
IF BUILD_MZ80A > 0
|
||||
LD A,(HWMODEL) ; Get the machine model we are conforming to.
|
||||
CP 5 ; MZ-800 has its own timing.
|
||||
JR Z,CMTSETDLY0
|
||||
CP 6 ; MZ-80B uses 1800 baud settings
|
||||
JR Z,CMTSETDLY1
|
||||
CP 7 ; MZ-2000 uses 1800 baud settings
|
||||
JR Z,CMTSETDLY1
|
||||
;
|
||||
; K Series
|
||||
LD A,47 ; Remainder of the machines use a 1200 baud setting,
|
||||
LD (CMTSAMPLECNT),A ; 368uS sample point.
|
||||
LD A,30 ;
|
||||
LD (CMTDLY1CNTM),A ; 240us
|
||||
LD A,33 ;
|
||||
LD (CMTDLY1CNTS),A ; + 264uS = 504uS
|
||||
LD A,62
|
||||
LD (CMTDLY2CNTM),A ; 464uS
|
||||
LD A,66
|
||||
LD (CMTDLY2CNTS),A ; + 494uS = 958uS
|
||||
RET
|
||||
; MZ-800
|
||||
CMTSETDLY0: LD A,49 ; 379uS sample point
|
||||
LD (CMTSAMPLECNT),A
|
||||
LD A,30 ; 240uS
|
||||
LD (CMTDLY1CNTM),A
|
||||
LD A,35 ; + 278uS = 518uS
|
||||
LD (CMTDLY1CNTS),A
|
||||
LD A,62 ; 470uS
|
||||
LD (CMTDLY2CNTM),A ;
|
||||
LD A,66 ; + 494uS = 964uS
|
||||
LD (CMTDLY2CNTS),A ;
|
||||
RET
|
||||
; B Series
|
||||
CMTSETDLY1: LD A,32 ; 255uS sample point.
|
||||
LD (CMTSAMPLECNT),A
|
||||
LD A,19 ; 166.75uS
|
||||
LD (CMTDLY1CNTM),A
|
||||
LD A,19 ; + 166uS = 332.75uS
|
||||
LD (CMTDLY1CNTS),A
|
||||
LD A,43 ; 333uS
|
||||
LD (CMTDLY2CNTM),A ;
|
||||
LD A,43 ; + 334uS = 667uS
|
||||
LD (CMTDLY2CNTS),A ;
|
||||
ENDIF
|
||||
RET
|
||||
|
||||
|
||||
@@ -1155,14 +1186,54 @@ WBY1: RLCA
|
||||
|
||||
|
||||
|
||||
;---------------------------------------------------------------------------------------------------------------------
|
||||
;---------------------------------------------------------------------------------------------------------------------
|
||||
; The FDC controller uses it's busy/wait signal as a ROM address line input, this
|
||||
; causes a jump in the code dependent on the signal status. It gets around the 2MHz Z80 not being quick
|
||||
; enough to process the signal by polling.
|
||||
ALIGN_NOPS FDCJMP2
|
||||
ORG FDCJMP2
|
||||
FDCJMPH3: JP (IY)
|
||||
;---------------------------------------------------------------------------------------------------------------------
|
||||
;---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; START OF ADDITIONAL TZFS COMMAND METHODS
|
||||
;-------------------------------------------------------------------------------
|
||||
|
||||
; Cmd tool to Fill memory.
|
||||
; Read cmd line the start address, end address and byte to initialise with, if one not present, use 00H
|
||||
;
|
||||
FILL: CALL READ4HEX
|
||||
JR C,FILLERR
|
||||
PUSH HL
|
||||
CALL READ4HEX
|
||||
JR C,FILLERR
|
||||
LD (TMPADR),DE
|
||||
POP DE ; DE = Start addr
|
||||
OR A
|
||||
SBC HL,DE ; HL - DE = Count
|
||||
PUSH HL
|
||||
POP BC ; Count of bytes to fill
|
||||
JR C,FILLERR ; Overflow, End > Start
|
||||
JR Z,FILLERR ; Nothing to do, Start = End
|
||||
PUSH DE
|
||||
LD DE,(TMPADR)
|
||||
CALL _2HEX ; Get optional byte to use for fill, default to 00H
|
||||
JR NC,FILL1
|
||||
LD A,000H
|
||||
FILL1: POP HL
|
||||
LD (HL),A
|
||||
PUSH HL
|
||||
POP DE
|
||||
INC DE
|
||||
LDIR ; Copy (HL) -> (DE) filling memory with same byte.
|
||||
RET
|
||||
FILLERR: LD DE,MSGNOPARAM
|
||||
CALL ?PRINTMSG
|
||||
RET
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; END OF ADDITIONAL TZFS COMMAND METHODS
|
||||
;-------------------------------------------------------------------------------
|
||||
|
||||
; Ensure we fill the entire 4K by padding with FF's.
|
||||
;
|
||||
|
||||
1668
asm/tzfs_bank4.asm
1668
asm/tzfs_bank4.asm
File diff suppressed because it is too large
Load Diff
BIN
roms/mz80afi.rom
vendored
BIN
roms/mz80afi.rom
vendored
Binary file not shown.
BIN
roms/tzfs.rom
vendored
BIN
roms/tzfs.rom
vendored
Binary file not shown.
@@ -39,7 +39,7 @@ INCDIR=${ROOTDIR}/asm/include
|
||||
ROMDIR=${ROOTDIR}/roms # Compiled or source ROM files.
|
||||
HDRDIR=${ROOTDIR}/hdr # MZF headers directory.
|
||||
MZFDIR=${ROOTDIR}/MZF/Common # MZF Format source files.
|
||||
CPMVERSIONS="mz700_80c:0 mz80a_80c:1 mz80a_std:2"
|
||||
CPMVERSIONS="mz700_80c:0 mz80a_80c:1 mz80a_40c:2"
|
||||
|
||||
# As the tranZPUter project has eveolved different variants of CP/M are needed, so this loop along with the CPMVERSIONS string builds the versions as needed.
|
||||
for ver in ${CPMVERSIONS}
|
||||
|
||||
Reference in New Issue
Block a user