From c3b339d60cd761f2034f21078f375d4a3165e742 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Mon, 29 Aug 2016 18:19:21 -0500 Subject: [PATCH] vrstest looks better hmmm --- src/vrstest.c | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/vrstest.c b/src/vrstest.c index be88d7ae..e90d10e8 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -55,31 +55,6 @@ void main() { word w=0; - - // 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; - } - - //bmp = bitmapLoadPcx("data/chikyuu.pcx"); - gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); - mm.mmstarted=0; MM_Startup(&mm, &mmi); CA_Startup(&gvar); @@ -132,6 +107,31 @@ void main() { //if(CA_ReadFile("data/spri/CHUBACW1.vrl", &bigbuffer, &mm)) baka=1; else baka=0; //if(CA_LoadFile("data/spri/CHUBACW1.vrl", &bbuffer, &mm, &mmi)) baka=1; else baka=0; + // 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; + } + + //bmp = bitmapLoadPcx("data/chikyuu.pcx"); + gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); + + /* clear and draw one sprite and one bitmap */ VGAmodeX(1, 1, &gvar); modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].sw, gvar.video.page[0].sh, 1); -- 2.39.5