The VERA FPGA core, implemented on an iCE40 FPGA, is used to generate all audio and video signals produced by Sentinel 65X. This core, developed for the Commander X16 project by Frank van den Hoef, is licensed under the MIT license. It has been modified by Brian Swetland for Sentinel 65X, including porting it to be built using the Yosys open-source FPGA toolchain.
The VERA video generator outputs a fixed 640x480, 60Hz digital RGB signal, with a total of 4,096 possible colours, using a 12-bit R4G4B4 colour space.
The video generation is done using two independent tile/bitmap layers, and a third layer composed of 128 sprites. VERA supports a single palette of 256 colours, freely chosen from the 4,096 possible colours available.
## Audio
The VERA FPGA core produces audio output in i2S format, which is fed to the A/V port for conversion into an analog or digital format suitable for the target display device.
Audio is generated using a 16-voice stereo programmable sound generator, with each voice able to generate sounds independently, with the waveform for each chosen freely from among Pulse, Sawtooth, Triangle, and Noise.
VERA also generates sampled 48KHz 16-bit stereo audio from a 4KB on-chip memory buffer.
## Interrupts
The VERA implementation in Sentinel 65X has a dedicated vectored interrupt line to the CPU, which can be triggered by any or all of four conditions: Sprite collision, line number, PCM buffer status, or VSYNC.
Audio and video output in Sentinel 65X is directed to a pin header, which is connected to a small daughterboard which actually generates the final audio and video output signals, using electronics and connectors appropriate to the target display.
The A/V port is a 24-pin female pin header, with a pin and row pitch of 2.54mm. The pinout of the port, as seen from above, is shown in the following table:
<tdcolspan="8"align="center">Map Base Address (16:9)</td>
</tr>
<tr>
<td>$0F</td>
<td>L0_TILEBASE</td>
<tdcolspan="6"align="center">Tile Base Address (16:11)</td>
<tdcolspan="1"align="center">Tile Height</td>
<tdcolspan="1"align="center">Tile Width</td>
</tr>
<tr>
<td>$10</td>
<td>L0_HSCROLL_L</td>
<tdcolspan="8"align="center">H-Scroll (7:0)</td>
</tr>
<tr>
<td>$11</td>
<td>L0_HSCROLL_H</td>
<tdcolspan="4"align="center">-</td>
<tdcolspan="8"align="center">H-Scroll (11:8)</td>
</tr>
<tr>
<td>$12</td>
<td>L0_VSCROLL_L</td>
<tdcolspan="8"align="center">V-Scroll (7:0)</td>
</tr>
<tr>
<td>$13</td>
<td>L0_VSCROLL_H</td>
<tdcolspan="4"align="center">-</td>
<tdcolspan="8"align="center">V-Scroll (11:8)</td>
</tr>
<tr>
<td>$14</td>
<td>L1_CONFIG</td>
<tdcolspan="2"align="center">Map Height</td>
<tdcolspan="2"align="center">Map Width</td>
<tdcolspan="1"align="center">T256C</td>
<tdcolspan="1"align="center">Bitmap Mode</td>
<tdcolspan="2"align="center">Color Depth</td>
</tr>
<tr>
<td>$15</td>
<td>L1_MAPBASE</td>
<tdcolspan="8"align="center">Map Base Address (16:9)</td>
</tr>
<tr>
<td>$16</td>
<td>L1_TILEBASE</td>
<tdcolspan="6"align="center">Tile Base Address (16:11)</td>
<tdcolspan="1"align="center">Tile Height</td>
<tdcolspan="1"align="center">Tile Width</td>
</tr>
<tr>
<td>$17</td>
<td>L1_HSCROLL_L</td>
<tdcolspan="8"align="center">H-Scroll (7:0)</td>
</tr>
<tr>
<td>$18</td>
<td>L1_HSCROLL_H</td>
<tdcolspan="4"align="center">-</td>
<tdcolspan="8"align="center">H-Scroll (11:8)</td>
</tr>
<tr>
<td>$19</td>
<td>L1_VSCROLL_L</td>
<tdcolspan="8"align="center">V-Scroll (7:0)</td>
</tr>
<tr>
<td>$1A</td>
<td>L1_VSCROLL_H</td>
<tdcolspan="4"align="center">-</td>
<tdcolspan="8"align="center">V-Scroll (11:8)</td>
</tr>
<tr>
<td>$1B</td>
<td>AUDIO_CTRL</td>
<tdcolspan="1"align="center">FIFO Full / FIFO Reset</td>
<tdcolspan="1"align="center">FIFO Empty</td>
<tdcolspan="1"align="center">16-Bit</td>
<tdcolspan="1"align="center">Stereo</td>
<tdcolspan="4"align="center">PCM Volume</td>
</tr>
<tr>
<td>$1C</td>
<td>AUDIO_RATE</td>
<tdcolspan="8"align="center">PCM Sample Rate</td>
</tr>
<tr>
<td>$1D</td>
<td>AUDIO_DATA</td>
<tdcolspan="8"align="center">Audio FIFO data (write-only)</td>
</tr>
<tr>
<td>$1E</td>
<td>SPI_DATA</td>
<tdcolspan="8"align="center">Data</td>
</tr>
<tr>
<td>$1F</td>
<td>SPI_CTRL</td>
<tdcolspan="1"align="center">Busy</td>
<tdcolspan="4"align="center">-</td>
<tdcolspan="1"align="center">Auto-tx</td>
<tdcolspan="1"align="center">Slow clock</td>
<tdcolspan="1"align="center">Select</td>
</tr>
</table>
## VERA Memory
VERA implements 128KB of internal memory, which exists in its own independent address space, connected to the CPU's address space through address and data registers. This RAM's address space is numbered from `0x00000` to `0x1FFFF`, and is organized as in the following table: