]> 4ch.mooo.com Git - 16.git/commitdiff
p16 is being worked on a bunch by me wwww [16_ca needs huge amounts of work and I...
authorsparky4 <sparky4@cock.li>
Tue, 4 Apr 2017 15:45:20 +0000 (10:45 -0500)
committersparky4 <sparky4@cock.li>
Tue, 4 Apr 2017 15:45:20 +0000 (10:45 -0500)
26 files changed:
EXMMTEST.LOG [deleted file]
bcexmm.dsk
bcexmm.exe
bcexmm.prj
makefile
src/bakapi.c
src/bakapi.h
src/exmmtest.c
src/lib/16_dbg.h
src/lib/16_mm.c
src/lib/16_mm.h
src/lib/16_pm.c
src/lib/16_spri.c
src/lib/16_tail.c
src/lib/16_tail.h
src/lib/16_tdef.h
src/lib/16_vl.c
src/lib/16_vl.h
src/lib/16_vl_1.c
src/lib/bakapee.c
src/lib/hb/demo16.c [new file with mode: 0755]
src/lib/hb/demokd.c
src/lib/scroll16.c
src/xcroll.c
video.ofs.bufferofs [new file with mode: 0755]
video.ofs.displayofs [new file with mode: 0755]

diff --git a/EXMMTEST.LOG b/EXMMTEST.LOG
deleted file mode 100755 (executable)
index c0eeeaa..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-======================================load=====================================\r
-====================================load end===================================\r
-contents of the buffer\r
-[\r
-\r
-\ 5\ 1\b\r
-]\r
-\r
-yay!\r
-======================================read=====================================\r
-====================================read end===================================\r
-contents of the buffer\r
-[\r
-{ "backgroundcolor":"#000000",\r
- "height":30,\r
- "layers":[\r
-        {\r
-         "data":[1, 2, 3, 4, 0, 3, 3, 3, 3, 3, 3, 3, 3, 4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 0, 1, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 5, 6, 7, 8, 9, 10, 11, 12, 4, 1, 0, 1, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 9, 10, 11, 12, 13, 14, 15, 16, 0, 1, 1, 1, 5, 8, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 14, 15, 16, 0, 0, 4, 0, 0, 0, 0, 0, 8, 8, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 8, 8, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 39, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 3, 3, 3, 1, 2, 3, 4, 3, 3, 3, 3, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 5, 6, 7, 8, 6, 6, 6, 6, 6, 3, 3, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 3, 11, 11, 11, 11, 11, 9, 10, 11, 12, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 13, 14, 15, 16, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 3, 3, 3, 3, 3, 3, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 11, 11, 11, 11, 11, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 3, 3, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 11, 0, 0, 0, 11, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 3, 3, 11, 11, 11, 11, 11, 11, 11, 11, 0, 11, 0, 11, 11, 11, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 11, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 1, 2, 3, 4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 11, 11, 11, 11, 11, 11, 11, 11, 1, 2, 3, 4, 5, 6, 7, 8, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 11, 5, 6, 7, 8, 9, 10, 11, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 9, 10, 11, 12, 13, 14, 15, 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 14, 15, 16],\r
-         "height":30,\r
-         "name":"bg",\r
-         "opacity":1,\r
-         "type":"tilelayer",\r
-         "visible":true,\r
-         "width":40,\r
-         "x":0,\r
-         "y":0\r
-        }, \r
-        {\r
-         "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\r
-         "height":30,\r
-         "name":"fg",\r
-         "opacity":1,\r
-         "type":"tilelayer",\r
-         "visible":true,\r
-         "width":40,\r
-         "x":0,\r
-         "y":0\r
-        }, \r
-        {\r
-         "data":[0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\r
-         "height":30,\r
-         "name":"top",\r
-         "opacity":1,\r
-         "type":"tilelayer",\r
-         "visible":true,\r
-         "width":40,\r
-         "x":0,\r
-         "y":0\r
-        }, \r
-        {\r
-         "height":30,\r
-         "name":"ob",\r
-         "objects":[\r
-                {\r
-                 "height":16,\r
-                 "name":"trunk",\r
-                 "properties":\r
-                    {\r
-                     "walkable":"0"\r
-                    },\r
-                 "type":"nonc",\r
-                 "visible":true,\r
-                 "width":32,\r
-                 "x":128,\r
-                 "y":32\r
-                }, \r
-                {\r
-                 "height":16,\r
-                 "name":"stump",\r
-                 "properties":\r
-                    {\r
-                     "walkable":"0"\r
-                    },\r
-                 "type":"nonc",\r
-                 "visible":true,\r
-                 "width":16,\r
-                 "x":144,\r
-                 "y":128\r
-                }],\r
-         "opacity":1,\r
-         "type":"objectgroup",\r
-         "visible":true,\r
-         "width":40,\r
-         "x":0,\r
-         "y":0\r
-        }],\r
- "orientation":"orthogonal",\r
- "properties":\r
-    {\r
-\r
-    },\r
- "tileheight":16,\r
- "tilesets":[\r
-        {\r
-         "firstgid":1,\r
-         "image":"ed.png",\r
-         "imageheight":64,\r
-         "imagewidth":64,\r
-         "margin":0,\r
-         "name":"wwww",\r
-         "properties":\r
-            {\r
-\r
-            },\r
-         "spacing":0,\r
-         "tileheight":16,\r
-         "tilewidth":16\r
-        }, \r
-        {\r
-         "firstgid":17,\r
-         "image":"forest.gif",\r
-         "imageheight":
\ No newline at end of file
index c7cdb89b86faf9d0baf791715c9f435e89141717..e6b4ad6396d2f1e1e6e1b64ee4652ff379b60c62 100755 (executable)
Binary files a/bcexmm.dsk and b/bcexmm.dsk differ
index f3389f41cfd5be134501721a4cfb49b121995f33..947c944109e78a0d5bd53db67255c84554d405e8 100755 (executable)
Binary files a/bcexmm.exe and b/bcexmm.exe differ
index 10728db9afe0a292ba8aaae73d3c6eef754fe318..8e3d98de811878ffb3cfdcb3d94db9b5f2080d04 100755 (executable)
Binary files a/bcexmm.prj and b/bcexmm.prj differ
index 69486b5b6f15f0f40d768ca0fb44208e47d9f6e8..589d5ff0cd3d254396ec3568329dc99b89fce8c1 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -188,8 +188,6 @@ EXTERNTESTEXEC = &
        db.exe
 TESTEXEC = &
        vidtest.exe &
-       tesuto.exe &
-       0.exe &
        exmmtest.exe &
        vgmtest.exe &
        xcroll.exe &
@@ -204,6 +202,8 @@ TESTEXEC2 = &
        fonttest.exe &
        fontgfx.exe &
        test0.exe &
+       tesuto.exe &
+       0.exe &
        $(EXTERNTESTEXEC)
 TESTEXEC3= &
        pcxtest2.exe
@@ -242,7 +242,7 @@ testexec: $(EXEC) $(TESTEXEC2)
 # game and bakapi executables
 #
 16.exe:                16.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
-bakapi.exe:            bakapi.$(OBJ) gfx.lib $(DOSLIB)
+bakapi.exe:            bakapi.$(OBJ) gfx.lib $(DOSLIB) 16_wcpu.$(OBJ)
 
 #
 # Test Executables!
@@ -347,7 +347,7 @@ joytest.exe:
 16_vl.$(OBJ):  $(SRCLIB)/16_vl.c $(SRCLIB)/16_vl.h
 16_vl_1.$(OBJ):        $(SRCLIB)/16_vl_1.c $(SRCLIB)/16_vl.h
 16_vlpal.$(OBJ):       $(SRCLIB)/16_vlpa_.c    $(SRCLIB)/16_vlpal.c $(SRCLIB)/16_vlpal.h
-bakapee.$(OBJ):$(SRCLIB)/bakapee.c $(SRCLIB)/bakapee.h
+bakapee.$(OBJ):        $(SRCLIB)/bakapee.c $(SRCLIB)/bakapee.h
 16render.$(OBJ):$(SRCLIB)/16render.c $(SRCLIB)/16render.h
 16planar.$(OBJ):$(MODEXLIB16)/16planar.c $(MODEXLIB16)/16planar.h
 16_vrs.$(OBJ): $(SRCLIB)/16_vrs.c $(SRCLIB)/16_vrs.h $(DOSLIB)
index f787933a136589d69567cd4692809aff51355826..cc61dcc8c12369625fee63fd042f178ce1c5ce63 100755 (executable)
@@ -28,7 +28,7 @@
 static bakapee_t bakapee;\r
 word key,d,xpos,ypos,xdir,ydir;\r
 sword vgamodex_mode = 1; // 320x240 default\r
-int ch=0x0;\r
+//int ch=0x0;\r
 \r
 void\r
 main(int argc, char *argvar[])\r
@@ -86,6 +86,7 @@ main(int argc, char *argvar[])
                printf("This program requires VGA or higher graphics hardware\n");\r
                return;\r
        }\r
+       textInit();\r
 \r
        // main variables values\r
        d=4; // switch variable\r
@@ -95,17 +96,15 @@ main(int argc, char *argvar[])
        xdir=1;\r
        ydir=1;\r
 \r
-       VGAmodeX(vgamodex_mode, 1, &gvar); // TODO: Suggestion: Instead of magic numbers for the first param, might I suggest defining an enum or some #define constants that are easier to remember? --J.C.\r
+       VGAmodeX(vgamodex_mode, 0, &gvar); // TODO: Suggestion: Instead of magic numbers for the first param, might I suggest defining an enum or some #define constants that are easier to remember? --J.C.\r
                // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in.\r
                // we'll integrate DOSLIB vga into that part of the code instead for less disruption. -- J.C.\r
 \r
        bakapee.xx = rand()&0%gvar.video.page[0].width;\r
        bakapee.yy = rand()&0%gvar.video.page[0].height;\r
        bakapee.gq = 0;\r
-       bakapee.sx=0;\r
-       bakapee.sy=0;\r
-       bakapee.bakax=0;\r
-       bakapee.bakay=0;\r
+       bakapee.sx=     bakapee.sy=0;\r
+       bakapee.bakax=  bakapee.bakay=0;\r
        bakapee.coor=0;\r
 \r
        //once where #defines\r
@@ -114,9 +113,18 @@ main(int argc, char *argvar[])
        bakapee.lgq=32;\r
        bakapee.hgq=55;\r
 \r
+       switch(WCPU_detectcpu())\r
+       {\r
+               case 0:\r
+                       bakapee.tile=1;\r
+               break;\r
+               default:\r
+                       bakapee.tile=0;\r
+               break;\r
+       }\r
+\r
        /* setup camera and screen~ */\r
        gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);\r
-       textInit();\r
 \r
        //modexPalUpdate(bmp.palette); //____\r
        //modexDrawBmp(VGA, 0, 0, &bmp, 0); //____\r
@@ -125,7 +133,7 @@ main(int argc, char *argvar[])
        VL_ShowPage(&gvar.video.page[0], 0, 0);\r
 \r
 // screen savers\r
-#ifdef BOINK\r
+//#ifdef BOINK\r
        while(d>0)      // on!\r
        {\r
                int c;\r
@@ -285,11 +293,12 @@ pee:
                                break;\r
                                default:\r
                                        key=0;\r
-                                       break;\r
+                               break;\r
                        }\r
                }\r
        }\r
-#else // !defined(BOINK)\r
+#if 0\r
+//#else // !defined(BOINK)\r
 // FIXME: Does not compile. Do you want to remove this?\r
 // INFO: This is a testing section for textrendering and panning for project 16 --sparky4\r
        while(1)\r
@@ -325,5 +334,7 @@ pee:
 //     printf("page.width=%u   ", gvar.video.page[0].width); printf("page.height=%u\n", gvar.video.page[0].height);\r
        printf("bakapi ver. 1.04.16.04\nis made by sparky4\81i\81\86\83Ö\81\85\81j feel free to use it ^^\nLicence: GPL v3\n");\r
        printf("compiled on 2016/04/04\n");\r
+//     printf("[%u]%dx%d       [%dx%d] %u %u %u\n[%u   %u      %u]", key, bakapee.bakax, bakapee.bakay, bakapee.xx, bakapee.yy,\r
+//bakapee.coor, bakapee.tile, bakapee.gq, bakapee.bonk, bakapee.lgq, bakapee.hgq);\r
 }\r
 //pee!\r
index 54af89847e49e76ee5747e01325ea553eb91b294..cf9aa3fec14fdf56e648c28d72bcaa9f92b0af9d 100755 (executable)
@@ -24,6 +24,7 @@
 #define __BAKAPI_H_\r
 \r
 #include "src/lib/bakapee.h"\r
+#include "src/lib/wcpu/16_wcpu.h"\r
 \r
 //project 16 testing define switch for veiwing the contents of the video memory --sparky4\r
 #define BOINK // what does this mean? --J.C.\r
index c0d2bbd76bb632e1125a0cfcb99327946850d97b..106ebab73a61822f53757a54fdd1e7576959853c 100755 (executable)
@@ -45,7 +45,8 @@
 //#define EXMMVERBOSE__\r
 //     #define PRINTBBDUMP\r
 #define BUFFDUMP\r
-//#define NOVID\r
+#define NOVID\r
+\r
 \r
 #define KEYP IN_Shutdown(&gvar); printf("\n\npress any key to continue!\n"); getch(); IN_Startup(&gvar);\r
 \r
@@ -257,7 +258,7 @@ PRINTBB; KEYP
                switch (scan)\r
                {\r
                        case sc_Space:\r
-                               MM_ShowMemoryVidVer(&gvar);\r
+                               MM_ShowMemory(&gvar);\r
                        break;\r
 //#ifdef __WATCOMC__\r
                        case sc_O:\r
@@ -353,7 +354,7 @@ PRINTBB; KEYP
 #endif\r
        printf("\n");\r
 #endif\r
-       printf("old_mode=%u     VL_Started=%u", gvar.video.old_mode, gvar.video.VL_Started);\r
+       //printf("old_mode=%u   VL_Started=%u", gvar.video.old_mode, gvar.video.VL_Started);\r
        //printf("based core left:                      %lu\n", (dword)_basedcoreleft());\r
        //printf("huge core left:                       %lu\n", (dword)_hugecoreleft());\r
 }\r
index 6903aa575269784263aa29059ee610f024115d44..ede5c359cede94c1f74d7eacdfee64483387cebf 100755 (executable)
@@ -22,6 +22,7 @@
 extern boolean dbg_debugmm;\r
 #endif\r
 #ifdef __DEBUG_PM__\r
+//#define __DEBUG_PM_MAIN__\r
 extern boolean dbg_debugpm;\r
 #endif\r
 #ifdef __DEBUG_CA__\r
index a265e95834e99daaaab7d8ce450d7addac6d30eb..8fa8de5b226dea8da4183d50a56d28dbfdbc9ae1 100755 (executable)
@@ -1260,31 +1260,34 @@ void MM_SortMem(global_game_variables_t *gvar)
 void MM_ShowMemory(global_game_variables_t *gvar)
 {
        mmblocktype far *scan;
-       //word temp;
+       unsigned color,temp,x,y,w;
        sdword  end,owner;
-       //word chx,chy;
-       word w;
-       //dword wwww;
-       byte    scratch[160],scratch0[4096],str[16];//[[[[scratch1[160],
-       //byte d = '#';
-//[[[[ VW_SetLineWidth(40);
-//++++mh       temp = bufferofs;
-//++++mh       bufferofs = 0;
-//[[[[ VW_SetScreen (0,0);
+       byte    scratch[160],scratch0[4096],str[16];
+
+       VL_SetLineWidth(40, &gvar->video.ofs);
+       temp = gvar->video.ofs.bufferofs;
+       gvar->video.ofs.bufferofs = gvar->video.ofs.displayofs;
        scan = gvar->mm.mmhead;
-       end = -1;
+
+       end = -1; w = 0;
 
        CA_OpenDebug (gvar);
-       w=0;
-       while(scan)
+       while (scan)
        {
                strcpy(scratch, AARESET);
                if(scan->attributes & PURGEBITS)
+               {
+                       color = 5;              // dark purple = purgable
                        strcpy(scratch0, AAMAGENTA);            // dark purple = purgable
-               else
+               }else{
+                       color = 9;              // medium blue = non purgable
                        strcpy(scratch0, AABLUE);               // medium blue = non purgable
+               }
                if(scan->attributes & LOCKBIT)
+               {
+                       color = 12;             // red = locked
                        strcpy(scratch0, AARED);                // red = locked
+               }
                if(scan->start<=end)
                {
                        printf("\nend==%d\n\n", end);
@@ -1296,50 +1299,38 @@ void MM_ShowMemory(global_game_variables_t *gvar)
                        ultoa (scan->start,str,10);
                        strcat (scratch,str);
                        write(gvar->handle.debughandle,scratch,strlen(scratch));
-                       //modexprint(&page, chx, chy, 1, 0, 24, "\nMM_ShowMemory: Memory block order currupted!\n");
-                       break;
+                       Quit (gvar, "MM_ShowMemory: Memory block order currupted!");
                }
-               end = scan->start+(scan->length)-1;
-//++++         chy = scan->start/320;
-//++++         chx = scan->start%320;
-                               //modexhlin(page, scan->start, (unsigned)end, chy, color);
-                               //for(chx=scan->start;chx+4>=(word)end;chx+=4)
-                               //{
-//++++                                 modexClearRegion(page, chx, chy, 4, 4, color);
-                               //}
-//++++         VW_Hlin(scan->start,(unsigned)end,0,color);
+               end = scan->length-1;
+               //end = scan->start+(scan->length)-1;
+               y = scan->start/320;
+               x = scan->start%320;
+               VW_Hlin(x,x+end,y,color, &gvar->video.ofs);
+               VL_Plot(x,y,15, &gvar->video.ofs);
                for(w=(scan->start)/80;w<=end/80;w++)
                {
                        //printf("+     %u      %lu\n", w, scan->length);
                        strcat(scratch0, "+");
                }
-               //++==++==optional strcat(scratch0, AARESET); strcat(scratch0, AAGREY); strcat(scratch0,"_");
-//++++         VW_Plot(scan->start,0,15);
-//++++                         modexClearRegion(page, chx, chy, 4, 4, 15);
-//++++                 VW_Hlin(end+1,scan->next->start,0,0);   // black = free
-
-               //wwww=(dword)(scan->next->start)-(dword)scan->start;
-               //wwww=(dword)scan->start+(dword)(scan->next->start);
-               if (scan->next && scan->next->start >= end+1)
+//++==++==optional             strcat(scratch0, AARESET); strcat(scratch0, AAGREY); strcat(scratch0,"_");
+               if (scan->next && scan->next->start > end+1)
+               //if (scan->next && scan->next->start >= end+1)
                {
+                       VW_Hlin(x+end+1,x+(scan->next->start-scan->start),y,0, &gvar->video.ofs);       // black = free
                        strcat(scratch0, AARESET);
-                       //++==++==optional strcat(scratch0, "\n");
+//++==++==optional                     strcat(scratch0, "\n");
                        strcat(scratch0,AAGREEN);
                        for(w=(end+1)/80;w<=((scan->next->start-scan->start)/80);w++)
-                       //for(w=(wwww)/80;w<=((end+1)/80);w++)
-                       //for(w=(end+1)/80;w<=((wwww)/80);w++)
                        {
                                //printf("0     %x      %u      %lu\n", scan->next->start, w, scan->length);
                                strcat(scratch0,"0");
                        }
                        //printf("==================\n");
-                       //printf("w=%u  wwww=%lu        start=%04x      next=%04x       end=%lu\n", w/80, wwww/80, scan->start, (scan->next->start), end+1);
+                       //printf("w=%u  start=%04x      next=%04x       end=%lu\n", w/80, scan->start, (scan->next->start), end+1);
                        //printf("==================\n");
                        strcat(scratch0, "\n");
-                       //getch();
                }/*else {//if(scan->next->start <= scan->start){
                        scan->next->start=scan->start+0x1000;
-                       wwww=(dword)(scan->next->start)-(dword)scan->start;
                        strcat(scratch0, AARESET);
                        strcat(scratch0, "\n");
                        strcat(scratch0,AAGREEN);
@@ -1349,23 +1340,12 @@ void MM_ShowMemory(global_game_variables_t *gvar)
                                strcat(scratch0,"0");
                        }
                        printf("================\n");
-                       printf("w=%x    start=%x        next=%x end=%u  %lu\n", w, scan->start, (scan->next->start), end+1, wwww);
+                       printf("w=%x    start=%x        next=%x end=%u\n", w, scan->start, (scan->next->start), end+1);
                        printf("================\n");
                        getch();
                }*/
                strcat(scratch0, AARESET);
                //strcat(scratch0,"\n");
-                       //for(chx=scan->next->start;chx+4>=(word)end+1;chx+=4)
-                       //{
-//                             chx+=scan->next->start;
-//                             modexClearRegion(page, chx, chy, 4, 4, 2);
-                       //}
-                                       //modexhlin(page, end+1,scan->next->start, chy, 0);
-/*             y = scan->start/320;
-               x = scan->start%320;
-               VW_Hlin(x,x+end,y,color);
-               VW_Plot(x,y,15);*/
-//++++                 VW_Hlin(x+end+1,x+(scan->next->start-scan->start),y,0); // black = free
                strcat(scratch,"Seg:");
                ultoa (scan->start,str,16);
                strcat (scratch,str);
@@ -1379,76 +1359,19 @@ void MM_ShowMemory(global_game_variables_t *gvar)
                strcat (scratch,"\n");
                write(gvar->handle.debughandle,scratch,strlen(scratch));
                write(gvar->handle.debughandle,scratch0,strlen(scratch0));
-//modexprint(page, chx, chy, 1, 0, 24, &scratch);
-//++++chy+=4;
 //fprintf(stdout, "%s", scratch);
 
                scan = scan->next;
        }
-       /*strcpy(scratch1, AARESET);
-       strcat(scratch1, "========================================\n");
-       strcat(scratch1, "near=  ");
-       ultoa (*(gvar->mm.nearheap),str,10);
-       strcat (scratch1,str);
-       strcat(scratch1, "      far= ");
-       ultoa (*(gvar->mm.farheap),str,10);
-       strcat (scratch1,str);
-       strcat(scratch1, "\n");
-       //strcat(scratch1, "&near=      %Fp ", &(gvar->mm.nearheap));
-       //strcat(scratch1, "&far=       %Fp", &(gvar->mm.farheap));
-       //strcat(scratch1, "\n");
-       strcat(scratch1, "========================================\n");
-       write(gvar->handle.debughandle,scratch1,strlen(scratch1));*/
-
 
        CA_CloseDebug (gvar);
 
-//++++mh       IN_Ack();
+       IN_Ack(gvar);
 //**** VW_SetLineWidth(64);
-//++++mh       bufferofs = temp;
+       gvar->video.ofs.bufferofs = temp;
 }
 
-void MM_ShowMemoryVidVer(global_game_variables_t *gvar)
-{
-       mmblocktype far *scan;
-       unsigned color,temp,x,y;
-       long    end;//,owner;
-       //char    scratch[80],str[10];
 
-       temp = gvar->video.ofs.bufferofs;
-       gvar->video.ofs.bufferofs = gvar->video.ofs.displayofs;
-       scan = gvar->mm.mmhead;
-
-       end = -1;
-
-       while (scan)
-       {
-               if (scan->attributes & PURGEBITS)
-                       color = 5;              // dark purple = purgable
-               else
-                       color = 9;              // medium blue = non purgable
-               if (scan->attributes & LOCKBIT)
-                       color = 12;             // red = locked
-               if (scan->start<=end)
-                       Quit (gvar, "MM_ShowMemory: Memory block order currupted!");
-               //end = scan->length-1;
-               end = scan->start+(scan->length)-1;
-               y = scan->start/320;
-               x = scan->start%320;
-               VW_Hlin(x,x+end,y,color, &gvar->video.ofs);
-               VL_Plot(x,y,15, &gvar->video.ofs);
-               //if (scan->next && scan->next->start > end+1)
-               if (scan->next && scan->next->start >= end+1)
-                       VW_Hlin(x+end+1,x+(scan->next->start-scan->start),y,0, &gvar->video.ofs);       // black = free
-
-               scan = scan->next;
-       }
-
-       //----VL_FadeIn(0,255,&gvar->video.palette,10, &gvar->video);
-       IN_Ack(gvar);
-
-       gvar->video.ofs.bufferofs = temp;
-}
 
 //==========================================================================
 
@@ -1610,7 +1533,7 @@ void MM_Report_(global_game_variables_t *gvar)
                printf("        %c%cEMM v%x.%x available\n", 0xC7, 0xC4, gvar->pm.emm.EMSVer>>4,gvar->pm.emm.EMSVer&0x0F);
                printf("        %c%ctotalEMSpages:      %u      ", 0xC7, 0xC4, gvar->pm.emm.totalEMSpages); printf("freeEMSpages:       %u\n", gvar->pm.emm.freeEMSpages);
                printf("        %c%cEMSPageFrame:       %04x\n", 0xC7, 0xC4, gvar->pm.emm.EMSPageFrame);
-               printf("        %c%cEMSmem:     %lu\n", 0xD3, 0xC4, gvar->mmi.EMSmem);
+               printf("        %c%cEMSmem:     %lu or %luk\n", 0xD3, 0xC4, gvar->mmi.EMSmem, gvar->mmi.EMSmem/1204);
        }
        if(MML_CheckForXMS())
        {
@@ -1618,7 +1541,7 @@ void MM_Report_(global_game_variables_t *gvar)
                printf("        %c%cXMS v%x.%x available\n", 0xC7, 0xC4, XMSVer>>8,XMSVer&0x0F);
                printf("        %c%cXMSDriver:  %Fp\n", 0xC7, 0xC4, XMSDriver);
                printf("        %c%cXMSHandle:  %04x\n", 0xC7, 0xC4, gvar->pm.xmm.XMSHandle);
-               printf("        %c%cXMSmem:     %lu\n", 0xD3, 0xC4, gvar->mmi.XMSmem);
+               printf("        %c%cXMSmem:     %lu or %lukb\n", 0xD3, 0xC4, gvar->mmi.XMSmem, gvar->mmi.XMSmem/1024);
        }
        printf("        %cConv. %u\n", 0xC9, gvar->pm.mm.MainPresent); DebugMemory_(gvar, 0);
        //printf("mainmem:      %lu\n", gvar->mmi.mainmem);
