From 243e22dc4fb6ae069348ac984f79ae7827747be1 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Sat, 15 Apr 2017 09:06:23 -0500 Subject: [PATCH] p16 is being worked on a bunch by me wwww [16_ca needs huge amounts of work and I should remember what needs to be done soon][OpenVGMFile needs to be ported to 16_snd.c]going to port rest of code to borland c some time so we can use the core components of id engine here [going to add 16_us.c eventually but the debug system and CA_ PM_ and MM_ usage is priority now]older zcroll renamed to xcroll][zcroll is now the pre menu game loop system with PROPER data usage with CAMMPM] MM_ShowMemory is quite buggy on real machines. i need to debug it and fix added a struct printer[gvar.mm is FUCKING HUGE 14402 bytes FAT\!]16_rf now compiles BT UNKNOWN ON WHAT IT DOSE\! text box creates a ghost because page 1 do not have bg info thus it is stored and saved.... wwww fizzfade being worked on and no idea how to make it work...[xcroll is fixed resuming fizzfade testings] also imf to xcroll is not work [did some testing wwww] --- src/exmmtest.c | 4 +++- src/lib/16_mm.c | 8 ++++---- src/lib/16_vl.c | 29 ++++++++++++++++++----------- src/lib/scroll16.h | 2 +- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/exmmtest.c b/src/exmmtest.c index 98708a88..010bb6ea 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -262,7 +262,7 @@ PRINTBB; KEYP #ifdef __WATCOMC__ #ifndef NOVID - VGAmodeX(1, 0, &gvar); + VGAmodeX(8, 0, &gvar); // modexPalUpdate0(&gvar.video.palette); // ShapeTest_(&gvar); @@ -375,6 +375,8 @@ PRINTBB; KEYP #endif printf("\n"); #endif +// printf("curr_mode=%u\n", gvar.video.curr_mode); +// VL_PrintmodexmemInfo(&gvar.video); //printf("old_mode=%u VL_Started=%u", gvar.video.old_mode, gvar.video.VL_Started); //printf("based core left: %lu\n", (dword)_basedcoreleft()); //printf("huge core left: %lu\n", (dword)_hugecoreleft()); diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 7bd320ba..3e2077e0 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -1282,15 +1282,15 @@ void MM_ShowMemory(global_game_variables_t *gvar) strcpy(scratch, AARESET); if(scan->attributes & PURGEBITS) { - color = 5; // dark purple = purgable + color = 6; // dark purple = purgable strcpy(scratch0, AAMAGENTA); // dark purple = purgable }else{ - color = 9; // medium blue = non purgable + color = 2; // medium blue = non purgable strcpy(scratch0, AABLUE); // medium blue = non purgable } if(scan->attributes & LOCKBIT) { - color = 12; // red = locked + color = 1; // red = locked strcpy(scratch0, AARED); // red = locked } if(scan->start<=end) @@ -1329,7 +1329,7 @@ void MM_ShowMemory(global_game_variables_t *gvar) if (scan->next && scan->next->start >= end+1) #endif { - VW_Hlin(x+end+1,x+(scan->next->start-scan->start),y,0,gvar); // black = free + VW_Hlin(x+end+1,x+(scan->next->start-scan->start),y,3,gvar); // black = free//now green strcat(scratch0, AARESET); //++==++==optional strcat(scratch0, "\n"); strcat(scratch0,AAGREEN); diff --git a/src/lib/16_vl.c b/src/lib/16_vl.c index db066c72..12d8c4b6 100755 --- a/src/lib/16_vl.c +++ b/src/lib/16_vl.c @@ -282,7 +282,7 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv) switch(vq) { case 1: -// case 8: //320x240 no buffer + case 8: //320x240 no buffer //CRTParmCount = sizeof(ModeX_320x240regs) / sizeof(ModeX_320x240regs[0]); /*for(i=0; ipage[0].width); printf("%d ", v->page[0].height); printf("Tile: %dx", v->page[0].ti.tilesw); printf("%d", v->page[0].ti.tilesh); printf("=((Virtual Screen)/16)\n"); printf(" Screen: %dx", v->page[0].sw); printf("%d ", v->page[0].sh); printf("Tile: %dx", v->page[0].ti.tw); printf("%d", v->page[0].ti.th); printf("=((Screen)/16)\n"); + printf(" stride: %u ", vga_state.vga_stride); + printf("draw_stride: %u ", vga_state.vga_draw_stride); + printf("draw_stride_limit: %u\n", vga_state.vga_draw_stride_limit); - printf(" Free Video Memory: %u\n", v->vmem_remain); - printf(" page"); - for(i=0; inum_of_pages;i++) + if(v->vmem_remain) + printf(" Free Video Memory: %u\n", v->vmem_remain); + if(v->num_of_pages) { - printf(" [%u]=", i); - printf("(%Fp)", (v->page[i].data)); - printf(" size=%u ", v->page[i].pagesize); - printf("w=%-3lu h=%-3lu ", (unsigned long)v->page[i].width, (unsigned long)v->page[i].height); - printf("sw=%-3lu sh=%-3lu ", (unsigned long)v->page[i].sw, (unsigned long)v->page[i].sh); - printf("pi=%u", v->page[i].pi); - printf("\n"); + printf(" page"); + for(i=0; inum_of_pages;i++) + { + printf(" [%u]=", i); + printf("(%Fp)", (v->page[i].data)); + printf(" size=%u ", v->page[i].pagesize); + printf("w=%-3lu h=%-3lu ", (unsigned long)v->page[i].width, (unsigned long)v->page[i].height); + printf("sw=%-3lu sh=%-3lu ", (unsigned long)v->page[i].sw, (unsigned long)v->page[i].sh); + printf("pi=%u", v->page[i].pi); + printf("\n"); + } } } diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 546fbe29..2eb1b838 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -91,9 +91,9 @@ printf("\n\n");\ printf("gvar.video:\n");\ printf(" r=%u ", gvar.video.dorender);\ printf("bgps=%u ", gvar.video.vga_state.bgps);\ - printf("dbg_delayanimation=%u ", dbg_delayanimation);\ printf("\n\n"); +// printf("dbg_delayanimation=%u ", dbg_delayanimation); /* if(IN_KeyDown(sc_F11)){ pagedelayrendermap=!pagedelayrendermap; IN_UserInput(1, &gvar); } if(IN_KeyDown(sc_F10)){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap; IN_UserInput(1, &gvar); } -- 2.39.2