Repository navigation
Using the TS Pico
The TS Pico uses extended versions of the TS 2068 LOAD and SAVE commands to perform its operations.
All TS Pico commands are prefixed with tpi:, to signal that a command will follow.
The TS Pico uses the LOAD command to perform the following operations:
- Load (“mount”) a TAP file
- Print the contents of the current working directory
- Print the contents of a mounted TAP file
- Print the path to the current working directory
The TS Pico uses the SAVE command for instructions that aren’t directly related to loading files:
- Changing the working directory
- Creating a new subdirectory
- Deleting a subdirectory
- Navigate through files in a TAP file
- Unmounting a TAP file
- Switch between physical tape and TS Pico
LOAD “tpi:filename.tap”
The first and most basic thing you can do with your TS Pico is to LOAD a TAP file.
This command instructs the TS Pico to “mount” the TAP file. It is the equivalent of inserting a cassette tape into your tape player.
To mount a TAP file, enter:
LOAD “tpi:filename.tap” and press Enter.
Replace filename.tap with the name of the TAP file to mount. Filenames are case-sensitive: frogger.tap and Frogger.tap are different files.
If the TS Pico finds the TAP file in the current working directory, it will load the file and report 0 OK, 0:1.
Once you’ve mounted the TAP file, you can load any file or program in the TAP file with the appropriate commands.
To load the first file in the TAP file, type:
LOAD “”
Your TS 2068 will load the first file within the TAP file and report the type and its filename, just as if it were loading from actual tape, only loads faster.
LOAD “tpi:dir”
Chances are good that you won’t remember all the TAP files on your SD card. That’s where the tpi:dir command comes in handy.
When you send the directory request to the TS Pico, it’ll scan the current working directory and report its contents back to you.
If there are more than 20 files in the directory, you’ll see a prompt at the bottom of the screen to "Press N to stop:".
If you press any other key, the directory will continue to scroll through the items until all have been displayed.
The directory listing starts by printing the current working directory, or Path.
Subsequent lines display an index number for the file, the file name and file size.
Subdirectories are enclosed in <>. In the example to the left, , , , and are subdirectories.
LOAD “tpi:path”
When you turn your TS 2068 on, the TS Pico will mount the /TAP folder on the SD card as the root, or base, folder.
Using the CD command, you can navigate to child directories.
While you can use DIR to see the current working directory and its files, there may be times when you only want to know what directory you are in. The PATH command will display just the current working directory.
LOAD “tpi:tapdir”
Once you’ve mounted a TAP file with LOAD “tpi:filename.tap”, you can use TAPDIR to see the files inside it.
It’s important to note that TAP files can contain a number of individual files, but the minimum is usually two. TAP files are organized in blocks.
Almost every TAP file contains two files per program or data file within it: the header and the file itself. This format duplicates how the TS 2068 actually stores files on cassette tape.
The header holds information about the program or data file, including the file name, if there is one. The header is usually 19 bytes long and has a type of 00.
The program or data file does not have a filename, so you’ll see “n/a” in the filename column. It will have a variable file length and the type will be FF.
Some programs used “headerless” files as a way of copy protection, so you may see a program or data file that does not have a header file listed before it.
TAPDIR will tell you which block the “pointer” is on in a message and with a > next to the block. The pointer is where the next LOAD command will start.
SAVE “tpi:cd path”
The TS Pico supports subdirectories on your SD card. We recommend using subdirectories to manage your TAP files, especially if you have a lot.
The CD command will tell the TS Pico to change to that directory.
The TS Pico will check if the directory exists before changing. It will ignore the command if the directory does not exist.
You can move “back up” to the parent directory with:
SAVE “tpi:cd ..”
You can only move up one directory level at a time. The TS Pico will not let you move above the root directory.
You can move to the root (top level) directory with:
SAVE “tpi:cd /”
SAVE “tpi:md directory”
The MD command will tell the TS Pico to create a subdirectory in the current working directory.
Directory names are limited to 10 characters.
The TS Pico will check if the directory already exists before creating a directory. It will ignore the command if the directory exists.
You can create a subdirectory with the same name as a TAP file without harm.
You can move “back up” to the parent directory with:
SAVE “tpi:cd ..”
You can only move up one directory level at a time. The TS Pico will not let you move above the root directory.
SAVE “tpi:rm directory”
The RM command will tell the TS Pico to remove a subdirectory in the current working directory.
The TS Pico will check if the directory already exists before creating a directory. It will ignore the command if the directory does not exist.
SAVE “tpi:ffw”
SAVE “tpi:rew”
Once you’ve mounted a TAP File, you can use the tpi:ffw and tpi:rew commands to move the LOAD pointer to different blocks in the TAP file.
In most cases, you’ll want to simply LOAD the contents of a TAP file. Sometimes, you may want to skip ahead an load a specific file.
You can do that either by specifying the name of the file within the TAP file or by moving the LOAD pointer to a specific block.
Keep in mind that your TS 2068 wants load a file starting with the header, so in most cases, you’ll want to FFW or REW to a header block (type 00; header blocks also show the file name).
SAVE “tpi:close”
You must close, or unmount, the TAP file before you mount another TAP file.
Also, if you’d like to remove the SD card from your TS Pico, you should first close any open TAP files.
Once you get the “ok” from the TS 2068, you can safely mount another TAP file or remove the SD card.
SAVE “tpi:tape”
Use this command to route SAVE/LOAD commands to the TS 2068’s cassette interface ports (EAR/MIC).
You can use this command to load a file from a physical tape into memory or save the current memory contents to tape.
SAVE “tpi:sdcard”
If you’ve switched to the physical tape interface, use this command to switch back to using the TS Pico.
You can use this command to save a program you’ve loaded from tape to the TS Pico or to save a program loaded from the TS Pico to tape.
TP_MODE, a variable at 26686 (683Eh), controls whether SAVE/LOAD/VERIFY/MERGE commands go to cassette or the TS Pico.
- SAVE “tpi:tape” sets TP_MODE to 0
- SAVE “tpi:sdcard” sets TP_MODE to 1
You can read this variable via PEEK and use it in your programs.