--- np2/bios/bios18.c 2004/03/04 17:36:05 1.31 +++ np2/bios/bios18.c 2004/03/14 23:45:43 1.33 @@ -41,10 +41,10 @@ typedef struct { static const UINT8 modenum[4] = {3, 1, 0, 2}; static const CRTDATA crtdata[7] = { - {0x07, 0x00, 0x07, 0x08}, // 200-20 - {0x09, 0x1f, 0x08, 0x08}, // 200-25 - {0x0f, 0x00, 0x0f, 0x10}, // 400-20 - {0x13, 0x1e, 0x11, 0x10}, // 400-25 + {0x09, 0x1f, 0x08, 0x08}, // 200-20 + {0x07, 0x00, 0x07, 0x08}, // 200-25 + {0x13, 0x1e, 0x11, 0x10}, // 400-20 + {0x0f, 0x00, 0x0f, 0x10}, // 400-25 {0x17, 0x1c, 0x13, 0x10}, // 480-20 {0x12, 0x1f, 0x11, 0x10}, // 480-25 {0x0f, 0x00, 0x0f, 0x10}}; // 480-30 @@ -114,8 +114,8 @@ const CRTDATA *crt; gdc.mode1 |= 0x08; crt += 2; } - if (mode & 0x01) { - crt += 1; // 20行 + if (!(mode & 0x01)) { + crt += 1; // 25行 } if (mode & 0x02) { gdc.mode1 |= 0x04; // 40桁 @@ -135,6 +135,14 @@ const CRTDATA *crt; bios0x18_10(0); } +void bios0x18_0c(void) { + + if (!(gdcs.textdisp & GDCSCRN_ENABLE)) { + gdcs.textdisp |= GDCSCRN_ENABLE; + screenupdate |= 2; + } +} + static void bios0x18_0f(UINT seg, UINT off, REG8 num, REG8 cnt) { BYTE *p; @@ -167,10 +175,10 @@ static void bios0x18_0f(UINT seg, UINT o #endif while((cnt--) && (p < (gdc.m.para + GDC_SCROLL + 0x10))) { - t = i286_memword_read(seg, off); + t = MEML_READ16(seg, off); t >>= 1; STOREINTELWORD(p, t); - t = i286_memword_read(seg, off + 2); + t = MEML_READ16(seg, off + 2); t *= raster; STOREINTELWORD(p + 2, t); off += 4; @@ -208,7 +216,7 @@ const BYTE *p; switch(code >> 8) { case 0x00: // 8x8 size = 0x0101; - i286_memword_write(seg, off, 0x0101); + MEML_WRITE16(seg, off, 0x0101); p = fontrom + 0x82000 + ((code & 0xff) << 4); MEML_WRITESTR(seg, off + 2, p, 8); break; @@ -218,7 +226,7 @@ const BYTE *p; case 0x2a: case 0x2b: size = 0x0102; - i286_memword_write(seg, off, 0x0102); + MEML_WRITE16(seg, off, 0x0102); p = fontrom; p += (code & 0x7f) << 12; p += (((code >> 8) - 0x20) & 0x7f) << 4; @@ -243,7 +251,7 @@ const BYTE *p; MEML_WRITESTR(seg, off + 2, buf, 32); break; } - i286_memword_write(seg, off, size); + MEML_WRITE16(seg, off, size); return(size); } @@ -756,8 +764,8 @@ void bios0x18(void) { #if 0 TRACEOUT(("int18 AX=%.4x %.4x:%.4x", CPU_AX, - i286_memword_read(CPU_SS, CPU_SP+2), - i286_memword_read(CPU_SS, CPU_SP))); + MEML_READ16(CPU_SS, CPU_SP+2), + MEML_READ16(CPU_SS, CPU_SP))); #endif sti_waiting ^= 1; @@ -825,10 +833,7 @@ void bios0x18(void) { break; case 0x0c: // テキスト画面の表示開始 - if (!(gdcs.textdisp & GDCSCRN_ENABLE)) { - gdcs.textdisp |= GDCSCRN_ENABLE; - screenupdate |= 2; - } + bios0x18_0c(); break; case 0x0d: // テキスト画面の表示終了 @@ -980,7 +985,7 @@ void bios0x18(void) { case 0x44: // ボーダカラーの設定 // if (!(mem[MEMB_PRXCRT] & 0x40)) { -// color = i286_membyte_read(CPU_DS, CPU_BX + 1); +// color = MEML_READ8(CPU_DS, CPU_BX + 1); // } break;