 |
PicoVGA
1.0-cmake
VGA/TV display on Raspberry Pico
|
Go to the documentation of this file.
12 #define VGADARK(num,col) (((u32)(vga_offset_dark+BASE_OFFSET)<<27) | ((u32)(num)<<8) | (u32)(col)) // assemble control word of "dark" command
13 #define VGACMD(jmp,num) (((u32)(jmp)<<27) | (u32)(num)) // assemble control word
18 #define VGAKEY(delay,num,col) (((u32)((delay)+1)<<19) | ((u32)(col)<<11) | (u32)((num)-1))
21 #define VGAMONO(delay,num,col) (((u32)((delay)+0)<<20) | ((u32)(col)<<12) | ((u32)((num)-1)<<1) | B0)
24 #define VGACOLOR(delay,num) (((u32)((delay)+2)<<20) | ((u32)0xff<<12) | ((u32)((num)-1)<<1) | 0)
27 #define VGABLACK(delay,num) (((u32)((delay)+3)<<16) | (u32)((num)-1))
30 #define VGAWHITE(delay,num) (((u32)((delay)+3)<<16) | (u32)((num)-1))
33 #define VGARLE(delay) ((delay)+1)
36 #define BYTESWAP(n) ((((n)&0xff)<<24)|(((n)&0xff00)<<8)|(((n)&0xff0000)>>8)|(((n)&0xff000000)>>24))
39 #define ALIGN4(x) ((x) & ~3)
44 const struct pio_program* prg;
59 extern u8 LayerProgInx;
73 extern u8 LayerModeInx[LAYERS];
293 void LayerSetup(u8 inx,
const u8* img,
const sVmode* vmode, u16 w, u16 h, u8 col = 0,
const void* par = NULL);
312 s8 horiz,
const int* mat, u8 col = 0);
393 s16 x, s16 y, u16 w, u16 h, u8 col = 0);
411 void SpritePrepLines(
const u8* img, u8* x0, u8* w0, u16 w, u16 h, u16 wb, u8 col, Bool fast);
427 #endif // _VGA_LAYER_H
u8 ybits
Number of bits of height of source image (only with LAYERMODE_PERSP* modes)
Definition: vga_layer.h:209
Sprite (on change update SSPRITE_* in define.h)
Definition: vga_layer.h:216
Bool on
Layer is ON.
Definition: vga_layer.h:211
const u8 * img
Pointer to image in current layer format, or sprite list.
Definition: vga_layer.h:196
u8 LayerFirstPin[LAYERS_MAX]
Index of first pin of layer (base layer should stay VGA_GPIO_FIRST)
Definition: vga_layer.cpp:275
u32 keycol
Key color.
Definition: vga_layer.h:199
#define LAYERMODE_NUM
Number of overlapped layer modes.
Definition: define.h:55
void LayerSetW(u8 inx, u16 w)
Set width of image of overlapped layer.
Definition: vga_layer.cpp:357
u16 h
Height.
Definition: vga_layer.h:204
void LayerPerspSetup(u8 inx, const u8 *img, const sVmode *vmode, u16 w, u16 h, u8 xbits, u8 ybits, s8 horiz, const int *mat, u8 col=0)
Setup overlapped layer 1..3 for LAYERMODE_PERSP* modes.
Definition: vga_layer.cpp:411
s16 x
SSPRITE_X sprite X-coordinate on the screen.
Definition: vga_layer.h:221
sLayer LayerScreen[LAYERS]
Current layer screens.
Definition: vga_layer.cpp:270
void SortSprite(sSprite **list, int num)
Sort fast sprite list by X coordinate.
Definition: vga_layer.cpp:493
u16 w
SSPRITE_W sprite width (slow sprite: max. width 255)
Definition: vga_layer.h:223
Definition: vga_layer.h:63
void LayerSetY(u8 inx, s16 y)
Set coordinate Y of overlapped layer.
Definition: vga_layer.cpp:349
u16 wb
Image width in bytes (pitch of lines)
Definition: vga_layer.h:205
u8 * x0
SSPRITE_X0 pointer to array of start of lines, or fast sprite start of lines/4.
Definition: vga_layer.h:218
u8 * w0
SSPRITE_W0 pointer to array of length of lines, or fast sprite length of lines/4.
Definition: vga_layer.h:219
#define LAYERPROG_NUM
Number of layer programs.
Definition: define.h:28
u16 trans
Trans count.
Definition: vga_layer.h:200
u16 wb
SSPRITE_WB sprite pitch (number of bytes between lines)
Definition: vga_layer.h:225
void LayerSetX(u8 inx, s16 x)
Set coordinate X of overlapped layer.
Definition: vga_layer.cpp:297
Definition: vga_layer.h:42
u8 * img
SSPRITE_IMG pointer to image data.
Definition: vga_layer.h:217
u32 keycol
SSPRITE_KEYCOL key color.
Definition: vga_layer.h:220
u8 cpp
Current clock pulses per pixel (used to calculate X coordinate)
Definition: vga_layer.h:212
u32 init
Init word sent on start of scanline (start X coordinate)
Definition: vga_layer.h:198
void LayerSpriteSetup(u8 inx, sSprite **sprite, u16 spritenum, const sVmode *vmode, s16 x, s16 y, u16 w, u16 h, u8 col=0)
Setup overlapped layer 1..3 for LAYERMODE_SPRITE* and LAYERMODE_FASTSPRITE* modes.
Definition: vga_layer.cpp:432
u8 mode
Layer mode.
Definition: vga_layer.h:206
void LayerSetup(u8 inx, const u8 *img, const sVmode *vmode, u16 w, u16 h, u8 col=0, const void *par=NULL)
Setup overlapped layer 1..3 (not for sprites or perspective mode)
Definition: vga_layer.cpp:383
s8 horiz
Horizon of perspective projection/4 (only with LAYERMODE_PERSP* modes, 0=no perspecitve,...
Definition: vga_layer.h:207
Layer screen descriptor (on change update SLAYER_* in define.h)
Definition: vga_layer.h:195
u8 xbits
Number of bits of width of source image (only with LAYERMODE_PERSP* modes)
Definition: vga_layer.h:208
void LayerOff(u8 inx)
Set overlapped layer 1..3 OFF.
Definition: vga_layer.cpp:289
s16 x
Start X coordinate.
Definition: vga_layer.h:201
s16 y
Start Y coordinate.
Definition: vga_layer.h:202
u16 res
Reserved, structure align.
Definition: vga_layer.h:226
void LayerSetH(u8 inx, u16 h)
Set height of image of overlapped layer.
Definition: vga_layer.cpp:368
const void * par
Additional parameter (RLE index table, integer transformation matrix)
Definition: vga_layer.h:197
s16 y
SSPRITE_Y sprite Y-coordinate on the screen.
Definition: vga_layer.h:222
Videomode table - used to setup video driver.
Definition: vga_vmode.h:119
u16 w
Width in pixels.
Definition: vga_layer.h:203
u8 LayerNumPin[LAYERS_MAX]
Number of pins of overlapped layer (base layer should stay VGA_GPIO_OUTNUM)
Definition: vga_layer.cpp:278
u16 spritenum
Number of sprites.
Definition: vga_layer.h:210
void SpritePrepLines(const u8 *img, u8 *x0, u8 *w0, u16 w, u16 h, u16 wb, u8 col, Bool fast)
Prepare array of start and length of lines (detects transparent pixels)
Definition: vga_layer.cpp:451
u16 h
SSPRITE_H sprite height.
Definition: vga_layer.h:224
void LayerOn(u8 inx)
Set overlapped layer 1..3 ON.
Definition: vga_layer.cpp:281