-
Notifications
You must be signed in to change notification settings - Fork 78
MS‐DOS BIOS Specification
Still in progress. Please help if you can to optimize and improve. Keep notes.
| Register | Value |
|---|---|
| AH | 0xFF |
| Register | Value |
|---|---|
| AH | 0xFE |
| ES:BX | Destination Segment (ES) and Offset (BX) for SSID Data |
The target buffer will be filled with 97 bytes of data:
| Offset | Length | Value |
|---|---|---|
| 0 | 33 | NULL terminated string containing WiFi SSID |
| 34 | 64 | NULL terminated string containing PSK |
| Register | Value |
|---|---|
| AH | 0xFD |
The number of found networks will be returned in AL.
| Register | Value |
|---|---|
| AH | 0xFC |
| AL | An Index equal or less than # of networks returned by 0xFD |
| ES:BX | Destination Segment (ES) and Offset (BX) for SSID Result |
The target buffer will contain 34 bytes of data:
| Offset | Length | Value |
|---|---|---|
| 0 | 33 | SSID as NULL terminated string |
| 34 | 1 | RSSI strength (dBm from negative to zero) |
| Register | Value |
|---|---|
| AH | 0xFB |
| ES:BX | Pointer to SSID Information |
| CL | 1 = Ask FujiNet to save SSID, 0 = Do not save |
The source buffer should contain the following data at ES:BX:
| Offset | Length | Value |
|---|---|---|
| 0 | 33 | NULL terminated string containing WiFi SSID |
| 34 | 64 | NULL terminated string containing PSK |
| Register | Value |
|---|---|
| AH | 0xFA |
The following WIFI status values are returned in AL:
| Value | Description |
|---|---|
| 0 | WIFI is idle. |
| 1 | No SSID available. |
| 2 | Scan completed. |
| 3 | Connected to SSID and active. |
| 4 | Most recent connect failed. |
| 5 | WiFi Connection Lost |
| 6 | WiFi Explicitly Disconnected |
| Register | Value |
|---|---|
| AH | 0xF9 |
| AL | Host slot # to mount |
| Register | Value |
|---|---|
| AH | 0xF8 |
| CL | Device Slot # to mount |
| CH | Mode $01 = Read, $02 = Write |
NOTE: The device slots should be populated using both the WRITE DEVICE SLOTS and SET FILENAME FOR DEVICE SLOT commands, before using this command.
| Register | Value |
|---|---|
| AH | 0xF7 |
| AL | Host slot to perform open directory on. |
| ES:BX | Pointer to 256 byte NULL terminated string containing desired directory path. |
| Register | Value |
|---|---|
| AH | 0xF6 |
| AL | Desired Length of returned directory entry. |
| ES:BX | Pointer to destination for directory entry. Reserved space must be equal or greater than AL |
| CL | If bit 7 (0x80 is set), additional file details are returned, add 9 bytes to AL. |
-
If bit 7 is not set, the next file name is returned.
-
If bit 7 is set, additional file info is appended to the entry in the following format:
| Byte | Item | Description |
|---|---|---|
| 0x00 | MODIFIED_YEAR | File modified date-time, years since 1970 |
| 0x01 | MODIFIED_MONTH | File modified date-time, month (1-12) |
| 0x02 | MODIFIED_DAY | File modified date-time, day (1-31) |
| 0x03 | MODIFIED_HOUR | File modified date-time, hour (0-23) |
| 0x04 | MODIFIED_MINUTE | File modified date-time, minute (0-59) |
| 0x05 | MODIFIED_SECONDS | File modified date-time, seconds (0-59) |
| 0x06 | FILE_SIZE_LO | File size, lo byte |
| 0x07 | FILE_SIZE_HI | File size, hi byte |
| 0x08 | FILE_FLAGS | One or more file flags (see below) |
| 0x09 | FILE_TYPE | One of the file types (see below) |
File Flags
| Flag | Value | Description |
|---|---|---|
| FF_DIR | 0x01 | Entry is directory. |
| FF_TRUNC | 0x02 | Entry was truncated to fit requested AL size. |
File Types
| Type | Value | Description |
|---|---|---|
| FT_UNKNOWN | 0x00 | File type could not be determined |
| FT_ATR | 0x01 | ATR disk image format |
| FT_ATX | 0x02 | ATX disk image format |
| FT_XEX | 0x03 | XEX disk image format |
TODO: Add more disk types, we never added more, oops.
| Register | Value |
|---|---|
| AH | 0xF5 |
| AL | Host slot to close (0-7) |
| Register | Value |
|---|---|
| AH | 0xF4 |
| ES:BX | Pointer to a 256 byte buffer to hold all 8 hosts, 32 characters per host. |
| Register | Value |
|---|---|
| AH | 0xF3 |
| ES:BX | Pointer to a 256 byte buffer to holding all 8 hosts, 32 characters per host |
| Register | Value |
|---|---|
| AH | 0xF2 |
| ES:BX | Pointer to 304 byte buffer in the format below |
The 304 byte buffer, is an array of 8 device slots, with the following format:
| Offset | Size | Description |
|---|---|---|
| 0 | 1 | Host slot (0-7) |
| 1 | 1 | Mode (0 = Read Only, 1 = write) |
| 2 | 36 | Displayed filename |
| Register | Value |
|---|---|
| AH | 0xF1 |
| ES:BX | Pointer to 304 byte buffer in the format below |
The 304 byte buffer, is an array of 8 device slots, with the following format:
| Offset | Size | Description |
|---|---|---|
| 0 | 1 | Host slot (0-7) |
| 1 | 1 | Mode (0 = Read Only, 1 = write) |
| 2 | 36 | Displayed filename |
| Register | Value |
|---|---|
| AH | 0xF0 |
| ES:BX | Pointer to 64 byte NULL terminated string containing host name. |
| CX | UDP Port number (0-65535) |
| Register | Value |
|---|---|
| AH | 0xEA |
Return value in AL, 0 = Disabled, 1 = Enabled.
| Register | Value |
|---|---|
| AH | 0xE9 |
| AL | Device slot to unmount (0-7) |
| Register | Value |
|---|---|
| AH | 0xE8 |
| ES:BX | Pointer to 140 byte data structure to hold the AdapterConfig defined below |
AdapterConfig Structure:
| Offset | Size | Description |
|---|---|---|
| 0 | 33 | The current SSID |
| 34 | 64 | The current host name |
| 97 | 4 | Local IPv4 Address |
| 101 | 4 | Gateway IPv4 Address |
| 105 | 4 | IPv4 Network Mask |
| 109 | 4 | DNS IPv4 Address |
| 113 | 6 | MAC address |
| 119 | 6 | BSSID |
| 125 | 15 | Fujinet version as NULL terminated string |
| Register | Value |
|---|---|
| AH | 0xE7 |
| ES:BX | Pointer to 262 byte buffer specified below: |
The new disk buffer is in the following format:
| Offset | Size | Description |
|---|---|---|
| 0 | 2 | Number of sectors (0-65535) |
| 2 | 2 | Sector size (512) |
| 4 | 1 | Host Slot (0-7) |
| 5 | 1 | Device slot (0-7) |
| 6 | 256 | NULL terminated string containing full path to filename on host |
TODO: change size of number of sectors to 4 bytes.
| Register | Value |
|---|---|
| AH | 0xE6 |
| AL | Host Slot (0-7) |
| Register | Value |
|---|---|
| AH | 0xE5 |
The directory position (0-65535) is returned in AX.
| Register | Value |
|---|---|
| AH | 0xE4 |
| CX | Desired directory position (0-65535) |
| Register | Value |
|---|---|
| AH | 0xE3 |
| AL | High speed SIO index |
| Register | Value |
|---|---|
| AH | 0xE2 |
| AL | Desired Device Slot (0-7) |
| ES:BX | Pointer to NULL terminated 256 byte string containing full path. |
| CL | The desired host slot (0-7) |
| CH | Bits 0-3 specify mode (0=read, 1=write), Bits 4-7 specify host slot (0-7) |
| Register | Value |
|---|---|
| AH | 0xE1 |
| AL | Host slot (0-7) |
| ES:BX | Pointer to NULL terminated 256 byte string containing the new host prefix. |
| Register | Value |
|---|---|
| AH | 0xE1 |
| AL | Host slot (0-7) |
| ES:BX | Pointer to NULL terminated 256 byte string to contain current host prefix |
| Register | Value |
|---|---|
| AH | 0xDF |
| CX | 16-bit value, LSB, rate in kHz |
| Register | Value |
|---|---|
| AH | 0xDE |
| ES:BX | Pointer to buffer to write to FujiNet's App Key storage. Assumed to be CX bytes |
| CX | Length of data to store. |
| Register | Value |
|---|---|
| AH | 0xDD |
| ES:BX | Pointer to buffer in which to store the AppKey received from FujiNet app key storage. First two bytes are length |
| Register | Value |
|---|---|
| AH | 0xDC |
| AL | open Mode (0=read, 1=write) |
| BL | Key ID |
| BH | App ID |
| CX | Creator ID |
The app key registry is here: https://github.com/FujiNetWIFI/fujinet-firmware/wiki/SIO-Command-$DC-Open-App-Key
| Register | Value |
|---|---|
| AH | 0xDB |
| Register | Value |
|---|---|
| AH | 0xDA |
| AL | Device Slot (0-7) |
| ES:BX | Pointer to 256 byte area to hold path. |
| Register | Value |
|---|---|
| AH | 0xD9 |
| AL | 1 = Enable, 0 = Disable |
| Register | Value |
|---|---|
| AH | 0xD8 |
| ES:BX | Pointer to 256 byte NULL terminated string containing copy specification |
| CL | Source host slot (0-7) |
| CH | Destination host slot (0-7) |
The copy specification is a source path, and destination path seperated by the | character, e.g.
/sourcefolder/sourcefile.img|/destfolder/destfile.img
| Register | Value |
|---|---|
| AH | 0xD7 |
| Register | Value |
|---|---|
| AH | 0xD6 |
| AL | Boot mode, see below. |
Boot Mode:
| Mode | Description |
|---|---|
| 0 | Boot into CONFIG |
| 1 | Boot into mount-and-boot |
| 2 | Boot into Game Lobby |
| Register | Value |
|---|---|
| AH | 0xD5 |
| AL | Device ID |
| Register | Value |
|---|---|
| AH | 0xD4 |
| AL | Device ID |
| Register | Value |
|---|---|
| AH | 0xD3 |
TODO: Implement in firmware
Random integer is returned in AX (0-65535)
| Register | Value |
|---|---|
| AH | 0xD2 |
TODO: Implement in firmware
| Register | Value |
|---|---|
| AH | 0xD1 |
TODO: Implement in Firmware
| Register | Value |
|---|---|
| AH | 0xD0 |
| ES:BX | Pointer to buffer of data to feed into base64 generator. |
| CX | Length of buffer (0-65535) |
| Register | Value |
|---|---|
| AH | 0xCF |
| Register | Value |
|---|---|
| AH | 0xCE |
Total length of computed BASE64 data is returned in BX = High 16 bits, AX = Low 16 bits.
| Register | Value |
|---|---|
| AH | 0xCD |
| ES:BX | Pointer to destination buffer for BASE64 output. |
| Register | Value |
|---|---|
| AH | 0xCC |
| ES:BX | Pointer to buffer of data to feed into base64 generator. |
| CX | Length of buffer (0-65535) |
| Register | Value |
|---|---|
| AH | 0xCB |
| Register | Value |
|---|---|
| AH | 0xCA |
Total length of decoded BASE64 data is returned in BX = High 16 bits, AX = Low 16 bits.
| Register | Value |
|---|---|
| AH | 0xC9 |
| ES:BX | Pointer to destination buffer for binary output |
| Register | Value |
|---|---|
| AH | 0xC8 |
| ES:BX | Pointer to source buffer for hash input |
| CX | Length in bytes (0-65535 |
| Register | Value |
|---|---|
| AH | 0xC7 |
| AL | Hash type, see below. |
| Hash Type | Description |
|---|---|
| 0 | MD5 |
| 1 | SHA1 |
| 2 | SHA256 |
| 3 | SHA512 |
| Register | Value |
|---|---|
| AH | 0xC6 |
| AL | Type of data to retrieve: 0 = binary, 1 = HEX |
Total length of resulting hash is returned in AL
| Register | Value |
|---|---|
| AH | 0xC5 |
| AL | Type of data to retrieve: 0 = binary, 1 = HEX |
| ES:BX | Pointer to destination buffer for hash output. |
| Register | Value |
|---|---|
| AH | 0x00 |
Returns far pointer to the address of the error byte in ES:BX
Copyright 2024 Contributors to the FujiNetWIFI project.
Join us on Discord: https://discord.gg/7MfFTvD
- Home
- What is FujiNet?
- The Definition of Done
- Board bring up for FujiNet Platform.IO code
- The Complete Linux CLI Guide
- The Complete macOS CLI Guide
- Development Env for Apps
- FujiNet-Development-Guidelines
- System Quickstarts
- FujiNet Flasher
- Setting up a TNFS Server
- FujiNet Configuration File: fnconfig.ini
- AppKey Registry - SIO Command $DC Open App Key
- CP-M Support
- BBS
- Official Hardware Versions
- Prototype Board Revisions
- FujiNet Development Guidelines
- Atari Programming
- Apple Programming
- C64 Programming
- ADAM Programming
- Testing Plan
- Hacker List
- FujiNet VirtualMachine