mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-21 21:49:15 +01:00
[SC64][DOCS] Updated documentation
This commit is contained in:
parent
b68d4a4be0
commit
e170abdcd3
52
README.md
52
README.md
@ -1,8 +1,5 @@
|
||||
# SC64 - an open source Nintendo 64 flashcart
|
||||
|
||||
[<img src="assets/sc64_logo_256_160.png" />](assets/sc64_logo_256_160.png)
|
||||
|
||||
---
|
||||
# <p style="text-align: center;">SummerCart64 - a fully open source Nintendo 64 flashcart</p>
|
||||
[<p style="text-align: center;"><img src="assets/sc64_logo.svg" /></p>](assets/sc64_logo.svg)
|
||||
|
||||
## Features
|
||||
- 64 MiB SDRAM memory for game and save data
|
||||
@ -29,38 +26,31 @@
|
||||
|
||||
- [Quick startup guide](./docs/00_quick_startup_guide.md)
|
||||
- [Memory map](./docs/01_memory_map.md)
|
||||
- [USB commands](./docs/02_usb_commands.md)
|
||||
- [N64 commands](./docs/03_n64_commands.md)
|
||||
- [N64 commands](./docs/02_n64_commands.md)
|
||||
- [USB interface](./docs/03_usb_interface.md)
|
||||
- [Config options](./docs/04_config_options.md)
|
||||
- [FW/SW building](./docs/05_fw_sw_building.md)
|
||||
- [Manufacturing guidelines](./docs/06_manufacturing_guidelines.md)
|
||||
|
||||
---
|
||||
|
||||
## How do I get one?
|
||||
|
||||
I've prepared all necessary manufacturing files on [PCBWay Shared Project](https://www.pcbway.com/project/shareproject/SC64_an_open_source_Nintendo_64_flashcart_14b9688a.html) site.
|
||||
Full disclosure: for every order made through this link I will receive 10% of PCB manufacturing and PCB assembly service cost. This is a great way of supporting further project development.
|
||||
|
||||
<a href="https://www.pcbway.com/project/shareproject/SC64_an_open_source_Nintendo_64_flashcart_14b9688a.html"><img src="https://www.pcbway.com/project/img/images/frompcbway-1220.png" alt="PCB from PCBWay" /></a>
|
||||
|
||||
If you don't need a physical product but still want to support me then check my [GitHub sponsors](https://github.com/sponsors/Polprzewodnikowy) page.
|
||||
|
||||
---
|
||||
|
||||
## Where's menu?
|
||||
|
||||
Menu, as known from 64drive or EverDrive-64, is currently under development. Progress can be tracked in [N64FlashcartMenu](https://github.com/Polprzewodnikowy/N64FlashcartMenu) repository.
|
||||
Ambitious goal of this software is to target every flashcart available on the market. However, main focus for now is getting at least basic UI running on the SC64.
|
||||
- [FW and SW info](./docs/05_fw_and_sw_info.md)
|
||||
- [Build guide](./docs/06_build_guide.md)
|
||||
|
||||
---
|
||||
|
||||
## Help / Q&A
|
||||
|
||||
For any questions related to this project, please use [*Discussions*](https://github.com/Polprzewodnikowy/SummerCollection/discussions) tab in GitHub repository.
|
||||
Do not use my e-mail for these questions, as I want to have a centralized knowledge base accessible for everyone interested in this project.
|
||||
For any questions related to this project, please use [*Discussions*](https://github.com/Polprzewodnikowy/SummerCart64/discussions) tab in GitHub repository.
|
||||
Using discussions tab is highly encouraged as it allows to have centralized knowledge database accessible for everyone interested in this project.
|
||||
|
||||
I'm also active at [N64brew](https://discord.gg/WqFgNWf) Discord server as `korgeaux#5558` but keep in mind that [*Discussions*](https://github.com/Polprzewodnikowy/SummerCollection/discussions) tab is a preferred option. **Discord is not a replacement for contact form in any way.**
|
||||
I'm also active at [N64brew](https://discord.gg/WqFgNWf) Discord server as `korgeaux` but keep in mind that [*Discussions*](https://github.com/Polprzewodnikowy/SummerCart64/discussions) tab is a preferred option.
|
||||
|
||||
---
|
||||
|
||||
## How do I get one?
|
||||
|
||||
One option is to ask in `#summer-cart-64` channel on [N64brew](https://discord.gg/WqFgNWf) Discord server if someone is making a group order.
|
||||
|
||||
If you want to order it yourself then I've prepared all necessary manufacturing files on [PCBWay Shared Project](https://www.pcbway.com/project/shareproject/SC64_an_open_source_Nintendo_64_flashcart_14b9688a.html) site.
|
||||
Full disclosure: for every order made through this link I will receive 10% of PCB manufacturing and PCB assembly service cost. This is a great way of supporting further project development.
|
||||
|
||||
If you don't need a physical product but still want to support me then check my [GitHub sponsors](https://github.com/sponsors/Polprzewodnikowy) page.
|
||||
|
||||
---
|
||||
|
||||
@ -73,6 +63,8 @@ I'm also active at [N64brew](https://discord.gg/WqFgNWf) Discord server as `korg
|
||||
## Finished example
|
||||
|
||||
[<img src="assets/sc64_finished_example.jpg" alt="SC64 finished example" width="800" />](assets/sc64_finished_example.jpg)
|
||||
[<img src="assets/sc64_pcb_front.jpg" alt="SC64 PCB front" width="800" />](assets/sc64_pcb_front.jpg)
|
||||
[<img src="assets/sc64_pcb_back.jpg" alt="SC64 PCB back" width="800" />](assets/sc64_pcb_back.jpg)
|
||||
|
||||
---
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 42 KiB |
BIN
assets/sc64_pcb_back.jpg
Normal file
BIN
assets/sc64_pcb_back.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 383 KiB |
BIN
assets/sc64_pcb_front.jpg
Normal file
BIN
assets/sc64_pcb_front.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 429 KiB |
@ -1,15 +1,16 @@
|
||||
- [First time setup](#first-time-setup)
|
||||
- [First time setup on PC](#first-time-setup-on-pc)
|
||||
- [Firmware backup/update](#firmware-backupupdate)
|
||||
- [Uploading game and/or save](#uploading-game-andor-save)
|
||||
- [Downloading save](#downloading-save)
|
||||
- [Running 64DD games](#running-64dd-games)
|
||||
- [Running menu in standalone mode](#running-menu-in-standalone-mode)
|
||||
- [Uploading game and/or save from PC](#uploading-game-andor-save-from-pc)
|
||||
- [Downloading save to PC](#downloading-save-to-pc)
|
||||
- [Running 64DD games from PC](#running-64dd-games-from-pc)
|
||||
- [Direct boot option](#direct-boot-option)
|
||||
- [Debug terminal](#debug-terminal)
|
||||
- [Debug terminal on PC](#debug-terminal-on-pc)
|
||||
- [LED blink patters](#led-blink-patters)
|
||||
|
||||
---
|
||||
|
||||
## First time setup
|
||||
## First time setup on PC
|
||||
|
||||
**Windows platform: replace `./sc64deployer` in examples below with `sc64deployer.exe`**
|
||||
|
||||
@ -35,7 +36,15 @@ To print firmware metadata run `./sc64deployer firmware info sc64-firmware-{vers
|
||||
|
||||
---
|
||||
|
||||
## Uploading game and/or save
|
||||
## Running menu in standalone mode
|
||||
|
||||
Menu, as known from 64drive or EverDrive-64, is developed in another repository: [N64FlashcartMenu](https://github.com/Polprzewodnikowy/N64FlashcartMenu).
|
||||
Download latest version from [here](https://github.com/Polprzewodnikowy/N64FlashcartMenu/releases) and put `sc64menu.n64` file in the root directory of the SD card.
|
||||
When N64 is powered on menu is automatically loaded from the SD card. Supported file system formats are FAT32 and exFAT.
|
||||
|
||||
---
|
||||
|
||||
## Uploading game and/or save from PC
|
||||
|
||||
`./sc64deployer upload path_to_rom.n64 --save-type eeprom4k --save path_to_save.sav`
|
||||
|
||||
@ -46,7 +55,7 @@ Arguments `--save-type` and/or `--save` can be omitted if game doesn't require a
|
||||
|
||||
---
|
||||
|
||||
## Downloading save
|
||||
## Downloading save to PC
|
||||
|
||||
`./sc64deployer download save path_to_save.sav`
|
||||
|
||||
@ -55,7 +64,7 @@ Command will raise error when no save type is currently enabled in the SC64 devi
|
||||
|
||||
---
|
||||
|
||||
## Running 64DD games
|
||||
## Running 64DD games from PC
|
||||
|
||||
64DD games require DDIPL ROM and disk images.
|
||||
To run disk game type `./sc64deployer 64dd path_to_ddipl.n64 path_to_disk_1.ndd path_to_disk_2.ndd`.
|
||||
@ -81,7 +90,7 @@ TV type cannot be forced when direct boot mode is enabled.
|
||||
|
||||
---
|
||||
|
||||
## Debug terminal
|
||||
## Debug terminal on PC
|
||||
|
||||
`sc64deployer` application supports UNFLoader protocol and has same functionality implemented as aforementioned program.
|
||||
Type `./sc64deployer debug` to activate it.
|
||||
|
@ -1,79 +0,0 @@
|
||||
- [USB commands](#usb-commands)
|
||||
- [USB command arguments](#usb-command-arguments)
|
||||
- [**TIME_GET**](#t-time_get)
|
||||
- [**TIME_SET**](#t-time_set)
|
||||
- [**CIC_PARAMS_SET**](#b-cic_params_set)
|
||||
|
||||
---
|
||||
|
||||
## USB commands
|
||||
|
||||
| id | name | arg0 | arg1 | data | response | description |
|
||||
| --- | ---------------------- | ------------ | ------------ | ---- | ---------------- | ------------------------------------------------------------- |
|
||||
| `v` | **IDENTIFIER_GET** | --- | --- | --- | identifier | Get flashcart identifier `SCv2` |
|
||||
| `V` | **VERSION_GET** | --- | --- | --- | version | Get flashcart firmware version |
|
||||
| `R` | **STATE_RESET** | --- | --- | --- | --- | Reset flashcart state (CIC params and config options) |
|
||||
| `B` | [**CIC_PARAMS_SET**](#b-cic_params_set) | cic_params_0 | cic_params_1 | --- | --- | Set CIC emulation parameters (disable/seed/checksum) |
|
||||
| `c` | **CONFIG_GET** | config_id | --- | --- | current_value | Get config option |
|
||||
| `C` | **CONFIG_SET** | config_id | new_value | --- | --- | Set config option |
|
||||
| `a` | **SETTING_GET** | setting_id | --- | --- | current_value | Get persistent setting option |
|
||||
| `A` | **SETTING_SET** | setting_id | new_value | --- | --- | Set persistent setting option |
|
||||
| `t` | [**TIME_GET**](#t-time_get) | --- | --- | --- | time | Get current RTC value |
|
||||
| `T` | [**TIME_SET**](#t-time_set) | time_0 | time_1 | --- | --- | Set new 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 |
|
||||
| `U` | **USB_WRITE** | type | length | data | N/A | Send data to be received by app running on N64 (no response!) |
|
||||
| `D` | **DD_SET_BLOCK_READY** | success | --- | --- | --- | Notify flashcart about 64DD block readiness |
|
||||
| `W` | **WRITEBACK_ENABLE** | --- | --- | --- | --- | Enable save writeback through USB packet |
|
||||
| `p` | **FLASH_WAIT_BUSY** | wait | --- | --- | erase_block_size | Wait until flash ready / Get flash block erase size |
|
||||
| `P` | **FLASH_ERASE_BLOCK** | address | --- | --- | --- | Start flash block erase |
|
||||
| `f` | **FIRMWARE_BACKUP** | address | --- | --- | status/length | Backup firmware to specified memory address |
|
||||
| `F` | **FIRMWARE_UPDATE** | address | length | --- | status | Update firmware from specified memory address |
|
||||
| `?` | **DEBUG_GET** | --- | --- | --- | debug_data | Get internal FPGA debug info |
|
||||
| `%` | **STACK_USAGE_GET** | --- | --- | --- | stack_usage | Get per task stack usage |
|
||||
|
||||
---
|
||||
|
||||
## USB command arguments
|
||||
|
||||
What follows is the description of the command arguments' bit fields.
|
||||
|
||||
These arguments are encoded in big-endian, and are laid out as such:
|
||||
|
||||
| | arg0 | arg1 |
|
||||
| --- | --- | --- |
|
||||
| bits | `[63:32]` | `[31:0]` |
|
||||
|
||||
---
|
||||
|
||||
### `B`: [**CIC_PARAMS_SET**](https://github.com/Polprzewodnikowy/SummerCart64/blob/v2.12.1/sw/controller/src/cic.c#L337)
|
||||
|
||||
| bits | description |
|
||||
| --- | --- |
|
||||
| `[56]` | Disable CIC |
|
||||
| `[55:48]` | CIC seed (IPL2 and IPL3 stages) |
|
||||
| `[47:0]` | Checksum |
|
||||
|
||||
---
|
||||
|
||||
### `t`: [**TIME_GET**](https://github.com/Polprzewodnikowy/SummerCart64/blob/v2.12.1/sw/controller/src/cfg.c#L410)
|
||||
|
||||
Same as [**TIME_SET**](#t-time_set).
|
||||
|
||||
---
|
||||
|
||||
### `T`: [**TIME_SET**](https://github.com/Polprzewodnikowy/SummerCart64/blob/v2.12.1/sw/pc/sc64.py#L795)
|
||||
|
||||
Date values use the [BCD](https://en.wikipedia.org/wiki/Binary-coded_decimal) format.
|
||||
|
||||
([RTC chip specifications](https://ww1.microchip.com/downloads/aemDocuments/documents/MPD/ProductDocuments/DataSheets/MCP7940N-Battery-Backed-I2C-RTCC-with-SRAM-20005010J.pdf))
|
||||
|
||||
| bits | description |
|
||||
| --- | --- |
|
||||
| `[63:56]` | Week day, starting at 1 (user-defined representation) |
|
||||
| `[55:48]` | Hours |
|
||||
| `[47:40]` | Minutes |
|
||||
| `[39:32]` | Seconds |
|
||||
| `[23:16]` | Year (from 0 to 99) |
|
||||
| `[15:8]` | Month |
|
||||
| `[7:0]` | Day |
|
254
docs/03_usb_interface.md
Normal file
254
docs/03_usb_interface.md
Normal file
@ -0,0 +1,254 @@
|
||||
- [Protocol](#protocol)
|
||||
- [Resetting communication](#resetting-communication)
|
||||
- [PC -\> SC64 packets](#pc---sc64-packets)
|
||||
- [**`CMD`** packet](#cmd-packet)
|
||||
- [SC64 -\> PC packets](#sc64---pc-packets)
|
||||
- [**`RSP`/`ERR`** packets](#rsperr-packets)
|
||||
- [**`PKT`** packet](#pkt-packet)
|
||||
- [Supported commands](#supported-commands)
|
||||
- [`v`: **IDENTIFIER\_GET**](#v-identifier_get)
|
||||
- [`response` (identifier)](#response-identifier)
|
||||
- [`V`: **VERSION\_GET**](#v-version_get)
|
||||
- [`response` (version)](#response-version)
|
||||
- [`R`: **STATE\_RESET**](#r-state_reset)
|
||||
- [`B`: **CIC\_PARAMS\_SET**](#b-cic_params_set)
|
||||
- [`arg0` (cic\_params\_0)](#arg0-cic_params_0)
|
||||
- [`arg1` (cic\_params\_1)](#arg1-cic_params_1)
|
||||
- [`t`: **TIME\_GET**](#t-time_get)
|
||||
- [`response` (time)](#response-time)
|
||||
- [`T`: **TIME\_SET**](#t-time_set)
|
||||
- [`arg0` (time\_0)](#arg0-time_0)
|
||||
- [`arg1` (time\_1)](#arg1-time_1)
|
||||
- [Asynchronous packets](#asynchronous-packets)
|
||||
|
||||
---
|
||||
|
||||
## Protocol
|
||||
|
||||
SC64 exposes itself in the system as simple serial device. This allows it to work without manually installed drivers.
|
||||
Serial communication is also well supported in almost all programming languages making it easy to work with.
|
||||
USB protocol use simple packet based communication. Every packet starts with 3 byte identifier and 1 byte data ID.
|
||||
Every argument/data is sent as big-endian value.
|
||||
|
||||
### Resetting communication
|
||||
|
||||
Due to serial communication nature, data transfer between PC and flashcart might get out of sync (for example when long data transfer is aborted before sending/receiving all bytes).
|
||||
Communication reset is done via emulated `DTR`/`DSR` pins.
|
||||
Start reset procedure by setting `DTR` pin value to `high (1)`.
|
||||
Next, observe `DSR` pin until its state is set to `high (1)`.
|
||||
At this point communication has been reset and USB interface is disabled. Now it is a good moment to clear/purge any buffers.
|
||||
Finish reset procedure by setting `DTR` pin value to `low (0)` and observe `DSR` pin until its state is set to `low (0)`.
|
||||
Flashcart should be ready to accept new commands.
|
||||
|
||||
### PC -> SC64 packets
|
||||
|
||||
| identifier | description |
|
||||
| ---------- | ------------------------ |
|
||||
| `CMD` | Send command to the SC64 |
|
||||
|
||||
SC64 understands only one packet identifier - `CMD`.
|
||||
Fourth byte denotes command type listed in [supported commands](#supported-commands) section.
|
||||
|
||||
#### **`CMD`** packet
|
||||
|
||||
General structure of packet:
|
||||
| offset | type | description |
|
||||
| ------ | -------------------- | -------------------------- |
|
||||
| `0` | char[3] | `CMD` identifier |
|
||||
| `3` | char[1] | Command ID |
|
||||
| `4` | uint32_t | First argument (arg0) |
|
||||
| `8` | uint32_t | Second argument (arg1) |
|
||||
| `12` | uint8_t[data_length] | Command data (if required) |
|
||||
|
||||
`CMD` packet always require arguments to be sent even if command does not require them.
|
||||
Arbitrary data length is derived from the argument if specific command supports it.
|
||||
|
||||
### SC64 -> PC packets
|
||||
|
||||
| identifier | description |
|
||||
| ---------- | ------------------------------------ |
|
||||
| `RSP` | Success response to the sent command |
|
||||
| `ERR` | Error response to the sent command |
|
||||
| `PKT` | Asynchronous data packet |
|
||||
|
||||
SC64 sends response packet `RSP`/`ERR` to almost every command sent from the PC.
|
||||
Fourth byte is the same as in the command that triggered the response.
|
||||
If command execution was not successful, then `RSP` identifier is replaced by the `ERR` identifier.
|
||||
|
||||
SC64 can also send `PKT` packet at any time as a response to action triggered by the N64 or the flashcart itself.
|
||||
Fourth byte denotes packet type listed in the [asynchronous packets](#asynchronous-packets) section.
|
||||
|
||||
#### **`RSP`/`ERR`** packets
|
||||
|
||||
General structure of packet:
|
||||
| offset | type | description |
|
||||
| ------ | -------------------- | ---------------------- |
|
||||
| `0` | char[3] | `RSP`/`ERR` identifier |
|
||||
| `3` | char[1] | Command ID |
|
||||
| `4` | uint32_t | Data length |
|
||||
| `8` | uint8_t[data_length] | Response data (if any) |
|
||||
|
||||
`RSP`/`ERR` packet is sent as a response to the command sent by the PC.
|
||||
`ERR` response might contain no (or undefined) data in the arbitrary data field compared to regular `RSP` packet.
|
||||
|
||||
#### **`PKT`** packet
|
||||
|
||||
General structure of packet:
|
||||
| offset | type | description |
|
||||
| ------ | -------------------- | ---------------------- |
|
||||
| `0` | char[3] | `PKT` identifier |
|
||||
| `3` | char[1] | Asynchronous packet ID |
|
||||
| `4` | uint32_t | Data length |
|
||||
| `8` | uint8_t[data_length] | Packet data (if any) |
|
||||
|
||||
Available packet types are listed in the [asynchronous packets](#asynchronous-packets) section.
|
||||
|
||||
---
|
||||
|
||||
## Supported commands
|
||||
|
||||
| id | name | arg0 | arg1 | data | response | description |
|
||||
| --- | --------------------------------------- | ------------ | ------------ | ---- | ---------------- | ------------------------------------------------------------- |
|
||||
| `v` | [**IDENTIFIER_GET**](#v-identifier_get) | --- | --- | --- | identifier | Get flashcart identifier `SCv2` |
|
||||
| `V` | [**VERSION_GET**](#v-version_get) | --- | --- | --- | version | Get flashcart firmware version |
|
||||
| `R` | [**STATE_RESET**](#r-state_reset) | --- | --- | --- | --- | Reset flashcart state (CIC params and config options) |
|
||||
| `B` | [**CIC_PARAMS_SET**](#b-cic_params_set) | cic_params_0 | cic_params_1 | --- | --- | Set CIC emulation parameters (disable/seed/checksum) |
|
||||
| `c` | **CONFIG_GET** | config_id | --- | --- | current_value | Get config option |
|
||||
| `C` | **CONFIG_SET** | config_id | new_value | --- | --- | Set config option |
|
||||
| `a` | **SETTING_GET** | setting_id | --- | --- | current_value | Get persistent setting option |
|
||||
| `A` | **SETTING_SET** | setting_id | new_value | --- | --- | Set persistent setting option |
|
||||
| `t` | [**TIME_GET**](#t-time_get) | --- | --- | --- | time | Get current RTC value |
|
||||
| `T` | [**TIME_SET**](#t-time_set) | time_0 | time_1 | --- | --- | Set new 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 |
|
||||
| `U` | **USB_WRITE** | type | length | data | N/A | Send data to be received by app running on N64 (no response!) |
|
||||
| `D` | **DD_SET_BLOCK_READY** | success | --- | --- | --- | Notify flashcart about 64DD block readiness |
|
||||
| `W` | **WRITEBACK_ENABLE** | --- | --- | --- | --- | Enable save writeback through USB packet |
|
||||
| `p` | **FLASH_WAIT_BUSY** | wait | --- | --- | erase_block_size | Wait until flash ready / Get flash block erase size |
|
||||
| `P` | **FLASH_ERASE_BLOCK** | address | --- | --- | --- | Start flash block erase |
|
||||
| `f` | **FIRMWARE_BACKUP** | address | --- | --- | status/length | Backup firmware to specified memory address |
|
||||
| `F` | **FIRMWARE_UPDATE** | address | length | --- | status | Update firmware from specified memory address |
|
||||
| `?` | **DEBUG_GET** | --- | --- | --- | debug_data | Get internal FPGA debug info |
|
||||
| `%` | **STACK_USAGE_GET** | --- | --- | --- | stack_usage | Get per task stack usage |
|
||||
|
||||
---
|
||||
|
||||
### `v`: **IDENTIFIER_GET**
|
||||
|
||||
Get flashcart identifier `SCv2`
|
||||
|
||||
_This command does not require arguments or data._
|
||||
|
||||
#### `response` (identifier)
|
||||
| offset | type | description |
|
||||
| ------ | ------- | ----------- |
|
||||
| `0` | char[4] | Identifier |
|
||||
|
||||
Identifier is always `SCv2` represented in ASCII code.
|
||||
|
||||
---
|
||||
|
||||
### `V`: **VERSION_GET**
|
||||
|
||||
Get flashcart firmware version
|
||||
|
||||
_This command does not require arguments or data._
|
||||
|
||||
#### `response` (version)
|
||||
| offset | type | description |
|
||||
| ------ | -------- | ------------- |
|
||||
| `0` | uint16_t | Major version |
|
||||
| `2` | uint16_t | Minor version |
|
||||
| `4` | uint32_t | Revision |
|
||||
|
||||
Increment in major version represents breaking API changes.
|
||||
|
||||
Increment in minor version represents non breaking API changes.
|
||||
|
||||
Increment in revision field represents no API changes, usually it's denoting bugfixes.
|
||||
|
||||
---
|
||||
### `R`: **STATE_RESET**
|
||||
|
||||
Reset flashcart state (CIC params and config options)
|
||||
|
||||
_This command does not require arguments or data._
|
||||
|
||||
_This command does not send response data._
|
||||
|
||||
---
|
||||
|
||||
### `B`: **CIC_PARAMS_SET**
|
||||
|
||||
Set CIC emulation parameters (disable/seed/checksum)
|
||||
|
||||
#### `arg0` (cic_params_0)
|
||||
| bits | description |
|
||||
| --------- | ------------------------------- |
|
||||
| `[32:25]` | _Unused_ |
|
||||
| `[24]` | Disable CIC |
|
||||
| `[23:16]` | CIC seed (IPL2 and IPL3 stages) |
|
||||
| `[15:0]` | Checksum (upper 16 bits) |
|
||||
|
||||
#### `arg1` (cic_params_1)
|
||||
| bits | description |
|
||||
| -------- | ------------------------ |
|
||||
| `[31:0]` | Checksum (lower 32 bits) |
|
||||
|
||||
_This command does not send response data._
|
||||
|
||||
---
|
||||
|
||||
### `t`: **TIME_GET**
|
||||
|
||||
Date/time values use the [BCD](https://en.wikipedia.org/wiki/Binary-coded_decimal) format.
|
||||
|
||||
_This command does not require arguments or data._
|
||||
|
||||
#### `response` (time)
|
||||
| offset | type | description |
|
||||
| ------ | ------- | ------------------------------------ |
|
||||
| `0` | uint8_t | Weekday (1 - 7), 1 represents Monday |
|
||||
| `1` | uint8_t | Hours (0 - 23) |
|
||||
| `2` | uint8_t | Minutes (0 - 59) |
|
||||
| `3` | uint8_t | Seconds (0 - 59) |
|
||||
| `4` | uint8_t | _Unused_ (returns zero) |
|
||||
| `5` | uint8_t | Year (0 - 99) |
|
||||
| `6` | uint8_t | Month (1 - 12) |
|
||||
| `7` | uint8_t | Day (1 - 31) |
|
||||
|
||||
---
|
||||
|
||||
### `T`: **TIME_SET**
|
||||
|
||||
Date/time values use the [BCD](https://en.wikipedia.org/wiki/Binary-coded_decimal) format.
|
||||
|
||||
#### `arg0` (time_0)
|
||||
| bits | description |
|
||||
| --------- | ------------------------------------ |
|
||||
| `[31:24]` | Weekday (1 - 7), 1 represents Monday |
|
||||
| `[23:16]` | Hours (0 - 23) |
|
||||
| `[15:8]` | Minutes (0 - 59) |
|
||||
| `[7:0]` | Seconds (0 - 59) |
|
||||
|
||||
#### `arg1` (time_1)
|
||||
| bits | description |
|
||||
| --------- | -------------- |
|
||||
| `[31:24]` | _Unused_ |
|
||||
| `[23:16]` | Year (0 - 99) |
|
||||
| `[15:8]` | Month (1 - 12) |
|
||||
| `[7:0]` | Day (1 - 31) |
|
||||
|
||||
_This command does not send response data._
|
||||
|
||||
## Asynchronous packets
|
||||
|
||||
| id | name | data | description |
|
||||
| --- | ---------------------- | -------------------- | ------------------------------------------- |
|
||||
| `B` | [**BUTTON**]() | --- | Button on the back of the SC64 was pressed |
|
||||
| `G` | [**DATA_FLUSHED**]() | --- | Data from `USB_WRITE` command was discarded |
|
||||
| `U` | [**DEBUG_DATA**]() | debug_data | Data sent from the N64 |
|
||||
| `D` | [**DISK_REQUEST**]() | disk_info/block_data | 64DD disk block R/W request |
|
||||
| `I` | [**IS_VIEWER_64**]() | text | IS-Viewer 64 `printf` text |
|
||||
| `S` | [**SAVE_WRITEBACK**]() | save_contents | Flushed save data |
|
||||
| `F` | [**UPDATE_STATUS**]() | progress | Firmware update progress |
|
22
docs/05_fw_and_sw_info.md
Normal file
22
docs/05_fw_and_sw_info.md
Normal file
@ -0,0 +1,22 @@
|
||||
- [Building FW/SW](#building-fwsw)
|
||||
- [Docker method](#docker-method)
|
||||
- [Lattice Diamond license](#lattice-diamond-license)
|
||||
|
||||
---
|
||||
|
||||
## Building FW/SW
|
||||
|
||||
### Docker method
|
||||
|
||||
Docker method is a preferred option.
|
||||
Run `./docker_build.sh release` to build all firmware/software and generate release package.
|
||||
For other options run script without any command to print help.
|
||||
|
||||
#### Lattice Diamond license
|
||||
|
||||
Lattice Diamond software is used to build FPGA bitstream, a free 1 year license is necessary to run the build process.
|
||||
Repository already contains license attached to fake MAC address `F8:12:34:56:78:90` (path to the license: `fw/project/lcmxo2/license.dat`).
|
||||
If the license expires, it is required to request new license from Lattice webpage.
|
||||
New license can be attached to aforementioned MAC address or any other address.
|
||||
In case of non default MAC address it is possible to provide it via `MAC_ADDRESS` environment variable.
|
||||
For example: `MAC_ADDRESS=AB:00:00:00:00:00 ./docker_build.sh release`.
|
@ -6,6 +6,7 @@
|
||||
- [**Putting it together**](#putting-it-together)
|
||||
- [**Initial programming**](#initial-programming)
|
||||
- [**Troubleshooting**](#troubleshooting)
|
||||
- [*`primer.py` threw error on `Bootloader -> SC64 FLASH` step*](#primerpy-threw-error-on-bootloader---sc64-flash-step)
|
||||
|
||||
---
|
||||
|
||||
@ -28,10 +29,12 @@ Please download latest release before proceeding with the instructions.
|
||||
|
||||
### **PCB requirements**
|
||||
|
||||
- Thickness: 1.2 mm
|
||||
- At least ENIG plating or better
|
||||
***Before ordering PCBs make sure you select correct options listed below:***
|
||||
|
||||
- PCB thickness: 1.2 mm
|
||||
- Surface finish (plating): ENIG (Hard gold for edge connector is recommended but it's very expensive)
|
||||
- PCB contains edge connector: yes
|
||||
- Beveled edge connector: yes, 45°
|
||||
- Beveled edge connector: yes, 45° (other angles also should work OK)
|
||||
|
||||
---
|
||||
|
||||
@ -66,7 +69,7 @@ You can skip this step if PCB assembly service was used in previous steps.
|
||||
For initial programming you are going to need a PC and a USB to UART (serial) adapter (3.3V signaling is required).
|
||||
These steps assume you are using modern Windows OS (version 10 or higher).
|
||||
|
||||
As for software here's list of required applications:
|
||||
As for software, here's list of required applications:
|
||||
- [FT_PROG](https://ftdichip.com/utilities/#ft_prog) - FTDI FT232H EEPROM programming software
|
||||
- [Python 3](https://www.python.org/downloads/) with `pip3` - necessary for initial programming script: `primer.py`
|
||||
|
||||
@ -102,7 +105,7 @@ Congratulations! Your SC64 flashcart should be ready for use!
|
||||
|
||||
### **Troubleshooting**
|
||||
|
||||
*`primer.py` threw error on `Bootloader -> SC64 FLASH` step*
|
||||
#### *`primer.py` threw error on `Bootloader -> SC64 FLASH` step*
|
||||
|
||||
This issue can be attributed to incorrectly programmed FT232H EEPROM in the first programming step.
|
||||
Check again in `FT_PROG` application if device was configured properly.
|
@ -1,15 +1,12 @@
|
||||
# SC64 - an open source Nintendo 64 flashcart
|
||||
|
||||
[<img src="../assets/sc64_logo_256_160.png" />](../assets/sc64_logo_256_160.png)
|
||||
|
||||
---
|
||||
# <p style="text-align: center;">SummerCart64 - a fully open source Nintendo 64 flashcart</p>
|
||||
[<p style="text-align: center;"><img src="../assets/sc64_logo.svg" /></p>](../assets/sc64_logo.svg)
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Quick startup guide](./00_quick_startup_guide.md)
|
||||
- [Memory map](./01_memory_map.md)
|
||||
- [USB commands](./02_usb_commands.md)
|
||||
- [N64 commands](./03_n64_commands.md)
|
||||
- [N64 commands](./02_n64_commands.md)
|
||||
- [USB interface](./03_usb_interface.md)
|
||||
- [Config options](./04_config_options.md)
|
||||
- [FW/SW building](./05_fw_sw_building.md)
|
||||
- [Manufacturing guidelines](./06_manufacturing_guidelines.md)
|
||||
- [FW and SW info](./05_fw_and_sw_info.md)
|
||||
- [Build guide](./06_build_guide.md)
|
||||
|
@ -3,7 +3,7 @@ name = "sc64deployer"
|
||||
version = "2.16.0"
|
||||
edition = "2021"
|
||||
authors = ["Polprzewodnikowy"]
|
||||
description = "SC64 loader and control software"
|
||||
description = "SummerCart64 loader and control software"
|
||||
documentation = "https://github.com/Polprzewodnikowy/SummerCart64"
|
||||
|
||||
[dependencies]
|
||||
|
Loading…
Reference in New Issue
Block a user