]> 4ch.mooo.com Git - 16.git/commitdiff
doslib probe DOS, CPU, and VGA. exit politely if not VGA.
authorJonathan Campbell <jonathan@castus.tv>
Mon, 4 Apr 2016 05:49:12 +0000 (22:49 -0700)
committerJonathan Campbell <jonathan@castus.tv>
Mon, 4 Apr 2016 05:49:12 +0000 (22:49 -0700)
git_con.fig
src/bakapi.c
src/lib/doslib

index 9c560e3025b45c8ffb8733f1dd3c0dffd6cbf06b..927bd4df91ff632c75c4dc1200c5e0fb3ccc9d97 100755 (executable)
@@ -3,21 +3,13 @@
        filemode = true
        bare = false
        logallrefupdates = true
-[remote "x4"]
-       url = ssh://sparky4@4ch.mooo.com:26/var/www/16/16.git
-       fetch = +refs/heads/*:refs/remotes/x4/*
+[remote "origin"]
+       url = https://github.com/sparky4/16
+       fetch = +refs/heads/*:refs/remotes/origin/*
 [branch "master"]
        remote = origin
        merge = refs/heads/master
-[remote "origin"]
-       url = git@github.com:sparky4/16.git
-       fetch = +refs/heads/*:refs/remotes/origin/*
-[remote "sf"]
-       url = ssh://sparky4q@git.code.sf.net/p/project16/code
-       fetch = +refs/heads/*:refs/remotes/sf/*
-[remote "jp"]
-       url = ssh://sparky4@git.pf.osdn.jp:/gitroot/s/sp/sparky4/project16.git
-       fetch = +refs/heads/*:refs/remotes/jp/*
-[remote "bb"]
-       url = git@bitbucket.org:sparky4/16.git
-       fetch = +refs/heads/*:refs/remotes/bb/*
+[submodule "src/lib/doslib"]
+       url = https://github.com/joncampbell123/doslib.git
+[submodule "src/lib/jsmn"]
+       url = https://github.com/zserge/jsmn.git
index 28faa99d7c53c9663811565cf58873b06fd7e277..9a5412c752b1935703a8f8008d0be51e51e08e6f 100755 (executable)
@@ -33,6 +33,27 @@ int ch=0x0;
 void
 main(int argc, char *argvar[])
 {
+       // 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;
+       }
+
        // main variables values
        d=4; // switch variable
        key=2; // default screensaver number
@@ -44,11 +65,6 @@ main(int argc, char *argvar[])
 #ifdef MXLIB
        VGAmodeX(1, &gvar);
 #else
-               probe_dos();
-       if (!probe_vga()) {
-               printf("VGA probe failed\n");
-               return 1;
-       }
        int10_setmode(19);
        update_state_from_vga();
        vga_enable_256color_modex(); // VGA mode X
index 8b4167100563ce243bb334dfa58da6314756cca2..b84bf02ac8fffdfc6ff569a36efe57ed3a450ef0 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 8b4167100563ce243bb334dfa58da6314756cca2
+Subproject commit b84bf02ac8fffdfc6ff569a36efe57ed3a450ef0