+++ /dev/null
-\e[0mSeg:0 Size:8351 Owner:0x0\r
-\e[41;31m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m\e[0mSeg:209f Size:256 Owner:0x5dfc\r
-\e[44;34m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:21cd Size:76 Owner:0x0\r
-\e[41;31m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2219 Size:256 Owner:0x1c32\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2319 Size:256 Owner:0x1c34\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2419 Size:256 Owner:0x1c36\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2519 Size:256 Owner:0x1c38\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2619 Size:256 Owner:0x1c3a\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2719 Size:256 Owner:0x1c3c\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2819 Size:256 Owner:0x1c3e\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2919 Size:256 Owner:0x1c40\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2a19 Size:256 Owner:0x1c42\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2b19 Size:256 Owner:0x1c44\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2c19 Size:256 Owner:0x1c46\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2d19 Size:256 Owner:0x1c48\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2e19 Size:256 Owner:0x1c4a\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:2f19 Size:256 Owner:0x1c4c\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3019 Size:256 Owner:0x1c4e\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3119 Size:256 Owner:0x1c50\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3219 Size:256 Owner:0x1c52\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3319 Size:256 Owner:0x1c54\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3419 Size:256 Owner:0x1c56\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3519 Size:256 Owner:0x1c58\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3619 Size:256 Owner:0x1c5a\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3719 Size:256 Owner:0x1c5c\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3819 Size:256 Owner:0x1c5e\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3919 Size:256 Owner:0x1c60\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3a19 Size:256 Owner:0x1c62\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3b19 Size:256 Owner:0x1c64\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3c19 Size:256 Owner:0x1c66\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3d19 Size:256 Owner:0x1c68\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3e19 Size:256 Owner:0x1c6a\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:3f19 Size:256 Owner:0x1c6c\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4019 Size:256 Owner:0x1c6e\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4119 Size:256 Owner:0x1c70\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4219 Size:256 Owner:0x1c72\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4319 Size:256 Owner:0x1c74\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4419 Size:256 Owner:0x1c76\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4519 Size:256 Owner:0x1c78\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4619 Size:256 Owner:0x1c7a\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4719 Size:256 Owner:0x1c7c\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4819 Size:256 Owner:0x1c7e\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4919 Size:256 Owner:0x1c80\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4a19 Size:256 Owner:0x1c82\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4b19 Size:256 Owner:0x1c84\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4c19 Size:256 Owner:0x1c86\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4d19 Size:256 Owner:0x1c88\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4e19 Size:256 Owner:0x1c8a\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:4f19 Size:256 Owner:0x1c8c\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5019 Size:256 Owner:0x1c8e\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5119 Size:256 Owner:0x1c90\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5219 Size:256 Owner:0x1c92\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5319 Size:256 Owner:0x1c94\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5419 Size:256 Owner:0x1c96\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5519 Size:256 Owner:0x1c98\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5619 Size:256 Owner:0x1c9a\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5719 Size:256 Owner:0x1c9c\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5819 Size:256 Owner:0x1c9e\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5919 Size:256 Owner:0x1ca0\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5a19 Size:256 Owner:0x1ca2\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5b19 Size:256 Owner:0x1ca4\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5c19 Size:256 Owner:0x1ca6\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5d19 Size:256 Owner:0x1ca8\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5e19 Size:256 Owner:0x1caa\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:5f19 Size:256 Owner:0x1cac\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6019 Size:256 Owner:0x1cae\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6119 Size:256 Owner:0x1cb0\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6219 Size:256 Owner:0x1cb2\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6319 Size:256 Owner:0x1cb4\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6419 Size:256 Owner:0x1cb6\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6519 Size:256 Owner:0x1cb8\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6619 Size:256 Owner:0x1cba\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6719 Size:256 Owner:0x1cbc\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6819 Size:256 Owner:0x1cbe\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6919 Size:256 Owner:0x1cc0\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6a19 Size:256 Owner:0x1cc2\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6b19 Size:256 Owner:0x1cc4\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6c19 Size:256 Owner:0x1cc6\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6d19 Size:256 Owner:0x1cc8\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6e19 Size:256 Owner:0x1cca\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:6f19 Size:256 Owner:0x1ccc\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7019 Size:256 Owner:0x1cce\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7119 Size:256 Owner:0x1cd0\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7219 Size:256 Owner:0x1cd2\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7319 Size:256 Owner:0x1cd4\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7419 Size:256 Owner:0x1cd6\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7519 Size:256 Owner:0x1cd8\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7619 Size:256 Owner:0x1cda\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7719 Size:256 Owner:0x1cdc\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7819 Size:256 Owner:0x1cde\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7919 Size:256 Owner:0x1ce0\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7a19 Size:256 Owner:0x1ce2\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7b19 Size:256 Owner:0x1ce4\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7c19 Size:256 Owner:0x1ce6\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7d19 Size:256 Owner:0x1ce8\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7e19 Size:256 Owner:0x1cea\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:7f19 Size:256 Owner:0x1cec\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:8019 Size:256 Owner:0x1cee\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:8119 Size:256 Owner:0x1cf0\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:8219 Size:256 Owner:0x1cf2\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:8319 Size:256 Owner:0x1cf4\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:8419 Size:256 Owner:0x1cf6\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:8519 Size:256 Owner:0x1cf8\r
-\e[45;35m\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:8619 Size:273 Owner:0x5dfc\r
-\e[44;34m\e[0m\e[42;32m00000000000000000000000000000000000000000000000000000000000000000000000000\r
-\e[0m\e[0mSeg:9e04 Size:25083 Owner:0x0\r
-\e[41;31m\e[0m
\ No newline at end of file
+++ /dev/null
-\r
- == near ==\r
-\r
- USED block at 120e:e726 of size 12\r
- USED block at 120e:e732 of size 322\r
- USED block at 120e:e874 of size 52\r
- USED block at 120e:e8a8 of size 20\r
- USED block at 120e:e8bc of size 20\r
- USED block at 120e:e8d0 of size 20\r
- USED block at 120e:e8e4 of size 20\r
- USED block at 120e:e8f8 of size 20\r
- FREE block at 120e:e90c of size 5872\r
-OK - end of heap\r
-\r
- == far ==\r
-\r
- USED block at 220f:0016 of size 136\r
- FREE block at 220f:009e of size 48840\r
- USED block at 220f:bf66 of size 20\r
- FREE block at 220f:bf7a of size 16514\r
- FREE block at 3210:0016 of size 65510\r
- FREE block at 4211:0016 of size 65510\r
- FREE block at 5212:0016 of size 65510\r
- FREE block at 6213:0016 of size 65510\r
- FREE block at 7214:0016 of size 65510\r
- FREE block at 8215:0016 of size 65510\r
- FREE block at 9216:0016 of size 49174\r
-OK - end of heap\r
-\r
-Memory Type Total Used Free\r
----------------- -------- -------- --------\r
-Near 6358 486 5872\r
-Far 48992 156 48836\r
----------------- -------- -------- --------\r
-HC_coreleft = 5870\r
-HC_farcoreleft = 513440\r
-coreleft = 5870\r
-farcoreleft = 513440\r
-stackavail = 31495\r
# serial output is plain text ASCII.
DEBUGSERIAL=1
-DELLOGFILE=0
+DELLOGFILE=1
#192x144
#wwww will add these
UPXQ=-qqq
# symbolic debug for wsample/wprof/wd
-D_FLAGS=-d2#1+
+D_FLAGS=-d1#+
# stacksize
STKSIZ=32768
# compile flags
#
S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k$(STKSIZ)
-Z_FLAGS=-zk0 -zc#### -zp4 -ei#### -zm
+Z_FLAGS=-zk0 -zc#### -zp4 -ei# -zm
O_FLAGS=-opnr -oe=24 -oil+ -outback -ohm
T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 $(D_FLAGS) -fo=.$(OBJ)## -e=65536
-DBUGFLAGS=$(D_FLAGS) -fm=$^&.meh -fd=$^&
+DBUGFLAGS=-fm=$^&.meh -fd=$^& $(D_FLAGS)
CPPFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 -DSTACKSIZE=$(STKSIZ)
!ifeq DEBUGSERIAL 1
CPPFLAGS += -DDEBUGSERIAL
#fonttes0.exe: fonttes0.$(OBJ) $(16LIB)
fontgfx.exe: fontgfx.$(OBJ) gfx.lib $(DOSLIB)
inputest.exe: inputest.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib
-#inntest.exe: inntest.$(OBJ) $(16LIBNOINOBJS) 16_in_1.$(OBJ) $(DOSLIB) gfx.lib
sountest.exe: sountest.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib
imfplay.exe: imfplay.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib
vrldbg.exe: vrldbg.$(OBJ) #gfx.lib $(DOSLIB)
palettel.exe: palettel.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
palbomb.exe: palbomb.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
palllist.exe: palllist.$(OBJ) $(16LIB) gfx.lib $(DOSLIB) ll.$(OBJ)
-pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib $(DOSLIB)
+pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib $(DOSLIB)
#planrpcx.exe: planrpcx.$(OBJ) gfx.lib
maptest.exe: maptest.$(OBJ) 16_map.$(OBJ) 16_head.$(OBJ) gfx.lib $(DOSLIB) $(16LIB)
-fmemtest.exe: fmemtest.$(OBJ)
-exmmtest.exe: exmmtest.$(OBJ) 16_pm.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_mm.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ) 16_vl_1.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_dbg.$(OBJ)
- #$(16LIB) gfx.lib $(DOSLIB)
+fmemtest.exe: fmemtest.$(OBJ)
+exmmtest.exe: exmmtest.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
+ #16_pm.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_mm.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ) 16_vl_1.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_dbg.$(OBJ)
vgmtest.exe: vgmtest.$(OBJ) vgmsnd.lib $(16LIB) $(DOSLIB) gfx.lib
db.exe: db.$(OBJ)
#define NOVID\r
#endif\r
#ifdef __WATCOMC__\r
-#define NOVID\r
+//#define NOVID\r
//#define SCROLLLOAD\r
#endif\r
\r
#endif\r
\r
//from: https://stackoverflow.com/questions/14386856/c-check-available-ram\r
-void __near* HC_LargestFreeBlock(size_t* Size)\r
+void NPTR* HC_LargestFreeBlock(size_t* Size)\r
{\r
size_t s0, s1;\r
- void __near* p;\r
+ void NPTR* p;\r
\r
s0 = ~(size_t)0 ^ (~(size_t)0 >> 1);\r
while (s0 && (p = _nmalloc(s0)) == NULL)\r
int heap_status;\r
} hc_use_t;\r
\r
-#ifdef __BORLANDC__\r
-#if 0\r
-/*typedef */struct _heapinfo\r
-{\r
- int _far *_pentry; //- heap entry pointer\r
- size_t _size; //- size of heap entry\r
- int _useflag; //- entry in use return value\r
-};// _heapinfo_t;\r
+#ifdef __WATCOMC__\r
+#define NPTR __near\r
#endif\r
\r
+#ifdef __BORLANDC__\r
+#define NPTR\r
+\r
#define _HEAPBADBEGIN 2 /* heap header is corrupted */\r
#define _HEAPBADNODE 3 /* heap entry is corrupted */\r
#define _HEAPBADPTR 5 /* invalid heap entry pointer (_heapwalk) */\r
#endif\r
\r
//long HC_Newfarcoreleft();\r
-void __near* HC_LargestFreeBlock(size_t* Size);\r
+void NPTR* HC_LargestFreeBlock(size_t* Size);\r
size_t HC_coreleft(void);\r
void far* HC_LargestFarFreeBlock(dword* Size);\r
unsigned long HC_farcoreleft(void);\r
=====================\r
*/\r
\r
+\r
void MM_ShowMemory (global_game_variables_t *gvar)\r
{\r
mmblocktype far *scan;\r
- unsigned color,temp,x,y ,w,q,width;\r
+ unsigned color,temp,x,y ,w,width;\r
sdword end,owner;\r
byte scratch[160],scratch0[4096],str[16];\r
+#ifdef MMSMSCANINFO\r
mmshowmemoryinfo_t scaninfo[MAXBLOCKS];\r
+ byte scratch1[4];\r
+ unsigned xpos,ypos, oldq,q,maxq;\r
+ boolean done,restarted;\r
+ ScanCode scancode;\r
+#endif\r
\r
if(!gvar->video.page[0].width) gvar->video.page[0].sw = gvar->video.page[0].width = 320; //to prevent division by 0\r
//-- VL_SetLineWidth(40, gvar);\r
//gvar->video.ofs.bufferofs = gvar->video.ofs.displayofs;\r
temp = BDOFSCONV gvar->video.BOFS;\r
gvar->video.BOFS = gvar->video.DOFS;\r
+#ifdef MMSMSCANINFO\r
+ oldq = 0; restarted = false;\r
+reset:\r
+ q = 0;\r
+#endif\r
scan = gvar->mm.mmhead;\r
\r
end = -1; w = 0;\r
\r
- width = gvar->video.page[0].width; q = 0;\r
+ width = gvar->video.page[0].width;\r
\r
CA_OpenDebug (gvar);\r
while (scan)\r
{\r
+#ifdef MMSMSCANINFO\r
scaninfo[q].scan = scan;\r
+#endif\r
strcpy(scratch, AARESET);\r
if(scan->attributes & PURGEBITS)\r
{\r
end = scan->length-1;\r
y = scan->start/width;\r
x = scan->start%width;\r
- scaninfo[q].x = x;\r
- scaninfo[q].y = y;\r
+#ifdef MMSMSCANINFO\r
+ if(restarted){\r
+ y += gvar->video.page[0].dy;\r
+ x += gvar->video.page[0].dx;\r
+ }\r
+#if 0\r
+ else{\r
+ scaninfo[q].y = y;\r
+ scaninfo[q].x = x;\r
+ }\r
+#endif\r
+#endif\r
VW_Hlin(x,x+end,y,color,gvar);\r
VL_Plot(x,y,5,gvar);\r
//++==++==optional strcat(scratch0, AARESET); strcat(scratch0, AAGREY); strcat(scratch0,"_");\r
//0000fprintf(stdout, "[%u]\n", q);\r
\r
scan = scan->next;\r
+#ifdef MMSMSCANINFO\r
q++;\r
-//if(color!=6) IN_Ack(gvar);\r
+#endif\r
+//0000if(q==1 && gvar->video.VL_Started && color!=6) IN_Ack(gvar);\r
}\r
\r
CA_CloseDebug (gvar);\r
\r
-#ifdef MMSMPANVID\r
+#if 0\r
+//def MMSMPANVID\r
{\r
int dx,dy,odx,ody;\r
odx = gvar->video.page[0].dx;\r
ody = gvar->video.page[0].dy;\r
dx = dy = 0;\r
- while(!gvar->in.inst->Keyboard[sc_Escape])\r
+ while(!gvar->in.inst->Keyboard[sc_Escape] && !gvar->in.inst->Keyboard[sc_Space])\r
{\r
if(gvar->in.inst->Keyboard[sc_UpArrow])\r
{\r
}\r
#endif\r
#ifdef MMSMSCANINFO\r
- MM_ShowMemoryDetail (x, y, w, q, end, &scaninfo, gvar);\r
+//#define MMSMSCANINFOXYPOSNEW\r
+//{\r
+ maxq = q;\r
+ if(restarted) q = oldq;\r
+ else q = 0;\r
+ restarted = false;\r
+\r
+ IN_Ack(gvar);\r
+// VL_ClearVideo (8);\r
+ for (done = false;!done;)\r
+ {\r
+ if(scaninfo[q].scan->attributes & PURGEBITS)\r
+ {\r
+ color = 6; // dark purple = purgable\r
+ strcpy(scratch1, AAMAGENTA); // dark purple = purgable\r
+ //printf("%s", AAMAGENTA);\r
+ }else{\r
+ color = 2; // medium blue = non purgable\r
+ strcpy(scratch1, AABLUE); // medium blue = non purgable\r
+ //printf("%s", AABLUE);\r
+ }\r
+ if(scaninfo[q].scan->attributes & LOCKBIT)\r
+ {\r
+ color = 1; // red = locked\r
+ strcpy(scratch1, AARED); // red = locked\r
+ //printf("%s", AARED);\r
+ }\r
+ end = scaninfo[q].scan->length-1;\r
+//modexprint(page, x, y, t, tlsw, color, bgcolor, vidsw, const byte *str);\r
+#define MMSMPRINTMEMINFO modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 1, color, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8;\r
+#ifdef __WATCOMC__\r
+ if(gvar->video.VL_Started)\r
+ {\r
+ VL_ShowPage(&gvar->video.page[0], 1, 0);\r
+ modexClearRegion(&gvar->video.page[0], 0, 0, gvar->video.page[0].width, gvar->video.page[0].height, 8);\r
+ }else\r
+#endif\r
+ clrscr();\r
+ sprintf(global_temp_status_text, "block #%04u", q); MMSMPRINTMEMINFO\r
+// sprintf(global_temp_status_text, "%Fp", scaninfo[q].scan->useptr); MMSMPRINTMEMINFO\r
+ sprintf(global_temp_status_text, "start: %04x", (unsigned)scaninfo[q].scan->start); MMSMPRINTMEMINFO\r
+ sprintf(global_temp_status_text, "useptr: %04x", (unsigned)scaninfo[q].scan->useptr); MMSMPRINTMEMINFO\r
+ sprintf(global_temp_status_text, "size: %05u", (unsigned)scaninfo[q].scan->length); MMSMPRINTMEMINFO\r
+ if (scaninfo[q].scan->next && scaninfo[q].scan->next->start > end+1)\r
+ {\r
+ sprintf(global_temp_status_text, "free: %05u", (unsigned)(scaninfo[q].scan->next->start-scaninfo[q].scan->start)); MMSMPRINTMEMINFO\r
+ }else ypos+=8;\r
+ if(gvar->video.VL_Started)\r
+ {\r
+ y = scaninfo[q].scan->start/width;\r
+ x = scaninfo[q].scan->start%width;\r
+#ifndef MMSMSCANINFOXYPOSNEW\r
+ y = ypos;\r
+ x = xpos;\r
+#else\r
+ //y = scaninfo[q].y;\r
+ //x = scaninfo[q].x;\r
+ y += gvar->video.page[0].dy;\r
+ x += gvar->video.page[0].dx;\r
+#endif\r
+ VW_Hlin(x,x+end,y,color,gvar);\r
+ VL_Plot(x,y,5,gvar);\r
+ }\r
+ else\r
+ {\r
+ printf("%s", scratch1);\r
+ printf("%s", AAGREY); printf("_");\r
+ if(scaninfo[q].scan->length<64000)\r
+ for(w=(scaninfo[q].scan->start)/80;w<=end/80;w++)\r
+ {\r
+ //strcat(scratch1, "+");\r
+ printf("+");\r
+ }\r
+ }\r
+\r
+\r
+ if (scaninfo[q].scan->next && scaninfo[q].scan->next->start > end+1) if(!gvar->video.VL_Started)\r
+ {\r
+ //strcat(scratch1, AARESET);\r
+ printf("%s", AARESET);\r
+ //strcat(scratch1,AAGREEN);\r
+ printf("%s", AAGREEN);\r
+ for(w=(end+1)/80;w<=((scaninfo[q].scan->next->start-scaninfo[q].scan->start)/80);w++)\r
+ {\r
+ //strcat(scratch1,"0");\r
+ printf("0");\r
+ }\r
+ }else VW_Hlin(x+end+1,x+(scaninfo[q].scan->next->start-scaninfo[q].scan->start),y,3,gvar); // black = free//now green\r
+\r
+\r
+ if(gvar->video.VL_Started)\r
+ {\r
+ //if (scan->next && scan->next->start > end+1) free\r
+ xpos = gvar->video.page[0].dx;\r
+ ypos = gvar->video.page[0].dy;//(gvar->video.page[0].sh-(32));//8*4\r
+ }\r
+ else\r
+ {\r
+ //printf("%s\n", scratch1);\r
+ printf("%s", AARESET);\r
+ printf("\n");\r
+ }\r
+\r
+\r
+ while (!(scancode = gvar->in.inst->LastScan)){}\r
+\r
+ IN_ClearKey(scancode);\r
+ switch (scancode)\r
+ {\r
+ case sc_LeftArrow:\r
+ if(q>0) q--;\r
+ else q = maxq;\r
+ break;\r
+ case sc_RightArrow:\r
+ if(q<maxq) q++;\r
+ else q = 0;\r
+ break;\r
+ case sc_UpArrow:\r
+ if(q>10) q-=10;\r
+ else q = maxq;\r
+ break;\r
+ case sc_DownArrow:\r
+ if(q<maxq+10) q+=10;\r
+ else q = 0;\r
+ break;\r
+ case sc_Space:\r
+// scan = gvar->mm.mmhead;\r
+// x = gvar->video.page[0].dx;\r
+// y = gvar->video.page[0].dy;//(gvar->video.page[0].sh-(32));//8*4\r
+ oldq = q;\r
+ restarted = true;\r
+ goto reset;\r
+ break;\r
+ case sc_Escape:\r
+ done = true;\r
+ break;\r
+ }\r
+ }\r
+//}\r
+// MM_ShowMemoryDetail (x, y, w, q, end, &scaninfo, gvar);\r
#endif\r
\r
\r
- if(gvar->video.VL_Started) IN_Ack(gvar);\r
+//?? if(gvar->video.VL_Started) IN_Ack(gvar);\r
\r
gvar->video.BOFS = (byte __far *)temp;\r
}\r
\r
-#ifdef MMSMSCANINFO\r
+#if 0\r
+//def MMSMSCANINFO\r
void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar)\r
{\r
byte scratch1[4];\r
//printf("%s", AARED);\r
}\r
end = scaninfo[q].scan->length-1;\r
-/*typedef struct mmblockstruct{\r
- word start,length;\r
- unsigned attributes;\r
- memptr *useptr; // pointer to the segment start\r
- struct mmblockstruct far *next;\r
-} mmblocktype;*/\r
- //modexprint(page, x, y, t, tlsw, color, bgcolor, vidsw, const byte *str);\r
+//modexprint(page, x, y, t, tlsw, color, bgcolor, vidsw, const byte *str);\r
#define MMSMPRINTMEMINFO modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 1, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8;\r
#ifdef __WATCOMC__\r
if(gvar->video.VL_Started)\r
printf("\n");\r
}\r
//0000printf("%s", AABLACK); fprintf(stdout, "q=%u maxq=%u\n", q, maxq); printf("%s", AARESET);\r
-fprintf(stdout, ""); //this is a HAX to make it decrement and increment properly when it is at 0 and qmax\r
+//fprintf(stdout, ""); //this is a HAX to make it decrement and increment properly when it is at 0 and qmax\r
while (!(scancode = gvar->in.inst->LastScan)){}\r
\r
IN_ClearKey(scancode);\r
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_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar);\r
+//void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, 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
\r
typedef struct mmshowmemoryinfo\r
{\r
- word x,y;\r
+// unsigned x,y;\r
mmblocktype far *scan;\r
} mmshowmemoryinfo_t;\r
\r
gvar->video.page[1].dx=gvar->video.page[1].dy=TILEWH; // 1 tile size buffer\r
gvar->video.page[2].dx=gvar->video.page[2].dy=\r
gvar->video.page[3].dx=gvar->video.page[3].dy=0; // cache pages are buffer wwww\r
+\r
+ gvar->video.page[0].tlx=gvar->mv[0].tx*TILEWH;\r
+ gvar->video.page[0].tly=gvar->mv[0].ty*TILEWH;\r
}\r
\r
//\r
-Subproject commit 9105fb6b1a87976bbcd38521732564c87bebb9a7
+Subproject commit 4a5b0a9ac65c61b586956cb4ba103c12b3679ad4