|
pico9918-core 1.3.0
TMS9918A / F18A video display processor emulation in C99
|
pico9918-core - the post-palette pixel path More...
Include dependency graph for pixel_test.c:Go to the source code of this file.
Macros | |
| #define | H_VIRTUAL 640u |
| #define | H_BORDER ((H_VIRTUAL - TMS9918_PIXELS_X * 2u) / 2u) /* 64 pixels each side */ |
| #define | SENTINEL 0xbeefu |
Functions | |
| static void | fail (const char *what, unsigned where, unsigned wanted, unsigned got) |
| static void | regWrite (uint8_t reg, uint8_t value) |
| static void | unlock (void) |
| static void | distinctPalette (void) |
| static uint16_t | want (int index) |
| static void | renderLines (uint16_t from, uint16_t to) |
| static uint16_t | activeLine (void) |
| static void | renderOneActiveLine (void) |
| static void | text80 (void) |
| static void | checkLineBytes (const char *stage, uint32_t wanted) |
| static void | checkDoubledLayout (const char *stage) |
| static void | checkPackedLayout (const char *stage) |
| static void | checkGeometry (const char *stage, int doubled) |
| static uint16_t | dimmed (uint16_t src) |
| static void | setScanlines (int on) |
| static void | checkDimMaths (void) |
| static void | checkDimScale1 (void) |
| int | main (void) |
Variables | |
| static pico9918_scanline_params_t | params = {H_VIRTUAL, 240, false, 0} |
| static PICO9918_PIXEL_T | line [H_VIRTUAL+16] |
| static int | failures |
pico9918-core - the post-palette pixel path
Copyright (c) 2026 Troy Schrapel
This code is licensed under the MIT license
https://github.com/visrealm/pico9918-core
Everything between a palette index and a host's framebuffer, which nothing else covers: the goldens render a 256-byte line and digest it, and the scene suite compares palette INDEXES. Neither looks at a wide row's colours, and neither looks at where in the scanline the picture lands.
Both are load-bearing for a host. The LUT has two layouts - a pixel pair per entry for every mode that doubles, and a nibble pair for the 4bpp 80-column line - and a row that picks the wrong one still renders, in the wrong colours. The geometry is denominated in 32-bit words holding two pixels, so a host that reads the window at the wrong offset gets the border fill through the middle of its picture.
Definition in file pixel_test.c.
| #define H_VIRTUAL 640u |
Definition at line 29 of file pixel_test.c.
| #define H_BORDER ((H_VIRTUAL - TMS9918_PIXELS_X * 2u) / 2u) /* 64 pixels each side */ |
Definition at line 30 of file pixel_test.c.
| #define SENTINEL 0xbeefu |
Definition at line 31 of file pixel_test.c.
|
static |
Definition at line 38 of file pixel_test.c.
|
static |
Definition at line 43 of file pixel_test.c.
|
static |
Definition at line 49 of file pixel_test.c.
|
static |
Definition at line 57 of file pixel_test.c.
|
static |
Definition at line 62 of file pixel_test.c.
|
static |
Definition at line 67 of file pixel_test.c.
|
static |
Definition at line 74 of file pixel_test.c.
|
static |
Definition at line 84 of file pixel_test.c.
|
static |
Definition at line 90 of file pixel_test.c.
|
static |
Definition at line 99 of file pixel_test.c.
|
static |
Definition at line 115 of file pixel_test.c.
|
static |
Definition at line 133 of file pixel_test.c.
|
static |
Definition at line 153 of file pixel_test.c.
|
static |
Definition at line 182 of file pixel_test.c.
|
static |
Definition at line 189 of file pixel_test.c.
|
static |
Definition at line 199 of file pixel_test.c.
|
static |
Definition at line 230 of file pixel_test.c.
| int main | ( | void | ) |
Definition at line 259 of file pixel_test.c.
|
static |
Definition at line 33 of file pixel_test.c.
|
static |
Definition at line 34 of file pixel_test.c.
|
static |
Definition at line 36 of file pixel_test.c.