![]() PC Tape interface
( written by Andreas Jung / Germany,
hardware is made by www.sharpmz.org / Germany ) |
|||||||||||||||||||||||||||||
Overview | |||||||||||||||||||||||||||||
The interface desribed here can also be used to transfer data directly
from / to an MZ. |
|||||||||||||||||||||||||||||
Hardware | |||||||||||||||||||||||||||||
Connecting a data recorder | |||||||||||||||||||||||||||||
Use an external power supply ( 5V / min. 0.3A ) and connect it to the pins 9 ( GND ) and 6 ( +5V ) at the MZ-1T01 / MZ-1T04 site. The power supply is needed to supply your data recorder because the LPT port cannot do this. Please wait for the pin description of MZ-80K / 80A / 80B or try yourself ( see the Download sections of Service Manuals ).
|
|||||||||||||||||||||||||||||
Directly connecting an MZ | |||||||||||||||||||||||||||||
If you want to transfer a program from the PC to the MZ: If you want to transfer a program from the MZ to the PC: |
|||||||||||||||||||||||||||||
Software | |||||||||||||||||||||||||||||
Installing the software | |||||||||||||||||||||||||||||
Unzip the file into the their given directories and put the name of the directory \mztape into the PATH definition statement ( autoexec.bat ). Start DOS. Don't run the programs in a non-DOS environment ( e.g. Win95 ). It may be that interrupts can occur which will result into incorrect data during saving / loading a file. There are three subdirectories of \mztape. One is for the MZ-700 ( and for the MZ-80K / 80A ), the second is for the MZ-800, and the last one is for the MZ-80B. Use the appropriate directory to read or write files. All series do not use the same timings while reading / writing ( see below ).
If there are timing problems, try to change the read / write values for the cycles defined in the source code. Then reassemble the progam. I'm just working on a new MZLOAD version which will be more comfortable to use. May be, the MZSAVE will also be changed. Please note, the GAP written to an MZ-80B tape differs from all other MZs: The MZ-80B writes only 10,000 short pulses in front of the header, whereas all other MZs use 22,000 short pulses. The timer 8253 / 8254 is used to control all cycles. The clocking of the timer chip is 1.193046 MHz ( IBM PC 1.193180 MHz, but this little difference has no meaning ). The timings of the square wave are:
Thanks to the author for his programs described in the following sections. The author is Andreas Jung / Germany and the source code is documented but in german at this time only. The source code is included in the ZIP-file you have downloaded. The programs are almost written in x86-assembler.
MZ-700 - \MZ700 |
|||||||||||||||||||||||||||||
Loading data from tape | |||||||||||||||||||||||||||||
The program can be aborted by pressing the STOP button at your data recorder. The file will be created into the current / active directory shown in the DOS prompt after entering the load command and the type of the file created is a M12-formatted file at this time only. You can change and assemble the source of the program for your own purposes. You can rename it to .mzf without problems. .m12 and .mzf are compatible. The syntax to execute Mzload.com is: Mzload.com [options] [dosfilename] ["tapefilename"] Parameters shown in [paranthesis] are optional but you should read the sections about all parameters before using Mzload.com. If you code an invalid option the program returns a help text and stops processing. If the PLAY button at your data recorder is not active after invoking
the program you will be prompted to press this button. After pressing
this button the motor of your data recorder starts if your data recorder
supports the Motor/Remote control function. The motor stops automatically
when the file is loaded . This is supported by the remote control function
too. |
|||||||||||||||||||||||||||||
Options | |||||||||||||||||||||||||||||
If you use the original MZ-data recorder then you don't need the option -x. If you use other recorders try to read the tape using the option. If you can't read the tape by using this option try to read the tape without this option. Using the option -x works like the polarity switch in your MZ does. All bits read from tape will be inverted. Must be used for some types of data recorders, not for the original MZ-data recorders. If you use the option -s the first copy will be used if no errors occured during the read process otherwise the program tries to read and to use the 2nd copy like your MZ does. If you don't use this option both copies will be verified and you will be informed by a message if the copies are not equal. This means, it is more secure but it is time expensive too.
In the case of using the option -s and next saving a file you have
to forward the tape behind the whole file ( behind the 2nd copy ). To
this you should remember the counter value of the recorder's counter.
You would be very thankful to yourself some years later or ealier in
doing so ;-) |
|||||||||||||||||||||||||||||
DOSFILENAME | |||||||||||||||||||||||||||||
In both cases the suffix will be .M12. This means, the program can only create this type of files at this time ( for other file types like .bin, mz7, etc. change the program for your own purposes and don't forget to send me your version, thanks ;-). If the file dosfilename already exists the suffix will be .M13. If a file dosfilename.M13 already exists the suffix will be .M14, and so on, M15, .....M99, N00...Z99. This will take effect in both cases described above (even if the dosfilename is omitted). Special ( non-standard ) MZ-ASCII-characters found will be translated
or omitted ( e.g. non-alphanumeric characters ) if "tapefilename"
is omitted and if such characters were found in the tape header by the
program. Lowercase letters will be translated well. |
|||||||||||||||||||||||||||||
"tapefilename" | |||||||||||||||||||||||||||||
You must enclose the "tapefilename" in quotation marks
to enable the program to distinguish between the "tapefilename"
and the dosfilename. |
|||||||||||||||||||||||||||||
Error condition | |||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
Using the batch files and Motor.com | |||||||||||||||||||||||||||||
The batch files Mzload.bat and Mzsave.bat both use the program Motor.com prior to the execution of Mzload.com / Mzsave.com and at the end of their execution again. This enables you to forward or rewind the tape until you press the ESC key. If you press the ESC key Motor.com terminates. Mzload.bat will be terminated if any error occurs or if the STOP button at the data recorder was pushed. Motor.com checks the status of the buttons at your data recorder by
using the signal sense. If sense signals a key is pressed then the motor
will be started by Motor.com otherwise it will be stopped. This program
is written in PASCAL. |
|||||||||||||||||||||||||||||
Saving data to tape | |||||||||||||||||||||||||||||
The program can be aborted by pressing the STOP button at your data recorder. The syntax of Mzsave.com is: Mzsave.com [options] dosfilename ["tapefilename"] Parameters shown in [paranthesis] are optional but you should read
the sections about all parameters before using Mzsave.com. If you omit
all parameters you get displayed a help text. |
|||||||||||||||||||||||||||||
Options | |||||||||||||||||||||||||||||
If you use the original MZ-data recorder you don't need the option -x. If you use other recorders try to write to the tape using the option. If you can't read the tape try to omit this option and / or define or omit -x in the options of Mzload.com. All bits written to tape will be inverted. Must be used for some types of data recorders. If you use the option -s a single copy only will be written to tape. MZ's always writes two copies to tape.
|
|||||||||||||||||||||||||||||
DOSFILENAME | |||||||||||||||||||||||||||||
You cannot use *.M12 to save multiple files. |
|||||||||||||||||||||||||||||
"tapefilename" | |||||||||||||||||||||||||||||
If you define "tapefilename" you must enclose it in quotation marks to enable the program to distinguish between the "tapefilename" and the dosfilename. Special ( non-MZ-ASCII) ASCII-characters found will be translated or
omitted ( e.g. non-alphanumeric characters ) if "tapefilename"
is omitted and if such characters were found by the program in the M12
header. Lowercase letters will be translated well. |
|||||||||||||||||||||||||||||
Error condition | |||||||||||||||||||||||||||||
|