From: sparky4 <sparky4@cock.li>
Date: Tue, 6 Jun 2017 22:52:09 +0000 (-0500)
Subject: FIXED farcoreleft() is a VERY important part of the farheap of MM. it is much larger... 
X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=229f7058d063564cbb5aa80f766f664a571bc1cb;p=16.git

FIXED farcoreleft() is a VERY important part of the farheap of MM. it is much larger in borlan C and in watcom c it is a fixed size because it works and it is stable... i want to know how the farcoreleft() works so i can make a write up port for p16
---

diff --git a/DEBUG.16B b/DEBUG.16B
index ccae1ef3..5bf61588 100755
--- a/DEBUG.16B
+++ b/DEBUG.16B
@@ -1,209 +1,209 @@
-Seg:0	Size:5739	Owner:0x0
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Seg:166b	Size:256	Owner:0x764d
+Seg:0	Size:5742	Owner:0x0
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Seg:166e	Size:256	Owner:0x764d
 0
-Seg:176b	Size:256	Owner:0x341a
+Seg:176e	Size:256	Owner:0x341a
 0
-Seg:186b	Size:256	Owner:0x341c
+Seg:186e	Size:256	Owner:0x341c
 0
-Seg:196b	Size:256	Owner:0x341e
+Seg:196e	Size:256	Owner:0x341e
 0
-Seg:1a6b	Size:256	Owner:0x3420
+Seg:1a6e	Size:256	Owner:0x3420
 0
-Seg:1b6b	Size:256	Owner:0x3422
+Seg:1b6e	Size:256	Owner:0x3422
 0
-Seg:1c6b	Size:256	Owner:0x3424
+Seg:1c6e	Size:256	Owner:0x3424
 0
-Seg:1d6b	Size:256	Owner:0x3426
+Seg:1d6e	Size:256	Owner:0x3426
 0
-Seg:1e6b	Size:256	Owner:0x3428
+Seg:1e6e	Size:256	Owner:0x3428
 0
-Seg:1f6b	Size:256	Owner:0x342a
+Seg:1f6e	Size:256	Owner:0x342a
 0
-Seg:206b	Size:256	Owner:0x342c
+Seg:206e	Size:256	Owner:0x342c
 0
-Seg:216b	Size:256	Owner:0x342e
+Seg:216e	Size:256	Owner:0x342e
 0
-Seg:226b	Size:256	Owner:0x3430
+Seg:226e	Size:256	Owner:0x3430
 0
-Seg:236b	Size:256	Owner:0x3432
+Seg:236e	Size:256	Owner:0x3432
 0
-Seg:246b	Size:256	Owner:0x3434
+Seg:246e	Size:256	Owner:0x3434
 0
-Seg:256b	Size:256	Owner:0x3436
+Seg:256e	Size:256	Owner:0x3436
 0
-Seg:266b	Size:256	Owner:0x3438
+Seg:266e	Size:256	Owner:0x3438
 0
-Seg:276b	Size:256	Owner:0x343a
+Seg:276e	Size:256	Owner:0x343a
 0
-Seg:286b	Size:256	Owner:0x343c
+Seg:286e	Size:256	Owner:0x343c
 0
-Seg:296b	Size:256	Owner:0x343e
+Seg:296e	Size:256	Owner:0x343e
 0
-Seg:2a6b	Size:256	Owner:0x3440
+Seg:2a6e	Size:256	Owner:0x3440
 0
-Seg:2b6b	Size:256	Owner:0x3442
+Seg:2b6e	Size:256	Owner:0x3442
 0
-Seg:2c6b	Size:256	Owner:0x3444
+Seg:2c6e	Size:256	Owner:0x3444
 0
-Seg:2d6b	Size:256	Owner:0x3446
+Seg:2d6e	Size:256	Owner:0x3446
 0
-Seg:2e6b	Size:256	Owner:0x3448
+Seg:2e6e	Size:256	Owner:0x3448
 0
-Seg:2f6b	Size:256	Owner:0x344a
+Seg:2f6e	Size:256	Owner:0x344a
 0
-Seg:306b	Size:256	Owner:0x344c
+Seg:306e	Size:256	Owner:0x344c
 0
-Seg:316b	Size:256	Owner:0x344e
+Seg:316e	Size:256	Owner:0x344e
 0
-Seg:326b	Size:256	Owner:0x3450
+Seg:326e	Size:256	Owner:0x3450
 0
