Video changes:

1. The passthrough from VGA to 8514/A and/or 8514/A to VGA no longer relies on hackish places where to switch from/to, instead, relying on port 0x3c3 of VGA doing so (though the Mach8/32 still needs some places where to manually switch from/to, mainly the MCA one when configuring the EEPROM).
2. Implemented the MCA behalf of the Mach32 and its corresponding reset function.
3. Properly implemented (more or less) true color, including 24-bit BGR rendering
4. Other fixes such as color patterns and mono patterns being more correct than before in various operating systems and in 24-bit true color.
5. Implemented the onboard Mach32 video of the IBM PS/ValuePoint P60 machine.
6. Made the onboard internal video detect when it's 8514/A compatible or not (CGA/EGA/MDA/VGA/etc.). If the former is selected, then the video monitor flag is used instead (for QT).
7. The TGUI9400 and 9440, if on VLB, now detect the right amount of memory if on 2MB.
8. Initial implementation of the ATI 68875 ramdac used by the Mach32 and made the ATI 68860 8514/A aware when selected with the Mach32AX PCI.
9. Separated the 8514/A ramdac ports from the VGA ramdac ports, allowing seamless transition from/to 8514/A/VGA.
10. Fixed a hdisp problem in the ET4000/W32 cards, where it was doubling the horizontal display in 15bpp+ graphics mode.
11. Removed the 0x3da/0x3ba port hack that was on the Mach8/32 code, relying on the (S)VGA core instead.
12. Reworked and simplified the TGUI9440 pitch register based on logging due to no documentation at all.
This commit is contained in:
TC1995
2023-08-12 00:00:46 +02:00
parent b2883df0d0
commit f240e8cb0c
19 changed files with 2559 additions and 2114 deletions

View File

@@ -19,7 +19,16 @@
#ifndef VIDEO_8514A_H
#define VIDEO_8514A_H
typedef struct {
int ena,
x, y, xoff, yoff, cur_xsize, cur_ysize,
v_acc, h_acc;
uint32_t addr, pitch;
} hwcursor8514_t;
typedef struct ibm8514_t {
hwcursor8514_t hwcursor;
hwcursor8514_t hwcursor_latch;
uint8_t pos_regs[8];
int force_old_addr;
@@ -29,8 +38,10 @@ typedef struct ibm8514_t {
uint32_t vram_size;
uint32_t vram_mask;
uint32_t pallook[512];
PALETTE vgapal;
uint8_t hwcursor_oddeven;
uint8_t dac_mask;
uint8_t dac_status;
uint32_t *map8;
@@ -38,7 +49,9 @@ typedef struct ibm8514_t {
int dac_pos;
int dac_r;
int dac_g;
int dac_b;
int internal_pitch;
int hwcursor_on;
struct {
uint16_t subsys_cntl;

View File

@@ -89,6 +89,7 @@ typedef struct svga_t {
int dac_pos;
int dac_r;
int dac_g;
int dac_b;
int vtotal;
int dispend;
int vsyncstart;
@@ -341,6 +342,9 @@ extern void ati68860_ramdac_set_render(void *priv, svga_t *svga);
extern void ati68860_ramdac_set_pallook(void *priv, int i, uint32_t col);
extern void ati68860_hwcursor_draw(svga_t *svga, int displine);
extern void ati68875_ramdac_out(uint16_t addr, int rs2, int rs3, uint8_t val, void *priv, svga_t *svga);
extern uint8_t ati68875_ramdac_in(uint16_t addr, int rs2, int rs3, void *priv, svga_t *svga);
extern void att49x_ramdac_out(uint16_t addr, int rs2, uint8_t val, void *priv, svga_t *svga);
extern uint8_t att49x_ramdac_in(uint16_t addr, int rs2, void *priv, svga_t *svga);
@@ -396,6 +400,7 @@ extern float tvp3026_getclock(int clock, void *priv);
# ifdef EMU_DEVICE_H
extern const device_t ati68860_ramdac_device;
extern const device_t ati68875_ramdac_device;
extern const device_t att490_ramdac_device;
extern const device_t att491_ramdac_device;
extern const device_t att492_ramdac_device;
@@ -409,6 +414,9 @@ 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 ics2595_device;
extern const device_t icd2061_device;
extern const device_t ics9161_device;

View File

@@ -73,6 +73,15 @@ void svga_render_ABGR8888_highres(svga_t *svga);
void svga_render_RGBA8888_lowres(svga_t *svga);
void svga_render_RGBA8888_highres(svga_t *svga);
void ibm8514_render_8bpp(svga_t *svga);
void ibm8514_render_15bpp(svga_t *svga);
void ibm8514_render_16bpp(svga_t *svga);
void ibm8514_render_24bpp(svga_t *svga);
void ibm8514_render_BGR(svga_t *svga);
void ibm8514_render_32bpp(svga_t *svga);
void ibm8514_render_ABGR8888(svga_t *svga);
void ibm8514_render_RGBA8888(svga_t *svga);
extern void (*svga_render)(svga_t *svga);
#endif /*VID_SVGA_RENDER_H*/

View File

@@ -302,7 +302,9 @@ 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_mca_device;
extern const device_t mach32_pci_device;
extern const device_t mach32_onboard_pci_device;
/* ATi Mach64 */
extern const device_t mach64gx_isa_device;