| Header | {z88dk}/include/zxinterface1.h |
|---|---|
| Source | {z88dk}/libsrc/spectrum |
| Include | #include <zxinterface1.h> |
| Linking | n/a |
| Compile | n/a |
| Comments |
This library permits low-level operations on the Interface 1 and Microdrives.
Some of these functions are used by the fcntl driver performing the direct control of the ZX Microdrives (zxmdv.lib). Such driver requires the “malloc” library too.
This group of functions mainly work by calling directly the ROM routines to overcome some limitations and bugs.
The buffers aren’t stored before the BASIC program area anymore and the number of files being opened at once is limited by the tape and memory space only.
The sectors can be identified both as a unique block in the whole tape and as a specific record in a file. They can be loaded, created or modified an then saved on the same or on a different sector.
Load a sector identified by file name and record number. An M_CHAN buffer structure pointing to a valid memory space must be passed.
Load a sector identified by the sector number An M_CHAN buffer structure pointing to a valid memory space must be passed.
Write the sector present in “buffer” An M_CHAN buffer structure pointing to a valid memory space and initialized with the proper values must be passed.
Add a record containing additional data in “buffer” An M_CHAN buffer structure pointing to a valid memory space and initialized with the proper values must be passed.
Put a 10 characters file name at the specified location; return with the file name length
Pick the file name at the given location and convert it into the C standard string format.
Delete a file
Create a file if it doesn’t exist
Create a file and return a file handle. An M_CHAN buffer structure pointing to a valid memory space must be passed.
Load the map values for the specified drive
Find a free sector
Find a free sector in the specified map
Returns true if the current program has been loaded from microdrive
Returns true if the system variables are already present
Returns true if the Interface 1 is present