pico9918-core 1.3.0
TMS9918A / F18A video display processor emulation in C99
Loading...
Searching...
No Matches
pico9918_palette.c File Reference

pico9918-core - Palette to pixel-pair LUT More...

+ Include dependency graph for pico9918_palette.c:

Go to the source code of this file.

Typedefs

typedef uint32_t PICO9918_MAY_ALIAS pico9918_aliasing_u32_t
 

Functions

static uint32_t cachePixelPair (PICO9918_PALETTE_LUT_T *dest, const uint16_t *source)
 
PICO9918_NOINLINE void pico9918_palette_regenerate (pico9918_t *tms9918)
 

Variables

PICO9918_PALETTE_LUT_T pico9918_palette_lut [256]
 
const pico9918_t * pico9918_palette_owner = 0
 
static uint32_t paletteShadow [32]
 
static uint8_t paletteShadowLayout
 

Detailed Description

pico9918-core - Palette to pixel-pair LUT

Copyright (c) 2021 Troy Schrapel

This code is licensed under the MIT license

https://github.com/visrealm/pico9918-core

Builds the 256-entry LUT that the scanline expansion consumes. The indexed scanline buffer is always a 256-byte stream; only the meaning of a byte changes per mode, so the build is selected once per rebuild and never per pixel.

The colour transform itself is host policy - PICO9918_PIXEL_FROM_RGB12 - so this TU is portable and the Pico build still emits the BGR12 pair trick. (A pram entry is byte-swapped RGB444, 0xGB0R; the macro's input contract is documented in platform/pico/platform_pico.h.)

Definition in file pico9918_palette.c.

Typedef Documentation

◆ pico9918_aliasing_u32_t

typedef uint32_t PICO9918_MAY_ALIAS pico9918_aliasing_u32_t

Definition at line 37 of file pico9918_palette.c.

Function Documentation

◆ cachePixelPair()

static uint32_t cachePixelPair ( PICO9918_PALETTE_LUT_T *  dest,
const uint16_t *  source 
)
inlinestatic

Definition at line 55 of file pico9918_palette.c.

◆ pico9918_palette_regenerate()

PICO9918_NOINLINE void pico9918_palette_regenerate ( pico9918_t *  tms9918)

Definition at line 65 of file pico9918_palette.c.

Variable Documentation

◆ pico9918_palette_lut

PICO9918_PALETTE_LUT_T pico9918_palette_lut[256]

Definition at line 28 of file pico9918_palette.c.

◆ pico9918_palette_owner

const pico9918_t* pico9918_palette_owner = 0

Definition at line 31 of file pico9918_palette.c.

◆ paletteShadow

uint32_t paletteShadow[32]
static

Definition at line 50 of file pico9918_palette.c.

◆ paletteShadowLayout

uint8_t paletteShadowLayout
static

Definition at line 51 of file pico9918_palette.c.