N: Device Filename Size Limitations - FujiNetWIFI/fujinet-firmware GitHub Wiki
CIO does not care about the size of a device specification; only that there is a buffer large enough to hold the device-spec, and that its length is properly passed to the CIOV call.
The various file management systems (FMS) present in different disk operating systems (DOS) are another matter, entirely. These differing FMSes impose their own unique limitations, and this discrepancy will become very important as a mapping scheme is implemented for file-level operations in the N: device.
DOS | Length |
---|---|
DOS 1.0 | 8.3 1 |
DOS 2.0 | 8.3 1 |
DOS 3.0 | 8.3 2 |
DOS 4.0 | 125 |
MyDOS | 256 |
SpartaDOS | 256 3 |
OS/A+ | 23 |
DOS XL | 23 |
XDOS | 45 |
- The DUP throws a FILENAME TOO LONG error if this limit is breached.
- A combination of explicit input length limiting and over-eager pre-pending of D1: before N: for any KCP operations make this DOS unsuitable for N: usage in the utility package. An external utility will be needed.
- For Disk-based SpartaDOS, an implementation of XIO 40 will need to be added so that binary files can be loaded. This is because the binary loader is implemented in the FMS itself, and not the command processor.
To test a particular DOS:
- Load DOS in Altirra
- Go into the file management portion of DOS
- Hit F8 to enable debugger.
- In the debugger window, type
.tracecio on
Debugger should answer with affirmative message. - Hit F8 to resume the emulation.
- Try any file operation, such as a BINARY LOAD, or a COPY, where you are offered to enter a filename.
- Look in the debugger window for a GET RECORD operation from E:, this is an opportunity to get input, and write down the length. This will tell you how long the line can be.
- Try various filenames, e.g.
N:ABCDEFGH.IJK
orN:ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
- The OS will return with an error 130. This is fine. Record the Filenames that come back in the debugger window in the corresponding OPEN call, and see how they match.
- If the filenames become corrupted after a certain length, try to find the point at which behavior changes, by trying filenames of different lengths.
- Once you have a definitive number, come back here and alter the table.