This commit is contained in:
starfrost013
2025-08-26 00:56:25 +01:00
235 changed files with 42660 additions and 37012 deletions

View File

@@ -38,9 +38,12 @@
#define SCREEN_RES_Y 480
/* Filename and pathname info. */
#define CONFIG_FILE "86box.cfg"
#define NVR_PATH "nvr"
#define SCREENSHOT_PATH "screenshots"
#define CONFIG_FILE "86box.cfg"
#define GLOBAL_CONFIG_FILE "86box_global.cfg"
#define NVR_PATH "nvr"
#define SCREENSHOT_PATH "screenshots"
#define VMM_PATH "Virtual Machines"
#define VMM_PATH_WINDOWS "86Box VMs"
/* Recently used images */
#define MAX_PREV_IMAGES 10
@@ -115,16 +118,21 @@ extern uint64_t instru_run_ms;
#define window_y monitor_settings[0].mon_window_y
#define window_w monitor_settings[0].mon_window_w
#define window_h monitor_settings[0].mon_window_h
extern int inhibit_multimedia_keys; /* (C) Inhibit multimedia keys on Windows. */
extern int inhibit_multimedia_keys; /* (G) Inhibit multimedia keys on Windows. */
extern int window_remember;
extern int vid_resize; /* (C) allow resizing */
extern int invert_display; /* (C) invert the display */
extern int suppress_overscan; /* (C) suppress overscans */
extern int lang_id; /* (C) language id */
extern int lang_id; /* (G) language id */
extern int scale; /* (C) screen scale factor */
extern int dpi_scale; /* (C) DPI scaling of the emulated screen */
extern int vid_api; /* (C) video renderer */
extern int vid_cga_contrast; /* (C) video */
extern int vid_cga_comp_brightness; /* (C) CGA composite brightness */
extern int vid_cga_comp_sharpness; /* (C) CGA composite sharpness */
extern int vid_cga_comp_hue; /* (C) CGA composite hue */
extern int vid_cga_comp_saturation; /* (C) CGA composite saturation */
extern int vid_cga_comp_contrast; /* (C) CGA composite saturation */
extern int video_fullscreen; /* (C) video */
extern int video_fullscreen_scale; /* (C) video */
extern int enable_overscan; /* (C) video */
@@ -154,11 +162,12 @@ extern int fpu_type; /* (C) fpu type */
extern int fpu_softfloat; /* (C) fpu uses softfloat */
extern int time_sync; /* (C) enable time sync */
extern int hdd_format_type; /* (C) hard disk file format */
extern int confirm_reset; /* (C) enable reset confirmation */
extern int confirm_exit; /* (C) enable exit confirmation */
extern int confirm_save; /* (C) enable save confirmation */
extern int confirm_reset; /* (G) enable reset confirmation */
extern int confirm_exit; /* (G) enable exit confirmation */
extern int confirm_save; /* (G) enable save confirmation */
extern int enable_discord; /* (C) enable Discord integration */
extern int force_10ms; /* (C) force 10ms CPU frame interval */
extern int jumpered_internal_ecp_dma; /* (C) Jumpered internal EPC DMA */
extern int other_ide_present; /* IDE controllers from non-IDE cards are present */
extern int other_scsi_present; /* SCSI controllers from non-SCSI cards are present */
extern int is_pcjr; /* The current machine is PCjr. */
@@ -169,7 +178,8 @@ extern int fixed_size_y;
extern int sound_muted; /* (C) Is sound muted? */
extern int do_auto_pause; /* (C) Auto-pause the emulator on focus loss */
extern int auto_paused;
extern double mouse_sensitivity; /* (C) Mouse sensitivity scale */
extern int force_constant_mouse; /* (C) Force constant updating of the mouse */
extern double mouse_sensitivity; /* (G) Mouse sensitivity scale */
#ifdef _Atomic
extern _Atomic double mouse_x_error; /* Mouse error accumulator - Y */
extern _Atomic double mouse_y_error; /* Mouse error accumulator - Y */
@@ -177,15 +187,20 @@ extern _Atomic double mouse_y_error; /* Mouse error accumulator - Y */
extern int pit_mode; /* (C) force setting PIT mode */
extern int fm_driver; /* (C) select FM sound driver */
extern int hook_enabled; /* (C) Keyboard hook is enabled */
extern int vmm_disabled; /* (G) disable built-in manager */
extern char vmm_path_cfg[1024]; /* (G) VMs path (unless -E is used) */
extern char exe_path[2048]; /* path (dir) of executable */
extern char usr_path[1024]; /* path (dir) of user data */
extern char cfg_path[1024]; /* full path of config file */
extern char exe_path[2048]; /* path (dir) of executable */
extern char usr_path[1024]; /* path (dir) of user data */
extern char cfg_path[1024]; /* full path of config file */
extern char global_cfg_path[1024]; /* full path of global config file */
extern int open_dir_usr_path; /* default file open dialog directory of usr_path */
extern char uuid[MAX_UUID_LEN]; /* UUID or machine identifier */
extern char vmm_path[1024]; /* VM Manager path to scan (temporary) */
extern int vmm_enabled;
extern int open_dir_usr_path; /* default file open dialog directory of usr_path */
extern char uuid[MAX_UUID_LEN]; /* UUID or machine identifier */
extern char vmm_path[1024]; /* VM Manager path to scan */
extern int start_vmm; /* the current execution will start the manager */
extern int portable_mode; /* we are running in portable mode
(global dirs = exe path) */
#ifndef USE_NEW_DYNAREC
extern FILE *stdlog; /* file to log output to */
#endif
@@ -213,6 +228,7 @@ extern void update_mouse_msg(void);
#if 0
extern void pc_reload(wchar_t *fn);
#endif
extern int pc_init_roms(void);
extern int pc_init_modules(void);
extern int pc_init(int argc, char *argv[]);
extern void pc_close(void *threadid);