-Seg:336b	Size:256	Owner:0x3452
+Seg:336e	Size:256	Owner:0x3452
 0
-Seg:346b	Size:256	Owner:0x3454
+Seg:346e	Size:256	Owner:0x3454
 0
-Seg:356b	Size:256	Owner:0x3456
+Seg:356e	Size:256	Owner:0x3456
 0
-Seg:366b	Size:256	Owner:0x3458
+Seg:366e	Size:256	Owner:0x3458
 0
-Seg:376b	Size:256	Owner:0x345a
+Seg:376e	Size:256	Owner:0x345a
 0
-Seg:386b	Size:256	Owner:0x345c
+Seg:386e	Size:256	Owner:0x345c
 0
-Seg:396b	Size:256	Owner:0x345e
+Seg:396e	Size:256	Owner:0x345e
 0
-Seg:3a6b	Size:256	Owner:0x3460
+Seg:3a6e	Size:256	Owner:0x3460
 0
-Seg:3b6b	Size:256	Owner:0x3462
+Seg:3b6e	Size:256	Owner:0x3462
 0
-Seg:3c6b	Size:256	Owner:0x3464
+Seg:3c6e	Size:256	Owner:0x3464
 0
-Seg:3d6b	Size:256	Owner:0x3466
+Seg:3d6e	Size:256	Owner:0x3466
 0
-Seg:3e6b	Size:256	Owner:0x3468
+Seg:3e6e	Size:256	Owner:0x3468
 0
-Seg:3f6b	Size:256	Owner:0x346a
+Seg:3f6e	Size:256	Owner:0x346a
 0
-Seg:406b	Size:256	Owner:0x346c
+Seg:406e	Size:256	Owner:0x346c
 0
-Seg:416b	Size:256	Owner:0x346e
+Seg:416e	Size:256	Owner:0x346e
 0
-Seg:426b	Size:256	Owner:0x3470
+Seg:426e	Size:256	Owner:0x3470
 0
-Seg:436b	Size:256	Owner:0x3472
+Seg:436e	Size:256	Owner:0x3472
 0
-Seg:446b	Size:256	Owner:0x3474
+Seg:446e	Size:256	Owner:0x3474
 0
-Seg:456b	Size:256	Owner:0x3476
+Seg:456e	Size:256	Owner:0x3476
 0
-Seg:466b	Size:256	Owner:0x3478
+Seg:466e	Size:256	Owner:0x3478
 0
-Seg:476b	Size:256	Owner:0x347a
+Seg:476e	Size:256	Owner:0x347a
 0
-Seg:486b	Size:256	Owner:0x347c
+Seg:486e	Size:256	Owner:0x347c
 0
-Seg:496b	Size:256	Owner:0x347e
+Seg:496e	Size:256	Owner:0x347e
 0
-Seg:4a6b	Size:256	Owner:0x3480
+Seg:4a6e	Size:256	Owner:0x3480
 0
-Seg:4b6b	Size:256	Owner:0x3482
+Seg:4b6e	Size:256	Owner:0x3482
 0
-Seg:4c6b	Size:256	Owner:0x3484
+Seg:4c6e	Size:256	Owner:0x3484
 0
-Seg:4d6b	Size:256	Owner:0x3486
+Seg:4d6e	Size:256	Owner:0x3486
 0
-Seg:4e6b	Size:256	Owner:0x3488
+Seg:4e6e	Size:256	Owner:0x3488
 0
-Seg:4f6b	Size:256	Owner:0x348a
+Seg:4f6e	Size:256	Owner:0x348a
 0
-Seg:506b	Size:256	Owner:0x348c
+Seg:506e	Size:256	Owner:0x348c
 0
-Seg:516b	Size:256	Owner:0x348e
+Seg:516e	Size:256	Owner:0x348e
 0
-Seg:526b	Size:256	Owner:0x3490
+Seg:526e	Size:256	Owner:0x3490
 0
-Seg:536b	Size:256	Owner:0x3492
+Seg:536e	Size:256	Owner:0x3492
 0
-Seg:546b	Size:256	Owner:0x3494
+Seg:546e	Size:256	Owner:0x3494
 0
-Seg:556b	Size:256	Owner:0x3496
+Seg:556e	Size:256	Owner:0x3496
 0
