From a537cf1b266637e8e0e5ebb6a83ce705e01d2037 Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Sun, 1 Jan 2023 22:09:27 +0100 Subject: [PATCH] [SC64][DOCS] Updated documentation / rearranged files --- .github/sc64_v2_block_diagram.svg | 4 --- README.md | 29 ++++++++++-------- assets/sc64_v2_block_diagram.svg | 4 +++ {.github => assets}/sc64_v2_example.jpg | Bin docs/{memory_map.md => 01_memory_map.md} | 16 +++++----- docs/{usb_commands.md => 02_usb_commands.md} | 0 docs/{n64_commands.md => 03_n64_commands.md} | 0 ...config_options.md => 04_config_options.md} | 6 ++-- docs/05_fw_sw_building.md | 0 docs/06_manufacturing_guidelines.md | 0 docs/README.md | 12 +++++--- 11 files changed, 40 insertions(+), 31 deletions(-) delete mode 100644 .github/sc64_v2_block_diagram.svg create mode 100644 assets/sc64_v2_block_diagram.svg rename {.github => assets}/sc64_v2_example.jpg (100%) rename docs/{memory_map.md => 01_memory_map.md} (95%) rename docs/{usb_commands.md => 02_usb_commands.md} (100%) rename docs/{n64_commands.md => 03_n64_commands.md} (100%) rename docs/{config_options.md => 04_config_options.md} (96%) create mode 100644 docs/05_fw_sw_building.md create mode 100644 docs/06_manufacturing_guidelines.md diff --git a/.github/sc64_v2_block_diagram.svg b/.github/sc64_v2_block_diagram.svg deleted file mode 100644 index 35515f2..0000000 --- a/.github/sc64_v2_block_diagram.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
SPI Interface
SPI Interface
USB FIFO R/W
USB FIFO R/W
Memory interface
Memory interface
Control Register File
Control Register File
FT1248 Interface
FT1248 Interface
TX FIFO 1kB
TX FIFO 1kB
RX FIFO 1kB
RX FIFO 1kB
FIFO Junction
FIFO Junction
USB DMA Controller
USB DMA Controller
SDIO Interface
SDIO Interface
TX FIFO 1kB
TX FIFO 1kB
RX FIFO 1kB
RX FIFO 1kB
SD DMA Controller
SD DMA Controller
USB
FT232H
USB...
USB
Type-C
USB...
SD Card Slot
SD Card Sl...
μC
STM32G030
μC...
RTC
MCP7940N
RTC...
UART Header
UART Header
 USB
 USB
 Flashcart Controller
 Flashcart Controller
 SD Card
 SD Card
Button
Button
LED
LED
FLASH Interface
FLASH Interface
SDRAM Interface
SDRAM Interface
Block RAM ~10kB
Block RAM ~10kB
SDRAM
64 MB
SDRAM...
QSPI FLASH
16 MB
QSPI FLASH...
 Memory
 Memory
Memory Arbiter
Memory Arbiter
FPGA Vendor Interface
FPGA Vendor Int...
N64
CIC
N64...
N64
Reset
N64...
N64
IRQ
N64...
N64
Joybus
N64...
N64
AD16 Bus
N64...
PI Interface
PI Interface
Joybus Interface
Joybus Interface
EEPROM Controller
EEPROM Controller
RTC Controller
RTC Controller
64DD Controller
64DD Controller
FlashRAM Controller
FlashRAM Controller
Flashcart Interface
Flashcart Interface
 N64 Joybus devices
 N64 Joybus devices
 N64 PI devices
 N64 PI devices
IRQ Controller
IRQ Controller
FPGA 
LCMXO2-7000 
FPGA...
12 MHz
Clock
12 MHz...
50 MHz
Clock
50 MHz...
PLL
PLL
SYS CLK
SYS CLK
SYS CLK
100 MHz
SYS CLK...
SDRAM CLK
100 MHz 90°
SDRAM CLK...
 Clock & Reset
 Clock & Reset
