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

pico9918-core - Splash overlay More...

#include "impl/platform.h"
#include "pico9918.h"
#include "pico9918_build_config.h"
#include <stdbool.h>
#include <stdint.h>
+ Include dependency graph for splash.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PICO9918_NO_SPLASH   0
 set to 1 to build without the splash overlay
 
#define PICO9918_F18A_BADGE_WIDTH   56
 badge columns - must stay a multiple of 8, see splash.c
 
#define PICO9918_F18A_BADGE_HEIGHT   14
 badge rows, each one OUTPUT line rather than one display line
 
#define PICO9918_F18A_BADGE_FRAMES   384
 frames the badge is shown for, counting from reset
 

Functions

 PICO9918_STATIC_ASSERT (sizeof(PICO9918_PIXEL_T)==PICO9918_BUILD_PIXEL_SIZE, "PICO9918_PIXEL_T does not match the width this library was built " "with (see pico9918_build_config.h). Select the same pixel " "policy the library used - one ships, and it is the default in " "platform/ on both platforms.")
 
void pico9918_splash_reset (void)
 restart the splash animation (after... reset)
 
void pico9918_splash_allow_hide (void)
 allow the splash to animate back out - the host calls this once the display has been enabled
 
void pico9918_splash_render (uint16_t y, uint32_t frameCount, uint32_t vBorder, uint32_t vPixels, uint32_t vVirtualPixels, PICO9918_PIXEL_T *pixels)
 render the splash logo into the scanline buffer, if row y falls in the logo band.
 
void pico9918_splash_select_pro (bool pro)
 render the F18A's power-on badge into the scanline buffer
 
bool pico9918_f18a_badge_render (uint16_t outputLine, uint32_t frameCount, PICO9918_PIXEL_T *pixels)
 

Detailed Description

pico9918-core - Splash overlay

Copyright (c) 2024 Troy Schrapel

This code is licensed under the MIT license

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

The splash logo the device shows over the bottom border for its first few hundred frames, before the host enables the display. Device behaviour, not decoration - an emulator that omits it is not emulating the device.

Geometry arrives per call. The overlay owns no display parameters, so this header carries no host dependency; the caller supplies the row counts it already has.

PICO9918_NO_SPLASH compiles this module to nothing (the build also drops the image asset), so the calls remain valid and cost nothing.

Definition in file splash.h.

Macro Definition Documentation

◆ PICO9918_NO_SPLASH

#define PICO9918_NO_SPLASH   0

set to 1 to build without the splash overlay

Definition at line 35 of file splash.h.

◆ PICO9918_F18A_BADGE_WIDTH

#define PICO9918_F18A_BADGE_WIDTH   56

badge columns - must stay a multiple of 8, see splash.c

Definition at line 82 of file splash.h.

◆ PICO9918_F18A_BADGE_HEIGHT

#define PICO9918_F18A_BADGE_HEIGHT   14

badge rows, each one OUTPUT line rather than one display line

Definition at line 84 of file splash.h.

◆ PICO9918_F18A_BADGE_FRAMES

#define PICO9918_F18A_BADGE_FRAMES   384

frames the badge is shown for, counting from reset

Definition at line 86 of file splash.h.

Function Documentation

◆ pico9918_splash_reset()

void pico9918_splash_reset ( void  )

restart the splash animation (after... reset)

Definition at line 57 of file splash.c.

Referenced by pico9918_reset().

◆ pico9918_splash_allow_hide()

void pico9918_splash_allow_hide ( void  )

allow the splash to animate back out - the host calls this once the display has been enabled

Definition at line 64 of file splash.c.

Referenced by pico9918_frame_end().

◆ pico9918_splash_render()

void pico9918_splash_render ( uint16_t  y,
uint32_t  frameCount,
uint32_t  vBorder,
uint32_t  vPixels,
uint32_t  vVirtualPixels,
PICO9918_PIXEL_T *  pixels 
)

render the splash logo into the scanline buffer, if row y falls in the logo band.

Also advances the animation, on y == 0.

Definition at line 74 of file splash.c.

Referenced by pico9918_frame_scanline().

◆ pico9918_splash_select_pro()

void pico9918_splash_select_pro ( bool  pro)

render the F18A's power-on badge into the scanline buffer

What PICO9918_CHIP_F18A shows where PICO9918_CHIP_PICO9918 shows its own splash. Not gated behind PICO9918_NO_SPLASH: that option drops the PICO9918's splash, and an F18A still has a badge.

outputLine is the host's OUTPUT line, not a display line, so one row of the badge is one physical scanline. Only a host driving pico9918_frame_output_line gets it; an interlaced one, which drives pico9918_frame_scanline per field, does not.

Returns
whether it drew, i.e. whether pixels changed.

choose the PRO artwork over the PICO9918's

pico9918_set_chip calls this; a host has no reason to. Only a runtime-chip build carries both images - a board resolves its one at build time.

Definition at line 36 of file splash.c.

Referenced by pico9918_set_chip().

◆ pico9918_f18a_badge_render()

bool pico9918_f18a_badge_render ( uint16_t  outputLine,
uint32_t  frameCount,
PICO9918_PIXEL_T *  pixels 
)

Definition at line 147 of file splash.c.