-Seg:566b	Size:256	Owner:0x3498
+Seg:566e	Size:256	Owner:0x3498
 0
-Seg:576b	Size:256	Owner:0x349a
+Seg:576e	Size:256	Owner:0x349a
 0
-Seg:586b	Size:256	Owner:0x349c
+Seg:586e	Size:256	Owner:0x349c
 0
-Seg:596b	Size:256	Owner:0x349e
+Seg:596e	Size:256	Owner:0x349e
 0
-Seg:5a6b	Size:256	Owner:0x34a0
+Seg:5a6e	Size:256	Owner:0x34a0
 0
-Seg:5b6b	Size:256	Owner:0x34a2
+Seg:5b6e	Size:256	Owner:0x34a2
 0
-Seg:5c6b	Size:256	Owner:0x34a4
+Seg:5c6e	Size:256	Owner:0x34a4
 0
-Seg:5d6b	Size:256	Owner:0x34a6
+Seg:5d6e	Size:256	Owner:0x34a6
 0
-Seg:5e6b	Size:256	Owner:0x34a8
+Seg:5e6e	Size:256	Owner:0x34a8
 0
-Seg:5f6b	Size:256	Owner:0x34aa
+Seg:5f6e	Size:256	Owner:0x34aa
 0
-Seg:606b	Size:256	Owner:0x34ac
+Seg:606e	Size:256	Owner:0x34ac
 0
-Seg:616b	Size:256	Owner:0x34ae
+Seg:616e	Size:256	Owner:0x34ae
 0
-Seg:626b	Size:256	Owner:0x34b0
+Seg:626e	Size:256	Owner:0x34b0
 0
-Seg:636b	Size:256	Owner:0x34b2
+Seg:636e	Size:256	Owner:0x34b2
 0
-Seg:646b	Size:256	Owner:0x34b4
+Seg:646e	Size:256	Owner:0x34b4
 0
-Seg:656b	Size:256	Owner:0x34b6
+Seg:656e	Size:256	Owner:0x34b6
 0
-Seg:666b	Size:256	Owner:0x34b8
+Seg:666e	Size:256	Owner:0x34b8
 0
-Seg:676b	Size:256	Owner:0x34ba
+Seg:676e	Size:256	Owner:0x34ba
 0
-Seg:686b	Size:256	Owner:0x34bc
+Seg:686e	Size:256	Owner:0x34bc
 0
-Seg:696b	Size:256	Owner:0x34be
+Seg:696e	Size:256	Owner:0x34be
 0
-Seg:6a6b	Size:256	Owner:0x34c0
+Seg:6a6e	Size:256	Owner:0x34c0
 0
-Seg:6b6b	Size:256	Owner:0x34c2
+Seg:6b6e	Size:256	Owner:0x34c2
 0
-Seg:6c6b	Size:256	Owner:0x34c4
+Seg:6c6e	Size:256	Owner:0x34c4
 0
-Seg:6d6b	Size:256	Owner:0x34c6
+Seg:6d6e	Size:256	Owner:0x34c6
 0
-Seg:6e6b	Size:256	Owner:0x34c8
+Seg:6e6e	Size:256	Owner:0x34c8
 0
-Seg:6f6b	Size:256	Owner:0x34ca
+Seg:6f6e	Size:256	Owner:0x34ca
 0
-Seg:706b	Size:256	Owner:0x34cc
+Seg:706e	Size:256	Owner:0x34cc
 0
-Seg:716b	Size:256	Owner:0x34ce
+Seg:716e	Size:256	Owner:0x34ce
 0
-Seg:726b	Size:256	Owner:0x34d0
+Seg:726e	Size:256	Owner:0x34d0
 0
-Seg:736b	Size:256	Owner:0x34d2
+Seg:736e	Size:256	Owner:0x34d2
 0
-Seg:746b	Size:256	Owner:0x34d4
+Seg:746e	Size:256	Owner:0x34d4
 0
-Seg:756b	Size:256	Owner:0x34d6
+Seg:756e	Size:256	Owner:0x34d6
 0
-Seg:766b	Size:256	Owner:0x34d8
+Seg:766e	Size:256	Owner:0x34d8
 0
-Seg:776b	Size:256	Owner:0x34da
+Seg:776e	Size:256	Owner:0x34da
 0
-Seg:786b	Size:256	Owner:0x34dc
+Seg:786e	Size:256	Owner:0x34dc
 0
