analog/v2-analog-rev1/vga/vgaout.h
David Kuder d9be2ed9cd Firmware Release 23-01-16-119
New autodetect routines for Apple II+, IIe (Platinum), IIgs (ROM03).
Timing tweaks to improve compatibility on IIgs and IIe.
Corrected text rendering on all supported machines.
Initial Super HiRes support (not recommended to use at this time)
Monochrome DHGR and HGR support activated with IIgs MONOCOLOR or NEWVID registers.
80 Column mode on IIe and IIgs.
2023-01-16 20:36:00 -05:00

41 lines
860 B
C

#pragma once
#include <stdint.h>
#define VGA_WIDTH 640
#define VGA_HEIGHT 480
#define THEN_WAIT_VSYNC (2 << 9)
#define THEN_WAIT_HSYNC (3 << 9)
#define THEN_EXTEND_7 (4 << 9)
#define THEN_EXTEND_6 (5 << 9)
#define THEN_EXTEND_5 (6 << 9)
#define THEN_EXTEND_4 (7 << 9)
#define THEN_EXTEND_3 (8 << 9)
#define THEN_EXTEND_2 (9 << 9)
#define THEN_EXTEND_1 (10 << 9)
struct vga_scanline {
// number of 32-bit words in the data array
uint_fast16_t length;
// number of times to repeat the scanline
uint_fast16_t repeat_count;
volatile uint_fast8_t _flags;
uint32_t _sync;
uint32_t data[(VGA_WIDTH/2)+8];
};
void vga_init();
void vga_deinit();
void vga_prepare_frame();
struct vga_scanline *vga_prepare_scanline();
void vga_submit_scanline(struct vga_scanline *scanline);