--- np2/io/crtc.c 2004/03/14 23:45:44 1.5 +++ np2/io/crtc.c 2005/03/06 10:41:50 1.8 @@ -22,8 +22,8 @@ static void IOOUTCALL crtc_o7c(UINT port if (grcg.chip) { grcg.modereg = (UINT8)dat; grcg.counter = 0; - vramop.operate &= VOP_GRCGMASK; - vramop.operate |= ((dat & 0xc0) >> 4); + vramop.operate &= ~(3 << VOPBIT_GRCG); + vramop.operate |= ((dat & 0xc0) >> (6 - VOPBIT_GRCG)); if (grcg.chip >= 2) { grcg.gdcwithgrcg = (dat >> 4) & 0x0c; } @@ -76,13 +76,24 @@ void crtc_biosreset(void) { crtc.reg.ssl = 0; } gdcs.textdisp |= GDCSCRN_ALLDRAW; + + grcg.modereg = 0; + grcg.counter = 0; + vramop.operate &= ~(3 << VOPBIT_GRCG); + grcg.gdcwithgrcg = 0; + ZeroMemory(grcg.tile, sizeof(grcg.tile)); + i286_vram_dispatch(vramop.operate); } void crtc_reset(void) { ZeroMemory(&grcg, sizeof(grcg)); ZeroMemory(&crtc, sizeof(crtc)); +#if defined(SUPPORT_PC9821) + grcg.chip = 3; // PC-9821は EGC必須 +#else grcg.chip = np2cfg.grcg & 3; // GRCG動作のコピー +#endif crtc_biosreset(); }