]> 4ch.mooo.com Git - 16.git/commitdiff
dang it./wbuild.sh
authorsparky4 <sparky4@cock.li>
Sun, 17 Apr 2016 23:19:42 +0000 (18:19 -0500)
committersparky4 <sparky4@cock.li>
Sun, 17 Apr 2016 23:19:42 +0000 (18:19 -0500)
26 files changed:
16.exe [deleted file]
bakapi.exe [deleted file]
exmmtest.exe [deleted file]
fmemtest.exe [deleted file]
fontgfx.exe [deleted file]
fonttest.exe [deleted file]
inputest.exe [deleted file]
makefile
maptest.exe [deleted file]
palettec.exe [deleted file]
palettel.exe [deleted file]
pcx2vrl
pcxsscut
pcxtest.exe [deleted file]
pcxtest2.exe [deleted file]
planrpcx.exe [deleted file]
scroll.exe [deleted file]
src/fontgfx.c
src/lib/modex16.c
src/lib/modex16.h
test.exe [deleted file]
test2.exe [deleted file]
tesuto.exe [deleted file]
vgmtest.exe [deleted file]
vrl2vrs
vrsdump

diff --git a/16.exe b/16.exe
deleted file mode 100755 (executable)
index f243a6b..0000000
Binary files a/16.exe and /dev/null differ
diff --git a/bakapi.exe b/bakapi.exe
deleted file mode 100755 (executable)
index b762938..0000000
Binary files a/bakapi.exe and /dev/null differ
diff --git a/exmmtest.exe b/exmmtest.exe
deleted file mode 100755 (executable)
index cc4eb9a..0000000
Binary files a/exmmtest.exe and /dev/null differ
diff --git a/fmemtest.exe b/fmemtest.exe
deleted file mode 100755 (executable)
index b8bc18b..0000000
Binary files a/fmemtest.exe and /dev/null differ
diff --git a/fontgfx.exe b/fontgfx.exe
deleted file mode 100755 (executable)
index 23909ae..0000000
Binary files a/fontgfx.exe and /dev/null differ
diff --git a/fonttest.exe b/fonttest.exe
deleted file mode 100755 (executable)
index 7df23f1..0000000
Binary files a/fonttest.exe and /dev/null differ
diff --git a/inputest.exe b/inputest.exe
deleted file mode 100755 (executable)
index da99804..0000000
Binary files a/inputest.exe and /dev/null differ
index da98dc4f1bfea815b7015ba954bf3edb787478a4..33c33aeba5db8829d6dfe6d071affe1ad4d14541 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -81,7 +81,7 @@ DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
 
 GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) 16planar.$(OBJ) $(DOSLIBLIBS)
 
-DOSLIBLIBS=$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib
+DOSLIBLIBS=$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vgatty.lib
 
 TESTEXEC = exmmtest.exe test.exe pcxtest.exe pcxtest2.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe palettel.exe planrpcx.exe
 # tsthimem.exe
@@ -131,8 +131,8 @@ fonttest.exe: fonttest.$(OBJ) $(16LIBOBJS) gfx.lib
 #fonttes0.exe: fonttes0.$(OBJ) $(16LIBOBJS)
 #      wcl $(FLAGS) fonttes0.$(OBJ) $(16LIBOBJS)
 
-fontgfx.exe: fontgfx.$(OBJ) $(16LIBOBJS) gfx.lib
-       wcl $(FLAGS) fontgfx.$(OBJ) $(16LIBOBJS) gfx.lib -fm=fontgfx.map
+fontgfx.exe: fontgfx.$(OBJ) $(16LIBOBJS) gfx.lib $(DOSLIBLIBS)
+       wcl $(FLAGS) fontgfx.$(OBJ) $(16LIBOBJS) gfx.lib $(DOSLIBLIBS) -fm=fontgfx.map
 
 inputest.exe: inputest.$(OBJ) $(16LIBOBJS)
        wcl $(FLAGS) inputest.$(OBJ) $(16LIBOBJS) -fm=inputest.map
@@ -292,8 +292,11 @@ $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib:
        cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu && .$(DIRSEP)make.sh
 $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib:
        cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos && .$(DIRSEP)make.sh
