From dd97f166f16d3b0579cf59a860c3f1fe8dbf5e33 Mon Sep 17 00:00:00 2001 From: Kyle Cardoza Date: Sat, 23 Mar 2024 00:39:51 -0400 Subject: [PATCH] Work on fleshing out sections --- Executables.md | 24 ++++++++++++++++++++++++ Expansion Port.md | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 Executables.md diff --git a/Executables.md b/Executables.md new file mode 100644 index 0000000..7f7c94e --- /dev/null +++ b/Executables.md @@ -0,0 +1,24 @@ +--- +gitea: none +include_toc: true +--- + +# Executables + +Sentinel 65X's firmware is designed to load and execute binaries in the `PGZ` format. This is a multi-segment binary file format which can load data into any number of areas of memory from a compact binary. + +## PGZ Format + +The first byte of a PGZ file is always an ASCII "Z". + +This is followed by one or more segments, packed with no padding or separator. Each such segment has the following format: + +| Offset | Length | Description | +| :----: | :----: | :------------: | +| 0 | 3 bytes | Target address | +| 3 | 3 bytes | Length of data | +| 6 | ... | Data | + +This enables the binary loader to be extremely simple, as the data to be read into memory is always read from a contiguous region of memory, and the information provided is sufficient to make use of the C standard library `memcpy()` function. + +The final segment is special: its target address represents the entry point to the executable, and its length of data value is always `0x000000`. The loader can easily detect this to identify when loading is done and where to enter the program. diff --git a/Expansion Port.md b/Expansion Port.md index baf3abd..466d79d 100644 --- a/Expansion Port.md +++ b/Expansion Port.md @@ -8,3 +8,40 @@ include_toc: true Sentinel 65X features an expansion port along one side of the mainboard PCB. This port, a male edge connnector, exposes the same pins as the [cartridge port](Cartridge Port.md), and is intended to connect to a buffered backplane accessory. The port also features test points for all the signals on the port. As with the cartridge port, the expansion port exposes the full system bus, as well as several chip select signals which simplify the development of expansions. + +## Pinout + +| Pin | Label | | Label | Pin | +| :---: | :--------: | --- | :--------: | :---: | +| b1 | PHI2 | | GND | a1 | +| b2 | /RES | | +3.3V | a2 | +| b3 | A0 | | A1 | a3 | +| b4 | A2 | | A3 | a4 | +| b5 | A4 | | A5 | a5 | +| b6 | A6 | | A7 | a6 | +| b7 | A8 | | A9 | a7 | +| b8 | A10 | | A11 | a8 | +| b9 | A12 | | A13 | a9 | +| b10 | A14 | | A15 | a10 | +| b11 | A16 | | A17 | a11 | +| b12 | A18 | | A19 | a12 | +| b13 | A20 | | A21 | a13 | +| b14 | A22 | | A23 | a14 | +| b15 | D0 | | D1 | a15 | +| b16 | D2 | | D3 | a16 | +| b17 | D4 | | D5 | a17 | +| b18 | D6 | | GND | a18 | +| b19 | D7 | | /WR | a19 | +| b20 | /RD | | /RAM1 | a20 | +| b21 | /ROM1 | | BE | a21 | +| b22 | /CS6 | | /CS7 | a22 | +| b23 | /CS1 | | RUN | a23 | +| b24 | BA | | /IRQ | a24 | +| b25 | R/W | | /VIRQ | a25 | +| b26 | /CS0 | | /NMI | a26 | +| b27 | SNES_DATA0 | | SCL | a27 | +| b28 | SNES_DATA1 | | SDA | a28 | +| b29 | SNES_DATA2 | | SNES_LATCH | a29 | +| b30 | SNES_DATA3 | | SNES_CLK | a30 | +| b31 | /CART | | +3.3V | a31 | +| b32 | +5V | | GND | a32 |