|
pico9918-core 1.3.0
TMS9918A / F18A video display processor emulation in C99
|
pico9918-core - the library-paced GPU More...
Include dependency graph for gpu_test.c:Go to the source code of this file.
Macros | |
| #define | PROGRAM_AT 0x2000u |
| #define | RESULT_AT 0x2100u |
| #define | MARKER 0xbeefu |
| #define | NEW_WP 0x2800u |
| #define | DMA_SRC 0x1000u |
| #define | DMA_DST 0x1800u |
Functions | |
| static void | fail (const char *what, unsigned wanted, unsigned got) |
| static void | regWrite (uint8_t reg, uint8_t value) |
| static void | unlock (void) |
| static void | loadProgram (void) |
| static uint16_t | result (void) |
| static void | arm (void) |
| static void | loadDmaProgram (void) |
| static void | loadWorkspaceProgram (void) |
| static void | loadEchoProgram (void) |
| static void | loadStatusProgram (void) |
| static void | dma (uint32_t src, uint32_t dst, uint8_t width, uint8_t height, uint8_t stride, uint8_t params) |
| static void | expect (const char *what, uint32_t at, uint8_t wanted) |
| static bool | stepWatch (pico9918_t *vdp, uint16_t pc, void *userdata) |
| int | main (void) |
Variables | |
| static int | failures |
| static uint16_t | stepPc [8] |
| static unsigned | stepCalls |
| static uint16_t | stepStopAt |
| static unsigned | stepWrongArgs |
pico9918-core - the library-paced GPU
Copyright (c) 2026 Troy Schrapel
This code is licensed under the MIT license
https://github.com/visrealm/pico9918-core
pico9918_gpu_set_clock's contract, which nothing else covers: a rate makes the library run an armed program from inside the arming write, and zero leaves the GPU to the host.
The first half is what software detecting an F18A depends on. The probe arms a tiny self-modifying program and reads its result back within a handful of host cycles, so a host servicing the GPU once a scanline sees the chip only when a scanline boundary happens to fall in between - a real flaky-detection bug in two emulators.
The last section is the DMA engine, which is here because a program triggering one is the only way to reach it: the ports it answers to are above the address space a host can write.
Definition in file gpu_test.c.
| #define PROGRAM_AT 0x2000u |
Definition at line 30 of file gpu_test.c.
| #define RESULT_AT 0x2100u |
Definition at line 31 of file gpu_test.c.
| #define MARKER 0xbeefu |
Definition at line 32 of file gpu_test.c.
| #define NEW_WP 0x2800u |
Definition at line 102 of file gpu_test.c.
| #define DMA_SRC 0x1000u |
Definition at line 148 of file gpu_test.c.
| #define DMA_DST 0x1800u |
Definition at line 149 of file gpu_test.c.
|
static |
Definition at line 36 of file gpu_test.c.
|
static |
Definition at line 42 of file gpu_test.c.
|
static |
Definition at line 48 of file gpu_test.c.
|
static |
Definition at line 62 of file gpu_test.c.
|
static |
Definition at line 73 of file gpu_test.c.
|
static |
Definition at line 79 of file gpu_test.c.
|
static |
Definition at line 94 of file gpu_test.c.
|
static |
Definition at line 109 of file gpu_test.c.
|
static |
Definition at line 125 of file gpu_test.c.
|
static |
Definition at line 141 of file gpu_test.c.
|
static |
Definition at line 153 of file gpu_test.c.
|
static |
Definition at line 175 of file gpu_test.c.
|
static |
Definition at line 185 of file gpu_test.c.
| int main | ( | void | ) |
Definition at line 210 of file gpu_test.c.
|
static |
Definition at line 34 of file gpu_test.c.
|
static |
Definition at line 180 of file gpu_test.c.
|
static |
Definition at line 181 of file gpu_test.c.
|
static |
Definition at line 182 of file gpu_test.c.
|
static |
Definition at line 183 of file gpu_test.c.