Merge pull request #556 from 86Box/feature/mga
Added Matrox MGA (Mystique) emulation from PCem.
This commit is contained in:
4908
src/video/vid_mga.c
Normal file
4908
src/video/vid_mga.c
Normal file
File diff suppressed because it is too large
Load Diff
17
src/video/vid_mga.h
Normal file
17
src/video/vid_mga.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||||
|
* running old operating systems and software designed for IBM
|
||||||
|
* PC systems and compatibles from 1981 through fairly recent
|
||||||
|
* system designs based on the PCI bus.
|
||||||
|
*
|
||||||
|
* This file is part of the 86Box distribution.
|
||||||
|
*
|
||||||
|
* Matrox MGA graphics card emulation.
|
||||||
|
*
|
||||||
|
* Version: @(#)vid_mga.h 1.0.0 2020/01/16
|
||||||
|
*
|
||||||
|
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||||
|
* Copyright 2008-2020 Sarah Walker.
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern const device_t mystique_device;
|
||||||
@@ -570,6 +570,7 @@ svga_poll(void *p)
|
|||||||
uint32_t x, blink_delay;
|
uint32_t x, blink_delay;
|
||||||
int wx, wy;
|
int wx, wy;
|
||||||
int skip = (svga->crtc[8] >> 5) & 0x03;
|
int skip = (svga->crtc[8] >> 5) & 0x03;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (!svga->linepos) {
|
if (!svga->linepos) {
|
||||||
if (svga->displine == svga->hwcursor_latch.y && svga->hwcursor_latch.ena) {
|
if (svga->displine == svga->hwcursor_latch.y && svga->hwcursor_latch.ena) {
|
||||||
@@ -701,11 +702,18 @@ svga_poll(void *p)
|
|||||||
svga->vc &= 2047;
|
svga->vc &= 2047;
|
||||||
|
|
||||||
if (svga->vc == svga->split) {
|
if (svga->vc == svga->split) {
|
||||||
svga->ma = svga->maback = 0;
|
ret = 1;
|
||||||
svga->sc = 0;
|
|
||||||
if (svga->attrregs[0x10] & 0x20) {
|
if (svga->line_compare)
|
||||||
svga->scrollcache = 0;
|
ret = svga->line_compare(svga);
|
||||||
svga->x_add = (overscan_x >> 1);
|
|
||||||
|
if (ret) {
|
||||||
|
svga->ma = svga->maback = 0;
|
||||||
|
svga->sc = 0;
|
||||||
|
if (svga->attrregs[0x10] & 0x20) {
|
||||||
|
svga->scrollcache = 0;
|
||||||
|
svga->x_add = (overscan_x >> 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (svga->vc == svga->dispend) {
|
if (svga->vc == svga->dispend) {
|
||||||
|
|||||||
@@ -109,6 +109,11 @@ typedef struct svga_t
|
|||||||
void (*ven_write)(struct svga_t *svga, uint8_t val, uint32_t addr);
|
void (*ven_write)(struct svga_t *svga, uint8_t val, uint32_t addr);
|
||||||
float (*getclock)(int clock, void *p);
|
float (*getclock)(int clock, void *p);
|
||||||
|
|
||||||
|
/*Called when VC=R18 and friends. If this returns zero then MA resetting
|
||||||
|
is skipped. Matrox Mystique in Power mode reuses this counter for
|
||||||
|
vertical line interrupt*/
|
||||||
|
int (*line_compare)(struct svga_t *svga);
|
||||||
|
|
||||||
/*If set then another device is driving the monitor output and the SVGA
|
/*If set then another device is driving the monitor output and the SVGA
|
||||||
card should not attempt to display anything */
|
card should not attempt to display anything */
|
||||||
int override;
|
int override;
|
||||||
|
|||||||
@@ -678,6 +678,7 @@ VIDOBJ := video.o \
|
|||||||
vid_et4000.o vid_sc1502x_ramdac.o \
|
vid_et4000.o vid_sc1502x_ramdac.o \
|
||||||
vid_et4000w32.o vid_stg_ramdac.o \
|
vid_et4000w32.o vid_stg_ramdac.o \
|
||||||
vid_ht216.o \
|
vid_ht216.o \
|
||||||
|
vid_mga.o \
|
||||||
vid_oak_oti.o \
|
vid_oak_oti.o \
|
||||||
vid_paradise.o \
|
vid_paradise.o \
|
||||||
vid_ti_cf62011.o \
|
vid_ti_cf62011.o \
|
||||||
|
|||||||
@@ -684,6 +684,7 @@ VIDOBJ := video.o \
|
|||||||
vid_et4000.o vid_sc1502x_ramdac.o \
|
vid_et4000.o vid_sc1502x_ramdac.o \
|
||||||
vid_et4000w32.o vid_stg_ramdac.o \
|
vid_et4000w32.o vid_stg_ramdac.o \
|
||||||
vid_ht216.o \
|
vid_ht216.o \
|
||||||
|
vid_mga.o \
|
||||||
vid_oak_oti.o \
|
vid_oak_oti.o \
|
||||||
vid_paradise.o \
|
vid_paradise.o \
|
||||||
vid_ti_cf62011.o \
|
vid_ti_cf62011.o \
|
||||||
|
|||||||
Reference in New Issue
Block a user