From 6cb7af40446a399db9f56ba66d8db74a1a1f3181 Mon Sep 17 00:00:00 2001
From: sparky4 <sparky4@cock.li>
Date: Fri, 6 Oct 2017 13:15:39 -0500
Subject: [PATCH] intro screen stuff added from wolf 3d. i am far too busy to
 code again. there is also borland c showmem stuff and joystick testing and
 palett manipulation stuff i needd to do but no time

---
 EXMMTEST.LOG      | 338 ++++++++++++++++++++++++++++++++++++++++++++++
 src/exmmtest.c    |   7 +
 src/lib/16_tail.c | 110 ++++++++++++++-
 src/lib/16_tail.h |   1 +
 src/lib/doslib    |   2 +-
 src/xcroll.c      |   2 +-
 6 files changed, 456 insertions(+), 4 deletions(-)
 create mode 100755 EXMMTEST.LOG

diff --git a/EXMMTEST.LOG b/EXMMTEST.LOG
new file mode 100755
index 00000000..aa440742
--- /dev/null
+++ b/EXMMTEST.LOG
@@ -0,0 +1,338 @@
+bakapee1[data/spri/chikyuu.sht]
+bakapee2[data/test.map]
+stackavail()=32584
+
+
+press any key to continue!
+======================================load=====================================
+====================================load end===================================
+contents of the buffer
+[
+# CHUKYUU.PCX demo sprite sheet compiler script
+# (C) 2016 Jonathan Campbell
+
+# *spritesheet declares the section used by the sprite sheet cutting tool
+#
+# Sprites are declared by name (which becomes the .VRL file) at the + in the form:
+# +NAME@ID
+#
+# Sprite names are meant for temporary use when compiling the sprite sheet into VRLs.
+# At some point a longer name might be provided for use in your code.
+# This will fill the CURRENT WORKING DIRECTORY with .VRL files as directed when you
+# run PCXSSCUT, make sure your makefile does this in a temporary directory when
+# you integrate into your build and that your cleanup commands delete these files,
+# and that your .gitignore does not attempt to commit these files.
+
+# this format is a bit crap, but we'll improve it as needed. be patient.
+
+# begin spritesheet section
+*spritesheet
+
+# ---------------- player, walking, blue shirt with white cross. Frame 2/3 could be used for standing still
+
+# player, forward, frame 1/3
++CHUBFCW0@10
+xy=0,0
+wh=24,32
+# player, forward, frame 2/3
++CHUBFCW1@11
+xy=24,0
+wh=24,32
+# player, forward, frame 3/3
++CHUBFCW2@12
+xy=48,0
+wh=24,32
+
+# player, left, frame 1/3
++CHUBLCW0@20
+xy=0,32
+wh=24,32
+# player, left, frame 2/3
++CHUBLCW1@21
+xy=24,32
+wh=24,32
+# player, left, frame 3/3
++CHUBLCW2@22
+xy=48,32
+wh=24,32
+
+# player, right, frame 1/3
++CHUBRCW0@30
+xy=0,64
+wh=24,32
+# player, right, frame 2/3
++CHUBRCW1@31
+xy=24,64
+wh=24,32
+# player, right, frame 3/3
++CHUBRCW2@32
+xy=48,64
+wh=24,32
+
+# player, away, frame 1/3
++CHUBACW0@40
+xy=0,96
+wh=24,32
+# player, away, frame 2/3
++CHUBACW1@41
+xy=24,96
+wh=24,32
+# player, away, frame 3/3
++CHUBACW2@42
+xy=48,96
+wh=24,32
+
+# begin animation list section. must come after sprite sheet
+*animation
+
+# Chikyuu, forward, standing and walking animation cycles
++CHUBFCW_STANDING@10
+sprite=CHUBFCW1
+
++CHUBFCW_WALKING@11
+sprite=CHUBFCW0
+delay=3
+-newframe
+sprite=CHUBFCW1
+delay=3
+event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
+-newframe
+sprite=CHUBFCW2
+delay=3
+-newframe
+sprite=CHUBFCW1
+delay=3
+event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
+
+# Chikyuu, left, standing and walking animation cycles
++CHUBLCW_STANDING@20
+sprite=CHUBLCW1
+
++CHUBLCW_WALKING@21
+sprite=CHUBLCW0
+delay=3
+-newframe
+sprite=CHUBLCW1
+delay=3
+event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
+-newframe
+sprite=CHUBLCW2
+delay=3
+-newframe
+sprite=CHUBLCW1
+delay=3
+event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
+
+# Chikyuu, right, standing and walking animation cycles
++CHUBRCW_STANDING@30
+sprite=CHUBRCW1
+
++CHUBRCW_WALKING@31
+sprite=CHUBRCW0
+delay=3
+-newframe
+sprite=CHUBRCW1
+delay=3
+event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
+-newframe
+sprite=CHUBRCW2
+delay=3
+-newframe
+sprite=CHUBRCW1
+delay=3
+event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
+
+# Chikyuu, away, standing and walking animation cycles
++CHUBACW_STANDING@40
+sprite=CHUBACW1
+
++CHUBACW_WALKING@41
+sprite=CHUBACW0
+delay=3
+-newframe
+sprite=CHUBACW1
+delay=3
+event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
+-newframe
+sprite=CHUBACW2
+delay=3
+-newframe
+sprite=CHUBACW1
+delay=3
+event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
+
+
+]
+
+yay!
+
+
+press any key to continue!
+======================================read=====================================
+====================================read end===================================
+contents of the buffer
+[
+{ "backgroundcolor":"#000000",
+ "height":30,
+ "layers":[
+        {
+         "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],
+         "height":30,
+         "name":"bg",
+         "opacity":1,
+         "type":"tilelayer",
+         "visible":true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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],
+         "height":30,
+         "name":"fg",
+         "opacity":1,
+         "type":"tilelayer",
+         "visible":true,
+         "width":40,
+         "x":0,
+         "y":0
+        }, 
+        {
+         "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, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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],
+         "height":30,
+         "name":"top",
+         "opacity":1,
+         "type":"tilelayer",
+         "visible":true,
+         "width":40,
+         "x":0,
+         "y":0
+        }, 
+        {
+         "height":30,
+         "name":"ob",
+         "objects":[
+                {
+                 "height":16,
+                 "name":"trunk",
+                 "properties":
+                    {
+                     "walkable":"0"
+                    },
+                 "type":"nonc",
+                 "visible":true,
+                 "width":32,
+                 "x":128,
+                 "y":32
+                }, 
+                {
+                 "height":16,
+                 "name":"stump",
+                 "properties":
+                    {
+                     "walkable":"0"
+                    },
+                 "type":"nonc",
+                 "visible":true,
+                 "width":16,
+                 "x":144,
+                 "y":128
+                }],
+         "opacity":1,
+         "type":"objectgroup",
+         "visible":true,
+         "width":40,
+         "x":0,
+         "y":0
+        }],
+ "orientation":"orthogonal",
+ "properties":
+    {
+
+    },
+ "tileheight":16,
+ "tilesets":[
+        {
+         "firstgid":1,
+         "image":"ed.png",
+         "imageheight":64,
+         "imagewidth":64,
+         "margin":0,
+         "name":"wwww",
+         "properties":
+            {
+
+            },
+         "spacing":0,
+         "tileheight":16,
+         "tilewidth":16
+        }, 
+        {
+         "firstgid":17,
+         "image":"forest.gif",
+         "imageheight":112,
+         "imagewidth":80,
+         "margin":0,
+         "name":"forest",
+         "properties":
+            {
+
+            },
+         "spacing":0,
+         "tileheight":16,
+         "tilewidth":16
+        }],
+ "tilewidth":16,
+ "version":1,
+ "width":40
+}
+]
+
+yay!
+
+
+press any key to continue!
+XxY = 97x163
+XxY = 97x155
+XxY = 97x147
+XxY = 97x139
+XxY = 97x131
+XxY = 97x123
+XxY = 97x115
+XxY = 97x107
+XxY = 97x99
+XxY = 97x91
+========================================
+		DebugMemory_
+========================================
+Memory Usage
+------------
+Total:		472k
+Free:		64k
+With purge:	464k
+------------
+
+
+press any key to continue!
+========================================
+		MM_Report_
+========================================
+	ÉLIMEMS	1
+	ÇÄEMM v4.0 available
+	ÇÄtotalEMSpages:	4032	freeEMSpages:	3923
+	ÇÄEMSPageFrame:	e000
+	ÓÄEMSmem:	64274432
+	ÉXMS	1
+	ÇÄXMS v3.0 available
+	ÇÄXMSDriver:	c83f:0010
+	ÇÄXMSHandle:	08fc
+	ÓÄXMSmem:	2355200
+	ÉConv.	1
+	ÓÄTotal:	472k	Free:	64k	With purge:464k
+nearheap:	764		farheap:	482630
+========================================
+near=	18b0:f8f8 far=	28b1:021a
+&near=	18b0:204e &far=	18b0:204a
+========================================
+Project 16 exmmtest.exe. This is just a test file!
+version Oct  6 2017 12:09:39
diff --git a/src/exmmtest.c b/src/exmmtest.c
index 83aa4e2b..7e3bd8de 100755
--- a/src/exmmtest.c
+++ b/src/exmmtest.c
@@ -236,6 +236,13 @@ PRINTBB; KEYP
 	modexHiganbanaPageSetup(&gvar);
 	gvar.video.page[0].dx = gvar.video.page[0].dy = 0;
 //	VL_modexPalScramble(&gvar.video.palette);
