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 1d73d7e..5b136f3 100644 Binary files a/software/roms/tzfs.rom and b/software/roms/tzfs.rom differ