pcem/src/vid_cga.h
SarahW 65a9d17674 Toshiba T3100e improvements :
* Enables [Fn]+key combinations (using right-Ctrl or right-Alt as [Fn]). In particular:
* Implements switching the built-in display adapter between the 'internal' plasma display ([Fn]+[Home]) and an 'external' CGA monitor ([Fn]+[End])
* Allows the video font to be toggled between thin and thick ([Fn]+[Right arrow]).
* Implements the four hardware fonts of the original, selectable in BIOS setup.
* Implements CRTC register 12h (attribute mapping and display type)
Patch from John Elliott
2017-10-28 16:03:44 +01:00

45 lines
1 KiB
C

typedef struct cga_t
{
mem_mapping_t mapping;
int crtcreg;
uint8_t crtc[32];
uint8_t cgastat;
uint8_t cgamode, cgacol;
int fontbase;
int linepos, displine;
int sc, vc;
int cgadispon;
int con, coff, cursoron, cgablink;
int vsynctime, vadj;
uint16_t ma, maback;
int oddeven;
int dispontime, dispofftime;
int vidtime;
int firstline, lastline;
int drawcursor;
uint8_t *vram;
uint8_t charbuffer[256];
int revision;
int composite;
int snow_enabled;
} cga_t;
void cga_init(cga_t *cga);
void cga_out(uint16_t addr, uint8_t val, void *p);
uint8_t cga_in(uint16_t addr, void *p);
void cga_write(uint32_t addr, uint8_t val, void *p);
uint8_t cga_read(uint32_t addr, void *p);
void cga_recalctimings(cga_t *cga);
void cga_poll(void *p);
extern device_t cga_device;