# TZFS **Website:** [engineers@work](https://eaw.app) | **Repository:** [git.eaw.app/eaw/TZFS](https://git.eaw.app/eaw/TZFS) --- ## Overview
The TranZputer Filing System is a port of the Rom Filing System used on the Rom Disk hardware upgrade board. It reuses much of the same software functionality and consequently provides the same services, the differences lie in the use of a different memory model. It's purpose is to provide methods to manipulate files stored on the SD card and provide an extended command line interface, the TZFS Monitor. The command set includes SD file manipulation and backup along with a number of commands found on the MZ700/800 computers.
The advent of the tranZPUter FusionX with its virtual I/O processor prompted the separation of this software out of the tranZPUter repository into a standalone module. TZFS runs on all the tranZPUter range, including the newer tranZPUterFusionX and tranZPUterFusion devices.
The SD card and ROM's are managed by the K64F I/O processor. A service request API has been written whereby a common shared memory block (640byte) is used in conjunction with a physical I/O request to pass commands and data between the Z80 and the K64F. ie. When the Z80 wants to read an SD file, it creates a request to open a file in the memory block, makes a physical I/O operation which the K64F detects via interrupt, it opens the file and passes the data back to the Z80 one sector at a time in the shared memory.
TZFS presents itself to the user as an enhanced version of the host monitor program (ie. SA-1510, 1Z-013A etc) with application storage and retrieval in both Flash RAM and SD card devices, with some updated applications such as SA-5510 being able to read/write to/from SD cards as required.
-------------------------------------------------------------------------------------------------------- ### TZFS Monitor
On power up of the Sharp MZ-700, a command line interface called the monitor is presented to the user to enable basic actions such as bootstrapping a tape or manual execution of preloaded software. The TZFS monitor is an extension to the basic monitor and once the tranZPUter SW card has been inserted into the Z80 socket on the mainboard, entering the following command at the monitor prompt '*' will start TZFS:
`` JE800 `` It is possible to automate the startup of the computer directly into TZFS. To do this create an empty file in the root directory of the SD card called: `` 'TZFSBOOT.FLG' ``
On startup of the K64F processor, it will boot zOS and then if zOS detects this file it will perform the necessary tasks to ensure TZFS is automatically started on the Sharp MZ-700.

In addition, if a file named `AUTOEXEC.BAT` exists in the root of the SD card, TZFS will execute the commands listed in it line by line after startup. This can be used to, for example, set a default CPU frequency or switch to a particular machine mode automatically.

Once TZFS has booted, the typical 1Z-013A monitor signon banner will appear and be appended with "+ TZFS" postfix if all works well. The usual '*' prompt appears and you can then issue any of the original 1Z-013A commands along with a set of enhanced commands, some of which were seen on the MZ80A/ MZ700/ MZ800 range and others are custom. The full set of commands are listed in the table below:

| Command | Parameters | Description | |--------- |-------------------------------------------------------------|------------------------------------------------------------------------------------| | 4 | n/a | Switch to 40 Character mode\. | | 8 | n/a | Switch to 80 Character mode\. | | 40A | n/a | Switch to Sharp MZ-80A 40 column BIOS and mode. Use the MZ80A emulation command instead. | | 80A | n/a | Switch to Sharp MZ-80A 80 column BIOS and mode. Use the MZ80A emulation command instead. | | 80B | n/a | Switch to Sharp MZ-80B compatible mode. | | 700 | n/a | Switch to Sharp MZ-700 40 column BIOS and mode. Use the MZ700 emulation command instead. | | 7008 | n/a | Switch to Sharp MZ-700 80 column BIOS and mode. Use the MZ700 emulation command instead. | | ASM | \ | Assemble Z80 Mnemonics into given memory address\. | | B | n/a | Enable/Disable key entry beep\. | | BASIC | n/a | Locates the first BASIC interpreter on the SD card, loads and runs it\. | | CD | \[\\] | Switch to given SD card directory \. If no directory given, reset to \MZF which is the default. After a directory change the DIR command may take a few seconds to output information as the I/O processor caches the directory contents. | | CP | \,\,\ | Copy memory locations start to end address into memory starting at destination address\. | | CPM | n/a | Locates CP/M 2.23 on the SD card, loads and runs it. | | D | \
\[\\] | Dump memory from \
to \ (or 20 lines) in hex and ascii. When a screen is full, the output is paused until a key is pressed\.

Subsequent 'D' commands without an address value continue on from last displayed address\.

Recognised keys during paging are:
'D' - page down, 'U' - page up, 'X' - exit, all other keys list another screen of data\.| | DASM | \,\ | Disassemble address locations Start to End into Z80 Mnemonics\. | | DIR | \ | Listing of the files stored on the SD Card\. Each file title is preceded with a hex number which can be used to identify the file\.
A wildcard pattern can be given to filter the results, ie. '\*BASIC\*' will list all files with BASIC in their name.
Output is in the form HH<separator>FileName, where <separator> identifies the type of file:
'.' = Machine code, '-' = BASIC MZ80K/C/A, '<-' = BASIC MZ-700/800, '+' = Other. | | EC | \ or
\ | Erase file from SD Card\. The SD Card is searched for a file with \ or \ and if found, erased\. | | EX | n/a | Exit from TZFS and return machine to original state, I/O processor will be disabled\. | | F | \[\\] | Boot from the given Floppy Disk, if no disk number is given, you will be prompted to enter one\. | | FILL | \,\,\ | Initialise memory from start address to end address with given value.\. | | FREQ | \ | Change the CPU frequency to the value given, 0 for default\. Any frequency is possible, the CPU is the limiting factor. On the installed 20MHz Z80 CPU frequencies up to 24MHz have been verified\. | | H | n/a | Help screen of all these commands\. | | J | \
| Jump \(start execution\) at location \
\. | | L \| LT | [,\] | Load file into memory from Tape and execute\.