-Seg:796b	Size:256	Owner:0x34de
+Seg:796e	Size:256	Owner:0x34de
 0
-Seg:7a6b	Size:256	Owner:0x34e0
+Seg:7a6e	Size:256	Owner:0x34e0
 0
-Seg:7b6b	Size:273	Owner:0x764d
+Seg:7b6e	Size:273	Owner:0x764d
 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 Seg:9fbe	Size:32834	Owner:0x0
-000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-Seg:9f3f	Size:24768	Owner:0x0
+
+Seg:9ffe	Size:24577	Owner:0x0
 
\ No newline at end of file
diff --git a/DEBUG.16W b/DEBUG.16W
new file mode 100755
index 00000000..ecbd3c35
--- /dev/null
+++ b/DEBUG.16W
@@ -0,0 +1,210 @@
+Seg:0	Size:9835	Owner:0x0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++000
+Seg:26d3	Size:76	Owner:0x0
+0
+Seg:271f	Size:256	Owner:0x5fec
+0
+Seg:281f	Size:256	Owner:0x1e22
+0
+Seg:291f	Size:256	Owner:0x1e24
+0
+Seg:2a1f	Size:256	Owner:0x1e26
+0
+Seg:2b1f	Size:256	Owner:0x1e28
+0
+Seg:2c1f	Size:256	Owner:0x1e2a
+0
+Seg:2d1f	Size:256	Owner:0x1e2c
+0
+Seg:2e1f	Size:256	Owner:0x1e2e
+0
+Seg:2f1f	Size:256	Owner:0x1e30
+0
+Seg:301f	Size:256	Owner:0x1e32
+0
+Seg:311f	Size:256	Owner:0x1e34
+0
+Seg:321f	Size:256	Owner:0x1e36
+0
+Seg:331f	Size:256	Owner:0x1e38
+0
+Seg:341f	Size:256	Owner:0x1e3a
+0
+Seg:351f	Size:256	Owner:0x1e3c
+0
+Seg:361f	Size:256	Owner:0x1e3e
+0
+Seg:371f	Size:256	Owner:0x1e40
+0
+Seg:381f	Size:256	Owner:0x1e42
+0
+Seg:391f	Size:256	Owner:0x1e44
+0
+Seg:3a1f	Size:256	Owner:0x1e46
+0
+Seg:3b1f	Size:256	Owner:0x1e48
+0
+Seg:3c1f	Size:256	Owner:0x1e4a
+0
+Seg:3d1f	Size:256	Owner:0x1e4c
+0
+Seg:3e1f	Size:256	Owner:0x1e4e
+0
+Seg:3f1f	Size:256	Owner:0x1e50
+0
+Seg:401f	Size:256	Owner:0x1e52
+0
+Seg:411f	Size:256	Owner:0x1e54
+0
+Seg:421f	Size:256	Owner:0x1e56
+0
+Seg:431f	Size:256	Owner:0x1e58
+0
+Seg:441f	Size:256	Owner:0x1e5a
+0
+Seg:451f	Size:256	Owner:0x1e5c
+0
+Seg:461f	Size:256	Owner:0x1e5e
+0
+Seg:471f	Size:256	Owner:0x1e60
+0
+Seg:481f	Size:256	Owner:0x1e62
+0
+Seg:491f	Size:256	Owner:0x1e64
+0
+Seg:4a1f	Size:256	Owner:0x1e66
+0
+Seg:4b1f	Size:256	Owner:0x1e68
+0
+Seg:4c1f	Size:256	Owner:0x1e6a
+0
+Seg:4d1f	Size:256	Owner:0x1e6c
+0
+Seg:4e1f	Size:256	Owner:0x1e6e
+0
+Seg:4f1f	Size:256	Owner:0x1e70
+0
+Seg:501f	Size:256	Owner:0x1e72
+0
+Seg:511f	Size:256	Owner:0x1e74
+0
+Seg:521f	Size:256	Owner:0x1e76
+0
+Seg:531f	Size:256	Owner:0x1e78
+0
+Seg:541f	Size:256	Owner:0x1e7a
+0
+Seg:551f	Size:256	Owner:0x1e7c
+0
+Seg:561f	Size:256	Owner:0x1e7e
+0
+Seg:571f	Size:256	Owner:0x1e80
+0
+Seg:581f	Size:256	Owner:0x1e82
+0
+Seg:591f	Size:256	Owner:0x1e84
+0
+Seg:5a1f	Size:256	Owner:0x1e86
+0
+Seg:5b1f	Size:256	Owner:0x1e88
+0
+Seg:5c1f	Size:256	Owner:0x1e8a
+0
+Seg:5d1f	Size:256	Owner:0x1e8c
+0
+Seg:5e1f	Size:256	Owner:0x1e8e
+0
+Seg:5f1f	Size:256	Owner:0x1e90
+0
+Seg:601f	Size:256	Owner:0x1e92
+0
+Seg:611f	Size:256	Owner:0x1e94
+0
+Seg:621f	Size:256	Owner:0x1e96
+0
+Seg:631f	Size:256	Owner:0x1e98
+0
+Seg:641f	Size:256	Owner:0x1e9a
+0
+Seg:651f	Size:256	Owner:0x1e9c
+0
+Seg:661f	Size:256	Owner:0x1e9e
+0
+Seg:671f	Size:256	Owner:0x1ea0
+0
+Seg:681f	Size:256	Owner:0x1ea2
+0
+Seg:691f	Size:256	Owner:0x1ea4
+0
+Seg:6a1f	Size:256	Owner:0x1ea6
+0
+Seg:6b1f	Size:256	Owner:0x1ea8
+0
+Seg:6c1f	Size:256	Owner:0x1eaa
+0
+Seg:6d1f	Size:256	Owner:0x1eac
+0
+Seg:6e1f	Size:256	Owner:0x1eae
+0
+Seg:6f1f	Size:256	Owner:0x1eb0
+0
+Seg:701f	Size:256	Owner:0x1eb2
+0
+Seg:711f	Size:256	Owner:0x1eb4
+0
+Seg:721f	Size:256	Owner:0x1eb6
+0
+Seg:731f	Size:256	Owner:0x1eb8
+0
+Seg:741f	Size:256	Owner:0x1eba
+0
+Seg:751f	Size:256	Owner:0x1ebc
+0
+Seg:761f	Size:256	Owner:0x1ebe
+0
+Seg:771f	Size:256	Owner:0x1ec0
+0
+Seg:781f	Size:256	Owner:0x1ec2
+0
+Seg:791f	Size:256	Owner:0x1ec4
+0
+Seg:7a1f	Size:256	Owner:0x1ec6
+0
+Seg:7b1f	Size:256	Owner:0x1ec8
+0
+Seg:7c1f	Size:256	Owner:0x1eca
+0
+Seg:7d1f	Size:256	Owner:0x1ecc
+0
+Seg:7e1f	Size:256	Owner:0x1ece
+0
+Seg:7f1f	Size:256	Owner:0x1ed0
+0
+Seg:801f	Size:256	Owner:0x1ed2
+0
+Seg:811f	Size:256	Owner:0x1ed4
+0
+Seg:821f	Size:256	Owner:0x1ed6
+0
+Seg:831f	Size:256	Owner:0x1ed8
+0
+Seg:841f	Size:256	Owner:0x1eda
+0
+Seg:851f	Size:256	Owner:0x1edc
+0
+Seg:861f	Size:256	Owner:0x1ede
+0
+Seg:871f	Size:256	Owner:0x1ee0
+0
+Seg:881f	Size:256	Owner:0x1ee2
+0
+Seg:891f	Size:256	Owner:0x1ee4
+0
+Seg:8a1f	Size:256	Owner:0x1ee6
+0
+Seg:8b1f	Size:256	Owner:0x1ee8
+0
+Seg:8c1f	Size:273	Owner:0x5fec
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+Seg:b71f	Size:18656	Owner:0x0
+
\ No newline at end of file
diff --git a/HEAP.16W b/HEAP.16W
new file mode 100755
index 00000000..a579fb53
--- /dev/null
+++ b/HEAP.16W
@@ -0,0 +1,36 @@
+
+	== near ==
+
+  USED block at 1714:f386 of size 12
+  USED block at 1714:f392 of size 322
+  USED block at 1714:f4d4 of size 52
+  USED block at 1714:f508 of size 20
+  USED block at 1714:f51c of size 20
+  USED block at 1714:f530 of size 20
+  USED block at 1714:f544 of size 20
+  USED block at 1714:f558 of size 20
+  FREE block at 1714:f56c of size 2704
+OK - end of heap
+
+	== far ==
+
+  USED block at 2715:0016 of size 136
+  FREE block at 2715:009e of size 18
+  USED block at 2715:00b0 of size 20
+  FREE block at 2715:00c4 of size 7992
+OK - end of heap
+
+Memory Type         Total      Used       Free
+----------------  --------   --------   --------
+Near		   3190		486	  2704
+Far		   8166		156	  8010
+----------------  --------   --------   --------
+HC_coreleft = 2702
+HC_farcoreleft = 35120
+HC_Newfarcoreleft = 0
+HC_GetFreeSize = 32436
+HC_GetNearFreeSize = 2704
+HC_GetFarFreeSize = 32436
+coreleft = 2702
+farcoreleft = 589840
+stackavail = 31498
diff --git a/MMDUMP.16W b/MMDUMP.16W
new file mode 100755
index 00000000..f9f91b32
Binary files /dev/null and b/MMDUMP.16W differ
diff --git a/bcexmm.dsk b/bcexmm.dsk
index b0e92853..44f458fe 100755
Binary files a/bcexmm.dsk and b/bcexmm.dsk differ
diff --git a/bcexmm.exe b/bcexmm.exe
index ad0e6412..986660a5 100755
Binary files a/bcexmm.exe and b/bcexmm.exe differ
diff --git a/bcexmm.prj b/bcexmm.prj
index c56c954c..74745a98 100755
Binary files a/bcexmm.prj and b/bcexmm.prj differ
diff --git a/exmmtest.l16 b/exmmtest.l16
new file mode 100755
index 00000000..e2380d92
--- /dev/null
+++ b/exmmtest.l16
@@ -0,0 +1,139 @@
+bakapee1[data/koishi~.pcx]
+bakapee2[data/test.map]
+
+
+press any key to continue!
+======================================load=====================================
+====================================load end===================================
+contents of the buffer
+[
+
+
+]
+
+yay!
+======================================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,
+         "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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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],
+         "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,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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],
+         "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!
+
+end==-25354
+
+
\ No newline at end of file
diff --git a/src/exmmtest.c b/src/exmmtest.c
index 3ab4e02e..d9af3401 100755
--- a/src/exmmtest.c
+++ b/src/exmmtest.c
@@ -22,7 +22,6 @@
 /*
 	exmm test
 */