View File

@@ -42,6 +42,8 @@ extern const device_t amd640_device;
extern const device_t isa486c_device;
/* Compaq */
extern const device_t compaq_device;
extern const device_t compaq_386_device;
extern const device_t compaq_genoa_device;
@@ -64,6 +66,9 @@ extern const device_t cs4031_device;
extern const device_t gc100_device;
extern const device_t gc100a_device;
/* GRiDcase */
extern const device_t grid1520_device;
/* Headland */
extern const device_t headland_gc10x_device;
extern const device_t headland_gc113_device;
@@ -114,6 +119,10 @@ extern const device_t slc90e66_device;
extern const device_t ioapic_device;
/* VTech */
extern const device_t laserxt_device;
extern const device_t lxt3_device;
/* Olivetti */
extern const device_t olivetti_eva_device;
@@ -126,6 +135,7 @@ extern const device_t opti481_device;
extern const device_t opti493_device;
extern const device_t opti495slc_device;
extern const device_t opti495sx_device;
extern const device_t opti496_device;
extern const device_t opti498_device;
extern const device_t opti499_device;
extern const device_t opti601_device;
@@ -138,6 +148,12 @@ extern const device_t opti895_device;
extern const device_t opti5x7_device;
extern const device_t opti5x7_pci_device;
/* Philips */
extern const device_t philips_device;
/* Sanyo */
extern const device_t sanyo_device;
/* SiS */
extern const device_t rabbit_device;
extern const device_t sis_85c401_device;
@@ -212,4 +228,8 @@ extern const device_t nec_mate_unk_device;
extern const device_t phoenix_486_jumper_device;
extern const device_t phoenix_486_jumper_pci_device;
extern const device_t radisys_config_device;
extern const device_t zenith_scratchpad_device;
#endif /*EMU_CHIPSET_H*/

View File

@@ -137,7 +137,9 @@ typedef struct config_t {
} config_t;
#endif
extern void config_load_global(void);
extern void config_load(void);
extern void config_save_global(void);
extern void config_save(void);
#ifdef EMU_INI_H

View File

