starting timer ok\r
index=4096\r
-chkmap ok \r
-\r
- 1st vmem_remain=262144\r
- [0], video->page[i].pagesize=95744\r
- [0], vmem_remain=166400\r
- [1], video->page[i].pagesize=95744\r
- [1], vmem_remain=70656\r
- [2], video->page[i].pagesize=70400\r
- [2], vmem_remain=256\r
- [3], video->page[i].pagesize=256\r
- [3], vmem_remain=0\r
-Project 16 scroll.exe. This is just a test file!\r
-version May 4 2016 10:25:12\r
-tx: 15\r
-ty: 4\r
+chkmap ok Project 16 scroll.exe. This is just a test file!\r
+version May 9 2016 02:45:56\r
+tx: 0\r
+ty: 0\r
player.x: 160 player.y: 128\r
-player.tx: 25 player.ty: 12\r
-player.triggx: 24 player.triggy: 12\r
-player.hp: 4 player.q: 1 player.info.dir: 2 player.d: 2 pdir=1\r
-tile data value at player trigger position: 3\r
+player.tx: 10 player.ty: 8\r
+player.triggx: 10 player.triggy: 9\r
+player.hp: 4 player.q: 1 player.info.dir: 2 player.d: 2 pdir=0\r
+tile data value at player trigger position: 0\r
Virtual Screen: 352x272\r
Screen: 320x240\r
virtual tile resolution: 22x17\r
tile resolution: 20x15 \r
middle tile position: 10x8\r
-video memory remaining: 0\r
-page [0]=(a000:163c)\r
- [1]=(a000:73bc)\r
- [2]=(a000:bd14)\r
- [3]=(a000:010c)\r
-mv[1].tx: 15 mv[1].ty: 4 panswitch=0\r
+video memory remaining: 40447\r
+page [0]=(a000:0000) size=30208 sw=320 sh=240 width=352 height=272\r
+ [1]=(a000:7600) size=30208 sw=320 sh=240 width=352 height=272\r
+ [2]=(a000:ec00) size=30208 sw=320 sh=240 width=352 height=272\r
+mv[1].tx: 0 mv[1].ty: 0 panswitch=0\r
\r
\r
detected CPU type: 386 or newer\r
page.tilemidposscreenx = page.tw/2;\r
page.tilemidposscreeny = (page.th/2)+1;\r
page.stridew=page.width/4;\r
- page.pagesize = (sdiword)(page.width/4)*page.height;\r
+ page.pagesize = (word)(page.width/4)*page.height;\r
page.id = 0;\r
\r
return page;\r
result.tilesh=result.height/TILEWH;\r
result.id = p->id+1;\r
result.stridew=result.width/4;\r
- result.pagesize = (sdiword)(result.width/4)*result.height;\r
+ result.pagesize = (word)(result.width/4)*result.height;\r
\r
return result;\r
}\r
void modexCalcVmemRemain(video_t *video)\r
{\r
byte i;\r
- //printf("\n\n 1st vmem_remain=%ld\n", video->vmem_remain);\r
- for(i=0; i<=video->num_of_pages-1; i++)\r
+ //printf("\n\n 1st vmem_remain=%u\n", video->vmem_remain);\r
+ for(i=0; i<video->num_of_pages; i++)\r
{\r
video->vmem_remain-=video->page[i].pagesize;\r
- //printf(" [%u], video->page[i].pagesize=%ld\n", i, video->page[i].pagesize);\r
- //printf(" [%u], vmem_remain=%ld\n", i, video->vmem_remain);\r
+ //printf(" [%u], video->page[%u].pagesize=%u\n", i, i, video->page[i].pagesize);\r
+ //printf(" [%u], vmem_remain=%u\n", i, video->vmem_remain);\r
}\r
}\r
\r
void modexHiganbanaPageSetup(video_t *video)\r
{\r
- video->vmem_remain=262144L;\r
+ video->vmem_remain=65535U;\r
video->num_of_pages=0;\r
(video->page[0]) = modexDefaultPage(&(video->page[0])); video->num_of_pages++; //video->page[0].width += (TILEWHD); video->page[0].height += (TILEWHD);\r
(video->page[1]) = modexNextPage(&(video->page[0])); video->num_of_pages++;\r
(video->page[2]) = modexNextPage(&(video->page[1])); video->num_of_pages++;\r
- //(video->page[2]) = modexNextPageFlexibleSize(&(video->page[1]), video->page[0].width, video->page[0].sh-40); video->num_of_pages++;\r
+ (video->page[3]) = modexNextPage(&(video->page[2])); video->num_of_pages++;\r
+// (video->page[3]) = modexNextPageFlexibleSize(&(video->page[2]), video->page[0].width/8, video->page[0].height/8); video->num_of_pages++;\r
//(video->page[3]) = modexNextPageFlexibleSize(&(video->page[2]), TILEWH, TILEWH); video->num_of_pages++;\r
modexCalcVmemRemain(video);\r
video->p=0;\r
printf("WARNING: bios cls no ptr\n");\r
}\r
}\r
+\r
+void modexprintmeminfo(video_t *v)\r
+{\r
+ byte i;\r
+ printf("video memory remaining: %u\n", v->vmem_remain);\r
+ printf("page ");\r
+ for(i=0; i<v->num_of_pages;i++)\r
+ {\r
+ printf(" [%u]=", i);\r
+ printf("(%Fp)", (v->page[i].data));\r
+ printf(" size=%u", v->page[i].pagesize);\r
+ printf(" sw=%lu sh=%lu ", (unsigned long)v->page[i].sw, (unsigned long)v->page[i].sh);\r
+ printf(" width=%lu height=%lu", (unsigned long)v->page[i].width, (unsigned long)v->page[i].height);\r
+ printf("\n");\r
+ }\r
+}\r
void modexcls(page_t *page, byte color, byte *Where);
void modexWaitBorder();
void bios_cls();
+void modexprintmeminfo(video_t *v);
#endif
sword tileplayerposscreenx; /* player position on screen */\r
sword tileplayerposscreeny; /* player position on screen */\r
word stridew; /*width/4*/\r
- sdiword pagesize; /* page size */\r
+ word pagesize; /* page size */\r
} page_t;\r
\r
typedef struct\r
{\r
char old_mode; //old video mode before game!\r
page_t page[MAXPAGE]; //pointer to root page[0]\r
- sdiword vmem_remain; //remaining video memory\r
+ word vmem_remain; //remaining video memory\r
byte num_of_pages; //number of actual pages\r
boolean __near p; //render page number\r
word pr[MAXPAGE][4]; //render sections of pages\r
static map_t map;
player_t player[MaxPlayers];
//page_t screen, gvar.video.page[1], gvar.video.page[2];
-map_view_t mv[3];
+map_view_t mv[4];
bitmap_t p;
//word pn=0; //i forgot ww
static planar_buf_t huge *pp;
printf("virtual tile resolution: %dx", gvar.video.page[0].tilesw); printf("%d\n", gvar.video.page[0].tilesh);
printf("tile resolution: %dx", gvar.video.page[0].tw); printf("%d \n", gvar.video.page[0].th);
printf("middle tile position: %dx", gvar.video.page[0].tilemidposscreenx); printf("%d\n", gvar.video.page[0].tilemidposscreeny);
- printf("video memory remaining: %ld\n", gvar.video.vmem_remain);
- printf("page ");
- for(i=0; i<gvar.video.num_of_pages;i++)
- {
- printf(" [%u]=", i);
- printf("(%Fp)", (gvar.video.page[i].data));
- printf(" size=%ld", gvar.video.page[i].pagesize);
- printf(" sw=%lu sh=%lu ", (unsigned long)gvar.video.page[i].sw, (unsigned long)gvar.video.page[i].sh);
- printf(" width=%lu height=%lu", (unsigned long)gvar.video.page[i].width, (unsigned long)gvar.video.page[i].height);
- printf("\n");
- }
+ modexprintmeminfo(&gvar.video);
printf("mv[%u].tx: %d", pan.pn, mv[pan.pn].tx); printf(" mv[%u].ty: %d ", pan.pn, mv[pan.pn].ty); printf("panswitch=%u\n", panswitch);
//printf("player[1].q: %d", player[1].q); printf(" player[1].d: %d\n", player[1].d);
printf("\n");
VGAmodeX(0, 1, &gvar);\r
printf("Project 16 test.exe. This is just a test file!\n");\r
printf("version %s\n", VERSION);\r
- printf("video memory remaining: %ld\n", gvar.video.vmem_remain);\r
- printf("page ");\r
- for(i=0; i<gvar.video.num_of_pages;i++)\r
- {\r
- printf(" [%u]=", i);\r
- printf("(%Fp)", (gvar.video.page[i].data));\r
- printf(" size=%ld", gvar.video.page[i].pagesize);\r
- printf(" sw=%lu sh=%lu ", (unsigned long)gvar.video.page[i].sw, (unsigned long)gvar.video.page[i].sh);\r
- printf(" width=%lu height=%lu", (unsigned long)gvar.video.page[i].width, (unsigned long)gvar.video.page[i].height);\r
- printf("\n");\r
- }\r
+ modexprintmeminfo(&gvar.video);\r
printf("tx=%d ", mv[pan.pn].tx); printf("ty=%d ", mv[pan.pn].ty); printf("player.d=%d\n", player[0].d);\r
IN_Shutdown();\r
modexPalBlack();\r