@@ -636,14 +636,12 @@ static void wake_fifo_thread(mystique_t *mystique);
|
|||||||
static void wait_fifo_idle(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);
|
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 uint8_t mystique_readb_linear(uint32_t addr, void *priv);
|
||||||
static uint16_t mystique_readw_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 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_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_writew_linear(uint32_t addr, uint16_t val, void *priv);
|
||||||
static void mystique_writel_linear(uint32_t addr, uint32_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 void mystique_recalc_mapping(mystique_t *mystique);
|
||||||
static int mystique_line_compare(svga_t *svga);
|
static int mystique_line_compare(svga_t *svga);
|
||||||
@@ -994,7 +992,7 @@ mystique_recalc_mapping(mystique_t *mystique)
|
|||||||
if (mystique->pci_regs[0x41] & 1) {
|
if (mystique->pci_regs[0x41] & 1) {
|
||||||
switch (svga->gdcreg[6] & 0x0C) {
|
switch (svga->gdcreg[6] & 0x0C) {
|
||||||
case 0x0: /*128k at A0000*/
|
case 0x0: /*128k at A0000*/
|
||||||
mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000);
|
mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x20000);
|
||||||
svga->banked_mask = 0x1ffff;
|
svga->banked_mask = 0x1ffff;
|
||||||
break;
|
break;
|
||||||
case 0x4: /*64k at A0000*/
|
case 0x4: /*64k at A0000*/
|
||||||
@@ -2568,12 +2566,14 @@ mystique_accel_iload_write_l(UNUSED(uint32_t addr), uint32_t val, void *priv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static uint8_t
|
static uint8_t
|
||||||
mystique_readb_linear(uint32_t addr, void *priv)
|
mystique_readb_linear(uint32_t addr, void *priv)
|
||||||
{
|
{
|
||||||
const svga_t *svga = (svga_t *) priv;
|
const svga_t *svga = (svga_t *) priv;
|
||||||
|
|
||||||
|
if (!svga->fast)
|
||||||
|
return svga_read_linear(addr, priv);
|
||||||
|
|
||||||
cycles -= video_timing_read_b;
|
cycles -= video_timing_read_b;
|
||||||
|
|
||||||
addr &= svga->decode_mask;
|
addr &= svga->decode_mask;
|
||||||
@@ -2616,6 +2616,11 @@ mystique_writeb_linear(uint32_t addr, uint8_t val, void *priv)
|
|||||||
{
|
{
|
||||||
svga_t *svga = (svga_t *) priv;
|
svga_t *svga = (svga_t *) priv;
|
||||||
|
|
||||||
|
if (!svga->fast) {
|
||||||
|
svga_write_linear(addr, val, priv);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
cycles -= video_timing_write_b;
|
cycles -= video_timing_write_b;
|
||||||
|
|
||||||
addr &= svga->decode_mask;
|
addr &= svga->decode_mask;
|
||||||
@@ -2655,7 +2660,6 @@ mystique_writel_linear(uint32_t addr, uint32_t val, void *priv)
|
|||||||
svga->changedvram[addr >> 12] = svga->monitor->mon_changeframecount;
|
svga->changedvram[addr >> 12] = svga->monitor->mon_changeframecount;
|
||||||
*(uint32_t *) &svga->vram[addr] = val;
|
*(uint32_t *) &svga->vram[addr] = val;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
run_dma(mystique_t *mystique)
|
run_dma(mystique_t *mystique)
|
||||||
@@ -2719,7 +2723,7 @@ run_dma(mystique_t *mystique)
|
|||||||
mystique->dma.pri_state = (mystique->dma.pri_state + 1) & 3;
|
mystique->dma.pri_state = (mystique->dma.pri_state + 1) & 3;
|
||||||
|
|
||||||
if (mystique->dma.state == DMA_STATE_SEC) {
|
if (mystique->dma.state == DMA_STATE_SEC) {
|
||||||
mystique->dma.pri_state = 0;
|
mystique->dma.pri_state = 0;
|
||||||
mystique->dma.words_expected = 0;
|
mystique->dma.words_expected = 0;
|
||||||
mystique->dma.sec_state = 0;
|
mystique->dma.sec_state = 0;
|
||||||
}
|
}
|
||||||
@@ -5689,8 +5693,8 @@ mystique_init(const device_t *info)
|
|||||||
mem_mapping_disable(&mystique->ctrl_mapping);
|
mem_mapping_disable(&mystique->ctrl_mapping);
|
||||||
|
|
||||||
mem_mapping_add(&mystique->lfb_mapping, 0, 0,
|
mem_mapping_add(&mystique->lfb_mapping, 0, 0,
|
||||||
svga_read_linear, svga_readw_linear, svga_readl_linear,
|
mystique_readb_linear, mystique_readw_linear, mystique_readl_linear,
|
||||||
svga_write_linear, svga_writew_linear, svga_writel_linear,
|
mystique_writeb_linear, mystique_writew_linear, mystique_writel_linear,
|
||||||
NULL, 0, &mystique->svga);
|
NULL, 0, &mystique->svga);
|
||||||
mem_mapping_disable(&mystique->lfb_mapping);
|
mem_mapping_disable(&mystique->lfb_mapping);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user