Files
86Box/src/include/86box/vid_cga.h

88 lines
1.9 KiB
C
Raw Normal View History

/*
2023-01-06 15:36:05 -05:00
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
2023-01-06 15:36:05 -05:00
* This file is part of the 86Box distribution.
*
2023-01-06 15:36:05 -05:00
* Emulation of the old and new IBM CGA graphics cards.
*
2020-03-25 00:46:02 +02:00
*
*
2023-01-06 15:36:29 -05:00
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
2023-01-06 15:36:05 -05:00
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2018 Sarah Walker.
* Copyright 2016-2018 Miran Grca.
*/
2022-02-18 19:42:21 -05:00
2022-01-30 02:11:21 -05:00
#ifndef VIDEO_CGA_H
#define VIDEO_CGA_H
typedef struct cga_t {
mem_mapping_t mapping;
2022-02-20 02:26:27 -05:00
int crtcreg;
uint8_t crtc[32];
2022-02-20 02:26:27 -05:00
uint8_t cgastat;
2022-02-20 02:26:27 -05:00
2023-06-09 23:46:54 -04:00
uint8_t cgamode;
uint8_t cgacol;
int fontbase;
2023-06-09 23:46:54 -04:00
int linepos;
int displine;
int sc;
int vc;
int cgadispon;
2023-06-09 23:46:54 -04:00
int con;
int coff;
int cursoron;
int cgablink;
int vsynctime;
int vadj;
uint16_t ma;
uint16_t maback;
int oddeven;
2023-06-09 23:46:54 -04:00
uint64_t dispontime;
uint64_t dispofftime;
pc_timer_t timer;
2022-02-20 02:26:27 -05:00
2023-06-09 23:46:54 -04:00
int firstline;
int lastline;
2022-02-20 02:26:27 -05:00
int drawcursor;
2022-02-20 02:26:27 -05:00
int fullchange;
uint8_t *vram;
2022-02-20 02:26:27 -05:00
uint8_t charbuffer[256];
int revision;
int composite;
int snow_enabled;
int rgb_type;
2024-01-08 00:09:35 +01:00
int double_type;
} cga_t;
void cga_init(cga_t *cga);
2023-07-31 14:37:59 -04:00
void cga_out(uint16_t addr, uint8_t val, void *priv);
uint8_t cga_in(uint16_t addr, void *priv);
void cga_write(uint32_t addr, uint8_t val, void *priv);
uint8_t cga_read(uint32_t addr, void *priv);
void cga_recalctimings(cga_t *cga);
2023-07-31 14:37:59 -04:00
void cga_poll(void *priv);
#ifdef EMU_DEVICE_H
extern const device_config_t cga_config[];
2022-11-19 08:49:04 -05:00
extern const device_t cga_device;
extern const device_t cga_pravetz_device;
#endif
2022-01-30 02:11:21 -05:00
#endif /*VIDEO_CGA_H*/