@@ -1773,7 +1696,8 @@ void MM_BombOnError(boolean bomb, global_game_variables_t *gvar)
        gvar->mm.bombonerror = bomb;
 }
 
-/*void MM_GetNewBlock(global_game_variables_t *gvar)
+#if 0
+void MM_GetNewBlock(global_game_variables_t *gvar)
 {
        if(!gvar->mm.mmfree)
                MML_ClearBlock(gvar);
@@ -1792,7 +1716,8 @@ void MM_FreeBlock(mmblocktype *x, global_game_variables_t *gvar)
        x->useptr=NULL;
        x->next=gvar->mm.mmfree;
        gvar->mm.mmfree=x;
-}*/
+}
+#endif
 
 void xms_call(byte v, global_game_variables_t *gvar)
 {
index bd529c030eb3f224dbd6283c943fb3a836a431ed..f890a3bb4faa21bce17f92adda6621e6fae45dfe 100755 (executable)
 \r
 #define        BUFFERSIZE              0x1000          // miscelanious, allways available buffer\r
 \r
-//moved to typdefst\r
+//moved to 16_tdef.h\r
 //#define MAXBLOCKS            1024\r
 \r
 \r
-\r
 //--------\r
 \r
 #define        EMS_INT                 0x67\r
@@ -196,7 +195,6 @@ void MM_SetPurge(memptr *baseptr, int purge, global_game_variables_t *gvar);
 void MM_SetLock(memptr *baseptr, boolean locked, global_game_variables_t *gvar);\r
 void MM_SortMem(global_game_variables_t *gvar);\r
 void MM_ShowMemory(global_game_variables_t *gvar);\r
-void MM_ShowMemoryVidVer(global_game_variables_t *gvar);\r
 void MM_DumpData(global_game_variables_t *gvar);\r
 dword MM_UnusedMemory(global_game_variables_t *gvar);\r
 dword MM_TotalFree(global_game_variables_t *gvar);\r
index 9fabd9be60af74cd1001c5c27c695c6d0435ebe6..858bd4b9fe121208edf5393ae64f714c4596978a 100755 (executable)
@@ -507,7 +507,6 @@ PML_XMSCopy(boolean toxms,byte far *addr,word xmspage,word length, global_game_v
        if (!addr)\r
        {\r
                Quit (gvar, "PML_XMSCopy: zero address\n");\r
-               //return;\r
        }\r
 \r
        xoffset = (dword)xmspage * PMPageSize;\r
@@ -621,8 +620,10 @@ PM_SetMainMemPurge(int level, global_game_variables_t *gvar)
        for (i = 0;i < PMMaxMainMem;i++)\r
        {\r
 #ifdef __DEBUG_PM__\r
+#ifdef __DEBUG_PM_MAIN__\r
                printf("PM_SetMainMemPurge()    info of gvar->pm.mm.MainMemPages[i]\n");\r
                printf("&       %Fp,    %Fp\n", &gvar->pm.mm.MainMemPages[i],   &(gvar->pm.mm.MainMemPages[i]));\r
+#endif\r
 #endif\r
                if (gvar->pm.mm.MainMemPages[i])\r
                        MM_SetPurge(&(gvar->pm.mm.MainMemPages[i]),level, gvar);\r
index 251bad5b22ac1896690a2dbe0d0cabb93316726f..5c24d89ba633716da36fc9bfaab9897deb099985 100755 (executable)
@@ -22,6 +22,8 @@
 \r
 #include "src/lib/16_spri.h"\r
 \r
+struct glob_game_vars  *ggvv;\r
+\r
 char* get_curr_anim_name(struct sprite *spri)\r
 {\r
        // Retrive animation name list\r
@@ -197,7 +199,11 @@ void animate_spri(entity_t *enti, video_t *video)
        );\r
 #endif\r
 #ifdef __DEBUG_SPRI__\r
-       if(dbg_delayanimation) delay(250);//{ while(!IN_KeyDown(sc_Space)/* && !IN_KeyDown(sc_Escape)*/){} delay(250); }\r
+//     if(ggvv->player[0].enti.q<5)\r
+       if(dbg_delayanimation)\r
+       {\r
+               IN_Ack(ggvv);// delay(250);//{ while(!IN_KeyDown(sc_Space)/* && !IN_KeyDown(sc_Escape)*/){} delay(250); }\r
+       }\r
 #endif\r
        if(!video->vga_state.rss)\r
        {\r
index daa9fadc3192344578189bcdd8a8b762e11bb7e5..c0d6d89fdee243505a3ce0ed990b0d2d39117771 100755 (executable)
  *\r
  */\r
 /*\r
- * 16 library\r
+ * 16 tail library\r
  */\r
 \r
 #include "src/lib/16_tail.h"\r
 #include "src/lib/16text.h"\r
+\r
+static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
+\r
 /*\r
 ==========================\r
 =\r
@@ -127,7 +130,7 @@ void        TL_VidInit(global_game_variables_t *gvar)
        // get old video mode\r
        //in.h.ah = 0xf;\r
        //int86(0x10, &in, &out);\r
-       gvar->video.old_mode = vgaGetMode();//out.h.al;\r
+       if(!gvar->video.old_mode) gvar->video.old_mode = vgaGetMode();//out.h.al;\r
 #else\r
        gvar->video.old_mode = 3;\r
 #endif\r
@@ -281,6 +284,176 @@ void      TL_VidInit(global_game_variables_t *gvar)
 \r
 //===========================================================================\r
 \r
+/*\r
+===================\r
+=\r
+= FizzleFade\r
+=\r
+===================\r
+*/\r
+\r
+#define PIXPERFRAME     1600\r
+\r
+void FizzleFade (unsigned source, unsigned dest,\r
+       unsigned width,unsigned height, boolean abortable, global_game_variables_t *gv)\r
+{\r
+       unsigned        drawofs,pagedelta;\r
+       unsigned        char maskb[8] = {1,2,4,8,16,32,64,128};\r
+       unsigned        x,y,p,frame;\r
+       long            rndval;\r
+       word TimeCount = *clockw;\r
+       word screenseg = SCREENSEG;\r
+\r
+       pagedelta = dest-source;\r
+//++++ VL_SetScreen (dest,0);\r
+       rndval = 1;\r
+       x = y = 0;\r
+\r
+       __asm {\r
+               mov     es,[screenseg]\r
+               mov     dx,SC_INDEX\r
+               mov     al,SC_MAPMASK\r
+               out     dx,al\r
+       }\r
+\r
+       TimeCount=frame=0;\r
+       do      // while (1)\r
+       {\r
+               if (abortable)\r
+               {\r
+                       IN_ReadControl(0,gv);\r
+                       if (gv->player[0].info.button0 || gv->player[0].info.button1 || gv->in.inst->Keyboard[sc_Space]\r
+                       || gv->in.inst->Keyboard[sc_Enter])\r
+                       {\r
+//++++                         VW_ScreenToScreen (source,dest,width/8,height);\r
+                               return;\r
+                       }\r
+               }\r
+\r
+               for (p=0;p<PIXPERFRAME;p++)\r
+               {\r
+                       //\r
+                       // seperate random value into x/y pair\r
+                       //\r
+                       __asm {\r
+                               mov     ax,[WORD PTR rndval]\r
+                               mov     dx,[WORD PTR rndval+2]\r
+                               mov     bx,ax\r
+                               dec     bl\r
+                               mov     [BYTE PTR y],bl                 // low 8 bits - 1 = y xoordinate\r
+                               mov     bx,ax\r
+                               mov     cx,dx\r
+                               shr     cx,1\r
+                               rcr     bx,1\r
+                               shr     bx,1\r
+                               shr     bx,1\r
+                               shr     bx,1\r
+                               shr     bx,1\r
+                               shr     bx,1\r
+                               shr     bx,1\r
+                               shr     bx,1\r
+                               mov     [x],bx                                  // next 9 bits = x xoordinate\r
+                       //\r
+                       // advance to next random element\r
+                       //\r
+                               shr     dx,1\r
+                               rcr     ax,1\r
+                               jnc     noxor\r
+                               xor     dx,0x0001\r
+                               xor     ax,0x2000\r
+#ifdef __BORLANDC__\r
+                       }\r
+#endif\r
+noxor:\r
+#ifdef __BORLANDC__\r
+                       __asm {\r
+#endif\r
+                               mov     [WORD PTR rndval],ax\r
+                               mov     [WORD PTR rndval+2],dx\r
+                       }\r
+\r
+                       if (x>width || y>height)\r
+                               continue;\r
+                       drawofs = source+gv->video.ofs.ylookup[y];\r
+\r
+                       __asm {\r
+                               mov     cx,[x]\r
+                               mov     si,cx\r
+                               and     si,7\r
+                               mov     dx,GC_INDEX\r
+                               mov     al,GC_BITMASK\r
+                               mov     ah,BYTE PTR [maskb+si]\r
+                               out     dx,ax\r
+\r
+                               mov     si,[drawofs]\r
+                               shr     cx,1\r
+                               shr     cx,1\r
+                               shr     cx,1\r
+                               add     si,cx\r
+                               mov     di,si\r
+                               add     di,[pagedelta]\r
+\r
+                               mov     dx,GC_INDEX\r
+                               mov     al,GC_READMAP                   // leave GC_INDEX set to READMAP\r
+                               out         dx,al\r
+\r
+                               mov     dx,SC_INDEX+1\r
+                               mov     al,1\r
+                               out         dx,al\r
+                               mov     dx,GC_INDEX+1\r
+                               mov     al,0\r
+                               out         dx,al\r
+\r
+                               mov     bl,[es:si]\r
+                               xchg    [es:di],bl\r
+\r
+                               mov     dx,SC_INDEX+1\r
+                               mov     al,2\r
+                               out         dx,al\r
+                               mov     dx,GC_INDEX+1\r
+                               mov     al,1\r
+                               out         dx,al\r
+\r
+                               mov     bl,[es:si]\r
+                               xchg    [es:di],bl\r
+\r
+                               mov     dx,SC_INDEX+1\r
+                               mov     al,4\r
+                               out         dx,al\r
+                               mov     dx,GC_INDEX+1\r
+                               mov     al,2\r
+                               out         dx,al\r
+\r
+                               mov     bl,[es:si]\r
+                               xchg    [es:di],bl\r
+\r
+                               mov     dx,SC_INDEX+1\r
+                               mov     al,8\r
+                               out         dx,al\r
+                               mov     dx,GC_INDEX+1\r
+                               mov     al,3\r
+                               out         dx,al\r
+\r
+                               mov     bl,[es:si]\r
+                               xchg    [es:di],bl\r
+                       }\r
+\r
+                       if (rndval == 1)                // entire sequence has been completed\r
+                       {\r
+//++++                         VGABITMASK(255);\r
+//++++                         VGAMAPMASK(15);\r
+                               return;\r
+                       }\r
+               }\r
+               frame++;\r
+//++++         while (TimeCount<frame){}       // don't go too fast\r
+       } while (1);\r
+\r
+\r
+}\r
+\r
+//===========================================================================\r
+\r
 /*\r
 ==================\r
 =\r
@@ -319,7 +492,7 @@ void DebugMemory_(global_game_variables_t *gvar, boolean q)
 #ifdef __WATCOMC__\r
        //IN_Ack ();\r
 #endif\r
-       if(q) MM_ShowMemory (gvar);\r
+//     if(q) MM_ShowMemory (gvar);\r
 }\r
 \r
 /*\r
index dc43c89599be4a22271b87b969e96bf5532ed80f..eff9ba4f63402e99a37e027ba1c4c1d0486abf77 100755 (executable)
 #include "src/lib/16_vl.h"\r
 #include "src/lib/testpatt.h"\r
 \r
+#ifdef __WATCOMC__\r
+#include <hw/cpu/cpu.h>\r
+#include <hw/dos/dos.h>\r
+#include <hw/vga/vga.h>\r
+#include <hw/vga/vrl.h>\r
+#include <hw/vga/vrs.h>\r
+#endif\r
+\r
+//gvar.video.ofs.bufferofs,gvar.video.ofs.displayofs,\r
+#define FIZZLEFADEFUNCTION \\r
+       if(gvar.in.inst->Keyboard[sc_F]){ FizzleFade(\\r
+       atoi(gvar.video.page[0].data),atoi(gvar.video.page[1].data),\\r
+320,240,true, &gvar);  IN_UserInput(1, &gvar); } \\r
+\r
 #define TAIL_FUNCTIONKEYFUNCTIONS \\r
        if(gvar.in.inst->Keyboard[88]){ panswitch=!panswitch;                                                   IN_UserInput(1, &gvar); } \\r
        TAIL_FUNCTIONKEYFUNCTIONS0EXE\r
 \r
 #define TAIL_FUNCTIONKEYFUNCTIONS0EXE \\r
        if(gvar.in.inst->Keyboard[sc_F4]){ turboXT(12);                                                                 IN_UserInput(1, &gvar); } \\r
-       if(gvar.in.inst->Keyboard[68/*sc_F10*/]){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap;             IN_UserInput(1, &gvar); } \\r
-       if(gvar.in.inst->Keyboard[sc_F8]){ gvar.video.vga_state.bgps=!gvar.video.vga_state.bgps;                                        IN_UserInput(1, &gvar); } \\r
+       if(gvar.in.inst->Keyboard[68/*sc_F10*/]){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap;                     IN_UserInput(1, &gvar); } \\r
+       if(gvar.in.inst->Keyboard[sc_F8]){ gvar.video.vga_state.bgps=!gvar.video.vga_state.bgps;                IN_UserInput(1, &gvar); } \\r
        if(gvar.in.inst->Keyboard[sc_F7]){ ZC_ShowMV(&gvar.mv, 0, 1);                                           IN_UserInput(1, &gvar); } \\r
        if(gvar.in.inst->Keyboard[sc_F6]){ ZC_ShowMV(&gvar.mv, 0, 0);                                           IN_UserInput(1, &gvar); } \\r
-       if(gvar.in.inst->Keyboard[sc_T]){ gvar.video.vga_state.rss=!gvar.video.vga_state.rss;                                           IN_UserInput(1, &gvar); } \\r
+       if(gvar.in.inst->Keyboard[sc_T]){ gvar.video.vga_state.rss=!gvar.video.vga_state.rss;                   IN_UserInput(1, &gvar); } \\r
        if(gvar.in.inst->Keyboard[sc_P]){ modexpdump(&gvar.video.page[0]);                                      IN_UserInput(1, &gvar); } \\r
        if(gvar.in.inst->Keyboard[sc_Y]){ dbg_delayanimation=!dbg_delayanimation;                               IN_UserInput(1, &gvar); } \\r
        RFDEBUGFUNCTIONS\r
+//FIZZLEFADEFUNCTION\r
 \r
 #define TAIL_PANKEYFUN \\r
        TAIL_PANKEYFUNZC \\r
@@ -105,6 +120,7 @@ word modexPalOverscan(word col);
 void Shutdown16(global_game_variables_t *gvar);\r
 void Startup16(global_game_variables_t *gvar);\r
 void TL_VidInit(global_game_variables_t *gvar);\r
+void FizzleFade (unsigned source, unsigned dest,unsigned width,unsigned height, boolean abortable, global_game_variables_t *gv);\r
 void DebugMemory_(global_game_variables_t *gvar, boolean q);\r
 void ClearMemory (global_game_variables_t *gvar);\r
 void Quit (global_game_variables_t *gvar, char *error);\r
index a3ac0ae4504e9385575c9970d9317ab987e2a92e..93a0d3e0271e222fd24a088c7966a8d98a8bc81f 100755 (executable)
@@ -359,6 +359,12 @@ typedef struct
 #define MAXSCANLINES   240                     // size of ylookup table\r
 \r
 //video\r
+typedef struct\r
+{\r
+       word    tileHeight, tileWidth;  //defined by mapfile\r
+       word    quadwh;                 //preproccessed quad size of tilewidth and tileheight\r
+} tile_dimention_t;\r
+\r
 typedef struct\r
 {\r
        unsigned int offscreen_ofs;\r
@@ -396,6 +402,7 @@ typedef struct
        nibble sfip;            //shinku_fps_indicator_page; // we're on page 1 now, shinku(). follow along please or it will not be visible.\r
        ofs_t   ofs;            //offset vars used for doslib\r
        word    vh;             //video combined height\r
+       tile_dimention_t        td;\r
        //0000word startclk; float clk, tickclk;        //timer\r
        //wolf3d vars\r
        boolean screenfaded;\r
@@ -659,7 +666,9 @@ typedef struct {
        vidsw_t vsw;\r
 } sw_t;*/\r
 \r
-typedef struct\r
+\r
+\r
+typedef struct glob_game_vars\r
 {\r
        video_t video;  // video settings variable\r
        ca_t            ca;     // ca stuff\r
index 833a75a6f8f116c6c0fca834e49bc2988f4d52db..514e7d4d97e6d860e857654f196b73781ecbfea0 100755 (executable)
@@ -55,6 +55,10 @@ void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv)
                default: // init the video\r
                        if(gv->video.VL_Started)\r
                                return;\r
+                       // get old video mode\r
+                       //in.h.ah = 0xf;\r
+                       //int86(0x10, &in, &out);\r
+                       gv->video.old_mode = vgaGetMode();//out.h.al;\r
                        // enter mode\r
                        modexEnter(vq, cmem, gv);\r
                break;\r
@@ -175,39 +179,6 @@ modexLeave() {
        vgaSetMode(TEXT_MODE);\r
 }\r
 \r
-/*\r
-====================\r
-=\r
-= VL_SetLineWidth\r
-=\r
-= Line witdh is in WORDS, 40 words is normal width for vgaplanegr\r
-=\r
-====================\r
-*/\r
-\r
-void VL_SetLineWidth (unsigned width, ofs_t *ofs)\r
-{\r
-       int i,offset;\r
-\r
-//\r
-// set wide virtual screen\r
-//\r
-       outport (CRTC_INDEX,CRTC_OFFSET+width*256);\r
-\r
-//\r
-// set up lookup tables\r
-//\r
-       ofs->linewidth = width*2;\r
-\r
-       offset = 0;\r
-\r
-       for (i=0;i<MAXSCANLINES;i++)\r
-       {\r
-               ofs->ylookup[i]=offset;\r
-               offset += ofs->linewidth;\r
-       }\r
-}\r
-\r
 page_t\r
 modexDefaultPage(page_t *p)\r
 {\r
index 00cd22385536f6a52e14e9060adab4280ec0233c..af357b08c09d85874f74868749b27d5ab70350e9 100755 (executable)
 // #include "src/lib/modex16/192x144_.h"\r
 // #include "src/lib/modex16/160x120.h"\r
 \r
-#ifdef __WATCOMC__\r
-#include <hw/cpu/cpu.h>\r
-#include <hw/dos/dos.h>\r
-#include <hw/vga/vga.h>\r
-#include <hw/vga/vrl.h>\r
-#include <hw/vga/vrs.h>\r
-#endif\r
-\r
 //320x240 = 20x15\r
 //192x144 = 12x9\r
 \r
index a6928b27a3d5d6f84796b08fa6e9fc13f1f276cc..31c9f38e73a80f50735bac2612278ec9428c3389 100755 (executable)
 #include <stdlib.h>\r
 #include "src/lib/16_vl.h"\r
 \r
+static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
+\r
+//===========================================================================\r
+\r
+//==============\r
+//\r
+// VL_SetScreen\r
+//\r
+//==============\r
+\r
+void   VL_SetScreen (unsigned int crtc, int pelpan)\r
+{\r
+// PROC        VL_SetScreen  crtc:WORD, pel:WORD\r
+// PUBLIC      VL_SetScreen\r
+       word TimeCount = *clockw;\r
+       __asm {\r
+               mov     cx,[TimeCount]          // if TimeCount goes up by two, the retrace\r
+               add     cx,2                            // period was missed (an interrupt covered it)\r
+\r
+               mov     dx,STATUS_REGISTER_1\r
+\r
+       // wait for a display signal to make sure the raster isn't in the middle\r
+       // of a sync\r
+\r
+#ifdef __BORLANDC__\r
+       }\r
+#endif\r
+SetScreen_waitdisplay:\r
+#ifdef __BORLANDC__\r
+       __asm {\r
+#endif\r
+               in      al,dx\r
+               test    al,1    //1 = display is disabled (HBL / VBL)\r
+               jnz     SetScreen_waitdisplay\r
+\r
+#ifdef __BORLANDC__\r
+       }\r
+#endif\r
+SetScreen_loop:\r
+#ifdef __BORLANDC__\r
+       __asm {\r
+#endif\r
+               sti\r
+               jmp     SetScreen_skip1\r
+               cli\r
+#ifdef __BORLANDC__\r
+       }\r
+#endif\r
+SetScreen_skip1:\r
+#ifdef __BORLANDC__\r
+       __asm {\r
+#endif\r
+               cmp     [TimeCount],cx          // will only happen if an interrupt is\r
+               jae     SetScreen_setcrtc                       // straddling the entire retrace period\r
+\r
+       // when several succesive display not enableds occur,\r
+       // the bottom of the screen has been hit\r
+\r
+               in      al,dx\r
+               test    al,8\r
+               jnz     SetScreen_waitdisplay\r
+               test    al,1\r
+               jz      SetScreen_loop\r
+\r
+               in      al,dx\r
+               test    al,8\r
+               jnz     SetScreen_waitdisplay\r
+               test    al,1\r
+               jz      SetScreen_loop\r
+\r
+               in      al,dx\r
+               test    al,8\r
+               jnz     SetScreen_waitdisplay\r
+               test    al,1\r
+               jz      SetScreen_loop\r
+\r
+               in      al,dx\r
+               test    al,8\r
+               jnz     SetScreen_waitdisplay\r
+               test    al,1\r
+               jz      SetScreen_loop\r
+\r
+               in      al,dx\r
+               test    al,8\r
+               jnz     SetScreen_waitdisplay\r
+               test    al,1\r
+               jz      SetScreen_loop\r
+\r
+#ifdef __BORLANDC__\r
+       }\r
+#endif\r
+SetScreen_setcrtc:\r
+#ifdef __BORLANDC__\r
+       __asm {\r
+#endif\r
+       // set CRTC start\r
+       // for some reason, my XT's EGA card doesn't like word outs to the CRTC index...\r
+\r
+               mov     cx,[crtc]\r
+               mov     dx,CRTC_INDEX\r
+               mov     al,0ch          //start address high register\r
+               out     dx,al\r
+               inc     dx\r
+               mov     al,ch\r
+               out     dx,al\r
+               dec     dx\r
+               mov     al,0dh          //start address low register\r
+               out     dx,al\r
+               mov     al,cl\r
+               inc     dx\r
+               out     dx,al\r
+\r
+\r
+       // set horizontal panning\r
+\r
+               mov     dx,ATR_INDEX\r
+//             mov     al,ATR_PELPAN or 20h\r
+               out     dx,al\r
+               jmp     SetScreen_done\r
+               mov     al,[BYTE PTR pelpan]            //pel pan value\r
+               out     dx,al\r
+#ifdef __BORLANDC__\r
+       }\r
+#endif\r
+SetScreen_done:\r
+#ifdef __BORLANDC__\r
+       __asm {\r
+#endif\r
+//             sti\r
+\r
+//             ret\r
+       }\r
+}\r
+\r
+/*\r
+====================\r
+=\r
+= VL_SetLineWidth\r
+=\r
+= Line witdh is in WORDS, 40 words is normal width for vgaplanegr\r
+=\r
+====================\r
+*/\r
+\r
+void VL_SetLineWidth (unsigned width, ofs_t *ofs)\r
+{\r
+       int i,offset;\r
+\r
+//\r
+// set wide virtual screen\r
+//\r
+       outport (CRTC_INDEX,CRTC_OFFSET+width*256);\r
+\r
+//\r
+// set up lookup tables\r
+//\r
+       ofs->linewidth = width*2;\r
+\r
+       offset = 0;\r
+\r
+       for (i=0;i<MAXSCANLINES;i++)\r
+       {\r
+               ofs->ylookup[i]=offset;\r
+               offset += ofs->linewidth;\r
+       }\r
+}\r
+\r
 /*\r
 =============================================================================\r
 \r
index bab3eba72e3e819c8b62d0e655c614991009fa9d..389a815993bc5a3760d4b5fb50b56b5547130993 100755 (executable)
@@ -329,5 +329,6 @@ void ding(page_t *page, bakapee_t *pee, word q)
                default:\r
                break;\r
        }\r
+       //printf("      %dx%d   %dx%d\n", pee->xx, pee->yy, tx, ty);\r
        //pee->coor++;\r
 }\r
diff --git a/src/lib/hb/demo16.c b/src/lib/hb/demo16.c
new file mode 100755 (executable)
index 0000000..e69de29
index 1b19e36975a66affac035c4ea96ee503dbbca2b4..1059af5b1b06d06cc27790c06f6c322a143aa142 100755 (executable)
@@ -6,8 +6,7 @@
 =====================\r
 */\r
 \r
-void\r
-DemoLoop (void)\r
+void DemoLoop (void)\r
 {\r
        char            *s;\r
        word            move;\r
index 6f90915bb56032f4baa082ac074a224a2e98a93b..d6c33f34116a194ff9271da24754a06899d8c7f5 100755 (executable)
@@ -753,7 +753,7 @@ void shinku(global_game_variables_t *gv)
                        //modexCopyPageRegion(&video->page[0], &video->page[1], enti->x, enti->y, 0, 0, 24, 32);\r
                }*/\r
                VL_ShowPage(&(gv->video.page[gv->video.sp]), gv->kurokku.fpscap, 0);\r
-               gv->video.dorender =!gv->video.dorender ;\r
+               gv->video.dorender =!gv->video.dorender;\r
                //0000gv->video.tickclk = ((*clockw)-gv->video.startclk)/18.2;\r
        }\r
        PM_NextFrame(gv);\r
index 38516c990cdfe807bf5acf742680c5813188797e..fcc7778de5ba2f036c20998e128ed4210be54186 100755 (executable)
@@ -52,6 +52,7 @@ void main(int argc, char *argv[])
 {\r
        static global_game_variables_t gvar;\r
        char *bakapee1,*bakapee1p;\r
+       struct glob_game_vars   *ggvv;\r
 //     sword bakapee;\r
 //     if(argv[1]) bakapee = atoi(argv[1]);\r
 //     else bakapee = 1;\r
@@ -60,6 +61,7 @@ void main(int argc, char *argv[])
 \r
        bakapee1=malloc(64);\r
        bakapee1p=malloc(64);\r
+       ggvv=&gvar;\r
 \r
        if (argc < 2) {\r
                //fprintf(stderr,"drawvrl <VRL file> <palette file>\n palette file optional\n");\r
diff --git a/video.ofs.bufferofs b/video.ofs.bufferofs
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/video.ofs.displayofs b/video.ofs.displayofs
new file mode 100755 (executable)
index 0000000..e69de29