-void main() {\r
- bitmap_t bmp;
- planar_buf_t *p;\r
- int i;\r
- page_t page;\r
- word start;
- int plane;\r
- float t1, t2;\r
-\r
- page=modexDefaultPage();\r
-\r
- bmp = bitmapLoadPcx("data/ed.pcx");
- p = planar_buf_from_bitmap(&bmp);\r
- modexEnter();\r
-\r
- /* fix up the palette and everything */\r
- modexPalUpdate(bmp.palette);\r
-\r
- /* clear and draw one sprite and one bitmap */\r
- modexClearRegion(&page, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 1);\r
-\r
- /* non sprite comparison */
- /*start = *clock;\r
- for(i=0; i<100 ;i++) {\r
- oldDrawBmp(VGA, 20, 20, &bmp, 0);\r
- }\r
-\r
- start = *clock;\r
- for(i=0; i<100 ;i++) {\r
- modexDrawBmp(&page, 20, 20, &bmp);\r
- }\r
- t1 = (*clock-start) /18.2;\r
-\r
- start = *clock;\r
- for(i=0; i<100; i++) {\r
- modexCopyPageRegion(&page, &page, 20, 20, 128, 20, 64, 64);\r
- }\r
- t2 = (*clock-start)/18.2;\r
-\r
-\r
- start = *clock;\r
- for(i=0; i<100 ;i++) {\r
- oldDrawBmp(VGA, 20, 20, &bmp, 1);\r
- }\r
-\r
-\r
- start = *clock;\r
- for(i=0; i<100 ;i++) {\r
- modexDrawSprite(&page, 20, 20, &bmp);\r
- }*/
- while(!kbhit())
- {
- DrawPBuf(&page, 0, 0, p, 0);
- }
- modexLeave();\r
-
- printf("\n%d\n", sizeof(p->plane));
- printf("%d\n", sizeof(bmp));\r
- //printf("CPU to VGA: %f\n", t1);\r
- //printf("VGA to VGA: %f\n", t2);\r
- return;\r
+//0000 PCXBMP = bitmapLoadPcx("data/koishi~~.pcx");\r
+ PCXBMP = bitmapLoadPcx("data/chikyuu.pcx", &gvar);\r
+// PCXBMP = bitmapLoadPcx("data/koishi^^.pcx");\r
+// PCXBMP = bitmapLoadPcx("16/PCX_LIB/chikyuu.pcx");\r
+//---- p = planar_buf_from_bitmap(PCXBMPPTR);\r
+\r
+ VGAmodeX(1, 1, &gvar);\r
+ gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);\r
+\r
+ /* fix up the palette and everything */\r
+ modexPalUpdate(&PCXBMP->palette);\r
+\r
+ /* clear and draw one sprite and one bitmap */\r
+ modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 1);\r
+\r
+ /* non sprite comparison */\r
+ /*start = *clockw;\r
+ //for(i=0; i<100 ;i++) {\r
+ oldDrawBmp(VGA, 0, 0, PCXBMPPTR, 0);\r
+ //}\r
+\r
+ start = *clockw;\r
+ //for(i=0; i<100 ;i++) {\r
+//0000 modexDrawBmp(&gvar.video.page[0], 20, 20, PCXBMPPTR);\r
+ modexDrawBmp(&gvar.video.page[0], 160, 120, PCXBMPPTR);\r
+ //}\r
+ t1 = (*clockw-start) /18.2;\r
+\r
+ start = *clockw;\r
+ //for(i=0; i<100; i++) {\r
+//0000 modexCopyPageRegion(&gvar.video.page[0], &gvar.video.page[0], 20, 20, 128, 20, 64, 64);\r
+ modexCopyPageRegion(&gvar.video.page[0], &gvar.video.page[0], 0, 0, 0, 0, 320, 240);\r
+ //}\r
+ t2 = (*clockw-start)/18.2;*/\r
+\r
+\r
+ start = *clockw;\r
+ //for(i=0; i<100 ;i++) {\r
+ oldDrawBmp(VGA, 0, 0, PCXBMPPTR, 1);\r
+ //}\r
+ t1 = (*clockw-start) /18.2;\r
+\r
+\r
+ start = *clockw;\r
+ //for(i=0; i<100 ;i++) {\r
+//0000 modexDrawSprite(&gvar.video.page[0], 20, 20, PCXBMPPTR);\r
+ modexDrawSprite(&(gvar.video.page[0]), 160, 120, PCXBMPPTR);\r
+ modexDrawBmp(&gvar.video.page[0], 0, 128, PCXBMPPTR);\r
+ //}\r
+ t2 = (*clockw-start)/18.2;\r
+ //_fmemset(MK_FP(0xA000, 0), (int)p->plane, gvar.video.page[0].sw*(gvar.video.page[0].sh*2));\r
+ //modexDrawBmp(&gvar.video.page[0], 0, 0, PCXBMPPTR);\r
+ while(!kbhit())\r
+ {\r
+ //DrawPBuf(&gvar.video.page[0], 0, 0, p, 0);\r
+ }\r
+ VGAmodeX(0, 1, &gvar);\r
+ /*printf("\nmain=%Fp\n\n", &i);\r
+ printf("PCXBMP.data=%Fp\n", PCXBMP.data);\r
+ printf("*PCXBMP.data=%Fp\n", *(PCXBMP.data));\r
+ printf("PCXBMPPTR.data=%Fp\n", &(PCXBMP.data));\r
+\r
+ printf("\n%d\n", sizeof(p->plane));\r
+ printf("%d\n", sizeof(PCXBMP));*/\r
+\r
+ /*for(i=0; i<(320*240); i++)\r
+ {\r
+ fprintf(stdout, "%d", PCXBMP.data[i]);\r
+ if(i%PCXBMP.width==0) fprintf(stdout, "\n");\r
+ }*/\r
+ printf("CPU to VGA: %f\n", t1);\r
+ printf("VGA to VGA: %f\n", t2);\r
+ printf("gvar.video.page[0].width: %u\n", gvar.video.page[0].width);\r
+ printf("gvar.video.page[0].height: %u\n", gvar.video.page[0].height);\r
+ return;\r