\ specifies the machine cassette system to be used for the command, ie. MZ-80B uses 1800 baud data rate and selecting this machine will read MZ-80B/MZ-2000 cassettes.

Hardware option flags:
K - MZ-80K, C - MZ-80C. 1 = MZ-1200, A - MZ-80A,
7 - MZ-700, 8 - MZ-800, B - MZ-80B, 2 - MZ-2000 | | LTNX | [,\] | Load file into memory from Tape, don't execute\.
\ is described in LT above. | | LC | \ or
\[,\] | Load file into memory from SD Card\. The SD Card is searched for a file with \ or \ and if found, loaded and executed\.
Option argument \ allows setting the target under which the loaded software should run. This argument is intended for machines such as the MZ-800 where the default is to execute as an MZ-800 but specifying this flag you can force the MZ-700 compatibility mode. The flag is also used to target and run software into the original machine memory. Current flags:
8 - Force MZ-800 mode on an MZ-800 host.
7 - Force MZ-700 mode on an MZ-800 host.
O - Load into the host memory and run as original. | | LCNX | \ or
\[,\] | Load file into memory from SD Card\. The SD Card is searched for a file with \ or \ and if found, loaded and not executed\.
\ as per LC above.| | M | \
| Edit and change memory locations starting at \
\. | | MZ | [\] | Start the Sharp MZ Series hardware emulator, defaulting to MZ-80A mode. This reconfigures the host MZ-700 to emulate another MZ Series machine.

The OSD Menu is invoked by pressing SHIFT+BLANK and closed by pressing the same keys again. The machine can also be selected directly by issuing its name as a standalone command (see MZ80K … MZ2500 below). | | MZ80K | n/a | Switch to Sharp MZ-80K hardware emulation mode. *(tranZPUter SW only)* | | MZ80C | n/a | Switch to Sharp MZ-80C hardware emulation mode. *(tranZPUter SW only)* | | MZ1200 | n/a | Switch to Sharp MZ-1200 hardware emulation mode. *(tranZPUter SW only)* | | MZ80A | n/a | Switch to Sharp MZ-80A hardware emulation mode. *(tranZPUter SW only)* | | MZ700 | n/a | Switch to Sharp MZ-700 hardware emulation mode. *(tranZPUter SW only)* | | MZ1500 | n/a | Switch to Sharp MZ-1500 hardware emulation mode. *(tranZPUter SW only)* | | MZ800 | n/a | Switch to Sharp MZ-800 hardware emulation mode. *(tranZPUter SW only)* | | MZ80B | n/a | Switch to Sharp MZ-80B hardware emulation mode. *(tranZPUter SW only)* | | MZ2000 | n/a | Switch to Sharp MZ-2000 hardware emulation mode. *(tranZPUter SW only)* | | MZ2200 | n/a | Switch to Sharp MZ-2200 hardware emulation mode. *(tranZPUter SW only)* | | MZ2500 | n/a | Switch to Sharp MZ-2500 hardware emulation mode. *(tranZPUter SW only)* | | P | n/a | Run a test on connected printer\. | | R | n/a | Run a memory test on main memory\. | | RIO | \ | Read I/O address (8 or 16bit) and print value read\. | | S | \ \ \[,\] | Save a block of memory to tape\. You will be prompted to enter the filename\.

Ie\. S120020001203 - Save starting at 0x1200 up until 0x2000 and set execution address to 0x1203\.

\ is described in LT above. | | SC | \ \ \[,\] | Save a block of memory to the SD Card as an MZF file\. You will be prompted to enter the filename which will be used as the name the file is created under on the SD card\.

\ is described in LT above. | | SD2T | \ or
\[,\] | Copy a file from SD Card to Tape\. The SD Card is searched for a file with \ or \ and if found, copied to a tape in the CMT\.

\ is described in LT above. | | ST | \ \ \[,\] | Save a block of memory to Tape as an MZF file\. You will be prompted to enter the filename which will be used as the name the file is saved under on the tape\.

\ is described in LT above. | | T | n/a | Test the 8253 timer\. | | TC | [-]\ | Setup a tape delay compensation value for tapes which are stretched or machines with worn drive belts. This compensation value is added or subtracted from the tape delay parameter and has the range +/-0..127\. | | T2SD[B] | [,\] | Copy a file from Tape onto the SD Card. A program is loaded from Tape and written to a free position in the SD Card. Adding B onto the end of the command invokes Batch mode where the command enters a loop converting all programs on 1 or more cassettes, only stops if BREAK key is pressed or an error occurs\.

\ is described in LT above. | | T80 | n/a | Switch to the soft T80 CPU disabling the hard Z80. | | V | n/a | Verify a file just written to tape with the original data stored in memory | | VBORDER | \ | Set a VGA border colour.
0 = Black
1 = Green
2 = Blue
3 = Cyan
4 = Red
5 = Yellow
6 = Magenta
7 = White.\. | | VMODE | \