Level2 IO - jedimatt42/tipi GitHub Wiki

Level 2 Subroutines

TIPI generally uses the same level 2 subroutine names as the TI floppy controller.

0x10 through 0x1A, except 0x11 (format)

TIPI does not support >10 (sector read/write) or >11 (format) as TIPI does not require 'disk copying' or formatting.

It is true that reading the directory by sector IO is faster than the TI CATALOG file method, but this is a none-standard approach that is error prone when introducing hardware with less limitations.

TIPI supports the directory management patterns established by Myarc.

Unit numbers:

Level 2 IO refers to files by the single digit unit number, and the 10 character filename. Long filenames will have to use the TIPI provided shortened form.

Device Unit #
TIPI 0
DSK0 0
DSK1 1
DSK2 2
DSK3 3
DSK4 4

Note, TIPI, and DSK0 both point to the same part of the TIPI filesystem, although current directory path settings are maintained for each unit number.

Supported routines

  • >10 - sector read/write
  • >12 - set file protection state
  • >13 - file rename
  • >14 - direct block input
  • >15 - direct block output
  • >16 - If crubase is >1100 (same as floppy controller) then manipulate the VDP stack floppy controller buffers.
  • >17 - set directory path
  • >18 - create directory
  • >19 - delete directory
  • >1A - rename directory

Sector READ/WRITE Limitations

Added in July of 2022. Requires July 2022 update of TIPI DSR ROM.

Sector READ/WRITE is only supported for mapped drives, and therefore unit numbers 1-4. Unit 0 is excluded.

If a disk image file is uploaded to the TIPI with the filename extension of .dsk or .DSK then TIPI will capture the sector dump and store it along with the FIADs that were extracted in a .sectors file. If sector IO is executed against a drive mapping that has a .sectors file then read and writes go to this file.

If there is no .sectors file, then a cache file is created on the fly for that directory. It will be a 360K floppy image given the volume name of the directory, and will include all the files represented by the FIADs in the directory. This file is transient. It is in the /tmp folder which is a ramdisk on the linux host OS, and will be lost when the PI is rebooted or powered off. Subdirectories within the mapped directory are ignored when creating the cached sector dump.

Warning: Sector writes do not propagate to corresponding FIADs in the directory. They only update the sector dump file.

Second Warning: Software that uses sector IO is more likely to be prone to assumptions about the DSR code, CRUBASE, or residual scratchpad or VDP memory state after the call.