-#include <malloc.h>		// for _memavl()
 #include "src/lib/16_head.h"
 #include "src/lib/16_tail.h"
 #include "src/lib/16_pm.h"
@@ -194,6 +193,9 @@ main(int argc, char *argv[])
 PRINTBB; KEYP
 								#endif
 
+	IN_Default(0,&gvar.player[0],ctrl_Keyboard1, &gvar);
+	IN_SetControlType(&gvar.player[0],ctrl_Keyboard1);
+
 	{
 	byte w;	word baka;
 	w=0;
@@ -325,8 +327,8 @@ PRINTBB; KEYP
 	printf("========================================\n");
 
 								#ifdef EXMMVERBOSE__
-	printf("coreleft():			%u\n", _memavl());
-	printf("farcoreleft():			%lu\n", (dword)HC_farcoreleft());
+	printf("coreleft():			%u\n", coreleft());
+	printf("farcoreleft():			%ld\n", farcoreleft());
 								#endif
 #ifdef __WATCOMC__
 //this is far	printf("Total free:			%lu\n", (dword)(HC_GetFreeSize()));
@@ -337,11 +339,11 @@ PRINTBB; KEYP
 	HC_heapdump(&gvar);
 //	segatesuto();
 #endif
-/*#ifdef __BORLANDC__
-	//printf("core left:			%lu\n", (dword)HC_coreleft());
-	//printf("far core left:			%lu\n", (dword)HC_farcoreleft());
-//	printf("\nfarcoreleft():			%lu\n", farcoreleft());
-#endif*/
+#ifdef __BORLANDC__
+//	printf("HC_coreleft:			%lu\n", (dword)HC_coreleft());
+//	printf("HC_farcoreleft:			%lu\n", (dword)HC_farcoreleft());
+//	printf("HC_Newfarcoreleft():		%lu\n", (dword)HC_Newfarcoreleft());
+#endif
 	printf("Project 16 ");
 #ifdef __WATCOMC__
 	printf("exmmtest");
diff --git a/src/lib/16_hc.c b/src/lib/16_hc.c
index 26fe6248..e730bb2f 100755
--- a/src/lib/16_hc.c
+++ b/src/lib/16_hc.c
@@ -28,10 +28,9 @@
 
 //from ftp://213.85.246.177/pub/FreeBSD/ports/archivers/arj/work/arj-3.10.22/environ.c
 //#ifdef __WATCOMC__
-#define FARCORELEFTPTR __huge
-long HC_farcoreleft()
+long HC_Newfarcoreleft()
 {
-	void FARCORELEFTPTR *hp;		static long rc=736L;	long s_rc;
+	void huge *hp;		static long rc=736L;	long s_rc;
 
 	s_rc=rc;	rc+=2L;
 	do
@@ -190,7 +189,7 @@ void far* HC_LargestFarFreeBlock(size_t* Size)
 	return p;
 }
 
-size_t HC_farcoreleft_(void)
+size_t HC_farcoreleft(void)
 {
 	size_t total = 0;
 	void far* pFirst = NULL;
@@ -493,13 +492,15 @@ fh_info._pentry, fh_info._size );*/
 	printmeminfoline(&scratch, "Near", nh_total, nh_used, nh_free);
 	printmeminfoline(&scratch, "Far", fh_total, fh_used, fh_free);
 	strcat(scratch,"----------------  --------   --------   --------\n");
-	strcat(scratch,"HC_coreleft = ");			ultoa((dword)HC_coreleft(),str,10);		strcat(scratch,str);	strcat(scratch,"\n");
-	strcat(scratch,"HC_farcoreleft = ");		ultoa((dword)HC_farcoreleft(),str,10);	strcat(scratch,str);	strcat(scratch,"\n");
+	strcat(scratch,"HC_coreleft = ");			ultoa((dword)HC_coreleft(),str,10);			strcat(scratch,str);	strcat(scratch,"\n");
+	strcat(scratch,"HC_farcoreleft = ");			ultoa((dword)HC_farcoreleft(),str,10);		strcat(scratch,str);	strcat(scratch,"\n");
+	strcat(scratch,"HC_Newfarcoreleft = ");			ultoa((dword)HC_Newfarcoreleft(),str,10);		strcat(scratch,str);	strcat(scratch,"\n");
 	strcat(scratch,"HC_GetFreeSize = ");		ultoa((dword)HC_GetFreeSize(),str,10);		strcat(scratch,str);	strcat(scratch,"\n");
 	strcat(scratch,"HC_GetNearFreeSize = ");	ultoa((dword)HC_GetNearFreeSize(),str,10);	strcat(scratch,str);	strcat(scratch,"\n");
 	strcat(scratch,"HC_GetFarFreeSize = "); 	ultoa((dword)HC_GetFarFreeSize(),str,10);	strcat(scratch,str);	strcat(scratch,"\n");
-	strcat(scratch,"memavl = ");			ultoa((dword)_memavl(),str,10);			strcat(scratch,str);	strcat(scratch,"\n");
-	strcat(scratch,"stackavail = ");		ultoa((dword)stackavail(),str,10);		strcat(scratch,str);	strcat(scratch,"\n");
+	strcat(scratch,"coreleft = ");				ultoa((dword)coreleft(),str,10);				strcat(scratch,str);	strcat(scratch,"\n");
+	strcat(scratch,"farcoreleft = ");			ultoa((dword)farcoreleft(),str,10);			strcat(scratch,str);	strcat(scratch,"\n");
+	strcat(scratch,"stackavail = ");			ultoa((dword)stackavail(),str,10);			strcat(scratch,str);	strcat(scratch,"\n");
 	write(gvar->handle.heaphandle,scratch,strlen(scratch));
 	HC_CloseDebug(gvar);
 }