+$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vgatty.lib:
+       cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga && .$(DIRSEP)make.sh
 $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib:
        cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga && .$(DIRSEP)make.sh
+
 joytest.exe:
        cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)joystick && .$(DIRSEP)make.sh && $(COPYCOMMAND) dos86h$(DIRSEP)test.exe $(PDIR)$(PDIR)$(PDIR)$(PDIR)$(PDIR)joytest.exe
 #$(DOSLIBLIBS): .symbolic
diff --git a/maptest.exe b/maptest.exe
deleted file mode 100755 (executable)
index 575de09..0000000
Binary files a/maptest.exe and /dev/null differ
diff --git a/palettec.exe b/palettec.exe
deleted file mode 100755 (executable)
index f0499ca..0000000
Binary files a/palettec.exe and /dev/null differ
diff --git a/palettel.exe b/palettel.exe
deleted file mode 100755 (executable)
index b8dba39..0000000
Binary files a/palettel.exe and /dev/null differ
diff --git a/pcx2vrl b/pcx2vrl
index bd947e55158b82b4f9d900234745aca806cde60e..3d9ac6e6d0e4fe19bb8f1962de5fd02253dea7be 100755 (executable)
Binary files a/pcx2vrl and b/pcx2vrl differ
index 1deec74dc0487422bfdb03acb381df671e83a049..d743ac3b8ac58a73b3cb2380e2367aee9b167169 100755 (executable)
Binary files a/pcxsscut and b/pcxsscut differ
diff --git a/pcxtest.exe b/pcxtest.exe
deleted file mode 100755 (executable)
index 4c29295..0000000
Binary files a/pcxtest.exe and /dev/null differ
diff --git a/pcxtest2.exe b/pcxtest2.exe
deleted file mode 100755 (executable)
index 2a7e8f6..0000000
Binary files a/pcxtest2.exe and /dev/null differ
diff --git a/planrpcx.exe b/planrpcx.exe
deleted file mode 100755 (executable)
index f05646b..0000000
Binary files a/planrpcx.exe and /dev/null differ
diff --git a/scroll.exe b/scroll.exe
deleted file mode 100755 (executable)
index be8d176..0000000
Binary files a/scroll.exe and /dev/null differ
index 1fb477df64548eb74d6e8a57a94a4cd0faba7425..112aaaa0cc155ab12299c06e9ded7887e115f399 100755 (executable)
 //#include "lib/16text.h"\r
 #include "lib/modex16.h"\r
 \r
+#include <hw/cpu/cpu.h>\r
+#include <hw/dos/dos.h>\r
+#include <hw/vga/vga.h>\r
+#include <hw/vga/vgatty.h>\r
+\r
 global_game_variables_t gvar;\r
 \r
 void main(int argc, char near *argv[])\r
@@ -61,9 +66,36 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
 ,'___...---~~~\n\\r
 ";\r
 //     static byte *rosa;\r
-       static word chx;//, chy, colpee;\r
+//     static word chx;//, chy, colpee;\r
+       static word z;\r
 //     textInit();\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
        VGAmodeX(1, 1, &gvar);\r
+//     __asm{\r
+//             mov     ax,1112h                ; load 8x8 character set into RAM\r
+//             mov     bl,0\r
+//             int     10h\r
+//     }\r
        /* setup camera and screen~ */\r
        gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);\r
        //gvar.video.page[0].width += (16*2);\r
@@ -71,26 +103,29 @@ IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\
 //++++ modexShowPage(&gvar.video.page[0]);\r
        //modexprint(16, 16, 1, 15, "wwww");\r
        //getch();\r
-       chx=0;\r
+//     chx=0;\r
 //     chy=0;\r
 //     colpee=32;\r
+       bios_cls();\r
        /* position the cursor to home */\r
        vga_moveto(0,0);\r
        vga_sync_bios_cursor();\r
