From 520927d490502d300a39473ef0ab9d67cf4e8d99 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Sat, 18 Jun 2016 10:18:40 -0500 Subject: [PATCH] optimized scrolling ww --- src/lib/modex16.c | 4 ++-- src/lib/scroll16.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 85651bac..eeba90fc 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -307,14 +307,14 @@ modexShowPage(page_t *page) { low_address = LOW_ADDRESS | (offset << 8); /* wait for appropriate timing and then program CRTC */ - while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE)); + //while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE)); outpw(CRTC_INDEX, high_address); outpw(CRTC_INDEX, low_address); outp(CRTC_INDEX, 0x13); outp(CRTC_DATA, crtcOffset); /* wait for one retrace */ - while (!(inp(INPUT_STATUS_1) & VRETRACE)); + //while (!(inp(INPUT_STATUS_1) & VRETRACE)); /* do PEL panning here */ outp(AC_INDEX, 0x33); diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 12ee1d89..bc785aa6 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -843,10 +843,10 @@ void shinku(global_game_variables_t *gv) } if(pageflipflop){ if(gv->video.r){ - //vga_setup_wm1_block_copy(); - //_fmemcpy((gv->video.page[(gv->video.p)]).data, (gv->video.page[(!gv->video.p)]).data, gv->video.page[(!gv->video.p)].pagesize); - //vga_restore_rm0wm0(); - modexCopyPageRegion(&(gv->video.page[(gv->video.p)]), &(gv->video.page[(!gv->video.p)]), 0, 0, 0, 0, gv->video.page[gv->video.p].width, gv->video.page[!gv->video.p].height); + vga_setup_wm1_block_copy(); + _fmemcpy((gv->video.page[(gv->video.p)]).data, (gv->video.page[(!gv->video.p)]).data, gv->video.page[(!gv->video.p)].pagesize); + vga_restore_rm0wm0(); + //modexCopyPageRegion(&(gv->video.page[(gv->video.p)]), &(gv->video.page[(!gv->video.p)]), 0, 0, 0, 0, gv->video.page[gv->video.p].width, gv->video.page[!gv->video.p].height); modexShowPage(&(gv->video.page[gv->video.p])); gv->video.p=!gv->video.p; gv->video.r=!gv->video.r; -- 2.39.5