diff --git a/docs/README.md b/docs/README.md index 5b83b72..7e09b0a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# SC64 documentation table of contents +## SC64 documentation table of contents - [Memory map](./memory_map.md) - [Config options](./config_options.md) diff --git a/docs/n64_commands.md b/docs/n64_commands.md index b8c64d1..8c902e5 100644 --- a/docs/n64_commands.md +++ b/docs/n64_commands.md @@ -1 +1,26 @@ +- [N64 commands](#n64-commands) + +--- + ## N64 commands + +| id | name | arg0 | arg1 | rsp0 | rsp1 | description | +| --- | --------------------- | ---------- | ------------ | ---------------- | -------------- | -------------------------------------------------- | +| `v` | **VERSION_GET** | --- | --- | api_version | --- | Get command API version | +| `c` | **CONFIG_GET** | config_id | --- | --- | current_value | Get config option | +| `C` | **CONFIG_SET** | config_id | new_value | --- | previous_value | Set config option and get previous value | +| `t` | **TIME_GET** | --- | --- | time_0 | time_1 | Get current RTC value | +| `T` | **TIME_SET** | time_0 | time_1 | --- | --- | Set RTC value | +| `m` | **USB_READ** | pi_address | length | --- | --- | Receive data from USB to flashcart | +| `M` | **USB_WRITE** | pi_address | length/type | --- | --- | Send data from from flashcart to USB | +| `u` | **USB_READ_STATUS** | --- | --- | read_status/type | length | Get USB read status and type/length | +| `U` | **USB_WRITE_STATUS** | --- | --- | write_status | --- | Get USB write status | +| `i` | **SD_CARD_OP** | pi_address | operation | --- | return_data | Perform special operation on SD card | +| `I` | **SD_SECTOR_SET** | sector | --- | --- | --- | Set starting sector for next SD card R/W operation | +| `s` | **SD_READ** | pi_address | sector_count | --- | --- | Read sectors from SD card to flashcart | +| `S` | **SD_WRITE** | pi_address | sector_count | --- | --- | Write sectors from flashcart to SD card | +| `D` | **DD_SD_INFO** | pi_address | table_size | --- | --- | Set 64DD disk SD sector info | +| `W` | **WRITEBACK_SD_INFO** | pi_address | enabled | --- | --- | Set save writeback SD sector info | +| `p` | **FLASH_WAIT_BUSY** | --- | --- | erase_block_size | --- | Wait until flash ready / get block erase size | +| `P` | **FLASH_ERASE_BLOCK** | pi_address | --- | --- | --- | Start flash block erase | +| `?` | **DEBUG_GET** | --- | --- | debug_data_0 | debug_data_1 | Get internal FPGA debug info | diff --git a/docs/usb_commands.md b/docs/usb_commands.md index 933ab03..901fb53 100644 --- a/docs/usb_commands.md +++ b/docs/usb_commands.md @@ -1 +1,24 @@ +- [USB commands](#usb-commands) + +--- + ## USB commands + +| id | name | arg0 | arg1 | data | response | description | +| --- | ---------------------- | ------------ | ------------ | ---- | ---------------- | --------------------------------------------------- | +| `v` | **VERSION_GET** | --- | --- | --- | api_version | Get command API version | +| `R` | **STATE_RESET** | --- | --- | --- | --- | Reset entire flashcart state | +| `B` | **CIC_PARAMS_SET** | cic_params_0 | cic_params_1 | --- | --- | Set CIC mode/seed/version/checksum | +| `c` | **CONFIG_GET** | config_id | --- | --- | current_value | Get config option | +| `C` | **CONFIG_SET** | config_id | new_value | --- | --- | Set config option | +| `t` | **TIME_GET** | --- | --- | --- | time | Get current RTC value | +| `T` | **TIME_SET** | time_0 | time_1 | --- | --- | Set RTC value | +| `m` | **MEMORY_READ** | address | length | data | --- | Read data from specified memory address | +| `M` | **MEMORY_WRITE** | address | length | --- | data | Write data to specified memory address | +| `D` | **DD_SET_BLOCK_READY** | success | --- | --- | --- | Notify flashcart about 64DD block readiness | +| `U` | **USB_WRITE** | type | length | data | N/A | Send data to be received by app running on N64 | +| `f` | **FIRMWARE_BACKUP** | address | --- | --- | status/length | Backup firmware to specified memory address | +| `F` | **FIRMWARE_UPDATE** | address | length | --- | status | Update firmware from specified memory address | +| `p` | **FLASH_WAIT_BUSY** | --- | --- | --- | erase_block_size | Wait until flash ready / get flash block erase size | +| `P` | **FLASH_ERASE_BLOCK** | address | --- | --- | --- | Start flash block erase | +| `?` | **DEBUG_GET** | --- | --- | --- | debug_data | Get internal FPGA debug info |