--- np2/io/crtc.c 2005/02/16 09:31:55 1.7 +++ np2/io/crtc.c 2007/11/11 13:54:14 1.11 @@ -27,7 +27,7 @@ static void IOOUTCALL crtc_o7c(UINT port if (grcg.chip >= 2) { grcg.gdcwithgrcg = (dat >> 4) & 0x0c; } - i286_vram_dispatch(vramop.operate); + MEMM_VRAM(vramop.operate); } (void)port; } @@ -63,7 +63,7 @@ static const IOINP crtci70[8] = { void crtc_biosreset(void) { - if (!(np2cfg.dipsw[0] & 0x01)) { + if (!(pccore.dipsw[0] & 0x01)) { crtc.reg.pl = 0; crtc.reg.bl = 0x0f; crtc.reg.cl = 0x10; @@ -76,16 +76,23 @@ 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)); + MEMM_VRAM(vramop.operate); } -void crtc_reset(void) { +void crtc_reset(const NP2CFG *pConfig) { 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動作のコピー + grcg.chip = pConfig->grcg & 3; // GRCG動作のコピー #endif crtc_biosreset(); }