### *T*ran*Z*puter *F*iling *S*ystem
The TranZputer Filing System is a port of the [Rom Filing System](/sharpmz-upgrades-rfs/) used on the RFS 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 it's virtual I/O processor prompted the seperation of this software out of the tranZPUter repository into a standalone module. TZFS runs on all the
tranZPUter range, include the newer tzpuFusionX and tzpuFusion devices.
The SD card and ROM's are managed by the K64F I/O processor. A service request API has been written where by 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.
Under RFS the software had to be split into many ROM pages and accessed via paging as necessary, the same is true for TZFS but the pages are larger and thus less pages are needed.
The following files form the TranZputer Filing System:
| Module | Target Location | Size | Bank | Description |
|-------------------------|-----------------|------|------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| tzfs.asm | 0xE800:0xFFFF | 6K | 0 | Primary TranZputer Filing System and MZ700/MZ800 Monitor tools. |
| tzfs_bank2.asm | 0xF000:0xFFFF | 4K | 1 | Message printing routines, static messages, ascii conversion and help screen. |
| tzfs_bank3.asm | 0xF000:0xFFFF | 4K | 2 | Unused. |
| tzfs_bank4.asm | 0xF000:0xFFFF | 4K | 3 | Unused. |
| monitor_SA1510.asm | 0x00000:0x01000 | 4K | 0 | Original SA1510 Monitor for 40 character display loaded into 64K Bank 0 of tranZPUter memory. |
| monitor_80c_SA1510.asm | 0x00000:0x01000 | 4K | 0 | Original SA1510 Monitor patched for 80 character display loaded upon demand into 64K Bank 0 of tranZPUter memory. |
| monitor_1Z-013A.asm | 0x00000:0x01000 | 4K | 0 | Original 1Z-013A Monitor for the Sharp MZ-700 patched to use the MZ-80A keybaord and attribute RAM colours. |
| monitor_80c_1Z-013A.asm | 0x00000:0x01000 | 4K | 0 | Original 1Z-013A Monitor for the Sharp MZ-700 patched to use the MZ-80A keybaord, attribute RAM colours and 80 column mode. |
| MZ80B_IPL.asm | 0x00000:0x01000 | 4K | 0 | Original Sharp MZ-80B IPL firmware to bootstrap MZ-80B programs. |
In addition there are several shell scripts to aid in the building of TZFS software, namely:
| Script | Description |
|------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| assemble_tzfs.sh | A bash script to build the TranZputer Filing System binary images. |
| assemble_roms.sh | A bash script to build all the standard MZ80A ROMS, such as the SA-1510 monitor ROM needed by TZFS. |
| flashmmcfg | A binary program to generate the decoding map file for the tranZPUter SW FlashRAM decoder. |
| glass-0.5.1.jar | A bug fixed version of Glass release 0.5. 0.5 refused to fill to 0xFFFF leaving 1 byte missing, hence the bug fix. |
### CP/M
CPM v2.23 has been ported to the tranZPUter from the RFS project and enhanced to utilise the full 64K memory available as opposed to 48K under RFS. The Custom BIOS makes use of the tranZPUter memory and saves valuable CP/M TPA space
by relocating logic into another memory bank.
The following files form the CBIOS and CP/M Operating System:
| Module | Target Location | Size | Bank | Description |
|------------------------|-----------------|------|------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| cbios.asm | 0xF000:0xFFFF | 4K | 0 | CPM CBIOS stubs, interrupt service routines (RTC, keyboard etc) and CP/M disk description tables, buffers etc. |
| cbiosII.asm | 0x0000:0xCFFF | 48K | 1 | CPM CBIOS, I/O Processor Service API, SD Card Controller functions, Floppy Disk Controller functions, Screen and ANSI Terminal functions, Utilities and Audio functions.|
| | 0xE800:0xEFFF | 2K | 1 | Additional space for CBIOSII, currently not used. |
| cpm22.asm | 0xDA00:0xEFFF | 5K | 0 | The CP/M operating system comprised of the CCP (Console Command Processor) and the BDOS (Basic Disk Operating System). These components can be overwritten by applications that dont need CPM services and are reloaded when an application terminates. |
| cpm22-bios.asm | | | 0 | The Custom Bios is self contained and this stub no longer contains code. |
Additionally there are several shell scripts to aid in the building of the CP/M software, namely:
| Script | Description |
|------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| assemble_cpm.sh | A shell script to build the CPM binary in the MZF format application for loading via TZFS. |
| make_cpmdisks.sh | A bash script to build a set of CPM disks, created as binary files for use on the FAT32 formatted SD Card. CPC Extended Disk Formats for use in a Floppy disk emulator or copying to physical medium are also created. |
| glass-0.5.1.jar | A bug fixed version of Glass release 0.5. 0.5 refused to fill to 0xFFFF leaving 1 byte missing, hence the bug fix. |
Please refer to the [CP/M](/sharpmz-upgrades-cpm/) section for more details,
--------------------------------------------------------------------------------------------------------
### 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.
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\. |
| 80A | n/a | Switch to Sharp MZ-80A 80 column BIOS and mode\. |
| 80B | n/a | Switch to Sharp MZ-80B compatible mode. |
| 700 | n/a | Switch to Sharp MZ-700 40 column BIOS and mode\. |
| 7008 | n/a | Switch to Sharp MZ-700 80 column BIOS and mode\. |
| B | n/a | Enable/Disable key entry beep\. |
| BASIC | n/a | Locates the first BASIC interpreter on the SD card, loads and runs it\. |
| C | \[\<8 bit value\>\] | Initialise memory from 0x1200 to Top of RAM with 0x00 or provided value\. |
| 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. |
| 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\.|
| 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<seperator>FileName, where <seperator> 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\. |
| 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 upto 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, dont 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. This reconfigures the host MZ-700 to emulate another MZ Series machine, ie. MZ-80B.
\ is an optional parameter and specifies the initial startup machine. Without this option the initial machine will be the MZ-80K and can be changed by the OSD menus. The OSD Menu is invoked by pressing SHIFT+BLANK and closed by pressing the same keys again.
Machine selection:
MZ80K, MZ80C, MZ1200, MZ80A, MZ700, MZ800, MZ80B, MZ2000.
| P | n/a | Run a test on connected printer\. |
| R | n/a | Run a memory test on main memory\. |
| 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. |
| T | n/a | Test the 8253 timer\. |
| 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 | \