RESET
RESET
Power-ON
Reset Generator
Power-ON...
Debug
Header
Debug...
Text is not SVG - cannot display
\ No newline at end of file diff --git a/README.md b/README.md index 52aa327..451a0f0 100644 --- a/README.md +++ b/README.md @@ -5,39 +5,42 @@ --- ## Features - - 64 MB SDRAM memory for game and save data - - 16 MB FLASH memory for bootloader and extended game data - - 8 kB on-chip buffer for general use - - 25 MB/s peak transfer rate USB interface for data upload/download and debug functionality - - 25 MB/s peak transfer rate SD card interface + - 64 MiB SDRAM memory for game and save data + - 16 MiB FLASH memory for bootloader and extended game data + - 8 kiB on-chip buffer for general use + - ~23.8 MiB/s peak transfer rate USB interface for data upload/download and debug functionality + - ~23.8 MiB/s peak transfer rate SD card interface - EEPROM, SRAM and FlashRAM save types with automatic writeback to SD card - Battery backed real time clock (RTC) - Status LED and button for general use - 64DD add-on emulation - IS-Viewer 64 debug interface - Software and firmware update via USB interface - - N64 bootloader with support for IPL2 registers spoofing and loading menu from SD card + - N64 bootloader with support for IPL3 registers spoofing and loading menu from SD card - Enhanced [UltraCIC_C](https://github.com/jago85/UltraCIC_C) emulation with automatic region switching and programmable seed/checksum values - - PC app for communicating with flashcart (game/save data upload/download, feature enable control and debug console) + - PC app for communicating with flashcart (game/save data upload/download, feature enable control and debug terminal) - [UNFLoader](https://github.com/buu342/N64-UNFLoader) support + - 3D printable plastic shell --- ## Documentation -- [Memory map](./docs/memory_map.md) -- [Config options](./docs/config_options.md) -- [N64 commands](./docs/n64_commands.md) -- [USB commands](./docs/usb_commands.md) +- [Memory map](./docs/01_memory_map.md) +- [USB commands](./docs/02_usb_commands.md) +- [N64 commands](./docs/03_n64_commands.md) +- [Config options](./docs/04_config_options.md) +- [FW/SW building](./docs/05_fw_sw_building.md) +- [Manufacturing guidelines](./docs/06_manufacturing_guidelines.md) --- ## High-level flashcart block diagram -[](.github/sc64_v2_block_diagram.svg) +[](assets/sc64_v2_block_diagram.svg) --- ## Finished sample -[SC64 HW ver: 2.0](.github/sc64_v2_example.jpg) +[SC64 HW ver: 2.0](assets/sc64_v2_example.jpg) diff --git a/assets/sc64_v2_block_diagram.svg b/assets/sc64_v2_block_diagram.svg new file mode 100644 index 0000000..6aaa40b --- /dev/null +++ b/assets/sc64_v2_block_diagram.svg @@ -0,0 +1,4 @@ + + + +
SPI Interface
SPI Interface
USB FIFO R/W
USB FIFO R/W
Memory interface
Memory interface
Control Register File
Control Register File
FT1248 Interface
FT1248 Interface
TX FIFO 1 kiB
TX FIFO 1 kiB
RX FIFO 1 kiB
RX FIFO 1 kiB
FIFO Junction
FIFO Junction
USB DMA Controller
USB DMA Controller
SDIO Interface
SDIO Interface
TX FIFO 1 kiB
TX FIFO 1 kiB
RX FIFO 1 kiB
RX FIFO 1 kiB
SD DMA Controller
SD DMA Controller
USB
FT232H
USB...
USB
Type-C
USB...
SD Card Slot
SD Card Sl...
μC
STM32G030
μC...
RTC
MCP7940N
RTC...
UART Header
UART Header
 USB
 USB
 Flashcart Controller
 Flashcart Controller
 SD Card
 SD Card
Button
Button
LED
LED
FLASH Interface
FLASH Interface
SDRAM Interface
SDRAM Interface
Block RAM ~10.4 kiB
Block RAM ~10.4 kiB
SDRAM
64 MiB
SDRAM...
QSPI FLASH
16 MiB
QSPI FLASH...
 Memory
 Memory
Memory Arbiter
Memory Arbiter
FPGA Vendor Interface
FPGA Vendor Int...
N64
CIC
N64...
N64
Reset
N64...
N64
IRQ
N64...
N64
Joybus
N64...
N64
AD16 Bus
N64...
PI Interface
PI Interface
Joybus Interface
Joybus Interface
EEPROM Controller
EEPROM Controller
RTC Controller
RTC Controller
64DD Controller
64DD Controller
FlashRAM Controller
FlashRAM Controller
Flashcart Interface
Flashcart Interface
 N64 Joybus devices
 N64 Joybus devices
 N64 PI devices
 N64 PI devices
IRQ Controller
IRQ Controller
FPGA 
LCMXO2-7000 
FPGA...
12 MHz
Clock
12 MHz...
50 MHz
Clock
50 MHz...
PLL
PLL
SYS CLK
SYS CLK
SYS CLK
100 MHz
SYS CLK...
SDRAM CLK
100 MHz 90°
SDRAM CLK...
 Clock & Reset
 Clock & Reset
