/* Web64 SDK header printout: web64/disk.h * Generated by scripts/copy-web64-ide-source.mjs. * The IDE resolves this header as a read-only virtual SDK document. */ #ifndef WEB64_DISK_H #define WEB64_DISK_H #include #define WEB64_DISK_OK 0x00 #define WEB64_DISK_STATUS_TIMEOUT_WRITE 0x01 #define WEB64_DISK_STATUS_TIMEOUT_READ 0x02 #define WEB64_DISK_STATUS_EOI 0x40 #define WEB64_DISK_STATUS_DEVICE_NOT_PRESENT 0x80 #define WEB64_DISK_REQUEST_MAGIC_ADDRESS 0x02fe #define WEB64_DISK_REQUEST_ID_ADDRESS 0x02ff #define WEB64_DISK_NAME(text) (text), ((uint8_t)(sizeof(text) - 1)) typedef uint8_t Web64DiskStatus; typedef struct Web64DiskDescriptor { uint8_t index; uint8_t unit; const char *marker_name; uint8_t marker_length; } Web64DiskDescriptor; typedef struct Web64DiskFileDescriptor { const char *name; uint8_t name_length; uint8_t type; } Web64DiskFileDescriptor; _web64_rt uint8_t web64_disk_load(const char *name, uint8_t length, uint8_t device, uint16_t address); _web64_rt uint8_t web64_disk_save(const char *name, uint8_t length, uint8_t device, uint16_t start_address, uint16_t end_address); _web64_rt uint8_t web64_disk_require(const char *marker_name, uint8_t marker_length, uint8_t device); _web64_rt void web64_disk_request(uint8_t disk_index); uint16_t web64_disk_last_end(void); /* Separate from READST and DOS channel 15; 0 or 0x0100 | KERNAL A. */ uint16_t web64_disk_last_error(void); _web64_rt uint8_t web64_file_open(const char *name, uint8_t length, uint8_t logical_file, uint8_t device, uint8_t secondary); _web64_rt uint8_t web64_file_close(uint8_t logical_file); _web64_rt uint8_t web64_file_read(uint8_t logical_file, void *destination); _web64_rt uint8_t web64_file_write(uint8_t logical_file, uint8_t value); #endif