Video: more changes and fixes of the day (June 26th, 2025)

1. Convert the ramdac types into an enumerator.
2. Make sure the 8514/A compatible ramdacs are, if in VGA mode, using VGA compatible ports and/or, in 8514/A mode, the 8514/A ports when needed, fixes color issues in 1280x1024 resolutions on NT 3.1 and various stuff using the Mach32.
3. Add pitch initialization on reset, fixes 8514/A display drivers on various stuff on Mach8/Mach32 cards.
This commit is contained in:
TC1995
2025-06-26 13:11:42 +02:00
parent 08e281cfd5
commit 07af9f12d7
7 changed files with 74 additions and 52 deletions

View File

@@ -18,6 +18,12 @@
#ifndef VIDEO_ATI_MACH8_H
#define VIDEO_ATI_MACH8_H
typedef enum {
ATI_68875 = 0,
ATI_68860,
RAMDAC_MAX
} mach_ramdac_type;
typedef struct mach_t {
ati_eeprom_t eeprom;
svga_t svga;
@@ -39,7 +45,7 @@ typedef struct mach_t {
uint8_t irq_state;
int index;
int ramdac_type;
mach_ramdac_type ramdac_type;
int old_mode;
uint16_t config1;

View File

@@ -136,6 +136,7 @@ typedef struct svga_t {
int packed_4bpp;
int ps_bit_bug;
int ati_4color;
int vblankend;
/*The three variables below allow us to implement memory maps like that seen on a 1MB Trio64 :
0MB-1MB - VRAM
@@ -404,15 +405,15 @@ uint32_t svga_lookup_lut_ram(svga_t* svga, uint32_t val);
/* We need a way to add a device with a pointer to a parent device so it can attach itself to it, and
possibly also a second ATi 68860 RAM DAC type that auto-sets SVGA render on RAM DAC render change. */
extern void ati68860_ramdac_out(uint16_t addr, uint8_t val, void *priv, svga_t *svga);
extern uint8_t ati68860_ramdac_in(uint16_t addr, void *priv, svga_t *svga);
extern void ati68860_ramdac_out(uint16_t addr, uint8_t val, int is_8514, void *priv, svga_t *svga);
extern uint8_t ati68860_ramdac_in(uint16_t addr, int is_8514, void *priv, svga_t *svga);
extern void ati68860_set_ramdac_type(void *priv, int type);
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 ati68875_ramdac_out(uint16_t addr, int rs2, int rs3, uint8_t val, int is_8514, void *priv, svga_t *svga);
extern uint8_t ati68875_ramdac_in(uint16_t addr, int rs2, int rs3, int is_8514, 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);