Spectrum File Tools =================== J.G.Harston - jgh@mdfs.net http//mdfs.net/Software/Spectrum/Tools The Spectrum file tools allow various different Spectrum emulator files to be built, examined and manipulated. They will run on any platform capable of running BBC BASIC, such as BBC, Master, DOS, Windows, Unix, etc. Pre-built Windows binaries are available. BINtoTAP BINtoMDR BINtoSnap TAPtoBIN TAPtoMDR TAPCat TAPDump MDRtoBIN MDRtoTAP MDRCat MDRDump ZXBasConv ZXConv ZXLink ZXSend DispScrn SnapToScrn SetSpec BINtoTAP, BINtoMDR ================== Build a tape file or microdrive image file from binary files. Syntax: BINtoTAP infile outfile [name [load [exec [type]]]] -s -e -a BINtoMDR infile outfile [name [load [exec [type]]]] -t title -e -a Parameters: infile - source file to add to the output file. If infile is a directory, then all files in the specified directory are added. If no infile is specified, then the user is prompted for files to add. outfile - destination tape or microdrive file to create. name - the Spectrum filename to use for the file in the output file. If no name is specified, then infile is used as the filename. If infile is a directory, then the names of the directory entries are used as the Spectrum filenames. load - Spectrum load address to use. If not specified, or adding all files in a directory, then any BBC/RISC OS load address is used. exec - Spectrum exec/extra address to use. If not specified, or adding all files in a directory, then any BBC/RISC OS exec address is used. type - Spectrum filetype to use. If not specified, then the filetype in any BBC/RISC OS load address is used, otherwise 3 is used (Code). -embed - sets the load/exec addresses from the last two words at the end of a binary file. This overrides any file address or any specified on the command line. The file added to the output file will be four bytes shorter than the source file, so omitting the load/exec addresses. The easiest way to specify the load/exec addresses in a assembly source file is to include the following line at the end of the assembly: DEFW LOAD,EXEC with LOAD and EXEC being labels set approriately. -add - appends to the output file, so multiple BINtoTAP or BINtoMDR commands can add multiple files to an output file. For instance, the follow sequence of commands will create the tape file 'samples' including in the 'mdump', 'medit' and 'mcat'. BINtoTAP samples mdump -e BINtoTAP samples medit -e -a BINtoTAP samples mcat -e -a -spec - creates a Speculator tape file. This differs from a standard tape file in that there are no checksum bytes after each block, and the block header length is two bytes less. -title - specifies the title to use for the microdrive image file. If no title is specified, then " " (ten spaces) is used. TAPtoMDR, MDRtoTAP ================== Copies the files in the specified source file into the specified destination file. Syntax: TAPtoMDR infile outfile -t title MDRtoTAP infile outfile -s Parameters: infile - source file to copy to the output file. outfile - destination tape file or microdrive file to create. title - specified the title to use for the microdrive image file. If no title is specified, then " " (ten spaces) is used. -spec - creates a Speculator tape file. This differs from a standard tape file in that there are no checksum bytes after each block, and the block header length is two bytes less. TAPtoBIN, MDRtoBIN ================== Extracts the files from the specified source file. Syntax: TAPtoBIN infile [dest] -v MDRtoBIN infile [dest] -d -v Parameters: infile - source file to extract files from. dest - destination directory to extract files to. If no dest is given then files are extracted to the current directory. -d - the microdrive title is used as the name of a directory that the extracted files are saved to. -v - verbose, will list file entries as they are extracted. BINtoSnap ========= Builds a snapshot from the specified input files. Syntax: BINtoSnap infile infile infile... outfile -snap type -add TAPCat, MDRCat, TAPDump, MDRDump ================================ List or dump out files in a tape file or microdrive image file. Syntax: TAPCat infile MDRCat infile TAPDump infile MDRDump infile ZXDisp ====== Displays a Spectrum screen from within a snapshot or memory dump file. Syntax: ZXDisp infile Parameters: infile - source file. Recognises Speculator and .SNA snapshots and SCREEN$ memory dumps of Spectrum screen memory. GrabScrn ======== Extracts a Spectrum screen dump from a snapshot file. Syntax: GrapScrn infile outfile SetSpec ======= Set file load/exec attributes from embedded addresses. Syntax: SetSpec infile ZXConv ====== Converts between various Spectrum files. Syntax: ZXConv -intype infile -outtype outfile [options] Parameters: -intype and -outtype can be: -b Basic -d Devpac -t Text Options: -n Output line numbers to text files. All the above conversion tools are being incorporated into ZXConv. ZXBasConv ========= Converts betweem Spectrum and BBC BASIC files. ZXSend ====== Sends a file from a BBC/Master to a Spectrum via serial port. Syntax: ZXSend filename On the Spectrum use LOAD *"b" before using *ZXSend file on the BBC. SerLink ======= Sets up a Break Intercept to connect the BBC's input to the serial port, letting the BBC be controlled from the other end of the serial link, for instance with BBCtoSPEC. Notes ===== Conversion between different snapshot files is possible with tools such as SPConv.