RESET
RESET
Power-ON
Reset Generator
Power-ON...
Debug
Header
Debug...
Text is not SVG - cannot display
\ No newline at end of file diff --git a/.github/sc64_v2_example.jpg b/assets/sc64_v2_example.jpg similarity index 100% rename from .github/sc64_v2_example.jpg rename to assets/sc64_v2_example.jpg diff --git a/docs/memory_map.md b/docs/01_memory_map.md similarity index 95% rename from docs/memory_map.md rename to docs/01_memory_map.md index 61796d2..d00a635 100644 --- a/docs/memory_map.md +++ b/docs/01_memory_map.md @@ -3,10 +3,10 @@ - [Address decoding limitations](#address-decoding-limitations) - [Flash mapped sections](#flash-mapped-sections) - [SC64 registers](#sc64-registers) - - [**STATUS/COMMAND**](#statuscommand) - - [**DATA0** and **DATA1**](#data0-and-data1) - - [**VERSION**](#version) - - [**KEY**](#key) + - [`0x1FFF_0000`: **STATUS/COMMAND**](#0x1fff_0000-statuscommand) + - [`0x1FFF_0004`: **DATA0** and `0x1FFF_0008`: **DATA1**](#0x1fff_0004-data0-and-0x1fff_0008-data1) + - [`0x1FFF_000C`: **VERSION**](#0x1fff_000c-version) + - [`0x1FFF_0010`: **KEY**](#0x1fff_0010-key) - [Command execution flow](#command-execution-flow) --- @@ -97,7 +97,7 @@ Support for interrupts is provided but currently no command relies on it, 64DD I --- -#### **STATUS/COMMAND** +#### `0x1FFF_0000`: **STATUS/COMMAND** | name | bits | access | meaning | | ------------- | ------ | ------ | ----------------------------------------------------- | @@ -111,7 +111,7 @@ Note: Write to this register raises `CMD_BUSY` bit and clears `CMD_ERROR` bit. F --- -#### **DATA0** and **DATA1** +#### `0x1FFF_0004`: **DATA0** and `0x1FFF_0008`: **DATA1** | name | bits | access | meaning | | --------- | ------ | ------ | ---------------------------------- | @@ -121,7 +121,7 @@ Note: Result is valid only when command has executed and `CMD_BUSY` bit is reset --- -#### **VERSION** +#### `0x1FFF_000C`: **VERSION** | name | bits | access | meaning | | --------- | ------ | ------ | --------------------------------------------- | @@ -131,7 +131,7 @@ Note: Writing any value to this register will clear pending flashcart interrupt. --- -#### **KEY** +#### `0x1FFF_0010`: **KEY** | name | bits | access | meaning | | ----- | ------ | ------ | ------------------------------------------ | diff --git a/docs/usb_commands.md b/docs/02_usb_commands.md similarity index 100% rename from docs/usb_commands.md rename to docs/02_usb_commands.md diff --git a/docs/n64_commands.md b/docs/03_n64_commands.md similarity index 100% rename from docs/n64_commands.md rename to docs/03_n64_commands.md diff --git a/docs/config_options.md b/docs/04_config_options.md similarity index 96% rename from docs/config_options.md rename to docs/04_config_options.md index 44fd2a9..1ab88e6 100644 --- a/docs/config_options.md +++ b/docs/04_config_options.md @@ -20,7 +20,7 @@ ## Supported config options SC64 provides simple flashcart configuration by exposing various options settable by both USB and N64 side. -All options other than **BOOTLOADER_SWITCH** are preserved on console reset or power cycle. +All options other than **BOOTLOADER_SWITCH** are preserved on console reset or power cycle (only when powered from USB). | id | name | type | description | | ---- | ----------------------- | ------- | ----------------------------------------------------------------------- | @@ -73,7 +73,7 @@ type: *bool* | default: `0` Last 128 kiB of SDRAM is shared between ROM data and SRAM/FlashRAM save data. Use this setting for applications requiring all of ROM section space including last 128 kiB. -Check [PI memory map](./memory_map.md#pi-memory-map) for more information. +Check [PI memory map](./01_memory_map.md#pi-memory-map) for more information. --- @@ -143,6 +143,7 @@ type: *word* | default: `0xFFFF` Use this setting to force specific CIC seed/version. Lower 8 bits represents CIC seed and 9th bit represents CIC version. By setting value `0xFFFF` bootloader will try to guess needed values from loaded ROM IPL3. +This setting is not used when **BOOT_MODE** is set to `3` (direct boot). --- @@ -157,6 +158,7 @@ type: *enum* | default: `3` Use this setting to force specific TV type. By setting value `3` bootloader will try to guess TV type from loaded ROM header. +This setting is not used when **BOOT_MODE** is set to `3` (direct boot). --- diff --git a/docs/05_fw_sw_building.md b/docs/05_fw_sw_building.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/06_manufacturing_guidelines.md b/docs/06_manufacturing_guidelines.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/README.md b/docs/README.md index 67664e6..74276ef 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,11 @@ --- -- [Memory map](./memory_map.md) -- [Config options](./config_options.md) -- [N64 commands](./n64_commands.md) -- [USB commands](./usb_commands.md) +## Documentation + +- [Memory map](./01_memory_map.md) +- [USB commands](./02_usb_commands.md) +- [N64 commands](./03_n64_commands.md) +- [Config options](./04_config_options.md) +- [FW/SW building](./05_fw_sw_building.md) +- [Manufacturing guidelines](./06_manufacturing_guidelines.md)