More C&T 69000 fixes

This commit is contained in:
Cacodemon345
2024-01-30 16:56:08 +06:00
parent 10ff2dcc6a
commit 82e95cf59c

View File

@@ -43,7 +43,6 @@ typedef struct chips_69000_t {
uint8_t pci_line_interrupt; uint8_t pci_line_interrupt;
uint8_t pci_rom_enable; uint8_t pci_rom_enable;
uint8_t read_write_bank; uint8_t read_write_bank;
uint8_t slot;
atomic_bool engine_active; atomic_bool engine_active;
atomic_bool quit; atomic_bool quit;
thread_t *accel_thread; thread_t *accel_thread;
@@ -580,11 +579,11 @@ chips_69000_recalctimings(svga_t *svga)
if (!(chips->ext_regs[0x81] & 0x10)) if (!(chips->ext_regs[0x81] & 0x10))
svga->htotal += 5; svga->htotal += 5;
/* Let's care about horizontal blanking end later when it matters. */ svga->hblank_end_val = ((svga->crtc[3] & 0x1f) | ((svga->crtc[5] & 0x80) ? 0x20 : 0x00)) | (svga->crtc[0x3c] & 0b11000000);
svga->hblank_end_len = 0x100;
svga->ma_latch |= (svga->crtc[0x40] & 0xF) << 16; svga->ma_latch |= (svga->crtc[0x40] & 0xF) << 16;
svga->rowoffset |= (svga->crtc[0x41] & 0xF) << 8; svga->rowoffset |= (svga->crtc[0x41] & 0xF) << 8;
}
svga->interlace = !!(svga->crtc[0x70] & 0x80); svga->interlace = !!(svga->crtc[0x70] & 0x80);
@@ -592,34 +591,33 @@ chips_69000_recalctimings(svga_t *svga)
case 0b0010: case 0b0010:
svga->bpp = 8; svga->bpp = 8;
svga->render = svga_render_8bpp_highres; svga->render = svga_render_8bpp_highres;
svga->rowoffset <<= 2;
break; break;
case 0b0100: case 0b0100:
svga->bpp = 15; svga->bpp = 15;
svga->render = svga_render_15bpp_highres; svga->render = svga_render_15bpp_highres;
svga->rowoffset <<= 2;
break; break;
case 0b0101: case 0b0101:
svga->bpp = 16; svga->bpp = 16;
svga->render = svga_render_16bpp_highres; svga->render = svga_render_16bpp_highres;
svga->rowoffset <<= 2;
break; break;
case 0b0110: case 0b0110:
svga->bpp = 24; svga->bpp = 24;
svga->render = svga_render_24bpp_highres; svga->render = svga_render_24bpp_highres;
svga->rowoffset <<= 2;
break; break;
case 0b0111: case 0b0111:
svga->bpp = 32; svga->bpp = 32;
svga->render = svga_render_32bpp_highres; svga->render = svga_render_32bpp_highres;
svga->rowoffset <<= 2;
break; break;
} }
if (chips->ext_regs[0x40] & 1) { if (chips->ext_regs[0x40] & 1) {
svga->force_dword_mode = chips->ext_regs[0x40] & 1; svga->force_dword_mode = chips->ext_regs[0x40] & 1;
svga->rowoffset >>= 2; } else {
svga->force_dword_mode = 0;
}
} else {
svga->force_dword_mode = 0;
} }
} }
@@ -976,7 +974,7 @@ chips_69000_pci_write(int func, int addr, uint8_t val, void *p)
} }
case 0x13: case 0x13:
{ {
mem_mapping_set_addr(&chips->linear_mapping, val << 24, (1 << 24) - 1); mem_mapping_set_addr(&chips->linear_mapping, val << 24, (1 << 24));
break; break;
} }
case 0x3c: case 0x3c: