Restoring the old changes.
This commit is contained in:
@@ -634,12 +634,14 @@ static void wake_fifo_thread(mystique_t *mystique);
|
||||
static void wait_fifo_idle(mystique_t *mystique);
|
||||
static void mystique_queue(mystique_t *mystique, uint32_t addr, uint32_t val, uint32_t type);
|
||||
|
||||
#if 0
|
||||
static uint8_t mystique_readb_linear(uint32_t addr, void *priv);
|
||||
static uint16_t mystique_readw_linear(uint32_t addr, void *priv);
|
||||
static uint32_t mystique_readl_linear(uint32_t addr, void *priv);
|
||||
static void mystique_writeb_linear(uint32_t addr, uint8_t val, void *priv);
|
||||
static void mystique_writew_linear(uint32_t addr, uint16_t val, void *priv);
|
||||
static void mystique_writel_linear(uint32_t addr, uint32_t val, void *priv);
|
||||
#endif
|
||||
|
||||
static void mystique_recalc_mapping(mystique_t *mystique);
|
||||
static int mystique_line_compare(svga_t *svga);
|
||||
@@ -720,15 +722,10 @@ mystique_out(uint16_t addr, uint8_t val, void *priv)
|
||||
if (mystique->crtcext_idx == 1)
|
||||
svga->dpms = !!(val & 0x30);
|
||||
if (mystique->crtcext_idx < 4) {
|
||||
svga->fullchange = changeframecount;
|
||||
svga_recalctimings(svga);
|
||||
}
|
||||
if (mystique->crtcext_idx == 3) {
|
||||
if (val & CRTCX_R3_MGAMODE)
|
||||
svga->fb_only = 1;
|
||||
else
|
||||
svga->fb_only = 0;
|
||||
svga_recalctimings(svga);
|
||||
if (mystique->crtcext_idx != 3) {
|
||||
svga->fullchange = changeframecount;
|
||||
svga_recalctimings(svga);
|
||||
}
|
||||
}
|
||||
if (mystique->crtcext_idx == 4) {
|
||||
if (svga->gdcreg[6] & 0xc) {
|
||||
@@ -880,7 +877,6 @@ mystique_recalctimings(svga_t *svga)
|
||||
svga->interlace = !!(mystique->crtcext_regs[0] & 0x80);
|
||||
|
||||
if (mystique->crtcext_regs[3] & CRTCX_R3_MGAMODE) {
|
||||
svga->packed_chain4 = 1;
|
||||
svga->lowres = 0;
|
||||
svga->char_width = 8;
|
||||
svga->hdisp = (svga->crtc[1] + 1) * 8;
|
||||
@@ -891,6 +887,7 @@ mystique_recalctimings(svga_t *svga)
|
||||
svga->rowoffset <<= 1;
|
||||
svga->ma_latch <<= 1;
|
||||
}
|
||||
|
||||
if (mystique->type >= MGA_1064SG) {
|
||||
/*Mystique, unlike most SVGA cards, allows display start to take
|
||||
effect mid-screen*/
|
||||
@@ -903,7 +900,6 @@ mystique_recalctimings(svga_t *svga)
|
||||
}
|
||||
|
||||
svga->rowoffset <<= 1;
|
||||
|
||||
switch (mystique->xmulctrl & XMULCTRL_DEPTH_MASK) {
|
||||
case XMULCTRL_DEPTH_8:
|
||||
case XMULCTRL_DEPTH_2G8V16:
|
||||
@@ -952,6 +948,7 @@ mystique_recalctimings(svga_t *svga)
|
||||
}
|
||||
}
|
||||
svga->line_compare = mystique_line_compare;
|
||||
svga->packed_chain4 = !svga->chain4;
|
||||
} else {
|
||||
svga->packed_chain4 = 0;
|
||||
svga->line_compare = NULL;
|
||||
@@ -959,7 +956,11 @@ mystique_recalctimings(svga_t *svga)
|
||||
svga->bpp = 8;
|
||||
}
|
||||
|
||||
svga->fb_only = svga->packed_chain4;
|
||||
svga->disable_blink = (svga->bpp > 4);
|
||||
#if 0
|
||||
pclog("PackedChain4=%d, chain4=%x, fast=%x, bit6 attrreg10=%02x, bits 5-6 gdcreg5=%02x.\n", svga->packed_chain4, svga->chain4, svga->fast, svga->attrregs[0x10] & 0x40, svga->gdcreg[5] & 0x60);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2563,6 +2564,7 @@ mystique_accel_iload_write_l(UNUSED(uint32_t addr), uint32_t val, void *priv)
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static uint8_t
|
||||
mystique_readb_linear(uint32_t addr, void *priv)
|
||||
{
|
||||
@@ -2616,7 +2618,7 @@ mystique_writeb_linear(uint32_t addr, uint8_t val, void *priv)
|
||||
if (addr >= svga->vram_max)
|
||||
return;
|
||||
addr &= svga->vram_mask;
|
||||
svga->changedvram[addr >> 12] = changeframecount;
|
||||
svga->changedvram[addr >> 12] = svga->monitor->mon_changeframecount;
|
||||
svga->vram[addr] = val;
|
||||
}
|
||||
|
||||
@@ -2631,7 +2633,7 @@ mystique_writew_linear(uint32_t addr, uint16_t val, void *priv)
|
||||
if (addr >= svga->vram_max)
|
||||
return;
|
||||
addr &= svga->vram_mask;
|
||||
svga->changedvram[addr >> 12] = changeframecount;
|
||||
svga->changedvram[addr >> 12] = svga->monitor->mon_changeframecount;
|
||||
*(uint16_t *) &svga->vram[addr] = val;
|
||||
}
|
||||
|
||||
@@ -2646,9 +2648,10 @@ mystique_writel_linear(uint32_t addr, uint32_t val, void *priv)
|
||||
if (addr >= svga->vram_max)
|
||||
return;
|
||||
addr &= svga->vram_mask;
|
||||
svga->changedvram[addr >> 12] = changeframecount;
|
||||
svga->changedvram[addr >> 12] = svga->monitor->mon_changeframecount;
|
||||
*(uint32_t *) &svga->vram[addr] = val;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
run_dma(mystique_t *mystique)
|
||||
@@ -5628,9 +5631,9 @@ mystique_init(const device_t *info)
|
||||
mem_mapping_disable(&mystique->ctrl_mapping);
|
||||
|
||||
mem_mapping_add(&mystique->lfb_mapping, 0, 0,
|
||||
mystique_readb_linear, mystique_readw_linear, mystique_readl_linear,
|
||||
mystique_writeb_linear, mystique_writew_linear, mystique_writel_linear,
|
||||
NULL, 0, mystique);
|
||||
svga_read_linear, svga_readw_linear, svga_readl_linear,
|
||||
svga_write_linear, svga_writew_linear, svga_writel_linear,
|
||||
NULL, 0, &mystique->svga);
|
||||
mem_mapping_disable(&mystique->lfb_mapping);
|
||||
|
||||
mem_mapping_add(&mystique->iload_mapping, 0, 0,
|
||||
|
Reference in New Issue
Block a user