X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=16%2Fmodex16%2Fpcxtest.c;h=9cd1903d45bc37401d4d22c641198b88b6203584;hb=1563e70fa9792d30be454dbaff1758b80286a9dc;hp=6b88f5810f11d9241524f673f540f51b6ef420f5;hpb=42b3ed060a69fb588c7b933748400f2a052add0c;p=16.git diff --git a/16/modex16/pcxtest.c b/16/modex16/pcxtest.c index 6b88f581..9cd1903d 100644 --- a/16/modex16/pcxtest.c +++ b/16/modex16/pcxtest.c @@ -26,9 +26,9 @@ oldDrawBmp(byte far* page, int x, int y, bitmap_t *bmp, byte sprite) { void main() { bitmap_t bmp; int i; - float t1, t2, t3, t4; - word start; page_t page; + word start; + float t1, t2; page=modexDefaultPage(); @@ -46,31 +46,33 @@ void main() { for(i=0; i<100 ;i++) { oldDrawBmp(VGA, 20, 20, &bmp, 0); } - t1 = (*clock-start) / 18.2; start = *clock; for(i=0; i<100 ;i++) { modexDrawBmp(&page, 20, 20, &bmp); } - t2 = (*clock-start) / 18.2; + t1 = (*clock-start) /18.2; + + start = *clock; + for(i=0; i<100; i++) { + modexCopyPageRegion(&page, &page, 20, 20, 128, 20, 64, 64); + } + t2 = (*clock-start)/18.2; + start = *clock; for(i=0; i<100 ;i++) { oldDrawBmp(VGA, 20, 20, &bmp, 1); } - t3 = (*clock-start) / 18.2; + start = *clock; for(i=0; i<100 ;i++) { modexDrawSprite(&page, 20, 20, &bmp); } - t4 = (*clock-start) / 18.2; modexLeave(); - printf("Old non-sprite: %f\n", t1); - printf("New non-sprite: %f\n", t2); - printf("Old Sprite: %f\n", t3); - printf("New Sprite: %f\n", t4); - + printf("CPU to VGA: %f\n", t1); + printf("VGA to VGA: %f\n", t2); return; }