From 728fdaef3b687bc665acce9e6cfb590b54a0bf54 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Fri, 2 Sep 2016 14:19:57 -0500 Subject: [PATCH] vgacamm.exe fixed and vrstest works better~! wwwwwwwwwwwww --- DEBUG.16W | 10 +++++----- HEAP.16W | 34 +++++++++++++++++----------------- MMDUMP.16W | Bin 44 -> 66 bytes src/vgacamm.c | 9 ++++----- src/vrstest.c | 28 ++++++++++++++-------------- 5 files changed, 40 insertions(+), 41 deletions(-) diff --git a/DEBUG.16W b/DEBUG.16W index 8a6a4e7b..9c5bba7c 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,16 +1,16 @@ -Seg:0 Size:9278 Owner:0x0 +Seg:0 Size:9277 Owner:0x8dfe ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++_ 0 -Seg:243e Size:256 Owner:0x618c +Seg:243d Size:256 Owner:0x618c +++++_  -Seg:253e Size:401 Owner:0xa1f0 +Seg:253d Size:401 Owner:0xa1f2 ++++++_  -Seg:29db Size:36 Owner:0x0 +Seg:29da Size:36 Owner:0x0 ++_ 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -Seg:b9ff Size:9729 Owner:0x0 +Seg:b9fe Size:9730 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++_  Seg:e000 Size:8191 Owner:0x0 diff --git a/HEAP.16W b/HEAP.16W index 7d1bacf7..b90e4007 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,31 +1,31 @@ == default == - FREE block at 29fd0016 of size 18 - USED block at 29fd0028 of size 136 - USED block at 29fd00b0 of size 20 - FREE block at 29fd00c4 of size 7992 + FREE block at 29fc0016 of size 18 + USED block at 29fc0028 of size 136 + USED block at 29fc00b0 of size 20 + FREE block at 29fc00c4 of size 7992 OK - end of heap == near == - USED block at 19fca226 of size 12 - USED block at 19fca232 of size 326 - USED block at 19fca378 of size 52 - USED block at 19fca3ac of size 20 - USED block at 19fca3c0 of size 20 - USED block at 19fca3d4 of size 20 - USED block at 19fca3e8 of size 20 - USED block at 19fca3fc of size 20 - USED block at 19fca410 of size 23532 + USED block at 19fba226 of size 12 + USED block at 19fba232 of size 326 + USED block at 19fba378 of size 52 + USED block at 19fba3ac of size 20 + USED block at 19fba3c0 of size 20 + USED block at 19fba3d4 of size 20 + USED block at 19fba3e8 of size 20 + USED block at 19fba3fc of size 20 + USED block at 19fba410 of size 23532 OK - end of heap == far == - USED block at 29fd0016 of size 18 - USED block at 29fd0028 of size 136 - USED block at 29fd00b0 of size 20 - USED block at 29fd00c4 of size 7992 + USED block at 29fc0016 of size 18 + USED block at 29fc0028 of size 136 + USED block at 29fc00b0 of size 20 + USED block at 29fc00c4 of size 7992 OK - end of heap Memory Type Total Used Free diff --git a/MMDUMP.16W b/MMDUMP.16W index 67baf89c2503994fc2b3f7a0e3b987763fd9cc3c..68bebea4c092e799e186b80f598c55c1379d476b 100755 GIT binary patch delta 45 ucmdOKnjocNl5Ay>l9sBVp=+zDV5?xj%VkhuU|^JDm1vk|1QeYJ6$JqH5ef|e delta 23 ecmZ?LnII)(lwy@=m}a1$p*vAi!B)Y5mkR(x-vt%` diff --git a/src/vgacamm.c b/src/vgacamm.c index 39d92803..16054b38 100755 --- a/src/vgacamm.c +++ b/src/vgacamm.c @@ -66,11 +66,8 @@ void main() { return; } - gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); - VGAmodeX(1, 1, &gvar); - modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].sw, gvar.video.page[0].sh, 1); - //modexHiganbanaPageSetup(&gvar.video); + modexHiganbanaPageSetup(&gvar.video); /* non sprite comparison */ start = *clockw; @@ -96,13 +93,15 @@ void main() { VGAmodeX(0, 1, &gvar); MM_ShowMemory(&gvar, &gvar.mm); MM_DumpData(&gvar.mm); + // MM_FreePtr(&bigbuffer, &gvar.mm); + // CA_Shutdown(&gvar); MM_Shutdown(&gvar.mm); //printf("CPU to VGA: %f\n", t1); //printf("VGA to VGA: %f\n", t2); heapdump(&gvar); - printf("Project 16 emmtest.exe. This is just a test file!\n"); + printf("Project 16 vgacamm.exe. This is just a test file!\n"); printf("version %s\n", VERSION); printf("t1: %f\n", t1); printf("t2: %f\n", t2); diff --git a/src/vrstest.c b/src/vrstest.c index 6ffdab39..1adf65d0 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -28,10 +28,8 @@ #include "src/lib/16_ca.h" #include "src/lib/16_mm.h" -global_game_variables_t gvar; - void main() { - mminfo_t mm; mminfotype mmi; + global_game_variables_t gvar; __segment sega; void __based(sega)* bigbuffer; int i; @@ -53,8 +51,6 @@ void main() { struct vrl_container *vrl; word w=0; - - // DOSLIB: check our environment probe_dos(); @@ -76,15 +72,14 @@ void main() { return; } - //bmp = bitmapLoadPcx("data/chikyuu.pcx"); - gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); + //gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); - mm.mmstarted=0; - MM_Startup(&mm, &mmi); + gvar.mm.mmstarted=0; + MM_Startup(&gvar.mm, &gvar.mmi); CA_Startup(&gvar); // What should be done by read_vrs: //sega = (mm.bufferseg); - if(CA_LoadFile("data/spri/chikyuu.vrs", &bigbuffer, &mm, &mmi)) baka=1; else baka=0; + if(CA_LoadFile("data/spri/chikyuu.vrs", &bigbuffer, &gvar.mm, &gvar.mmi)) baka=1; else baka=0; // Insert sanity cheks later vrs.buffer = bigbuffer; @@ -133,7 +128,7 @@ void main() { /* clear and draw one sprite and one bitmap */ VGAmodeX(1, 1, &gvar); - modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].sw, gvar.video.page[0].sh, 1); + modexHiganbanaPageSetup(&gvar.video); /* non sprite comparison */ start = *clockw; @@ -145,7 +140,7 @@ void main() { t2 = (*clockw-start)/18.2; for (i = 0; i < 5; i++){ - spri.delay = 1; animate_spri(&spri); spri.x += 20; sleep(2); } + spri.delay = 1; animate_spri(&spri); spri.x += 20; sleep(1); } while(!kbhit()) { @@ -160,13 +155,18 @@ void main() { } } VGAmodeX(0, 1, &gvar); + MM_ShowMemory(&gvar, &gvar.mm); + MM_DumpData(&gvar.mm); free(spri.sprite_vrl_cont); - MM_FreePtr(&bigbuffer, &mm); + MM_FreePtr(&bigbuffer, &gvar.mm); //MM_FreePtr(&((void __based(sega)*)spri.spritesheet->buffer), &mm); - MM_Shutdown(&mm); CA_Shutdown(&gvar); + MM_Shutdown(&gvar.mm); //printf("CPU to VGA: %f\n", t1); //printf("VGA to VGA: %f\n", t2); + heapdump(&gvar); + printf("Project 16 vrstest.exe. This is just a test file!\n"); + printf("version %s\n", VERSION); printf("t1: %f\n", t1); printf("t2: %f\n", t2); printf("gvar.video.page[0].width: %u\n", gvar.video.page[0].width); -- 2.39.5