+	{
+		unsigned temp;
+		temp = BDOFSCONV gvar.video.BOFS;
+		gvar.video.BOFS = gvar.video.DOFS;
+		MU_IntroScreen(&gvar);
+		gvar.video.BOFS = (byte __far *)temp;
+	}
 //	ShapeTest_(&gvar);
 #endif
 	MM_ShowMemory(&gvar);
diff --git a/src/lib/16_tail.c b/src/lib/16_tail.c
index c8e1ee81..1909cbcd 100755
--- a/src/lib/16_tail.c
+++ b/src/lib/16_tail.c
@@ -142,6 +142,112 @@ void ShutdownCAMMPM (global_game_variables_t *gvar)
 
 //===========================================================================
 
+////////////////////////////////////////////////////////////////////
+//
+// HANDLE INTRO SCREEN (SYSTEM CONFIG)
+//
+////////////////////////////////////////////////////////////////////
+void MU_IntroScreen(global_game_variables_t *gvar)
+{
+#define MAINCOLOR	0x6c
+#define EMSCOLOR	0x6c
+#define XMSCOLOR	0x6c
+
+#define FILLCOLOR	14
+
+	long memory,emshere,xmshere;
+	int i,num,ems[10]={100,200,300,400,500,600,700,800,900,1000},
+		xms[10]={100,200,300,400,500,600,700,800,900,1000},
+		main[10]={32,64,96,128,160,192,224,256,288,320};
+
+	gvar->video.print.t=1;
+	gvar->video.print.tlsw=1;
+	gvar->video.print.bgcolor=8;
+	gvar->video.print.color=5;
+
+	//
+	// DRAW MAIN MEMORY
+	//
+	num=32;
+	gvar->video.print.x=49-32;
+
+	memory=(1023l+gvar->mmi.nearheap+gvar->mmi.farheap)/1024l;
+	for (i=0;i<10;i++)
+		if (memory>=main[i])
+		{
+			gvar->video.print.y=163-8*i;
+			sprintf(global_temp_status_text, "% 4u", num); VL_print(global_temp_status_text, 0, gvar);
+			VL_Bar(49,163-8*i,6,5,MAINCOLOR-i,gvar);
+			num+=32;
+		}
+	gvar->video.print.y=171;
+	VL_print("MAIN", 0, gvar);
+
+
+	//
+	// DRAW EMS MEMORY
+	//
+	if (gvar->pm.emm.EMSPresent)
+	{
+		num=100;
+		gvar->video.print.x=89-32;
+
+		emshere=4l*gvar->pm.emm.EMSPagesAvail;
+		for (i=0;i<10;i++)
+			if (emshere>=ems[i])
+			{
+				gvar->video.print.y=163-8*i;
+				sprintf(global_temp_status_text, "% 4u", num); VL_print(global_temp_status_text, 0, gvar);
+				VL_Bar(89,163-8*i,6,5,EMSCOLOR-i,gvar);
+				num+=100;
+			}
+		gvar->video.print.y=171;
+		VL_print(" EMS", 0, gvar);
+	}
+
+	//
+	// DRAW XMS MEMORY
+	//
+	if (gvar->pm.xmm.XMSPresent)
+	{
+		num=100;
+		gvar->video.print.x=129-32;
+
+		xmshere=4l*gvar->pm.xmm.XMSPagesAvail;
+		for (i=0;i<10;i++)
+			if (xmshere>=xms[i])
+			{
+				gvar->video.print.y=163-8*i;
+				sprintf(global_temp_status_text, "% 4u", num); VL_print(global_temp_status_text, 0, gvar);
+				VL_Bar(129,163-8*i,6,5,XMSCOLOR-i,gvar);
+				num+=100;
+			}
+		gvar->video.print.y=171;
+		VL_print(" XMS", 0, gvar);
+	}
+
+	//
+	// FILL BOXES
+	//
+	if (gvar->in.MousePresent)
+		VL_Bar(164,82,12,2,FILLCOLOR,gvar);
+
+	if (gvar->in.JoysPresent[0] || gvar->in.JoysPresent[1])
+		VL_Bar(164,105,12,2,FILLCOLOR,gvar);
+
+//++++	if (gvar->sd.AdLibPresent)//SB && !SoundBlasterPresent)
+//++++		VL_Bar(164,128,12,2,FILLCOLOR,gvar);
+
+//SB	if (SoundBlasterPresent)
+//SB		VL_Bar(164,151,12,2,FILLCOLOR,gvar);
+
+//SS	if (SoundSourcePresent)
+//SS		VL_Bar(164,174,12,2,FILLCOLOR,gvar);
+	IN_Ack (gvar);
+}
+
+//===========================================================================
+
 /*
 ====================
 =
@@ -494,7 +600,7 @@ void TestSprites(void)
 		spr = &spritetable[sprite-STARTSPRITES];
 		block = (spritetype _seg *)grsegs[sprite];
 
-		VWB_Bar (hx,hy,TEXTWIDTH,bottomy-hy,WHITE);
+		VL_Bar (hx,hy,TEXTWIDTH,bottomy-hy,WHITE);
 
 		PrintX=hx;
 		PrintY=hy;
@@ -525,7 +631,7 @@ void TestSprites(void)
 		//
 		// draw the current shift, then wait for key
 		//
-			VWB_Bar(topx,hy,DISPWIDTH,bottomy-hy,WHITE);
+			VL_Bar(topx,hy,DISPWIDTH,bottomy-hy,WHITE);
 			if (block)
 			{
 				PrintX = topx;
diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h
index 3bf8e2c5..4993b4e6 100755
--- a/src/lib/16_tail.h
+++ b/src/lib/16_tail.h
@@ -132,6 +132,7 @@ void	Shutdown16(global_game_variables_t *gvar),
 	Startup16(global_game_variables_t *gvar),
 	StartupCAMMPM (global_game_variables_t *gvar),
 	ShutdownCAMMPM (global_game_variables_t *gvar);
+void MU_IntroScreen(global_game_variables_t *gvar);
 void TL_DosLibStartup(global_game_variables_t *gvar);
 void TL_VidInit(global_game_variables_t *gvar);
 boolean FizzleFade (unsigned source, unsigned dest, unsigned width, unsigned height, unsigned frames, boolean abortable, global_game_variables_t *gvar);
diff --git a/src/lib/doslib b/src/lib/doslib
index 8396a97e..8747af5a 160000
--- a/src/lib/doslib
+++ b/src/lib/doslib
@@ -1 +1 @@
-Subproject commit 8396a97ea80ddc3c2dd32c9db46a52b6c57fd194
+Subproject commit 8747af5a1100fa9bee7fb87664ff54b248877d9f
diff --git a/src/xcroll.c b/src/xcroll.c
index 3f097a3c..93afc856 100755
--- a/src/xcroll.c
+++ b/src/xcroll.c
@@ -28,7 +28,7 @@
 
 //#define NOMAPLOAD
 //#define OLDPLAYERSPRITESTUFF
-#define XC_CTRLTYPE ctrl_Keyboard
+#define XC_CTRLTYPE ctrl_Mouse//Keyboard
 //Mouse
 #ifdef __DEBUG__
 #define SCROLLEXEDEBUG
-- 
2.39.5