Merge branch '86Box:master' into machine_23
This commit is contained in:
@@ -202,6 +202,8 @@ extern const char *device_get_bios_file(const device_t *dev, const char *interna
|
||||
|
||||
extern int device_is_valid(const device_t *, int m);
|
||||
|
||||
extern const device_t* device_context_get_device(void);
|
||||
|
||||
extern int device_get_config_int(const char *name);
|
||||
extern int device_get_config_int_ex(const char *s, int dflt_int);
|
||||
extern int device_get_config_hex16(const char *name);
|
||||
|
||||
@@ -439,6 +439,8 @@ extern void mem_reset_page_blocks(void);
|
||||
extern void flushmmucache(void);
|
||||
extern void flushmmucache_nopc(void);
|
||||
|
||||
extern void mem_debug_check_addr(uint32_t addr, int write);
|
||||
|
||||
extern void mem_a20_init(void);
|
||||
extern void mem_a20_recalc(void);
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ extern void mouse_scale_x(int x);
|
||||
extern void mouse_scale_y(int y);
|
||||
extern void mouse_scalef(double x, double y);
|
||||
extern void mouse_scale(int x, int y);
|
||||
extern void mouse_scale_axis(int axis, int val);
|
||||
extern void mouse_set_z(int z);
|
||||
extern void mouse_clear_z(void);
|
||||
extern void mouse_subtract_z(int *delta_z, int min, int max, int invert);
|
||||
|
||||
@@ -149,6 +149,7 @@ extern uint32_t plat_language_code(char *langcode);
|
||||
extern void plat_language_code_r(uint32_t lcid, char *outbuf, int len);
|
||||
extern void plat_get_cpu_string(char *outbuf, uint8_t len);
|
||||
extern double plat_get_dpi(void);
|
||||
extern void plat_set_thread_name(void *thread, const char *name);
|
||||
|
||||
/* Resource management. */
|
||||
extern void set_language(uint32_t id);
|
||||
|
||||
@@ -28,7 +28,7 @@ extern "C" {
|
||||
# define event_t plat_event_t
|
||||
# define mutex_t plat_mutex_t
|
||||
|
||||
# define thread_create plat_thread_create
|
||||
# define thread_create_named plat_thread_create_named
|
||||
# define thread_wait plat_thread_wait
|
||||
# define thread_create_event plat_thread_create_event
|
||||
# define thread_set_event plat_thread_set_event
|
||||
@@ -48,7 +48,8 @@ typedef void thread_t;
|
||||
typedef void event_t;
|
||||
typedef void mutex_t;
|
||||
|
||||
extern thread_t *thread_create(void (*thread_func)(void *param), void *param);
|
||||
#define thread_create(thread_func, param) thread_create_named((thread_func), (param), #thread_func)
|
||||
extern thread_t *thread_create_named(void (*thread_func)(void *param), void *param, const char *name);
|
||||
extern int thread_wait(thread_t *arg);
|
||||
extern event_t *thread_create_event(void);
|
||||
extern void thread_set_event(event_t *arg);
|
||||
|
||||
@@ -33,6 +33,8 @@ typedef struct hwcursor8514_t {
|
||||
} hwcursor8514_t;
|
||||
|
||||
typedef struct ibm8514_t {
|
||||
rom_t bios_rom;
|
||||
rom_t bios_rom2;
|
||||
hwcursor8514_t hwcursor;
|
||||
hwcursor8514_t hwcursor_latch;
|
||||
uint8_t pos_regs[8];
|
||||
@@ -60,12 +62,12 @@ typedef struct ibm8514_t {
|
||||
int dac_b;
|
||||
int internal_pitch;
|
||||
int hwcursor_on;
|
||||
int modechange;
|
||||
|
||||
struct {
|
||||
uint16_t subsys_cntl;
|
||||
uint16_t setup_md;
|
||||
uint16_t advfunc_cntl;
|
||||
uint8_t ext_advfunc_cntl;
|
||||
uint16_t cur_y;
|
||||
uint16_t cur_x;
|
||||
int16_t destx;
|
||||
@@ -142,14 +144,21 @@ typedef struct ibm8514_t {
|
||||
|
||||
uint16_t test;
|
||||
int vendor_mode[2];
|
||||
int h_blankstart;
|
||||
int h_blank_end_val;
|
||||
int hblankstart;
|
||||
int hblank_end_val;
|
||||
int hblankend;
|
||||
int hblank_ext;
|
||||
int hblank_sub;
|
||||
|
||||
int v_total;
|
||||
int dispend;
|
||||
int v_syncstart;
|
||||
int split;
|
||||
int h_disp;
|
||||
int h_disp_old;
|
||||
int h_total;
|
||||
int h_sync_width;
|
||||
int h_disp_time;
|
||||
int rowoffset;
|
||||
int dispon;
|
||||
@@ -176,20 +185,17 @@ typedef struct ibm8514_t {
|
||||
|
||||
uint8_t data_available;
|
||||
uint8_t data_available2;
|
||||
uint8_t scanmodulos;
|
||||
uint8_t rowcount;
|
||||
int hsync_start;
|
||||
int hsync_width;
|
||||
int htotal;
|
||||
int hdisp;
|
||||
int vtadj;
|
||||
int vdadj;
|
||||
int vsadj;
|
||||
int hdisped;
|
||||
int sc;
|
||||
int vtb;
|
||||
int vdb;
|
||||
int vsb;
|
||||
int vsyncstart;
|
||||
int vsyncwidth;
|
||||
int vtotal;
|
||||
int v_disp;
|
||||
int vdisp;
|
||||
int disp_cntl;
|
||||
int interlace;
|
||||
@@ -205,6 +211,7 @@ typedef struct ibm8514_t {
|
||||
int pitch;
|
||||
int ext_pitch;
|
||||
int ext_crt_pitch;
|
||||
int extensions;
|
||||
} ibm8514_t;
|
||||
|
||||
#endif /*VIDEO_8514A_H*/
|
||||
|
||||
162
src/include/86box/vid_ati_mach8.h
Normal file
162
src/include/86box/vid_ati_mach8.h
Normal file
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
* 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 8514/A-compatible Mach8 and Mach32 graphics
|
||||
* chips from ATI for the ISA/VLB/MCA/PCI buses.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: TheCollector1995.
|
||||
*
|
||||
* Copyright 2022-2024 TheCollector1995.
|
||||
*/
|
||||
#ifndef VIDEO_ATI_MACH8_H
|
||||
#define VIDEO_ATI_MACH8_H
|
||||
|
||||
typedef struct mach_t {
|
||||
ati_eeprom_t eeprom;
|
||||
svga_t svga;
|
||||
|
||||
rom_t bios_rom;
|
||||
rom_t bios_rom2;
|
||||
mem_mapping_t mmio_linear_mapping;
|
||||
|
||||
int mca_bus;
|
||||
int pci_bus;
|
||||
int vlb_bus;
|
||||
int has_bios;
|
||||
|
||||
uint8_t regs[256];
|
||||
uint8_t pci_regs[256];
|
||||
uint8_t int_line;
|
||||
uint8_t pci_slot;
|
||||
uint8_t irq_state;
|
||||
|
||||
int index;
|
||||
int ramdac_type;
|
||||
int old_mode;
|
||||
|
||||
uint32_t memory;
|
||||
|
||||
uint16_t config1;
|
||||
uint16_t config2;
|
||||
|
||||
uint8_t pos_regs[8];
|
||||
uint8_t pci_cntl_reg;
|
||||
uint8_t cursor_col_0;
|
||||
uint8_t cursor_col_1;
|
||||
uint8_t ext_cur_col_0_r;
|
||||
uint8_t ext_cur_col_1_r;
|
||||
uint8_t ext_cur_col_0_g;
|
||||
uint8_t ext_cur_col_1_g;
|
||||
uint16_t cursor_col_0_rg;
|
||||
uint16_t cursor_col_1_rg;
|
||||
uint16_t cursor_col_b;
|
||||
uint16_t cursor_offset_lo;
|
||||
uint16_t cursor_offset_lo_reg;
|
||||
uint16_t cursor_offset_hi;
|
||||
uint16_t cursor_offset_hi_reg;
|
||||
uint16_t cursor_vh_offset;
|
||||
uint16_t cursor_x;
|
||||
uint16_t cursor_y;
|
||||
uint16_t misc;
|
||||
uint16_t memory_aperture;
|
||||
uint16_t local_cntl;
|
||||
uint32_t linear_base;
|
||||
uint8_t ap_size;
|
||||
uint8_t bank_w;
|
||||
uint8_t bank_r;
|
||||
uint16_t shadow_set;
|
||||
uint16_t shadow_cntl;
|
||||
int ext_on[2];
|
||||
int compat_mode;
|
||||
|
||||
struct {
|
||||
uint8_t line_idx;
|
||||
int16_t line_array[6];
|
||||
uint8_t patt_idx;
|
||||
uint8_t patt_len;
|
||||
uint8_t pix_trans[2];
|
||||
uint8_t eeprom_control;
|
||||
uint16_t dest_x_end;
|
||||
uint16_t dest_x_start;
|
||||
uint16_t dest_y_end;
|
||||
uint16_t src_x_end;
|
||||
uint16_t src_x_start;
|
||||
uint16_t src_x;
|
||||
uint16_t src_y;
|
||||
int16_t bres_count;
|
||||
uint16_t clock_sel;
|
||||
uint16_t crt_pitch;
|
||||
uint16_t ge_pitch;
|
||||
uint16_t dest_cmp_fn;
|
||||
uint16_t dp_config;
|
||||
uint16_t ext_ge_config;
|
||||
uint16_t ge_offset_lo;
|
||||
uint16_t ge_offset_hi;
|
||||
uint16_t linedraw_opt;
|
||||
uint16_t max_waitstates;
|
||||
uint8_t patt_data_idx;
|
||||
uint8_t patt_data[0x18];
|
||||
uint16_t scan_to_x;
|
||||
uint16_t scratch0;
|
||||
uint16_t scratch1;
|
||||
uint16_t test;
|
||||
uint16_t pattern;
|
||||
uint16_t test2;
|
||||
int src_y_dir;
|
||||
int cmd_type;
|
||||
int block_write_mono_pattern_enable;
|
||||
int mono_pattern_enable;
|
||||
int16_t cx_end_line;
|
||||
int16_t cy_end_line;
|
||||
int16_t cx;
|
||||
int16_t cx_end;
|
||||
int16_t cy_end;
|
||||
int16_t dx;
|
||||
int16_t dx_end;
|
||||
int16_t dy;
|
||||
int16_t dy_end;
|
||||
int16_t dx_start;
|
||||
int16_t dy_start;
|
||||
int16_t cy;
|
||||
int16_t sx_start;
|
||||
int16_t sx_end;
|
||||
int16_t sx;
|
||||
int16_t x_count;
|
||||
int16_t xx_count;
|
||||
int16_t xxx_count;
|
||||
int16_t sy;
|
||||
int16_t y_count;
|
||||
int16_t err;
|
||||
int16_t width;
|
||||
int16_t src_width;
|
||||
int16_t height;
|
||||
int16_t bleft, bright, btop, bbottom;
|
||||
int poly_src;
|
||||
int temp_cnt;
|
||||
int stepx;
|
||||
int stepy;
|
||||
int src_stepx;
|
||||
uint8_t color_pattern[16];
|
||||
uint8_t color_pattern_full[32];
|
||||
uint16_t color_pattern_word[8];
|
||||
int mono_pattern[8][8];
|
||||
uint32_t ge_offset;
|
||||
uint32_t crt_offset;
|
||||
uint32_t patt_len_reg;
|
||||
int poly_fill;
|
||||
uint16_t dst_clr_cmp_mask;
|
||||
int clip_overrun;
|
||||
int color_pattern_idx;
|
||||
} accel;
|
||||
|
||||
atomic_int force_busy;
|
||||
} mach_t;
|
||||
|
||||
#endif /*VIDEO_ATI_MACH8_H*/
|
||||
@@ -274,10 +274,14 @@ typedef struct svga_t {
|
||||
/* Enable LUT mapping of >= 24 bpp modes. */
|
||||
int lut_map;
|
||||
|
||||
/* Override the horizontal blanking stuff. */
|
||||
int hoverride;
|
||||
|
||||
/* Return a 32 bpp color from a 15/16 bpp color. */
|
||||
uint32_t (*conv_16to32)(struct svga_t *svga, uint16_t color, uint8_t bpp);
|
||||
|
||||
void * dev8514;
|
||||
void * ext8514;
|
||||
void * xga;
|
||||
} svga_t;
|
||||
|
||||
@@ -293,6 +297,13 @@ extern void ibm8514_accel_out_pixtrans(svga_t *svga, uint16_t port, uint32_t
|
||||
extern void ibm8514_short_stroke_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, svga_t *svga, uint8_t ssv, int len);
|
||||
extern void ibm8514_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, svga_t *svga, int len);
|
||||
|
||||
#ifdef ATI_8514_ULTRA
|
||||
extern void ati8514_recalctimings(svga_t *svga);
|
||||
extern uint8_t ati8514_mca_read(int port, void *priv);
|
||||
extern void ati8514_mca_write(int port, uint8_t val, void *priv);
|
||||
extern void ati8514_init(svga_t *svga, void *ext8514, void *dev8514);
|
||||
#endif
|
||||
|
||||
extern void xga_poll(void *priv, svga_t *svga);
|
||||
extern void xga_recalctimings(svga_t *svga);
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ extern void xga_device_add(void);
|
||||
|
||||
/* IBM 8514/A and clones*/
|
||||
extern void ibm8514_device_add(void);
|
||||
extern const device_t mach8_isa_device;
|
||||
extern const device_t mach8_vga_isa_device;
|
||||
extern const device_t mach32_isa_device;
|
||||
extern const device_t mach32_vlb_device;
|
||||
extern const device_t mach32_mca_device;
|
||||
@@ -459,6 +459,7 @@ extern const device_t paradise_wd90c11_device;
|
||||
extern const device_t paradise_wd90c30_device;
|
||||
|
||||
/* Realtek (S)VGA */
|
||||
extern const device_t realtek_rtg3105_device;
|
||||
extern const device_t realtek_rtg3106_device;
|
||||
|
||||
/* S3 9XX/8XX/Vision/Trio */
|
||||
|
||||
Reference in New Issue
Block a user