]> 4ch.mooo.com Git - 16.git/commitdiff
NULL pageframe detection added for EMM386 memory manager failing to assign one
authorsparky4 <sparky4@cock.li>
Wed, 1 Mar 2017 02:49:17 +0000 (20:49 -0600)
committersparky4 <sparky4@cock.li>
Wed, 1 Mar 2017 02:49:17 +0000 (20:49 -0600)
DEBUG.16W
HEAP.16W
MEMINFO.16W [new file with mode: 0755]
MMDUMP.16W
src/lib/16_dbg.h
src/lib/16_mm.c
src/lib/16_pm.c
src/lib/16_pm.h

index 871f4d0a6280519ac4745d165db4004302ba16ef..ce787d0785c5621c684251d17b86387d4e90f85a 100755 (executable)
--- a/DEBUG.16W
+++ b/DEBUG.16W
-\e[0mSeg:0      Size:9249       Owner:0x0\r
-\e[41;31m++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m\e[42;32m0000\r
-\e[0m\e[0mSeg:2501       Size:39 Owner:0x0\r
-\e[41;31m+\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2528       Size:256        Owner:0x1dc4\r
-\e[44;34m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2628       Size:256        Owner:0x1bb6\r
+\e[0mSeg:0      Size:9022       Owner:0x0\r
+\e[41;31m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m\e[42;32m0000\r
+\e[0m\e[0mSeg:242e       Size:39 Owner:0x0\r
+\e[41;31m++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2455       Size:256        Owner:0x1dc4\r
+\e[44;34m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2555       Size:256        Owner:0x1bb6\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2728       Size:256        Owner:0x1bb8\r
+\e[0m\e[0mSeg:2655       Size:256        Owner:0x1bb8\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2828       Size:256        Owner:0x1bba\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2928       Size:256        Owner:0x1bbc\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2a28       Size:256        Owner:0x1bbe\r
+\e[0m\e[0mSeg:2755       Size:256        Owner:0x1bba\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2b28       Size:256        Owner:0x1bc0\r
+\e[0m\e[0mSeg:2855       Size:256        Owner:0x1bbc\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2c28       Size:256        Owner:0x1bc2\r
+\e[0m\e[0mSeg:2955       Size:256        Owner:0x1bbe\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2d28       Size:256        Owner:0x1bc4\r
+\e[0m\e[0mSeg:2a55       Size:256        Owner:0x1bc0\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2e28       Size:256        Owner:0x1bc6\r
+\e[0m\e[0mSeg:2b55       Size:256        Owner:0x1bc2\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2f28       Size:256        Owner:0x1bc8\r
+\e[0m\e[0mSeg:2c55       Size:256        Owner:0x1bc4\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3028       Size:256        Owner:0x1bca\r
+\e[0m\e[0mSeg:2d55       Size:256        Owner:0x1bc6\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3128       Size:256        Owner:0x1bcc\r
+\e[0m\e[0mSeg:2e55       Size:256        Owner:0x1bc8\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3228       Size:256        Owner:0x1bce\r
+\e[0m\e[0mSeg:2f55       Size:256        Owner:0x1bca\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3328       Size:256        Owner:0x1bd0\r
+\e[0m\e[0mSeg:3055       Size:256        Owner:0x1bcc\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3428       Size:256        Owner:0x1bd2\r
+\e[0m\e[0mSeg:3155       Size:256        Owner:0x1bce\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3528       Size:256        Owner:0x1bd4\r
+\e[0m\e[0mSeg:3255       Size:256        Owner:0x1bd0\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3628       Size:256        Owner:0x1bd6\r
+\e[0m\e[0mSeg:3355       Size:256        Owner:0x1bd2\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3728       Size:256        Owner:0x1bd8\r
+\e[0m\e[0mSeg:3455       Size:256        Owner:0x1bd4\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3828       Size:256        Owner:0x1bda\r
+\e[0m\e[0mSeg:3555       Size:256        Owner:0x1bd6\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3928       Size:256        Owner:0x1bdc\r
+\e[0m\e[0mSeg:3655       Size:256        Owner:0x1bd8\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3a28       Size:256        Owner:0x1bde\r
+\e[0m\e[0mSeg:3755       Size:256        Owner:0x1bda\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3b28       Size:256        Owner:0x1be0\r
+\e[0m\e[0mSeg:3855       Size:256        Owner:0x1bdc\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3c28       Size:256        Owner:0x1be2\r
+\e[0m\e[0mSeg:3955       Size:256        Owner:0x1bde\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3d28       Size:256        Owner:0x1be4\r
+\e[0m\e[0mSeg:3a55       Size:256        Owner:0x1be0\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3e28       Size:256        Owner:0x1be6\r
+\e[0m\e[0mSeg:3b55       Size:256        Owner:0x1be2\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3f28       Size:256        Owner:0x1be8\r
+\e[0m\e[0mSeg:3c55       Size:256        Owner:0x1be4\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4028       Size:256        Owner:0x1bea\r
+\e[0m\e[0mSeg:3d55       Size:256        Owner:0x1be6\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4128       Size:256        Owner:0x1bec\r
+\e[0m\e[0mSeg:3e55       Size:256        Owner:0x1be8\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4228       Size:256        Owner:0x1bee\r
+\e[0m\e[0mSeg:3f55       Size:256        Owner:0x1bea\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4328       Size:256        Owner:0x1bf0\r
+\e[0m\e[0mSeg:4055       Size:256        Owner:0x1bec\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4428       Size:256        Owner:0x1bf2\r
+\e[0m\e[0mSeg:4155       Size:256        Owner:0x1bee\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4528       Size:256        Owner:0x1bf4\r
+\e[0m\e[0mSeg:4255       Size:256        Owner:0x1bf0\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4628       Size:256        Owner:0x1bf6\r
+\e[0m\e[0mSeg:4355       Size:256        Owner:0x1bf2\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4728       Size:256        Owner:0x1bf8\r
+\e[0m\e[0mSeg:4455       Size:256        Owner:0x1bf4\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4828       Size:256        Owner:0x1bfa\r
+\e[0m\e[0mSeg:4555       Size:256        Owner:0x1bf6\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4928       Size:256        Owner:0x1bfc\r
+\e[0m\e[0mSeg:4655       Size:256        Owner:0x1bf8\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4a28       Size:256        Owner:0x1bfe\r
+\e[0m\e[0mSeg:4755       Size:256        Owner:0x1bfa\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4b28       Size:256        Owner:0x1c00\r
+\e[0m\e[0mSeg:4855       Size:256        Owner:0x1bfc\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4c28       Size:256        Owner:0x1c02\r
+\e[0m\e[0mSeg:4955       Size:256        Owner:0x1bfe\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4d28       Size:256        Owner:0x1c04\r
+\e[0m\e[0mSeg:4a55       Size:256        Owner:0x1c00\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4e28       Size:256        Owner:0x1c06\r
+\e[0m\e[0mSeg:4b55       Size:256        Owner:0x1c02\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4f28       Size:256        Owner:0x1c08\r
+\e[0m\e[0mSeg:4c55       Size:256        Owner:0x1c04\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5028       Size:256        Owner:0x1c0a\r
+\e[0m\e[0mSeg:4d55       Size:256        Owner:0x1c06\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5128       Size:256        Owner:0x1c0c\r
+\e[0m\e[0mSeg:4e55       Size:256        Owner:0x1c08\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5228       Size:256        Owner:0x1c0e\r
+\e[0m\e[0mSeg:4f55       Size:256        Owner:0x1c0a\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5328       Size:256        Owner:0x1c10\r
+\e[0m\e[0mSeg:5055       Size:256        Owner:0x1c0c\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5428       Size:256        Owner:0x1c12\r
+\e[0m\e[0mSeg:5155       Size:256        Owner:0x1c0e\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5528       Size:256        Owner:0x1c14\r
+\e[0m\e[0mSeg:5255       Size:256        Owner:0x1c10\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5628       Size:256        Owner:0x1c16\r
+\e[0m\e[0mSeg:5355       Size:256        Owner:0x1c12\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5728       Size:256        Owner:0x1c18\r
+\e[0m\e[0mSeg:5455       Size:256        Owner:0x1c14\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5828       Size:256        Owner:0x1c1a\r
+\e[0m\e[0mSeg:5555       Size:256        Owner:0x1c16\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5928       Size:256        Owner:0x1c1c\r
+\e[0m\e[0mSeg:5655       Size:256        Owner:0x1c18\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5a28       Size:256        Owner:0x1c1e\r
+\e[0m\e[0mSeg:5755       Size:256        Owner:0x1c1a\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5b28       Size:256        Owner:0x1c20\r
+\e[0m\e[0mSeg:5855       Size:256        Owner:0x1c1c\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5c28       Size:256        Owner:0x1c22\r
+\e[0m\e[0mSeg:5955       Size:256        Owner:0x1c1e\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5d28       Size:256        Owner:0x1c24\r
+\e[0m\e[0mSeg:5a55       Size:256        Owner:0x1c20\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5e28       Size:256        Owner:0x1c26\r
+\e[0m\e[0mSeg:5b55       Size:256        Owner:0x1c22\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5f28       Size:256        Owner:0x1c28\r
+\e[0m\e[0mSeg:5c55       Size:256        Owner:0x1c24\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6028       Size:256        Owner:0x1c2a\r
+\e[0m\e[0mSeg:5d55       Size:256        Owner:0x1c26\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6128       Size:256        Owner:0x1c2c\r
+\e[0m\e[0mSeg:5e55       Size:256        Owner:0x1c28\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6228       Size:256        Owner:0x1c2e\r
+\e[0m\e[0mSeg:5f55       Size:256        Owner:0x1c2a\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6328       Size:256        Owner:0x1c30\r
+\e[0m\e[0mSeg:6055       Size:256        Owner:0x1c2c\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6428       Size:256        Owner:0x1c32\r
+\e[0m\e[0mSeg:6155       Size:256        Owner:0x1c2e\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6528       Size:256        Owner:0x1c34\r
+\e[0m\e[0mSeg:6255       Size:256        Owner:0x1c30\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6628       Size:256        Owner:0x1c36\r
+\e[0m\e[0mSeg:6355       Size:256        Owner:0x1c32\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6728       Size:256        Owner:0x1c38\r
+\e[0m\e[0mSeg:6455       Size:256        Owner:0x1c34\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6828       Size:256        Owner:0x1c3a\r
+\e[0m\e[0mSeg:6555       Size:256        Owner:0x1c36\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6928       Size:256        Owner:0x1c3c\r
+\e[0m\e[0mSeg:6655       Size:256        Owner:0x1c38\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6a28       Size:256        Owner:0x1c3e\r
+\e[0m\e[0mSeg:6755       Size:256        Owner:0x1c3a\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6b28       Size:256        Owner:0x1c40\r
+\e[0m\e[0mSeg:6855       Size:256        Owner:0x1c3c\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6c28       Size:256        Owner:0x1c42\r
+\e[0m\e[0mSeg:6955       Size:256        Owner:0x1c3e\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6d28       Size:256        Owner:0x1c44\r
+\e[0m\e[0mSeg:6a55       Size:256        Owner:0x1c40\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6e28       Size:256        Owner:0x1c46\r
+\e[0m\e[0mSeg:6b55       Size:256        Owner:0x1c42\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6f28       Size:256        Owner:0x1c48\r
+\e[0m\e[0mSeg:6c55       Size:256        Owner:0x1c44\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7028       Size:256        Owner:0x1c4a\r
+\e[0m\e[0mSeg:6d55       Size:256        Owner:0x1c46\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7128       Size:256        Owner:0x1c4c\r
+\e[0m\e[0mSeg:6e55       Size:256        Owner:0x1c48\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7228       Size:256        Owner:0x1c4e\r
+\e[0m\e[0mSeg:6f55       Size:256        Owner:0x1c4a\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7328       Size:256        Owner:0x1c50\r
+\e[0m\e[0mSeg:7055       Size:256        Owner:0x1c4c\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7428       Size:256        Owner:0x1c52\r
+\e[0m\e[0mSeg:7155       Size:256        Owner:0x1c4e\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7528       Size:256        Owner:0x1c54\r
+\e[0m\e[0mSeg:7255       Size:256        Owner:0x1c50\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7628       Size:256        Owner:0x1c56\r
+\e[0m\e[0mSeg:7355       Size:256        Owner:0x1c52\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7728       Size:256        Owner:0x1c58\r
+\e[0m\e[0mSeg:7455       Size:256        Owner:0x1c54\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7828       Size:256        Owner:0x1c5a\r
+\e[0m\e[0mSeg:7555       Size:256        Owner:0x1c56\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7928       Size:256        Owner:0x1c5c\r
+\e[0m\e[0mSeg:7655       Size:256        Owner:0x1c58\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7a28       Size:256        Owner:0x1c5e\r
+\e[0m\e[0mSeg:7755       Size:256        Owner:0x1c5a\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7b28       Size:256        Owner:0x1c60\r
+\e[0m\e[0mSeg:7855       Size:256        Owner:0x1c5c\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7c28       Size:256        Owner:0x1c62\r
+\e[0m\e[0mSeg:7955       Size:256        Owner:0x1c5e\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7d28       Size:256        Owner:0x1c64\r
+\e[0m\e[0mSeg:7a55       Size:256        Owner:0x1c60\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7e28       Size:256        Owner:0x1c66\r
+\e[0m\e[0mSeg:7b55       Size:256        Owner:0x1c62\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7f28       Size:256        Owner:0x1c68\r
+\e[0m\e[0mSeg:7c55       Size:256        Owner:0x1c64\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8028       Size:256        Owner:0x1c6a\r
+\e[0m\e[0mSeg:7d55       Size:256        Owner:0x1c66\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8128       Size:256        Owner:0x1c6c\r
+\e[0m\e[0mSeg:7e55       Size:256        Owner:0x1c68\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8228       Size:256        Owner:0x1c6e\r
+\e[0m\e[0mSeg:7f55       Size:256        Owner:0x1c6a\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8328       Size:256        Owner:0x1c70\r
+\e[0m\e[0mSeg:8055       Size:256        Owner:0x1c6c\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8428       Size:256        Owner:0x1c72\r
+\e[0m\e[0mSeg:8155       Size:256        Owner:0x1c6e\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8528       Size:256        Owner:0x1c74\r
+\e[0m\e[0mSeg:8255       Size:256        Owner:0x1c70\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8628       Size:256        Owner:0x1c76\r
+\e[0m\e[0mSeg:8355       Size:256        Owner:0x1c72\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8728       Size:256        Owner:0x1c78\r
+\e[0m\e[0mSeg:8455       Size:256        Owner:0x1c74\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8828       Size:256        Owner:0x1c7a\r
+\e[0m\e[0mSeg:8555       Size:256        Owner:0x1c76\r
 \e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8928       Size:256        Owner:0x1c7c\r
+\e[0m\e[0mSeg:8655       Size:256        Owner:0x1c78\r
 \e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:9d67       Size:25240      Owner:0x0\r
-\e[41;31m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m
\ No newline at end of file
+\e[0m\e[0mSeg:8755       Size:256        Owner:0x1c7a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8855       Size:256        Owner:0x1c7c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8955       Size:273        Owner:0x1b88\r
+\e[44;34m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:9d94       Size:25195      Owner:0x0\r
+\e[41;31m++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m
\ No newline at end of file
index fb3acb4bbc4c8893e07e50c4cfdcdfdee3b9c57b..6f9a21a60de6619c5ca6730a082d6f578cefd5fb 100755 (executable)
--- a/HEAP.16W
+++ b/HEAP.16W
@@ -1,45 +1,47 @@
 \r
        == default ==\r
 \r
-  USED block at 25230016 of size 26\r
-  FREE block at 25230030 of size 34844\r
-  USED block at 2523884c of size 136\r
-  USED block at 252388d4 of size 20\r
-  FREE block at 252388e8 of size 7972\r
+  USED block at 24500016 of size 26\r
+  USED block at 24500030 of size 26\r
+  FREE block at 2450004a of size 38914\r
+  USED block at 2450984c of size 136\r
+  USED block at 245098d4 of size 20\r
+  FREE block at 245098e8 of size 7972\r
 OK - end of heap\r
 \r
        == near ==\r
 \r
-  USED block at 1522ecf6 of size 16\r
-  USED block at 1522ed06 of size 566\r
-  USED block at 1522ef3c of size 72\r
-  USED block at 1522ef84 of size 20\r
-  USED block at 1522ef98 of size 20\r
-  USED block at 1522efac of size 20\r
-  USED block at 1522efc0 of size 20\r
-  USED block at 1522efd4 of size 20\r
-  USED block at 1522efe8 of size 4116\r
+  USED block at 144fecf6 of size 12\r
+  USED block at 144fed02 of size 332\r
+  USED block at 144fee4e of size 52\r
+  USED block at 144fee82 of size 20\r
+  USED block at 144fee96 of size 20\r
+  USED block at 144feeaa of size 20\r
+  USED block at 144feebe of size 20\r
+  USED block at 144feed2 of size 20\r
+  USED block at 144feee6 of size 4374\r
 OK - end of heap\r
 \r
        == far ==\r
 \r
-  USED block at 25230016 of size 26\r
-  USED block at 25230030 of size 34844\r
-  USED block at 2523884c of size 136\r
-  USED block at 252388d4 of size 20\r
-  USED block at 252388e8 of size 7972\r
+  USED block at 24500016 of size 26\r
+  USED block at 24500030 of size 26\r
+  USED block at 2450004a of size 38914\r
+  USED block at 2450984c of size 136\r
+  USED block at 245098d4 of size 20\r
+  USED block at 245098e8 of size 7972\r
 OK - end of heap\r
 \r
 Memory Type         Total      Used       Free\r
 ----------------  --------   --------   --------\r
-Default                   42998        182       42816\r
-Near              4870         738       4132\r
-Far               42998        182       42816\r
+Default                   47094        208       46886\r
+Near              4870         496       4374\r
+Far               47094        208       46886\r
 ----------------  --------   --------   --------\r
-HC_coreleft = 4128\r
+HC_coreleft = 4372\r
 HC_farcoreleft = 458752\r
-HC_GetFreeSize = 42816\r
-HC_GetNearFreeSize = 4132\r
-HC_GetFarFreeSize = 42816\r
-memavl = 4128\r
-stackavail = 31605\r
+HC_GetFreeSize = 46886\r
+HC_GetNearFreeSize = 4374\r
+HC_GetFarFreeSize = 46886\r
+memavl = 4372\r
+stackavail = 31606\r
diff --git a/MEMINFO.16W b/MEMINFO.16W
new file mode 100755 (executable)
index 0000000..e69de29
index a8c901b28eb1453a2e896c5840cdcf45edea8138..5b3efb037b02f9061a5e44b80436f9414d4eda4e 100755 (executable)
Binary files a/MMDUMP.16W and b/MMDUMP.16W differ
index 61bbff8b40ddda0e741121a3976dd9558bd276db..3d7ef4afe9690e4912e3f18cf8d7af65d1a44c59 100755 (executable)
@@ -10,7 +10,7 @@
 #define __DEBUG_InputMgr__\r
 #define __DEBUG_MAP__\r
 //#define __DEBUG_CA__\r
-#define __DEBUG_PM__\r
+//#define __DEBUG_PM__\r
 //#define __DEBUG_MM__\r
 \r
 \r
index 5f8bb38e47aea4972ccb5a68bf77bdc68ea60d30..67059b39c245d74d1123270f8e2bb4f019b87adf 100755 (executable)
@@ -88,7 +88,8 @@ static        char *ParmStringsexmm[] = {"noems","noxms",""};
 
 boolean MML_CheckForEMS(void)
 {
-       boolean emmcfems=0;
+       boolean emmcfems = false;
+       word            EMSPageFrame = 0;
        static char     emmname[] = "EMMXXXX0"; //fix by andrius4669
        __asm {
                mov     dx,OFFSET emmname       //fix by andrius4669
@@ -115,11 +116,21 @@ boolean MML_CheckForEMS(void)
                mov     ah,0x3e
                int     0x21            // close handle
                jc      error
+
+               //
+               // pageframe check
+               //
+               mov     ah,EMS_GETFRAME
+               int     EMS_INT                 // find the page frame address
+               or      ah,ah
+               jnz     error
+               mov     [EMSPageFrame],bx
+
                //
                // EMS is good
                //
-               mov     emmcfems,1
-               jmp End
+               mov     emmcfems,1
+               jmp     End
 #ifdef __BORLANDC__
        }
 #endif
@@ -130,7 +141,7 @@ boolean MML_CheckForEMS(void)
                //
                // EMS is bad
                //
-               mov     emmcfems,0
+               mov     emmcfems,0
 #ifdef __BORLANDC__
        }
 #endif
@@ -138,6 +149,17 @@ boolean MML_CheckForEMS(void)
 #ifdef __WATCOMC__
        }
 #endif
+
+       //
+       // Pageframe switch to determine if there is one!
+       //
+       if(!EMSPageFrame)
+       {
+               emmcfems = false;
+#if defined(__DEBUG_PM__) || defined(__DEBUG_MM__)
+               printf("MML_CheckForEMS: EMS error No Pageframe!\nAddress detected to be %04x\n", EMSPageFrame);
+#endif
+       }
        return(emmcfems);
 }
 
index 03df02377c4c8e6c20d801e6b12ccfcefc5f811d..f4e150822cfcbd2de679684a4a82fa23705a2315 100755 (executable)
@@ -158,57 +158,45 @@ boolean
 PML_StartupEMS(global_game_variables_t *gvar)\r
 {\r
        int             i;\r
-       //long  size;\r
+#ifdef __PM__NOHOGEMS__\r
+       long    size;\r
+#endif\r
        byte    err=0, str[64];\r
 \r
        boolean errorflag=false;\r
        static char     emmname[] = "EMMXXXX0"; //fix by andrius4669\r
-       unsigned int EMSVer = 0;\r
-       unsigned        totalEMSpages,freeEMSpages,EMSPageFrame,EMSHandle=0,EMSAvail=0;\r
-#ifdef __DEBUG_PM__\r
-       word e=0;\r
-#endif\r
-       totalEMSpages = freeEMSpages = EMSPageFrame = 0;\r
+       unsigned        EMSVer;\r
+       unsigned        totalEMSpages,freeEMSpages,EMSPageFrame,EMSHandle,EMSAvail;\r
+       totalEMSpages = freeEMSpages = EMSPageFrame = EMSHandle = EMSAvail = EMSVer = 0;        // set all to 0~\r
        gvar->pm.emm.EMSPresent = false;                        // Assume that we'll fail\r
-       gvar->pm.emm.EMSAvail = 0;\r
-       gvar->mmi.EMSmem = 0;\r
+       gvar->pm.emm.EMSAvail = gvar->mmi.EMSmem = 0;\r
 \r
        __asm {\r
                mov     dx,OFFSET emmname       //fix by andrius4669\r
                mov     ax,0x3d00\r
                int     EMM_INT         // try to open EMMXXXX0 device\r
                jc      error1\r
-#ifdef __DEBUG_PM__\r
-               add     e,1\r
-#endif\r
+\r
                mov     bx,ax\r
                mov     ax,0x4400\r
 \r
                int     EMM_INT         // get device info\r
                jc      error1\r
-#ifdef __DEBUG_PM__\r
-               add     e,1\r
-#endif\r
+\r
                and     dx,0x80\r
                jz      error1\r
-#ifdef __DEBUG_PM__\r
-               add     e,1\r
-#endif\r
+\r
                mov     ax,0x4407\r
 \r
                int     EMM_INT         // get status\r
                jc      error1\r
                or      al,al\r
                jz      error1\r
-#ifdef __DEBUG_PM__\r
-               add     e,1\r
-#endif\r
+\r
                mov     ah,0x3e\r
                int     EMM_INT         // close handle\r
                jc      error1\r
-#ifdef __DEBUG_PM__\r
-               add     e,1\r
-#endif\r
+\r
                mov     ah,EMS_STATUS\r
                int     EMS_INT\r
                jc      error1                  // make sure EMS hardware is present\r
@@ -217,7 +205,7 @@ PML_StartupEMS(global_game_variables_t *gvar)
                int     EMS_INT                 // only work on EMS 3.2 or greater (silly, but...)\r
                or      ah,ah\r
                jnz     error1\r
-               mov     [EMSVer],ax             //      set EMSVer\r
+               mov     [EMSVer],ax             // set EMSVer\r
                cmp     al,0x32                 // only work on ems 3.2 or greater\r
                jb      error1\r
 \r
@@ -238,20 +226,17 @@ PML_StartupEMS(global_game_variables_t *gvar)
                mov     [totalEMSpages],dx\r
                mov     [freeEMSpages],bx\r
                mov     [EMSAvail],bx\r
-               jmp End1\r
+               jmp     End1\r
 #ifdef __BORLANDC__\r
        }\r
 #endif\r
        error1:\r
 #ifdef __BORLANDC__\r
        __asm {\r
-#endif\r
-#ifdef __DEBUG_PM__\r
-               mov     e,1\r
 #endif\r
                mov     err,ah\r
                mov     errorflag,1\r
-               jmp End1\r
+               jmp     End1\r
 #ifdef __BORLANDC__\r
        }\r
 #endif\r
@@ -260,7 +245,7 @@ End1:
 #ifdef __WATCOMC__\r
        }\r
 #endif\r
-/*\r
+#ifdef __PM__NOHOGEMS__\r
        if(errorflag==false)\r
        {\r
                // Don't hog all available EMS\r
@@ -271,7 +256,7 @@ End1:
                        gvar->pm.emm.EMSAvail = size / EMSPageSize;\r
                }\r
        }\r
-*/\r
+#endif\r
        __asm {\r
                mov     ah,EMS_ALLOCPAGES\r
                mov     bx,[EMSAvail];\r
@@ -286,41 +271,29 @@ End1:
        error2:\r
 #ifdef __BORLANDC__\r
        __asm {\r
-#endif\r
-#ifdef __DEBUG_PM__\r
-               mov     e,1\r
 #endif\r
                mov     err,ah\r
                mov     errorflag,1\r
-               jmp End2\r
+               jmp     End2\r
 #ifdef __BORLANDC__\r
-       }\r
+       }//end of assembly\r
 #endif\r
 End2:\r
 #ifdef __WATCOMC__\r
-       }\r
+       }//end of assembly\r
 #endif\r
-\r
-       if(errorflag==false)\r
-       {\r
-       gvar->mmi.EMSmem = EMSAvail * (dword)EMSPageSize;\r
-\r
-       // Initialize EMS mapping cache\r
-       for (i = 0;i < EMSFrameCount;i++)\r
-               gvar->pm.emm.EMSList[i].baseEMSPage = -1;\r
-\r
-       }\r
-       else\r
+       if(errorflag==true)\r
        {\r
                strcpy(str,"PML_StartupEMS: EMS error ");\r
                MM_EMSerr(str, err);\r
                printf("%s\n",str);\r
-#ifdef __DEBUG_PM__\r
-               printf("e=%u\n", e);\r
-               getch();\r
-#endif\r
                return(gvar->pm.emm.EMSPresent);\r
        }\r
+       gvar->mmi.EMSmem = EMSAvail * (dword)EMSPageSize;\r
+\r
+       // Initialize EMS mapping cache\r
+       for (i = 0;i < EMSFrameCount;i++)\r
+               gvar->pm.emm.EMSList[i].baseEMSPage = -1;\r
 \r
        gvar->pm.emm.EMSPresent = true;                 // We have EMS\r
        gvar->pm.emm.EMSPageFrame = EMSPageFrame;\r
index 2ce5fc10c6c3545b6d5a2982225b2a36c4bb3135..bdf29a5d90544090991ec04e79c1373116a496fc 100755 (executable)
@@ -34,6 +34,7 @@
 #include "src/lib/16_ca.h"\r
 #include <dos.h>\r
 \r
+//#define __PM__NOHOGEMS__\r
 /*//   NOTE! PMPageSize must be an even divisor of EMSPageSize, and >= 1024\r
 #define        EMSPageSize             16384\r
 #define        EMSPageSizeSeg  (EMSPageSize >> 4)\r