mirror of
https://github.com/86Box/86Box.git
synced 2025-01-23 09:42:47 -05:00
HT216-32: Apply the blanking calculation.
This commit is contained in:
parent
03a1f783f2
commit
0090000f85
1 changed files with 11 additions and 4 deletions
|
@ -312,6 +312,10 @@ ht216_out(uint16_t addr, uint8_t val, void *priv)
|
||||||
ht216_remap(ht216);
|
ht216_remap(ht216);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0xca:
|
||||||
|
svga_recalctimings(svga);
|
||||||
|
break;
|
||||||
|
|
||||||
case 0xc9:
|
case 0xc9:
|
||||||
case 0xcf:
|
case 0xcf:
|
||||||
ht216_remap(ht216);
|
ht216_remap(ht216);
|
||||||
|
@ -321,6 +325,7 @@ ht216_out(uint16_t addr, uint8_t val, void *priv)
|
||||||
svga->adv_flags &= ~FLAG_RAMDAC_SHIFT;
|
svga->adv_flags &= ~FLAG_RAMDAC_SHIFT;
|
||||||
if (val & 0x04)
|
if (val & 0x04)
|
||||||
svga->adv_flags |= FLAG_RAMDAC_SHIFT;
|
svga->adv_flags |= FLAG_RAMDAC_SHIFT;
|
||||||
|
svga_recalctimings(svga);
|
||||||
fallthrough;
|
fallthrough;
|
||||||
/*Bank registers*/
|
/*Bank registers*/
|
||||||
case 0xe8:
|
case 0xe8:
|
||||||
|
@ -688,7 +693,7 @@ ht216_recalctimings(svga_t *svga)
|
||||||
if (!(svga->crtc[1] & 1))
|
if (!(svga->crtc[1] & 1))
|
||||||
svga->hdisp--;
|
svga->hdisp--;
|
||||||
svga->hdisp++;
|
svga->hdisp++;
|
||||||
svga->hdisp *= (svga->seqregs[1] & 8) ? 16 : 8;
|
svga->hdisp *= svga->dots_per_clock;
|
||||||
svga->rowoffset <<= 1;
|
svga->rowoffset <<= 1;
|
||||||
if ((svga->crtc[0x17] & 0x60) == 0x20) /*Would result in a garbled screen with trailing cursor glitches*/
|
if ((svga->crtc[0x17] & 0x60) == 0x20) /*Would result in a garbled screen with trailing cursor glitches*/
|
||||||
svga->crtc[0x17] |= 0x40;
|
svga->crtc[0x17] |= 0x40;
|
||||||
|
@ -711,6 +716,9 @@ ht216_recalctimings(svga_t *svga)
|
||||||
svga->vram_display_mask = 0x7ffff;
|
svga->vram_display_mask = 0x7ffff;
|
||||||
else
|
else
|
||||||
svga->vram_display_mask = (ht216->ht_regs[0xf6] & 0x40) ? ht216->vram_mask : 0x3ffff;
|
svga->vram_display_mask = (ht216->ht_regs[0xf6] & 0x40) ? ht216->vram_mask : 0x3ffff;
|
||||||
|
|
||||||
|
if (ht216->ht_regs[0xe0] & 0x20)
|
||||||
|
svga->hblankstart = ((ht216->ht_regs[0xca] >> 2) << 8) + svga->crtc[4] + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1466,9 +1474,8 @@ radius_mca_feedb(UNUSED(void *priv))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void *
|
||||||
*
|
ht216_init(const device_t *info, uint32_t mem_size, int has_rom)
|
||||||
ht216_init(const device_t *info, uint32_t mem_size, int has_rom)
|
|
||||||
{
|
{
|
||||||
ht216_t *ht216 = malloc(sizeof(ht216_t));
|
ht216_t *ht216 = malloc(sizeof(ht216_t));
|
||||||
svga_t *svga;
|
svga_t *svga;
|
||||||
|
|
Loading…
Reference in a new issue