@@ -583,7 +584,12 @@ void HC_CloseDebug(global_game_variables_t *gvar)
 unsigned long farcoreleft()
 {
 	_fheapgrow();
-	return HC_farcoreleft();
+	//return HC_farcoreleft();
+// #ifdef __BORLANDC__
+// 	r 0x90000UL-16UL
+// #endif
+
+	return 0x90000UL+16UL;
 }
 
 unsigned long coreleft()
diff --git a/src/lib/16_hc.h b/src/lib/16_hc.h
index 2974a3ac..7d362648 100755
--- a/src/lib/16_hc.h
+++ b/src/lib/16_hc.h
@@ -28,7 +28,7 @@
 
 #include "src/lib/16_head.h"
 
-long HC_farcoreleft();
+long HC_Newfarcoreleft();
 #ifdef __BORLANDC__
 void * HC_LargestFreeBlock(size_t* Size);
 #endif
@@ -37,7 +37,7 @@ void __near* HC_LargestFreeBlock(size_t* Size);
 #endif
 size_t HC_coreleft(void);
 void far* HC_LargestFarFreeBlock(size_t* Size);
-size_t HC_farcoreleft_(void);
+size_t HC_farcoreleft(void);
 /*void huge* LargestHugeFreeBlock(size_t* Size);
 size_t _hugecoreleft(void);
 void __based(__self)* LargestBasedFreeBlock(size_t* Size);
diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c
index c044ae47..333c3686 100755
--- a/src/lib/16_mm.c
+++ b/src/lib/16_mm.c
@@ -896,7 +896,7 @@ void MM_Startup (global_game_variables_t *gvar)
 //
 // get all available far conventional memory segments
 //
-	length=HC_farcoreleft();
+	length=farcoreleft();
 	start = gvar->mm.farheap = farmalloc(length);
 	length -= 16-(FP_OFF(start)&15);
 	length -= SAVEFARHEAP;
@@ -1345,6 +1345,15 @@ void MM_SortMem (global_game_variables_t *gvar)
 
 //==========================================================================
 
+#ifdef __BORLANDC__
+extern char global_temp_status_text[512];
+extern char global_temp_status_text2[512];
+#endif
+#ifdef __WATCOMC__
+//#define MMSMPANVID
+#define MMSMSCANINFO
+#endif
+
 /*
 =====================
 =
@@ -1353,11 +1362,6 @@ void MM_SortMem (global_game_variables_t *gvar)
 =====================
 */
 
