|
pico9918-core 1.3.0
TMS9918A / F18A video display processor emulation in C99
|
pico9918-core - utility / helper functions More...
#include "pico9918_util.h"
Include dependency graph for pico9918_util.c:Go to the source code of this file.
Macros | |
| #define | PICO9918_DLLEXPORT |
| #define | PICO9918_DLLEXPORT_CONST |
| #define | LAST_SPRITE_YPOS 0xD0 |
| the sprite Y value that terminates the sprite list | |
Functions | |
| static void | clearTmsRam (pico9918_t *tms9918) |
| zero the 16KB of VRAM, then park all 32 sprites past the end of the list | |
| PICO9918_DLLEXPORT void | pico9918_initialise_gfx_i (pico9918_t *tms9918) |
| program Graphics I, the default table addresses and black on cyan, then clear VRAM | |
| PICO9918_DLLEXPORT void | pico9918_initialise_gfx_ii (pico9918_t *tms9918) |
| as pico9918_initialise_gfx_i(), but for Graphics II and with the name table filled with a rising pattern index | |
Variables | |
| PICO9918_DLLEXPORT_CONST uint32_t | pico9918_palette [] |
| the sixteen TMS9918 colours, each packed as 0xrrggbbaa | |
pico9918-core - utility / helper functions
Copyright (c) 2022 Troy Schrapel
This code is licensed under the MIT license
https://github.com/visrealm/pico9918-core
Definition in file pico9918_util.c.
| #define PICO9918_DLLEXPORT |
Definition at line 16 of file pico9918_util.c.
| #define PICO9918_DLLEXPORT_CONST |
Definition at line 20 of file pico9918_util.c.
| #define LAST_SPRITE_YPOS 0xD0 |
the sprite Y value that terminates the sprite list
Definition at line 24 of file pico9918_util.c.
|
static |
zero the 16KB of VRAM, then park all 32 sprites past the end of the list
Definition at line 47 of file pico9918_util.c.
References LAST_SPRITE_YPOS, PICO9918_INST, pico9918_set_address_write(), pico9918_write_byte_rpt(), pico9918_write_data(), and TMS_DEFAULT_VRAM_SPRITE_ATTR_ADDRESS.
Referenced by pico9918_initialise_gfx_i(), and pico9918_initialise_gfx_ii().
| PICO9918_DLLEXPORT void pico9918_initialise_gfx_i | ( | pico9918_t * | tms9918 | ) |
program Graphics I, the default table addresses and black on cyan, then clear VRAM
set up Graphics I with the default table addresses and a cleared VRAM
Definition at line 64 of file pico9918_util.c.
References clearTmsRam(), PICO9918_INST, PICO9918_INST_ONLY, pico9918_set_color_table_addr(), pico9918_set_fg_bg_color(), pico9918_set_name_table_addr(), pico9918_set_pattern_table_addr(), pico9918_set_sprite_attr_table_addr(), pico9918_set_sprite_patt_table_addr(), pico9918_write_register_value(), TMS_DEFAULT_VRAM_COLOR_ADDRESS, TMS_DEFAULT_VRAM_NAME_ADDRESS, TMS_DEFAULT_VRAM_PATT_ADDRESS, TMS_DEFAULT_VRAM_SPRITE_ATTR_ADDRESS, TMS_DEFAULT_VRAM_SPRITE_PATT_ADDRESS, TMS_R0_EXT_VDP_DISABLE, TMS_R0_MODE_GRAPHICS_I, TMS_R1_DISP_ACTIVE, TMS_R1_INT_ENABLE, TMS_R1_MODE_GRAPHICS_I, and TMS_R1_RAM_16K.
| PICO9918_DLLEXPORT void pico9918_initialise_gfx_ii | ( | pico9918_t * | tms9918 | ) |
as pico9918_initialise_gfx_i(), but for Graphics II and with the name table filled with a rising pattern index
set up Graphics II with the default table addresses and a cleared VRAM
Definition at line 84 of file pico9918_util.c.
References clearTmsRam(), PICO9918_INST, PICO9918_INST_ONLY, pico9918_set_address_write(), pico9918_set_fg_bg_color(), pico9918_set_name_table_addr(), pico9918_set_sprite_attr_table_addr(), pico9918_set_sprite_patt_table_addr(), pico9918_write_data(), pico9918_write_register_value(), TMS_DEFAULT_VRAM_NAME_ADDRESS, TMS_DEFAULT_VRAM_SPRITE_ATTR_ADDRESS, TMS_DEFAULT_VRAM_SPRITE_PATT_ADDRESS, TMS_R0_EXT_VDP_DISABLE, TMS_R0_MODE_GRAPHICS_II, TMS_R1_DISP_ACTIVE, TMS_R1_INT_ENABLE, TMS_R1_MODE_GRAPHICS_II, and TMS_R1_RAM_16K.
| PICO9918_DLLEXPORT_CONST uint32_t pico9918_palette[] |
the sixteen TMS9918 colours, each packed as 0xrrggbbaa
Definition at line 27 of file pico9918_util.c.