Vast fixes to the Mach8/32/8514/A compatible side (April 22nd 2025)

1. As tiring as it seems, XOR properly the passthrough bits for mode changes. Fixes everything tested as of now (Mach8/32).
2. Implemented separate destination and source GE pitch and offsets. Fixes Windows 3.1 mach8/32 drivers using devicebitmap enabled (or dmp=1).
3. Properly fixed high and true color patterns so that the aforementioned patterns are drawn correctly in various stuff.
4. Implemented in the best possible way the CRT offset (currently in on conjunction with the GE offset).
5. On ScanToX with bpp set to 24 and dpconfig 0x6211, optmize the SRC/CUR X-Y coordinates at the end of the blit.
6. For mode changes, don't call the mode change recalctimings function if we aren't in the appropriate bits of the respective ports.
7. Separate 8514/A compatible and Extended foreground/background selection implemented, fixes Windows 3.x ATI Ultra drivers from 1992 without hacks.
8. Clear the busy flags when needed without stalling the entire guests (but not the emulator itself) (Mach8/32).
9. The MMIO regs should be enabled only when the VGA aperture has reached a graphics mode (0xA000). This fixes NT 3.x mach drivers in true color mode and making Win3.1 drivers working without a hitch at the same time.
10. Actually implement the hardware 4bpp cursor properly on Mach32.
11. Cosmetic cleanups.
This commit is contained in:
TC1995
2025-04-22 21:15:05 +02:00
parent aa788e16f7
commit 14ef3b75ac
6 changed files with 803 additions and 818 deletions

View File

@@ -90,6 +90,7 @@ typedef struct ibm8514_t {
uint16_t subsys_cntl;
uint16_t setup_md;
uint16_t advfunc_cntl;
uint16_t advfunc_cntl_old;
uint16_t cur_y;
uint16_t cur_x;
int16_t destx;
@@ -107,8 +108,10 @@ typedef struct ibm8514_t {
uint16_t wrt_mask;
uint16_t rd_mask;
uint16_t color_cmp;
uint16_t bkgd_mix;
uint16_t frgd_mix;
uint8_t bkgd_mix;
uint8_t frgd_mix;
uint8_t bkgd_sel;
uint8_t frgd_sel;
uint16_t multifunc_cntl;
uint16_t multifunc[16];
uint16_t clip_right;
@@ -159,6 +162,14 @@ typedef struct ibm8514_t {
int ydir;
int linedraw;
uint32_t ge_offset;
uint32_t src_ge_offset;
uint32_t dst_ge_offset;
uint16_t src_pitch;
uint16_t dst_pitch;
int64_t cur_x_24bpp;
int64_t cur_y_24bpp;
int64_t dest_x_24bpp;
int64_t dest_y_24bpp;
} accel;
uint16_t test;
@@ -240,6 +251,8 @@ typedef struct ibm8514_t {
uint32_t vram_amount;
int vram_512k_8514;
int vendor_mode;
int _8514on;
int _8514crt;
PALETTE _8514pal;
latch8514_t latch;