-#ifdef __WATCOMC__
-//#define MMSMPANVID
-#define MMSMSCANINFO
-#endif
-
 void MM_ShowMemory (global_game_variables_t *gvar)
 {
 	mmblocktype far *scan;
@@ -1567,11 +1571,14 @@ void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword
 } mmblocktype;*/
 			//modexprint(page, x, y, t, tlsw, color, bgcolor, vidsw, const byte *str);
 #define MMSMPRINTMEMINFO modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 1, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8;
+#ifdef __WATCOMC__
 			if(gvar->video.VL_Started)
 			{
 				VL_ShowPage(&gvar->video.page[0], 1, 0);
 				modexClearRegion(&gvar->video.page[0], 0, 0, gvar->video.page[0].width, gvar->video.page[0].height, 8);
-			}else clrscr();
+			}else
+#endif
+				clrscr();
 			sprintf(global_temp_status_text, "block #%04u", qq); MMSMPRINTMEMINFO
 //			sprintf(global_temp_status_text, "%Fp", scaninfo[qq].scan->useptr); MMSMPRINTMEMINFO
 			sprintf(global_temp_status_text, "start:  %04x", (unsigned)scaninfo[qq].scan->start); MMSMPRINTMEMINFO
@@ -1592,6 +1599,7 @@ void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword
 			{
 				printf("%s", scratch1);
 				printf("%s", AAGREY); printf("_");
+				if(scaninfo[qq].scan->length<64000)
 				for(w=(scaninfo[qq].scan->start)/80;w<=end/80;w++)
 				{
 					//strcat(scratch1, "+");
diff --git a/src/lib/16_tail_.c b/src/lib/16_tail_.c
index 567a4f18..7a7b0793 100755
--- a/src/lib/16_tail_.c
+++ b/src/lib/16_tail_.c
@@ -86,7 +86,7 @@ void TL_DosLibStartup(global_game_variables_t *gvar)
 
 void	TL_VidInit(global_game_variables_t *gvar)
 {
-	start_timer(gvar);
+	start_timer(gvar);	//i do not remeber why this is here wwww i think it should be somewhere else www
 
 	if(!gvar->DLStarted) TL_DosLibStartup(gvar);
 
diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h
index f7db2a7a..3c7bc559 100755
--- a/src/lib/scroll16.h
+++ b/src/lib/scroll16.h
@@ -42,8 +42,7 @@
 #define SPRITE
 //#define TILERENDER
 
-//0000
-#define SHOWFPS
+//0000#define SHOWFPS
 //#define OLDWALKSHOWPAGESTUFF