From 27cb6fc79eda34a933b1a7a3cd927f2bcbd46d4d Mon Sep 17 00:00:00 2001 From: Philip Smart Date: Sat, 6 Mar 2021 01:11:50 +0000 Subject: [PATCH] Bug fix and addition of batch tape to sd command --- devices/sysbus/BRAM/TZSW_DualPortBootBRAM.vhd | 6 ++-- .../sysbus/BRAM/TZSW_SinglePortBootBRAM.vhd | 6 ++-- software/asm/include/TZFS_Definitions.asm | 32 +++++++++++++----- software/asm/tzfs.asm | 31 ++++++++++++----- software/asm/tzfs_bank2.asm | 20 +++++------ software/roms/tzfs.rom | Bin 18432 -> 18432 bytes 6 files changed, 62 insertions(+), 33 deletions(-) diff --git a/devices/sysbus/BRAM/TZSW_DualPortBootBRAM.vhd b/devices/sysbus/BRAM/TZSW_DualPortBootBRAM.vhd index f1f4b5e..cf59119 100644 --- a/devices/sysbus/BRAM/TZSW_DualPortBootBRAM.vhd +++ b/devices/sysbus/BRAM/TZSW_DualPortBootBRAM.vhd @@ -51403,7 +51403,7 @@ architecture arch of DualPortBootBRAM is 14920 => x"4f", 14921 => x"2a", 14922 => x"20", - 14923 => x"34", + 14923 => x"36", 14924 => x"2f", 14925 => x"31", 14926 => x"31", @@ -69610,10 +69610,10 @@ architecture arch of DualPortBootBRAM is 14921 => x"2a", 14922 => x"73", 14923 => x"30", - 14924 => x"32", + 14924 => x"33", 14925 => x"32", 14926 => x"76", - 14927 => x"65", + 14927 => x"66", 14928 => x"20", 14929 => x"2c", 14930 => x"76", diff --git a/devices/sysbus/BRAM/TZSW_SinglePortBootBRAM.vhd b/devices/sysbus/BRAM/TZSW_SinglePortBootBRAM.vhd index 00f379e..2c1208e 100644 --- a/devices/sysbus/BRAM/TZSW_SinglePortBootBRAM.vhd +++ b/devices/sysbus/BRAM/TZSW_SinglePortBootBRAM.vhd @@ -51398,7 +51398,7 @@ architecture arch of SinglePortBootBRAM is 14920 => x"4f", 14921 => x"2a", 14922 => x"20", - 14923 => x"34", + 14923 => x"36", 14924 => x"2f", 14925 => x"31", 14926 => x"31", @@ -69605,10 +69605,10 @@ architecture arch of SinglePortBootBRAM is 14921 => x"2a", 14922 => x"73", 14923 => x"30", - 14924 => x"32", + 14924 => x"33", 14925 => x"32", 14926 => x"76", - 14927 => x"65", + 14927 => x"66", 14928 => x"20", 14929 => x"2c", 14930 => x"76", diff --git a/software/asm/include/TZFS_Definitions.asm b/software/asm/include/TZFS_Definitions.asm index 1399902..71fba8d 100644 --- a/software/asm/include/TZFS_Definitions.asm +++ b/software/asm/include/TZFS_Definitions.asm @@ -33,6 +33,8 @@ ;----------------------------------------------- ; 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. ;----------------------------------------------- ; Entry/compilation start points. @@ -130,12 +132,8 @@ BRKEY EQU 0001Eh MELDY EQU 00030h ?TMST EQU 00033h MONIT: EQU 00000h -SS: EQU 00089h -ST1: EQU 00095h HLHEX EQU 00410h _2HEX EQU 0041Fh -?MODE: EQU 0074DH -?KEY EQU 008CAh PRNT3 EQU 0096Ch ?ADCN EQU 00BB9h ?DACN EQU 00BCEh @@ -146,20 +144,36 @@ PRTHL: EQU 003BAh PRTHX: EQU 003C3h HEX: EQU 003F9h DPCT: EQU 00DDCh -DLY12: EQU 00DA7h -DLY12A: EQU 00DAAh ?RSTR1: EQU 00EE6h -MOTOR: EQU 006A3H CKSUM: EQU 0071AH GAP: EQU 0077AH -WTAPE: EQU 00485H MSTOP: EQU 00700H + ; ROM location differences between the MZ80A and MZ-700. + IF BUILD_MZ80A > 0 +SS: EQU 00089h +ST1: EQU 00095h +WTAPE: EQU 00485H +MOTOR: EQU 006A3H +?MODE: EQU 0074DH +?KEY EQU 008CAh +DLY12: EQU 00DA7h +DLY12A: EQU 00DAAh + ELSE +SS: EQU 000A2H +ST1: EQU 000ADH +WTAPE: EQU 0048AH +MOTOR: EQU 0069FH +?MODE: EQU 0073EH +?KEY EQU 009B3H +DLY12: EQU 00996H + ENDIF + ; Debugging ENADEBUG EQU 0 ; Enable debugging logic, 1 = enable, 0 = disable ;----------------------------------------------- -; Memory mapped ports in hardware. +; Memory mapped ports in hardware.1G ;----------------------------------------------- SCRN: EQU 0D000H ARAM: EQU 0D800H diff --git a/software/asm/tzfs.asm b/software/asm/tzfs.asm index 3b03d21..ca4b670 100644 --- a/software/asm/tzfs.asm +++ b/software/asm/tzfs.asm @@ -19,7 +19,8 @@ ;- 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 2020 - Additional changes to accommodate soft CPU's. +;- Jan 2021 - Additional changes to accommodate soft CPU's. +;- Mar 2021 - Bug fixes - MZ-700/MZ-80A address differences. ;- ;-------------------------------------------------------------------------------------------------------- ;- This source file is free software: you can redistribute it and-or modify @@ -367,6 +368,9 @@ CMDTABLE: DB 000H | 000H | 000H | 003H DB 000H | 000H | 000H | 004H DB "TEST" ; A test function used in debugging. DW LOCALTEST + DB 000H | 000H | 000H | 005H + DB "T2SDB" ; Copy Tape to SD Card in bulk mode. + DW TAPE2SDBULK DB 000H | 000H | 000H | 004H DB "T2SD" ; Copy Tape to SD Card. DW TAPE2SD @@ -906,8 +910,8 @@ LOADTAPE6: LD DE,MSGCMTDATA RET - ; SA1510 Routine to write a tape header. Copied into the RFS and modified to merge better - ; with the RFS interface. + ; SA1510 Routine to write a tape header. Copied into the TZFS and modified to merge better + ; with the TZFS interface. ; CMTWRI: DI PUSH DE @@ -923,6 +927,7 @@ CMTWRI: DI LD A,E CP 0CCH JR NZ,CMTWRI1 + ; PUSH HL PUSH DE PUSH BC @@ -932,6 +937,7 @@ CMTWRI: DI POP BC POP DE POP HL + ; CMTWRI1: CALL GAP CALL WTAPE CMTWRI2: POP HL @@ -1918,8 +1924,12 @@ CHGDIR3: LD (RESULT),A ; encountered program is loaded into memory at 0x1200. The CMT header is populated with the correct details (even if ; the load address isnt 0x1200, the CMT Header contains the correct value). ; A call is then made to write the application to the SD card. + ; If the bulk method is called, we continue in a never ending loop, converting tape after tape. ; -TAPE2SD: ; Load from tape into memory, filling the tape CMT header and loading data into location 0x1200. +TAPE2SDBULK:LD A, 1 ; Flag to indicate this is a bulk conversion. + JR TAPE2SD1 +TAPE2SD: XOR A ; Flag to indicate this is a single conversion. +TAPE2SD1: PUSH AF ; Load from tape into memory, filling the tape CMT header and loading data into location 0x1200. CALL LOADTAPECP ; Call the Loadtape command, non execute version to get the tape contents into memory. LD A,(RESULT) OR A @@ -1930,15 +1940,20 @@ TAPE2SD: ; Load from tape into memory, filling the tape CMT header and loadin OR A JR NZ,TAPE2SDERR LD DE,MSGT2SDOK - JR TAPE2SDERR2 + CALL ?PRINTMSG + POP AF + OR A + JR Z, TAPE2SDERR2 + JR TAPE2SD1 TAPE2SDERR: LD DE,MSGT2SDERR -TAPE2SDERR2:CALL ?PRINTMSG - RET + POP AF + CALL ?PRINTMSG +TAPE2SDERR2:RET ; Method to copy an SD stored application to a Cassette tape in the CMT. ; The directory entry number or filename is passed to the command and the entry is located within the SD ; directory structure. The file is then loaded into memory and the CMT header populated. A call is then made - ; to write out the data to tap. + ; to write out the data to tape. ; SD2TAPE: ; Load from SD, fill the CMT header then call CMT save. CALL LOADSDCP diff --git a/software/asm/tzfs_bank2.asm b/software/asm/tzfs_bank2.asm index 45e55aa..a14a629 100644 --- a/software/asm/tzfs_bank2.asm +++ b/software/asm/tzfs_bank2.asm @@ -411,18 +411,18 @@ HELP: ;CALL NL 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 "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 "BASIC - load BASIC SA-5510.", 00DH DB "C[b] - clear memory $1200-$D000.", 00DH - DB "CPM - Load CPM.", 00DH + DB "CPM - load CPM.", 00DH DB "DXXXX[YYYY] - dump mem XXXX to YYYY.", 00DH DB "EC[fn]- erase file, fn=No or Filename", 00DH - DB "EX - Exit TZFS, reset as original.", 00DH + DB "EX - exit TZFS, reset as original.", 00DH DB "F[x] - boot fd drive x.", 00DH DB "FREQ[n]-set CPU to nKHz, 0 for default.", 00DH DB "H - this help screen.", 00DH @@ -440,12 +440,12 @@ HELPSCR: ; "--------- 40 column width -------------" DB "SC[XXXXYYYYZZZZ] - save mem to card.", 00DH DB " XXXX=start,YYYY=end,ZZZZ=exec", 00DH DB "T - test timer.", 00DH - DB "T2SD - copy tape to sd card.", 00DH + DB "T2SD[B]- copy tape to sd card, B=Bulk", 00DH DB "T80 - switch to soft T80 CPU.", 00DH DB "V - verify tape save.", 00DH DB "VBORDER[n] - set vga border colour.", 00DH DB "VMODE[n] - set video mode.", 00DH - DB "VGA[n]- Set VGA mode.", 00DH + DB "VGA[n]- set VGA mode.", 00DH DB "Z80 - switch to original Z80 CPU.", 00DH DB "ZPU - switch to ZPU Evo CPU and zOS.", 00DH DB 000H diff --git a/software/roms/tzfs.rom b/software/roms/tzfs.rom index 1d73d7e3ce1441a5f2d4b2b4e5e1713b5e49b7af..5b136f3634a34bb5339ff87c29dd71995d86c8b5 100644 GIT binary patch delta 931 zcmX|YY{A^MU`|G0H2x?j99u1d4Q!Lv_=9TvXVobDBTR?R zQiw*>m|$LlhA9Xb6aN5)7tR!%K)d4zc~Ot)*fp< z!Lr9)+OJDBU}b#R(gRYc(6ZWbjtE{jh&azy%a42huu7YEn^pFE<*rmob%(PROgqY) zdQVplRdRAOeDN;rtO9{m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