X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=16%2Fmodex16%2Fpcxtest.c;h=7373e8851dc471018b31c0128b4d842e574b32d3;hb=2fc6c650cc91ba3a4447630286d9aa4bb92bbfda;hp=6b88f5810f11d9241524f673f540f51b6ef420f5;hpb=42b3ed060a69fb588c7b933748400f2a052add0c;p=16.git diff --git a/16/modex16/pcxtest.c b/16/modex16/pcxtest.c old mode 100644 new mode 100755 index 6b88f581..7373e885 --- a/16/modex16/pcxtest.c +++ b/16/modex16/pcxtest.c @@ -1,5 +1,6 @@ #include #include "modex16.h" +#include "bitmap.h" word far* clock= (word far*) 0x046C; /* 18.2hz clock */ @@ -26,13 +27,13 @@ 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(); - bmp = modexLoadPcx("ed.pcx"); + bmp = bitmapLoadPcx("46113319.pcx"); modexEnter(); /* fix up the palette and everything */ @@ -46,31 +47,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; }