From: Jonathan Campbell Date: Wed, 6 Apr 2016 16:25:42 +0000 (-0700) Subject: same dos/cpu/vga probe for scroll.c X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=commitdiff_plain;h=bb3be3ebd67ad43d7b5705efc2b5be70fad01422 same dos/cpu/vga probe for scroll.c but apparently some function or data structure is making the DGROUP segment too large for Watcom to swallow :( --- diff --git a/src/scroll.c b/src/scroll.c index d5222a50..0c37c8c4 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -64,6 +64,27 @@ void main(int argc, char *argv[]) if(argv[1]) bakapee = atoi(argv[1]); else bakapee = 1; + // DOSLIB: check our environment + probe_dos(); + + // DOSLIB: what CPU are we using? + // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS. + // So this code by itself shouldn't care too much what CPU it's running on. Except that other + // parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for + // the CPU to carry out tasks. --J.C. + cpu_probe(); + + // DOSLIB: check for VGA + if (!probe_vga()) { + printf("VGA probe failed\n"); + return; + } + // hardware must be VGA or higher! + if (!(vga_state.vga_flags & VGA_IS_VGA)) { + printf("This program requires VGA or higher graphics hardware\n"); + return; + } + testcontrolnoisy=0; player[0].persist_aniframe=0;