@@ -119,7 +119,7 @@ extern "C" {
extern int gameport_available(int port);
#ifdef EMU_DEVICE_H
extern const device_t *gameport_getdevice(int port);
extern const device_t *gameport_get_device(int port);
#endif
extern int gameport_has_config(int port);
extern const char *gameport_get_internal_name(int port);
@@ -151,11 +151,11 @@ extern plat_joystick_state_t plat_joystick_state[MAX_PLAT_JOYSTICKS];
extern joystick_state_t joystick_state[GAMEPORT_MAX][MAX_JOYSTICKS];
extern int joysticks_present;
extern int joystick_type;
extern int joystick_type[GAMEPORT_MAX];
extern void joystick_init(void);
extern void joystick_close(void);
extern void joystick_process(void);
extern void joystick_process(uint8_t gp);
extern const char *joystick_get_name(int js);
extern const char *joystick_get_internal_name(int js);
@@ -168,7 +168,7 @@ extern const char *joystick_get_axis_name(int js, int id);
extern const char *joystick_get_button_name(int js, int id);
extern const char *joystick_get_pov_name(int js, int id);
extern void gameport_update_joystick_type(void);
extern void gameport_update_joystick_type(uint8_t gp);
extern void gameport_remap(void *priv, uint16_t address);
extern void *gameport_add(const device_t *gameport_type);

View File

@@ -106,9 +106,10 @@ extern const device_t ide_qua_pnp_device;
extern const device_t mcide_device;
extern const device_t xta_wdxt150_device; /* xta_wdxt150 */
extern const device_t xta_wdxt150_pc3086_device; /* xta_wdxt150 (PC3086) */
extern const device_t xta_hd20_device; /* EuroPC internal */
extern const device_t xta_st50x_device; /* ST-50X */
extern const device_t xta_st50x_pc5086_device; /* ST-50X (PC-5086) */
extern const device_t xta_st50x_pc5086_device; /* ST-50X (PC5086) */
extern const device_t xtide_device; /* xtide_xt */
extern const device_t xtide_at_device; /* xtide_at */

View File

@@ -118,101 +118,42 @@ typedef struct scancode {
const uint8_t brk[4];
} scancode;
#define STATE_SHIFT_MASK 0x22
#define STATE_RSHIFT 0x20
#define STATE_LSHIFT 0x02
#define STATE_SHIFT_MASK 0x22
#define STATE_RSHIFT 0x20
#define STATE_LSHIFT 0x02
#define FAKE_LSHIFT_ON 0x100
#define FAKE_LSHIFT_OFF 0x101
#define LSHIFT_ON 0x102
#define LSHIFT_OFF 0x103
#define RSHIFT_ON 0x104
#define RSHIFT_OFF 0x105
#define FAKE_LSHIFT_ON 0x100
#define FAKE_LSHIFT_OFF 0x101
#define LSHIFT_ON 0x102
#define LSHIFT_OFF 0x103
#define RSHIFT_ON 0x104
#define RSHIFT_OFF 0x105
/* KBC #define's */
/* IBM-style controllers */
#define KBC_IBM_PC_XT 0x0000 /* IBM PC/XT */
#define KBC_IBM_PCJR 0x0001 /* IBM PCjr */
#define KBC_IBM_TYPE_1 0x0002 /* IBM AT / PS/2 Type 1 */
#define KBC_IBM_TYPE_2 0x0003 /* IBM PS/2 Type 2 */
#define KBC_AMI_ACCESS_METHODS 0x0004 /* Access Methods AMI */
#define KBC_JU_JET 0x0005 /* Ju-Jet */
/* OEM proprietary */
#define KBC_TANDY 0x0011 /* Tandy 1000/1000HX */
#define KBC_TANDY_SL2 0x0012 /* Tandy 1000SL2 */
#define KBC_AMSTRAD 0x0013 /* Amstrad */
#define KBC_OLIVETTI_XT 0x0014 /* Olivetti XT */
#define KBC_OLIVETTI 0x0015 /* Olivetti AT */
#define KBC_TOSHIBA 0x0016 /* Toshiba AT */
#define KBC_COMPAQ 0x0017 /* Compaq */
#define KBC_NCR 0x0018 /* NCR */
#define KBC_QUADTEL 0x0019 /* Quadtel */
#define KBC_SIEMENS 0x001A /* Siemens */
/* Phoenix MultiKey/42 */
#define PHOENIX_MK42_105 0x0521 /* Phoenix MultiKey/42 1.05 */
#define PHOENIX_MK42_129 0x2921 /* Phoenix MultiKey/42 1.29 */
#define PHOENIX_MK42_138 0x3821 /* Phoenix MultiKey/42 1.38 */
#define PHOENIX_MK42_140 0x3821 /* Phoenix MultiKey/42 1.40 */
#define PHOENIX_MKC42_214 0x1422 /* Phoenix MultiKey/C42 2.14 */
#define PHOENIX_MK42I_416 0x1624 /* Phoenix MultiKey/42i 4.16 */
#define PHOENIX_MK42I_419 0x1924 /* Phoenix MultiKey/42i 4.19 */
/* AMI 0x3x */
#define KBC_ACER_V30 0x0030 /* Acer (0xA1 returns nothing, 0xAF returns 0x00) */
#define KBC_AMI_MEGAKEY_SUPER_IO 0x0035 /* AMI '5' MegaKey 1994 NSC (and SM(S)C?) */
#define KBC_AMI_8 0x0038 /* AMI '8' */
/* AMI 0x4x */
#define KBC_AMI_B 0x0042 /* AMI 'B' */
#define KBC_AMI_D 0x0044 /* AMI 'D' */
#define KBC_AMI_E 0x0045 /* AMI 'E' */
#define KBC_AMIKEY 0x0046 /* AMI 'F'/AMIKEY */
#define KBC_AMIKEY_2 0x0048 /* AMI 'H'/AMIEY-2 */
#define KBC_MR 0x004D /* MR 'M' - Temporary classification until we get a dump */
/* AMI 0x5x */
#define KBC_AMI_MEGAKEY_1993 0x0050 /* AMI 'P' MegaKey 1993 */
#define KBC_AMI_MEGAKEY_1994 0x0052 /* AMI 'R' MegaKey 1994 - 0xA0 returns 1993 copyright */
#define KBC_AMI_TRIGEM 0x005A /* TriGem AMI 'Z' (1990 AMI copyright) */
/* AMI 0x6x */
#define KBC_TANDON 0x0061 /* Tandon 'a' - Temporary classification until we get a dump */
/* Holtek */
#define KBC_HT_REGIONAL_6542 0x1046 /* Holtek 'F' (Regional 6542) */
#define KBC_HT_HT6542B_BESTKEY 0x1048 /* Holtek 'H' (Holtek HT6542B, BestKey) */
/* AMI 0x0x clone without command 0xA0 */
#define KBC_UNK_00 0x2000 /* Unknown 0x00 */
#define KBC_UNK_01 0x2001 /* Unknown 0x01 */
/* AMI 0x3x clone without command 0xA0 */
#define KBC_UNK_7 0x2037 /* Unknown '7' - Temporary classification until we get a dump */
#define KBC_UNK_9 0x2037 /* Unknown '9' - Temporary classification until we get a dump */
#define KBC_JETKEY_NO_VER 0x2038 /* No-version JetKey '8' */
/* AMI 0x4x clone without command 0xA0 */
#define KBC_UNK_A 0x2041 /* Unknown 'A' - Temporary classification until we get a dump */
#define KBC_JETKEY_5_W83C42 0x2046 /* JetKey 5.0 'F' and Winbond W83C42 */
#define KBC_UNK_G 0x2047 /* Unknown 'G' - Temporary classification until we get a dump */
#define KBC_MB_300E_SIS 0x2048 /* MB-300E Non-VIA 'H' and SiS 5582/559x */
#define KBC_UNK_L 0x204C /* Unknown 'L' - Temporary classification until we get a dump */
/* AMI 0x0x clone with command 0xA0 (Get Copyright String) only returning 0x00 */
#define KBC_VPC_2007 0x3000 /* Microsoft Virtual PC 2007 - everything returns 0x00 */
/* AMI 0x4x clone with command 0xA0 (Get Copyright String) only returning 0x00 */
#define KBC_ALI_M148X 0x3045 /* ALi M148x 'E'/'U' (0xA1 actually returns 'F' but BIOS shows 'E' or 'U') */
#define KBC_LANCE_UTRON 0x3046 /* Lance LT38C41 'F', Utron */
/* AMI 0x5x clone with command 0xA0 (Get Copyright String) only returning 0x00 */
#define KBC_SARC_6042 0x3055 /* SARC 6042 'U' */
/* Award and clones */
#define KBC_AWARD 0x4200 /* Award (0xA1 returns 0x00) - Temporary classification until we get \
the real 0xAF return */
#define KBC_VIA_VT82C4XN 0x4246 /* VIA VT82C41N, VT82C4N (0xA1 returns 'F') */
#define KBC_VIA_VT82C586A 0x4346 /* VIA VT82C586A (0xA1 returns 'F') */
#define KBC_VIA_VT82C586B 0x4446 /* VIA VT82C586B (0xA1 returns 'F') */
#define KBC_VIA_VT82C686B 0x4546 /* VIA VT82C686B (0xA1 returns 'F') */
/* UMC */
#define KBC_UMC_UM8886 0x5048 /* UMC UM8886 'H' */
/* IBM-style controllers with inverted P1 video type bit polarity */
#define KBC_IBM_TYPE_1_XI8088 0x8000 /* Xi8088: IBM Type 1 */
/* AMI (this is the 0xA1 revision byte) with inverted P1 video type bit polarity */
#define KBC_ACER_V30_INV 0x8030 /* Acer (0xA1 returns nothing, 0xAF returns 0x00) */
/* Holtek with inverted P1 video type bit polarity */
#define KBC_HT_HT6542B_XI8088 0x9048 /* Xi8088: Holtek 'H' (Holtek HT6542B, BestKey) */
/* Award and clones with inverted P1 video type bit polarity */
#define KBC_VIA_VT82C4XN_XI8088 0xC246 /* Xi8088: VIA VT82C41N, VT82C4N (0xA1 returns 'F') */
#define KBC_VEN_GENERIC 0x00
#define KBC_VEN_ACER 0x01
#define KBC_VEN_ALI 0x02
#define KBC_VEN_AMI 0x03
#define KBC_VEN_AMI_TRIGEM 0x04
#define KBC_VEN_AWARD 0x05
#define KBC_VEN_CHIPS 0x06
#define KBC_VEN_COMPAQ 0x07
#define KBC_VEN_HOLTEK 0x08
#define KBC_VEN_IBM 0x09
#define KBC_VEN_NCR 0x0a
#define KBC_VEN_OLIVETTI 0x0b
#define KBC_VEN_QUADTEL 0x0c
#define KBC_VEN_PHOENIX 0x0d
#define KBC_VEN_SIEMENS 0x0e
#define KBC_VEN_TOSHIBA 0x0f
#define KBC_VEN_VIA 0x10
#define KBC_VEN_UMC 0x11
#define KBC_VEN_SIS 0x12
#define KBC_VEN_MASK 0x1f
#define KBC_FLAG_IS_ASIC 0x80000000
#define KBC_FLAG_IS_CLONE 0x40000000
#define KBC_FLAG_IS_GREEN 0x20000000
#define KBC_FLAG_IS_TYPE2 0x10000000
#ifdef __cplusplus
extern "C" {
@@ -256,36 +197,8 @@ extern const device_t kbc_xt_zenith_device;
extern const device_t kbc_xt_hyundai_device;
extern const device_t kbc_xt_fe2010_device;
extern const device_t kbc_xtclone_device;
extern const device_t kbc_at_device;
extern const device_t kbc_at_ami_device;
extern const device_t kbc_at_compaq_device;
extern const device_t kbc_at_phoenix_device;
extern const device_t kbc_at_ncr_device;
extern const device_t kbc_at_olivetti_device;
extern const device_t kbc_at_siemens_device;
extern const device_t kbc_at_tg_ami_device;
extern const device_t kbc_at_toshiba_device;
extern const device_t kbc_ps2_device;
extern const device_t kbc_ps2_ps1_device;
extern const device_t kbc_ps2_ps1_pci_device;
extern const device_t kbc_ps2_xi8088_device;
extern const device_t kbc_ps2_ami_device;
extern const device_t kbc_ps2_compaq_device;
extern const device_t kbc_ps2_holtek_device;
extern const device_t kbc_ps2_mca_1_device;
extern const device_t kbc_ps2_mca_2_device;
extern const device_t kbc_ps2_olivetti_device;
extern const device_t kbc_ps2_phoenix_device;
extern const device_t kbc_ps2_quadtel_device;
extern const device_t kbc_ps2_tg_ami_device;
extern const device_t kbc_ps2_tg_ami_green_device;
extern const device_t kbc_ps2_pci_device;
extern const device_t kbc_ps2_ami_pci_device;
extern const device_t kbc_ps2_intel_ami_pci_device;
extern const device_t kbc_ps2_acer_pci_device;
extern const device_t kbc_ps2_ali_pci_device;
extern const device_t kbc_ps2_phoenix_pci_device;
extern const device_t kbc_ps2_tg_ami_pci_device;
extern const device_t keyboard_pc_xt_device;
extern const device_t keyboard_at_device;

View File

@@ -139,6 +139,7 @@ extern void lpt_set_cnfgb_readout(lpt_t *dev, const uint8_t cnfgb
extern void lpt_port_setup(lpt_t *dev, uint16_t port);
extern void lpt_port_irq(lpt_t *dev, uint8_t irq);
extern void lpt_port_dma(lpt_t *dev, uint8_t dma);
extern void lpt1_dma(const uint8_t dma);
extern void lpt_port_remove(lpt_t *dev);
extern void lpt1_remove_ams(lpt_t *dev);

File diff suppressed because it is too large Load Diff

View File

@@ -114,6 +114,7 @@ extern void mouse_subtract_w(int *delta_w, int min, int max, int inve
extern void mouse_set_buttons_ex(int b);
extern int mouse_get_buttons_ex(void);
extern void mouse_set_sample_rate(double new_rate);
extern void mouse_update_sample_rate(void);
extern void mouse_set_buttons(int buttons);
extern void mouse_get_abs_coords(double *x_abs, double *y_abs);
extern void mouse_process(void);

View File

@@ -146,6 +146,7 @@ extern void plat_get_exe_name(char *s, int size);
extern void plat_get_global_config_dir(char *outbuf, size_t len);
extern void plat_get_global_data_dir(char *outbuf, size_t len);
extern void plat_get_temp_dir(char *outbuf, uint8_t len);
extern void plat_get_vmm_dir(char *outbuf, size_t len);
extern void plat_init_rom_paths(void);
extern int plat_dir_check(char *path);
extern int plat_dir_create(char *path);

View File

@@ -28,6 +28,15 @@ extern const device_t f82c606_device;
extern const device_t f82c710_device;
extern const device_t f82c710_pc5086_device;
/* Commodore */
extern const device_t cbm_io_device;
/* Dataworld 90C50 (COMBAT) */
#define DW90C50_IDE 0x00001
extern const device_t dw90c50_device;
extern const device_t pc87310_device;
/* SM(S)C */
#define FDC37C651 0x00051
#define FDC37C661 0x00061

View File

@@ -67,8 +67,6 @@ typedef union {
typedef struct ibm8514_t {
rom_t bios_rom;
rom_t bios_rom2;
mem_mapping_t bios_mapping;
uint8_t *rom1;
uint8_t *rom2;
hwcursor8514_t hwcursor;
@@ -107,6 +105,8 @@ typedef struct ibm8514_t {
uint64_t dispofftime;
struct {
uint16_t scratch0;
uint16_t scratch1;
uint16_t subsys_cntl;
uint16_t setup_md;
uint16_t advfunc_cntl;
@@ -253,6 +253,7 @@ typedef struct ibm8514_t {
int vdisp;
int vdisp2;
int disp_cntl;
int disp_cntl_2;
int interlace;
uint16_t subsys_cntl;
uint8_t subsys_stat;
@@ -277,6 +278,7 @@ typedef struct ibm8514_t {
int _8514on;
int _8514crt;
PALETTE _8514pal;
uint8_t ven_clock;
latch8514_t latch;

View File

@@ -109,6 +109,7 @@ typedef struct mach_t {
uint16_t src_y;
int16_t bres_count;
uint16_t clock_sel;
uint16_t clock_sel_mode;
uint16_t crt_pitch;
uint16_t ge_pitch;
uint16_t src_pitch;

View File

@@ -21,11 +21,13 @@
#ifndef VIDEO_CGA_COMP_H
#define VIDEO_CGA_COMP_H
#include <stdbool.h>
#define Bitu unsigned int
#define bool uint8_t
void update_cga16_color(uint8_t cgamode);
void cga_comp_init(int revision);
void cga_comp_reload(int new_brightness, int new_saturation, int new_sharpness, int new_hue, int new_contrast);
uint32_t *Composite_Process(uint8_t cgamode, uint8_t border, uint32_t blocks /*, bool doublewidth*/, uint32_t *TempLine);
#endif /*VIDEO_CGA_COMP_H*/

View File

@@ -140,6 +140,7 @@ typedef struct svga_t {
int vblankend;
int render_line_offset;
int start_retrace_latch;
int vga_mode;
/*The three variables below allow us to implement memory maps like that seen on a 1MB Trio64 :
0MB-1MB - VRAM
@@ -347,6 +348,8 @@ extern void ati8514_out(uint16_t addr, uint8_t val, void *priv);
extern uint8_t ati8514_in(uint16_t addr, void *priv);
extern void ati8514_recalctimings(svga_t *svga);
extern uint8_t ati8514_mca_read(int port, void *priv);
extern uint8_t ati8514_rom_readb(uint32_t addr, void *priv);
extern uint16_t ati8514_rom_readw(uint32_t addr, void *priv);
extern void ati8514_mca_write(int port, uint8_t val, void *priv);
extern void ati8514_pos_write(uint16_t port, uint8_t val, void *priv);
extern void ati8514_init(svga_t *svga, void *ext8514, void *dev8514);
@@ -497,9 +500,12 @@ extern const device_t bt485a_ramdac_device;
extern const device_t gendac_ramdac_device;
extern const device_t ibm_rgb528_ramdac_device;
extern const device_t ics2494an_305_device;
extern const device_t ati18810_device;
extern const device_t ati18811_0_device;
extern const device_t ati18811_1_device;
extern const device_t ati18810_28800_device;
extern const device_t ati18811_0_28800_device;
extern const device_t ati18811_1_28800_device;
extern const device_t ati18810_mach32_device;
extern const device_t ati18811_0_mach32_device;
extern const device_t ati18811_1_mach32_device;
extern const device_t ics2595_device;
extern const device_t icd2061_device;
extern const device_t ics9161_device;

View File

@@ -0,0 +1,72 @@
/*
* 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.
*
* This file is part of the 86Box distribution.
*
* Emulation of the old and new IBM CGA graphics cards.
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Connor Hyde / starfrost, <mario64crashed@gmail.com>
*
* Copyright 2008-2018 Sarah Walker.
* Copyright 2016-2018 Miran Grca.
* Copyright 2025 starfrost (refactoring).
*/
#ifndef VIDEO_V6355_H
#define VIDEO_V6355_H
typedef struct v6355_t {
mem_mapping_t mapping;
uint8_t cgastat;
uint8_t cgamode;
uint8_t cgacol;
uint8_t pad[3];
uint8_t crtc[32];
uint8_t v6355data[106];
uint8_t charbuffer[256];
uint16_t ma;
uint16_t maback;
/* The V6355 has its own set of registers, as well as the emulated MC6845 */
int v6355reg;
int crtcreg;
int fontbase;
int linepos;
int displine;
int sc;
int vc;
int cgadispon;
int con;
int coff;
int cursoron;
int cgablink;
int vsynctime;
int vadj;
int oddeven;
int display_type;
int firstline;
int lastline;
int drawcursor;
int revision;
int rgb_type;
int double_type;
uint32_t v6355pal[16];
uint64_t dispontime;
uint64_t dispofftime;
pc_timer_t timer;
uint8_t * vram;
} v6355_t;
#endif /*VIDEO_V6355_H*/

View File

@@ -139,6 +139,8 @@ typedef struct monitor_t {
int mon_cga_palette_static; /* Whether it should not be freed by the API. */
const video_timings_t *mon_vid_timings;
int mon_vid_type;
atomic_bool mon_interlace;
atomic_bool mon_composite;
struct blit_data_struct *mon_blit_data_ptr;
} monitor_t;
@@ -401,11 +403,10 @@ extern const device_t gd5446_pci_device;
extern const device_t gd5446_stb_pci_device;
extern const device_t gd5480_pci_device;
/* IBM CGA*/
/* IBM CGA */
extern const device_t cga_device;
/* pravetz CGA */
/* Pravetz CGA */
extern const device_t cga_pravetz_device;
/* Compaq CGA */
@@ -575,7 +576,6 @@ extern const device_t s3_diamond_stealth_2000pro_pci_device;
extern const device_t s3_virge_385_pci_device;
extern const device_t s3_virge_357_pci_device;
extern const device_t s3_virge_357_agp_device;
extern const device_t s3_diamond_stealth_4000_pci_device;
extern const device_t s3_diamond_stealth_4000_agp_device;
extern const device_t s3_trio3d2x_pci_device;
extern const device_t s3_trio3d2x_agp_device;
@@ -634,6 +634,9 @@ extern const device_t nv3t_device_agp;
/* Wyse 700 */
extern const device_t wy700_device;
/* Yamaha V6355 */
extern const device_t v6355d_device;
/* Tandy */
extern const device_t tandy_1000_video_device;
extern const device_t tandy_1000hx_video_device;