--- np2/bios/bios18.c 2003/12/08 00:55:30 1.7 +++ np2/bios/bios18.c 2004/01/23 06:03:40 1.10 @@ -1,6 +1,5 @@ #include "compiler.h" #include "cpucore.h" -#include "memory.h" #include "pccore.h" #include "iocore.h" #include "bios.h" @@ -206,7 +205,9 @@ void bios0x18(void) { UINT16 tmp; UINT32 pal; -// TRACE_("int18", CPU_AH); + TRACEOUT(("int18 AX=%.4x %.4x:%.4x", CPU_AX, + i286_memword_read(CPU_SS, CPU_SP+2), + i286_memword_read(CPU_SS, CPU_SP))); sti_waiting ^= 1; if (sti_waiting) { // 割込み許可の遊び @@ -265,7 +266,6 @@ void bios0x18(void) { break; case 0x0a: // CRTモードの設定 -#if 1 mem[MEMB_CRT_STS_FLAG] = 0x80 | (CPU_AL & 0x0f); // GDCバッファを空に if (gdc.m.cnt) { @@ -305,18 +305,6 @@ void bios0x18(void) { gdcs.textdisp |= GDCSCRN_ALLDRAW2; gdc_restorekacmode(); break; -#else - // GDCバッファを空に - if (gdc.m.cnt) { - gdc_work(GDCWORK_MASTER); - } - gdc_forceready(&gdc.m); - - mem[MEMB_CRT_STS_FLAG] = CPU_AL; - if (systemport_r(0x33) & 0x08) { - mem[MEMB_CRT_STS_FLAG] |= 0x80; - } -#endif case 0x0b: // CRTモードのセンス CPU_AL = mem[MEMB_CRT_STS_FLAG]; @@ -522,17 +510,28 @@ void bios0x18(void) { break; case 0x40: // グラフィック画面の表示開始 + // GDCバッファを空に + if (gdc.s.cnt) { + gdc_work(GDCWORK_SLAVE); + } if (!(gdcs.grphdisp & GDCSCRN_ENABLE)) { gdcs.grphdisp |= GDCSCRN_ENABLE; screenupdate |= 2; } + mem[MEMB_PRXCRT] |= 0x80; break; case 0x41: // グラフィック画面の表示終了 + // GDCバッファを空に + if (gdc.s.cnt) { + gdc_work(GDCWORK_SLAVE); + } + gdc_forceready(&gdc.s); if (gdcs.grphdisp & GDCSCRN_ENABLE) { gdcs.grphdisp &= ~(GDCSCRN_ENABLE); screenupdate |= 2; } + mem[MEMB_PRXCRT] &= 0x7f; break; case 0x42: // 表示領域の設定