--- np2/vram/scrndraw.c 2004/02/07 21:23:22 1.4 +++ np2/vram/scrndraw.c 2004/02/29 03:10:03 1.6 @@ -131,6 +131,7 @@ const SDRAWFN *sdrawfn; _SDRAW sdraw; BYTE bit; int i; + int height; if (redraw) { updateallline(0x80808080); @@ -141,6 +142,12 @@ const SDRAWFN *sdrawfn; if (surf == NULL) { goto sddr_exit1; } +#if defined(SUPPORT_PC9821) + if (gdc.analog & 2) { + sdrawfn = sdraw_getproctblex(surf); + } + else +#endif sdrawfn = sdraw_getproctbl(surf); if (sdrawfn == NULL) { goto sddr_exit2; @@ -148,6 +155,12 @@ const SDRAWFN *sdrawfn; bit = 0; if (gdc.mode1 & 0x80) { // ver0.28 +#if defined(SUPPORT_PC9821) + if ((gdc.analog & 6) == 6) { + bit |= 0x01; + } + else +#endif if (gdcs.grphdisp & 0x80) { bit |= (1 << gdcs.disp); } @@ -165,12 +178,27 @@ const SDRAWFN *sdrawfn; renewal_line[i] &= ~bit; } } - if (gdc.mode1 & 0x10) { - sdrawfn += 4; - if (np2cfg.skipline) { + height = surf->height; + do { +#if defined(SUPPORT_PC9821) + if (gdc.analog & 2) { + break; + } +#endif +#if defined(SUPPORT_CRT15KHZ) + if (gdc.crt15khz & 2) { + sdrawfn += 12; + height >>= 1; + break; + } +#endif + if (gdc.mode1 & 0x10) { sdrawfn += 4; + if (np2cfg.skipline) { + sdrawfn += 4; + } } - } + } while(0); switch(bit & 7) { case 1: // grph1 sdrawfn += 2; @@ -205,11 +233,11 @@ const SDRAWFN *sdrawfn; sdraw.y = 0; sdraw.xalign = surf->xalign; sdraw.yalign = surf->yalign; - if ((!gdc.analog) || (palevent.events >= PALEVENTMAX)) { - (*(*sdrawfn))(&sdraw, surf->height); + if (((gdc.analog & 3) != 1) || (palevent.events >= PALEVENTMAX)) { + (*(*sdrawfn))(&sdraw, height); } else { - ret = rasterdraw(*sdrawfn, &sdraw, surf->height); + ret = rasterdraw(*sdrawfn, &sdraw, height); } sddr_exit2: