]> 4ch.mooo.com Git - 16.git/blobdiff - src/pcxtest.c
gvar.video.page[1].pattern_ofs removed because it is just (0x10000UL - (uint16_t...
[16.git] / src / pcxtest.c
index c05cff5f7f79a2093cb17ba3d895d468a671f6ee..99e2669ee01641da7e963f546713ea71f4e7a2de 100755 (executable)
@@ -37,9 +37,30 @@ void main() {
        int plane;\r
        float t1, t2;\r
 \r
+       // DOSLIB: check our environment\r
+       probe_dos();\r
+\r
+       // DOSLIB: what CPU are we using?\r
+       // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS.\r
+       //      So this code by itself shouldn't care too much what CPU it's running on. Except that other\r
+       //      parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for\r
+       //      the CPU to carry out tasks. --J.C.\r
+       cpu_probe();\r
+\r
+       // DOSLIB: check for VGA\r
+       if (!probe_vga()) {\r
+               printf("VGA probe failed\n");\r
+               return;\r
+       }\r
+       // hardware must be VGA or higher!\r
+       if (!(vga_state.vga_flags & VGA_IS_VGA)) {\r
+               printf("This program requires VGA or higher graphics hardware\n");\r
+               return;\r
+       }\r
+\r
 //0000 bmp = bitmapLoadPcx("data/koishi~~.pcx");\r
-//     bmp = bitmapLoadPcx("data/chikyuu.pcx");\r
-       bmp = bitmapLoadPcx("data/koishi^^.pcx");\r
+       bmp = bitmapLoadPcx("data/chikyuu.pcx");\r
+//     bmp = bitmapLoadPcx("data/koishi^^.pcx");\r
 //     bmp = bitmapLoadPcx("16/PCX_LIB/chikyuu.pcx");\r
        p = planar_buf_from_bitmap(&bmp);\r
        VGAmodeX(1, 1, &gvar);\r