-       for(e=0x00; e<=0xFE; e++)\r
+       for(e=0x00, z=0; e<=0xFE; e++, z++)\r
        {\r
-               if(chx+8>(gvar.video.page[0].width/2))\r
+               //if(chx+8>(gvar.video.page[0].width/2))\r
+               if((z)+1>16)\r
                {\r
-                       chx=0;\r
-                       printf("\n");\r
+//                     chx=0;\r
 //                     chy+=8;\r
 //                     sprintf(pee,"%u", colpee);\r
 //                     modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee, 1);\r
+                       z=0;\r
+                       printf("\n");\r
                        //getch();\r
                }\r
-               printf("%c", e);\r
+               //printf("%zc", e);\r
 //             modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e, 1);\r
-               chx+=9;\r
+//             chx+=9;\r
 //             colpee++;\r
 //             if(colpee>=32+24) colpee=32;\r
        }\r
index 6f8d64fa64a8810526e373e10e6a203cc9ff9849..c1c8eb5df107301c38b3ef77789d5925a213185b 100755 (executable)
@@ -1045,3 +1045,30 @@ modexWaitBorder() {
        // spin\r
     }\r
 }*/\r
+\r
+void bios_cls() {\r
+       VGA_ALPHA_PTR ap;\r
+       VGA_RAM_PTR rp;\r
+       unsigned char m;\r
+\r
+       m = int10_getmode();\r
+       if ((rp=vga_state.vga_graphics_ram) != NULL && !(m <= 3 || m == 7)) {\r
+               unsigned int i,im;\r
+\r
+               im = (FP_SEG(vga_state.vga_graphics_ram_fence) - FP_SEG(vga_state.vga_graphics_ram));\r
+               if (im > 0xFFE) im = 0xFFE;\r
+               im <<= 4;\r
+               for (i=0;i < im;i++) vga_state.vga_graphics_ram[i] = 0;\r
+       }\r
+       else if ((ap=vga_state.vga_alpha_ram) != NULL) {\r
+               unsigned int i,im;\r
+\r
+               im = (FP_SEG(vga_state.vga_alpha_ram_fence) - FP_SEG(vga_state.vga_alpha_ram));\r
+               if (im > 0x7FE) im = 0x7FE;\r
+               im <<= 4 - 1; /* because ptr is type uint16_t */\r
+               for (i=0;i < im;i++) vga_state.vga_alpha_ram[i] = 0x0720;\r
+       }\r
+       else {\r
+               printf("WARNING: bios cls no ptr\n");\r
+       }\r
+}\r
index acdf63e940fffbec392c7748c6bd1a6eb1303943..fe96a78fde3dc98afda722dba483c540469b6ef0 100755 (executable)
@@ -129,6 +129,7 @@ void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, c
 void modexpdump(page_t *pee);
 void modexcls(page_t *page, byte color, byte *Where);
 //void modexWaitBorder();
+void bios_cls();
 
 /* -======================= Constants & Vars ==========================- */
 extern byte far*  VGA;  /* The VGA Memory */
diff --git a/test.exe b/test.exe
deleted file mode 100755 (executable)
index 9fb706c..0000000
Binary files a/test.exe and /dev/null differ
diff --git a/test2.exe b/test2.exe
deleted file mode 100755 (executable)
index 0b19f95..0000000
Binary files a/test2.exe and /dev/null differ
diff --git a/tesuto.exe b/tesuto.exe
deleted file mode 100755 (executable)
index 6c8c4e3..0000000
Binary files a/tesuto.exe and /dev/null differ
diff --git a/vgmtest.exe b/vgmtest.exe
deleted file mode 100755 (executable)
index 2ba020f..0000000
Binary files a/vgmtest.exe and /dev/null differ
diff --git a/vrl2vrs b/vrl2vrs
index b67956b7baa37941b88ad79da1a2ff49c0c435a0..acdd4bda2f0dd8772cdce97a19b6c906e4e09f8e 100755 (executable)
Binary files a/vrl2vrs and b/vrl2vrs differ
diff --git a/vrsdump b/vrsdump
index dbaba30e42b8639969d3bdd4433243eb338adcbe..8ba0497deb819d75caeef21a3a0d4086b394845b 100755 (executable)
Binary files a/vrsdump and b/vrsdump differ