diff --git a/src/video/vid_svga.c b/src/video/vid_svga.c index 20c4d6dd6..4cc66899c 100644 --- a/src/video/vid_svga.c +++ b/src/video/vid_svga.c @@ -43,6 +43,8 @@ void svga_doblit(int wx, int wy, svga_t *svga); +svga_t *svga_8514; + extern int cyc_total; extern uint8_t edatlookup[4][4]; @@ -552,8 +554,13 @@ svga_recalctimings(svga_t *svga) } else overscan_x = 16; - if (svga->recalctimings_ex) - svga->recalctimings_ex(svga); + if (svga->vga_on) { + if (svga->recalctimings_ex) { + svga->recalctimings_ex(svga); + } + } else { + ibm8514_recalctimings(svga); + } svga->y_add = (overscan_y >> 1) - (svga->crtc[8] & 0x1f); svga->x_add = (overscan_x >> 1); @@ -650,6 +657,11 @@ svga_poll(void *p) int wx, wy; int ret, old_ma; + if (!svga->vga_on) { + ibm8514_poll(&svga->dev8514, svga); + return; + } + if (!svga->linepos) { if (svga->displine == svga->hwcursor_latch.y && svga->hwcursor_latch.ena) { svga->hwcursor_on = svga->hwcursor.ysize - svga->hwcursor_latch.yoff; @@ -956,6 +968,8 @@ svga_init(const device_t *info, svga_t *svga, void *p, int memsize, svga->translate_address = NULL; svga->ksc5601_english_font_type = 0; + svga->vga_on = 1; + if ((info->flags & DEVICE_PCI) || (info->flags & DEVICE_VLB) || (info->flags & DEVICE_MCA)) { mem_mapping_add(&svga->mapping, 0xa0000, 0x20000, svga_read, svga_readw, svga_readl, @@ -977,6 +991,11 @@ svga_init(const device_t *info, svga_t *svga, void *p, int memsize, svga_pri = svga; + if (ibm8514_enabled) + svga_8514 = svga; + else + svga_8514 = NULL; + svga->ramdac_type = RAMDAC_6BIT; svga->map8 = svga->pallook;