Files
picopal/cvideo.h
2026-04-01 18:41:10 +02:00

25 lines
686 B
C

#pragma once
#include <stdint.h>
// ---------------------------
// Video format
// ---------------------------
#define VIDEO_WIDTH 768
#define VIDEO_HEIGHT 576
#define WORDS_PER_LINE (VIDEO_WIDTH / 32)
#define LINES_PER_FIELD (VIDEO_HEIGHT / 2)
// Active and visible field in the framebuffer
#define START_X 35
#define END_X (VIDEO_WIDTH-40)
#define START_Y 20
#define END_Y (VIDEO_HEIGHT-40)
typedef uint32_t video_framebuffer_t[VIDEO_HEIGHT][WORDS_PER_LINE];
typedef uint32_t (*video_framebuffer_ptr_t)[WORDS_PER_LINE];
void video_init(video_framebuffer_t fb);
void video_set_framebuffer(video_framebuffer_t fb);
void video_set_framebuffer_switched_cb(void (*cb)());