|
pico9918-core 1.3.0
TMS9918A / F18A video display processor emulation in C99
|
pico9918-core - Platform Abstraction (portable C) More...
#include <stdint.h>#include <string.h>#include <time.h>
Include dependency graph for platform_std.h:Go to the source code of this file.
Data Structures | |
| struct | pico9918_fill32_t |
| struct | pico9918_copy32_t |
Macros | |
| #define | PICO9918_SECTION_SCRATCH_X(name) |
| #define | PICO9918_SECTION_SCRATCH_Y(name) |
| #define | PICO9918_UNINITIALIZED(decl) decl |
| #define | PICO9918_IN_FLASH_FUNC(fn) fn |
| #define | PICO9918_HOST_SET_INT(active) ((void)(active)) |
| #define | PICO9918_FILL_BORDER pico9918_fill_border |
| #define | PICO9918_FILL32_INIT(inst, srcPtr) |
| #define | PICO9918_FILL32_SET_COUNT(inst, n) |
| #define | PICO9918_FILL32_TRIGGER(inst, dstPtr) |
| #define | PICO9918_FILL32_WAIT(inst) ((void)0) /* TRIGGER is synchronous */ |
| #define | PICO9918_DMA_CLAIM() ((void)0) |
| #define | PICO9918_FILL_MASKS pico9918_fill_masks |
| #define | PICO9918_FILL_LINE pico9918_fill_line |
| #define | PICO9918_COPY pico9918_copy |
| #define | PICO9918_COPY_STATE() |
| #define | PICO9918_COPY_INIT(inst) |
| #define | PICO9918_COPY_SET_WIDTH(inst, wordAligned) |
| #define | PICO9918_COPY_SET_SRC(inst, srcPtr) |
| #define | PICO9918_COPY_SET_DST(inst, dstPtr) |
| #define | PICO9918_COPY_TRIGGER(inst, n) memcpy((inst).dst, (inst).src, (size_t)(n) << (inst).shift) |
| #define | PICO9918_COPY_WAIT(inst) ((void)0) /* TRIGGER is synchronous */ |
| #define | PICO9918_DIVMOD_U32(n, d, q, r) |
| #define | PICO9918_PIXEL_T PICO9918_PIXEL_T |
| #define | PICO9918_PIXEL_FROM_RGB12(rgb) ((PICO9918_PIXEL_T)(((rgb) & 0xFF0F) | ((((rgb) & 0xFF0F) >> 12) << 4))) |
| #define | PICO9918_PIXEL_FROM_RGB12_PAIR(packed) |
| #define | PICO9918_PIXEL_PAIR(p) ((uint32_t)(p) * 0x10001u) |
| #define | PICO9918_LOW16(x) ((uint32_t)(uint16_t)(x)) |
| #define | PICO9918_PIXEL_DARKEN(p) ((PICO9918_PIXEL_T)(((p) >> 2) & 0x333)) |
| #define | PICO9918_PIXEL_PAIR_DIM(w) (((w) >> 1) & 0x07770777u) |
| #define | PICO9918_INK_T PICO9918_INK_T |
| #define | PICO9918_INK_PIXELS 2 |
| #define | PICO9918_INK_FILL(fg) PICO9918_PIXEL_PAIR(fg) |
| #define | PICO9918_INK_DARKEN(w) (((w) >> 2) & 0x03330333u) |
| #define | PICO9918_INK_ONE(k) (0xffffu << ((k) * 16)) |
| #define | PICO9918_PALETTE_LUT_T PICO9918_PALETTE_LUT_T |
| #define | PICO9918_EXPAND_INIT(lut) ((void)0) |
| #define | PICO9918_EXPAND_INDEXED(dst, src, n, lut) |
| #define | PICO9918_EXPAND_INDEXED_WIDE(dst, src, n, lut) |
| #define | __force_inline inline |
Typedefs | |
| typedef uint16_t | PICO9918_PIXEL_T |
| typedef uint32_t | PICO9918_INK_T |
| typedef uint32_t | PICO9918_PALETTE_LUT_T |
Functions | |
| static uint32_t | time_us_32 (void) |
Variables | |
| pico9918_fill32_t | pico9918_fill_border |
| pico9918_fill32_t | pico9918_fill_masks |
| pico9918_fill32_t | pico9918_fill_line |
| pico9918_copy32_t | pico9918_copy |
pico9918-core - Platform Abstraction (portable C)
Copyright (c) 2021 Troy Schrapel
This code is licensed under the MIT license
https://github.com/visrealm/pico9918-core
Included by impl/platform.h when PICO_BUILD is not defined. Do not include directly.
Every macro here is overridable: a host may #define any PICO9918_* symbol before including pico9918.h to substitute its own (a real lock, a BGRA pixel type, a different fill). Defaults are guarded accordingly.
Definition in file platform_std.h.
| #define PICO9918_SECTION_SCRATCH_X | ( | name | ) |
Definition at line 25 of file platform_std.h.
| #define PICO9918_SECTION_SCRATCH_Y | ( | name | ) |
Definition at line 26 of file platform_std.h.
| #define PICO9918_UNINITIALIZED | ( | decl | ) | decl |
Definition at line 29 of file platform_std.h.
| #define PICO9918_IN_FLASH_FUNC | ( | fn | ) | fn |
Definition at line 32 of file platform_std.h.
| #define PICO9918_HOST_SET_INT | ( | active | ) | ((void)(active)) |
Definition at line 47 of file platform_std.h.
| #define PICO9918_FILL_BORDER pico9918_fill_border |
Definition at line 68 of file platform_std.h.
| #define PICO9918_FILL32_INIT | ( | inst, | |
| srcPtr | |||
| ) |
Definition at line 70 of file platform_std.h.
| #define PICO9918_FILL32_SET_COUNT | ( | inst, | |
| n | |||
| ) |
Definition at line 76 of file platform_std.h.
| #define PICO9918_FILL32_TRIGGER | ( | inst, | |
| dstPtr | |||
| ) |
Definition at line 82 of file platform_std.h.
| #define PICO9918_FILL32_WAIT | ( | inst | ) | ((void)0) /* TRIGGER is synchronous */ |
Definition at line 90 of file platform_std.h.
| #define PICO9918_DMA_CLAIM | ( | ) | ((void)0) |
Definition at line 93 of file platform_std.h.
| #define PICO9918_FILL_MASKS pico9918_fill_masks |
Definition at line 103 of file platform_std.h.
| #define PICO9918_FILL_LINE pico9918_fill_line |
Definition at line 104 of file platform_std.h.
| #define PICO9918_COPY pico9918_copy |
Definition at line 117 of file platform_std.h.
| #define PICO9918_COPY_STATE | ( | ) |
Definition at line 120 of file platform_std.h.
| #define PICO9918_COPY_INIT | ( | inst | ) |
Definition at line 121 of file platform_std.h.
| #define PICO9918_COPY_SET_WIDTH | ( | inst, | |
| wordAligned | |||
| ) |
Definition at line 126 of file platform_std.h.
| #define PICO9918_COPY_SET_SRC | ( | inst, | |
| srcPtr | |||
| ) |
Definition at line 131 of file platform_std.h.
| #define PICO9918_COPY_SET_DST | ( | inst, | |
| dstPtr | |||
| ) |
Definition at line 136 of file platform_std.h.
| #define PICO9918_COPY_TRIGGER | ( | inst, | |
| n | |||
| ) | memcpy((inst).dst, (inst).src, (size_t)(n) << (inst).shift) |
Definition at line 141 of file platform_std.h.
| #define PICO9918_COPY_WAIT | ( | inst | ) | ((void)0) /* TRIGGER is synchronous */ |
Definition at line 142 of file platform_std.h.
| #define PICO9918_DIVMOD_U32 | ( | n, | |
| d, | |||
| q, | |||
| r | |||
| ) |
Definition at line 145 of file platform_std.h.
| #define PICO9918_PIXEL_T PICO9918_PIXEL_T |
Definition at line 168 of file platform_std.h.
| #define PICO9918_PIXEL_FROM_RGB12 | ( | rgb | ) | ((PICO9918_PIXEL_T)(((rgb) & 0xFF0F) | ((((rgb) & 0xFF0F) >> 12) << 4))) |
Definition at line 178 of file platform_std.h.
| #define PICO9918_PIXEL_FROM_RGB12_PAIR | ( | packed | ) |
Definition at line 185 of file platform_std.h.
| #define PICO9918_PIXEL_PAIR | ( | p | ) | ((uint32_t)(p) * 0x10001u) |
Definition at line 191 of file platform_std.h.
| #define PICO9918_LOW16 | ( | x | ) | ((uint32_t)(uint16_t)(x)) |
Definition at line 195 of file platform_std.h.
| #define PICO9918_PIXEL_DARKEN | ( | p | ) | ((PICO9918_PIXEL_T)(((p) >> 2) & 0x333)) |
Definition at line 200 of file platform_std.h.
| #define PICO9918_PIXEL_PAIR_DIM | ( | w | ) | (((w) >> 1) & 0x07770777u) |
Definition at line 208 of file platform_std.h.
| #define PICO9918_INK_T PICO9918_INK_T |
Definition at line 216 of file platform_std.h.
| #define PICO9918_INK_PIXELS 2 |
Definition at line 217 of file platform_std.h.
| #define PICO9918_INK_FILL | ( | fg | ) | PICO9918_PIXEL_PAIR(fg) |
Definition at line 218 of file platform_std.h.
| #define PICO9918_INK_DARKEN | ( | w | ) | (((w) >> 2) & 0x03330333u) |
Definition at line 219 of file platform_std.h.
| #define PICO9918_INK_ONE | ( | k | ) | (0xffffu << ((k) * 16)) |
Definition at line 220 of file platform_std.h.
| #define PICO9918_PALETTE_LUT_T PICO9918_PALETTE_LUT_T |
Definition at line 229 of file platform_std.h.
| #define PICO9918_EXPAND_INIT | ( | lut | ) | ((void)0) |
Definition at line 234 of file platform_std.h.
| #define PICO9918_EXPAND_INDEXED | ( | dst, | |
| src, | |||
| n, | |||
| lut | |||
| ) |
Definition at line 242 of file platform_std.h.
| #define PICO9918_EXPAND_INDEXED_WIDE | ( | dst, | |
| src, | |||
| n, | |||
| lut | |||
| ) |
Definition at line 271 of file platform_std.h.
| #define __force_inline inline |
Definition at line 318 of file platform_std.h.
| typedef uint16_t PICO9918_PIXEL_T |
Definition at line 167 of file platform_std.h.
| typedef uint32_t PICO9918_INK_T |
Definition at line 215 of file platform_std.h.
| typedef uint32_t PICO9918_PALETTE_LUT_T |
Definition at line 228 of file platform_std.h.
|
inlinestatic |
Definition at line 298 of file platform_std.h.