3 #include <conio.h> /* this is where Open Watcom hides the outp() etc. functions */
13 #include <hw/cpu/cpu.h>
14 #include <hw/dos/dos.h>
15 #include <hw/dos/tgusmega.h>
17 #if !defined(TARGET_WINDOWS) && !defined(TARGET_OS2)
18 struct mega_em_info megaem_info={0};
20 int gravis_mega_em_detect(struct mega_em_info *x) {
21 /* TODO: Cache results, only need to scan once */
25 #if TARGET_MSDOS == 32
26 int386(0x21,®s,®s);
28 int86(0x21,®s,®s);
30 if (regs.w.ax == 0x5678) {
31 x->intnum = regs.h.cl;
32 x->version = regs.w.dx;
33 x->response = regs.w.bx;
35 if (x->version == 0) {
36 if (x->response == 0x1235)
38 else if (x->response == 0x1237)