Some more changes to the Mach8/32/8514/A side (April 29th, 2025)

1. Do not stall the guest when the passthrough mode is on, fixes hang ups in Windows 3.1 using the 2.3 drivers.
2. In the pitch register, make sure the passthrough goes on when needed only on the ATI Mach32, not 8, fixes mode on/off in text mode when needed.
3. Cosmetic changes and logs.
This commit is contained in:
TC1995
2025-04-29 00:57:03 +02:00
parent f4bc405c58
commit d623425efd
2 changed files with 14 additions and 9 deletions

View File

@@ -961,7 +961,7 @@ ibm8514_accel_in(uint16_t port, svga_t *svga)
temp |= INT_GE_BSY;
}
if (!dev->fifo_idx) {
if (!dev->fifo_idx && !dev->on) {
dev->force_busy = 0;
dev->force_busy2 = 0;
dev->data_available = 0;

View File

@@ -866,6 +866,9 @@ mach_accel_start(int cmd_type, int cpu_input, int count, uint32_t mix_dat, uint3
mach->accel.stepy = 1;
}
if (mach->accel.dp_config == 0x4011)
mach->accel.height++;
dev->accel.sy = 0;
dev->accel.dest = mach->accel.dst_ge_offset + (dev->accel.dy * mach->accel.dst_pitch);
@@ -1172,7 +1175,7 @@ mach_accel_start(int cmd_type, int cpu_input, int count, uint32_t mix_dat, uint3
mach->accel.sx++;
if (mach->accel.sx >= mach->accel.src_width) {
mach->accel.sx = 0;
if (mach->accel.src_stepx < 0)
if (mach->accel.src_stepx == -1)
dev->accel.cx += mach->accel.src_width;
else
dev->accel.cx -= mach->accel.src_width;
@@ -1196,7 +1199,7 @@ mach_accel_start(int cmd_type, int cpu_input, int count, uint32_t mix_dat, uint3
dev->accel.sx++;
if ((dev->accel.sx >= mach->accel.width) || (dev->accel.dx >= 0x600)) {
dev->accel.sx = 0;
if (mach->accel.stepx < 0)
if (mach->accel.stepx == -1)
dev->accel.dx += mach->accel.width;
else
dev->accel.dx -= mach->accel.width;
@@ -3457,7 +3460,7 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u
case 0xe2e9:
case 0xe6e9:
mach_log("Write PORT=%04x, 8514/A=%x, val=%04x, len=%d.\n", port, dev->accel.cmd_back, val, len);
mach_log("Write PORT=%04x, 8514/A=%x, val0=%02x, sy=%d, len=%d, dx=%d, dy=%d.\n", port, dev->accel.cmd_back, val, dev->accel.sy, len, dev->accel.dx, dev->accel.dy);
if (len == 1) {
if (!dev->accel.cmd_back) {
if (mach->accel.cmd_type >= 0) {
@@ -3645,9 +3648,9 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u
if (len == 2) {
dev->_8514crt = 0;
if (!(dev->accel.advfunc_cntl & 0x01)) {
if (!(dev->accel.advfunc_cntl & 0x01) && ATI_MACH32) {
dev->on = 1;
dev->vendor_mode = !!ATI_MACH32;
dev->vendor_mode = 1;
}
} else
dev->_8514crt = 1;
@@ -3656,7 +3659,7 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u
if (ATI_GRAPHICS_ULTRA || ATI_MACH32)
mach32_updatemapping(mach, svga);
mach_log("ATI 8514/A: (0x%04x) CRT Pitch, val=0x%02x, crtpitch=%x, len=%d, extended 8514/A mode bpp=%d.\n", port, val, dev->ext_crt_pitch, len, dev->accel_bpp);
mach_log("ATI 8514/A: (0x%04x) CRT Pitch, val=0x%02x, crtpitch=%x, len=%d, extended 8514/A mode bpp=%d, enable_on=%d.\n", port, val, dev->ext_crt_pitch, len, dev->accel_bpp, dev->on);
break;
case 0x2aee:
@@ -4747,21 +4750,23 @@ mach_accel_in_call(uint16_t port, mach_t *mach, svga_t *svga, ibm8514_t *dev)
}
}
if (!dev->fifo_idx) {
if (!dev->fifo_idx && !dev->on) {
dev->force_busy = 0;
dev->force_busy2 = 0;
mach->force_busy = 0;
dev->data_available = 0;
dev->data_available2 = 0;
temp |= INT_FIFO_EMP;
mach_log("Fifo Empty.\n");
}
temp |= (dev->subsys_stat | (dev->vram_512k_8514 ? 0x00 : 0x80));
if (mach->accel.ext_ge_config & 0x08)
temp |= ((mach->accel.ext_ge_config & 0x07) << 4);
else
temp |= 0x20;
mach_log("0x%04x read: Subsystem Status=%02x, monitoralias=%02x.\n", port, temp, mach->accel.ext_ge_config & 0x07);
}
mach_log("0x%04x read: Subsystem Status=%02x, monitoralias=%02x.\n", port, temp, mach->accel.ext_ge_config & 0x07);
break;
/*ATI Mach8/32 specific registers*/