Video features and fixes:

Added the Mach8 and Mach32 ISA/VLB/PCI cards (initial implementation and MCA coming soon for the Mach32) and their corresponding EEPROM's.
Added INMOS XGA ISA card and updated the SVGA core to reflect its mapping as well as the Mach8/32 mapping when in 8514 monitor mode.
Mark the XGA button as already checked and locked when a standalone XGA BIOS card is present like the INMOS one. (QT only)
Same concept as above, but applies to the Mach8 and 32 for the 8514 option as well. (QT only)
This commit is contained in:
TC1995
2023-07-14 23:38:04 +02:00
parent 7efcef82d0
commit cb06b9e78f
15 changed files with 6648 additions and 283 deletions

View File

@@ -24,6 +24,8 @@ typedef struct ibm8514_t {
int force_old_addr;
int type;
int local;
int bpp;
uint32_t vram_size;
uint32_t vram_mask;
@@ -32,6 +34,7 @@ typedef struct ibm8514_t {
uint8_t dac_mask, dac_status;
uint32_t *map8;
int dac_addr, dac_pos, dac_r, dac_g;
int internal_pitch;
struct {
uint16_t subsys_cntl;
@@ -58,7 +61,7 @@ typedef struct ibm8514_t {
uint8_t pix_trans[2];
int poly_draw;
int ssv_state;
int x1, x2, y1, y2;
int16_t x1, x2, x3, y1, y2;
int sys_cnt, sys_cnt2;
int temp_cnt;
int16_t cx, cy, oldcy;
@@ -80,6 +83,7 @@ typedef struct ibm8514_t {
uint16_t scratch;
int fill_state, xdir, ydir;
uint32_t ge_offset;
} accel;
uint16_t test;
@@ -90,7 +94,7 @@ typedef struct ibm8514_t {
dispon, hdisp_on, linecountff,
vc, linepos, oddeven, cursoron, blink, scrollcache,
firstline, lastline, firstline_draw, lastline_draw,
displine, fullchange, x_add, y_add;
displine, fullchange;
uint32_t ma, maback;
uint8_t *vram, *changedvram, linedbl;
@@ -103,11 +107,13 @@ typedef struct ibm8514_t {
int disp_cntl, interlace;
uint8_t subsys_cntl, subsys_stat;
volatile int force_busy, force_busy2;
atomic_int force_busy, force_busy2;
int blitter_busy;
uint64_t blitter_time;
uint64_t status_time;
int pitch;
int ext_pitch;
int ext_crt_pitch;
} ibm8514_t;
#endif /*VIDEO_8514A_H*/

View File

@@ -43,6 +43,7 @@ typedef struct ati_eeprom_t {
} ati_eeprom_t;
void ati_eeprom_load(ati_eeprom_t *eeprom, char *fn, int type);
void ati_eeprom_load_mach8(ati_eeprom_t *eeprom, char *fn);
void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat);
int ati_eeprom_read(ati_eeprom_t *eeprom);

View File

@@ -31,8 +31,9 @@
# define FLAG_NOSKEW 16
# define FLAG_ADDR_BY16 32
# define FLAG_RAMDAC_SHIFT 64
# define FLAG_128K_MASK 128
# define FLAG_ATI 128
# define FLAG_S3_911_16BIT 256
# define FLAG_512K_MASK 512
struct monitor_t;
typedef struct {

View File

@@ -36,6 +36,7 @@ typedef struct xga_t {
mem_mapping_t linear_mapping;
mem_mapping_t video_mapping;
rom_t bios_rom;
rom_t vga_bios_rom;
xga_hwcursor_t hwcursor, hwcursor_latch;
PALETTE extpal;
@@ -57,7 +58,7 @@ typedef struct xga_t {
uint8_t clk_sel_1, clk_sel_2;
uint8_t hwc_control;
uint8_t bus_arb;
uint8_t select_pos_isa;
uint8_t isa_pos_enable;
uint8_t hwcursor_oddeven;
uint8_t cfg_reg_instance;
uint8_t rowcount;
@@ -70,6 +71,8 @@ typedef struct xga_t {
uint8_t sprite_data[1024];
uint8_t scrollcache;
uint8_t direct_color;
uint8_t dma_channel;
uint8_t instance_isa, instance_num, ext_mem_addr;
uint8_t *vram, *changedvram;
int16_t hwc_pos_x;

View File

@@ -17,6 +17,11 @@
#ifndef VIDEO_XGA_DEVICE_H
#define VIDEO_XGA_DEVICE_H
extern int xga_has_vga;
#ifdef EMU_DEVICE_H
extern const device_t xga_device;
extern const device_t xga_isa_device;
extern const device_t inmos_isa_device;
#endif
#endif /*VIDEO_XGA_DEVICE_H*/

View File

@@ -60,8 +60,10 @@ enum {
#define VIDEO_FLAG_TYPE_CGA 0
#define VIDEO_FLAG_TYPE_MDA 1
#define VIDEO_FLAG_TYPE_SPECIAL 2
#define VIDEO_FLAG_TYPE_NONE 3
#define VIDEO_FLAG_TYPE_MASK 3
#define VIDEO_FLAG_TYPE_8514 3
#define VIDEO_FLAG_TYPE_XGA 4
#define VIDEO_FLAG_TYPE_NONE 5
#define VIDEO_FLAG_TYPE_MASK 7
typedef struct video_timings_t {
int type;
@@ -206,6 +208,7 @@ extern double cpuclock;
extern int emu_fps;
extern int frames;
extern int readflash;
extern int ibm8514_has_vga;
/* Function handler pointers. */
extern void (*video_recalctimings)(void);
@@ -232,6 +235,8 @@ extern int video_card_get_flags(int card);
extern int video_is_mda(void);
extern int video_is_cga(void);
extern int video_is_ega_vga(void);
extern int video_is_8514(void);
extern int video_is_xga(void);
extern void video_inform_monitor(int type, const video_timings_t *ptr, int monitor_index);
extern int video_get_type_monitor(int monitor_index);
@@ -290,8 +295,12 @@ extern uint32_t video_color_transform(uint32_t color);
/* IBM XGA */
extern void xga_device_add(void);
/* IBM 8514/A and generic clones*/
/* IBM 8514/A and clones*/
extern void ibm8514_device_add(void);
extern const device_t mach8_isa_device;
extern const device_t mach32_isa_device;
extern const device_t mach32_vlb_device;
extern const device_t mach32_pci_device;
/* ATi Mach64 */
extern const device_t mach64gx_isa_device;