--- np2/generic/hostdrv.c 2004/03/04 17:36:05 1.13 +++ np2/generic/hostdrv.c 2005/02/07 14:46:10 1.15 @@ -242,7 +242,7 @@ static void init_sft(SFTREC sft) { else { sft->open_mode[0] &= 0x0f; } - sft->dev_info_word[0] = (BYTE)(0x40 | hostdrv.stat.drive_no); + sft->dev_info_word[0] = (UINT8)(0x40 | hostdrv.stat.drive_no); sft->dev_info_word[1] = 0x80; STOREINTELDWORD(sft->dev_drvr_ptr, 0); STOREINTELDWORD(sft->file_pos, 0); @@ -343,7 +343,7 @@ static BOOL read_data(UINT num, UINT32 p HDRVFILE hdf; FILEH fh; - BYTE work[1024]; + UINT8 work[1024]; UINT r; hdf = (HDRVFILE)listarray_getitem(hostdrv.fhdl, num); @@ -370,7 +370,7 @@ static BOOL write_data(UINT num, UINT32 HDRVFILE hdf; FILEH fh; - BYTE work[1024]; + UINT8 work[1024]; UINT r; hdf = (HDRVFILE)listarray_getitem(hostdrv.fhdl, num); @@ -697,7 +697,7 @@ static void set_fileattr(INTRST intrst) fail(intrst, ERR_ACCESSDENIED); return; } - attr = i286_memword_read(CPU_SS, CPU_BP + sizeof(IF4INTR)) & 0x37; + attr = MEML_READ16(CPU_SS, CPU_BP + sizeof(IF4INTR)) & 0x37; // 成功したことにする... succeed(intrst); @@ -970,7 +970,7 @@ static void do_redir(INTRST intrst) { if (pathishostdrv(intrst, &sc) != SUCCESS) { return; } - mode = i286_memword_read(CPU_SS, CPU_BP + sizeof(IF4INTR)); + mode = MEML_READ16(CPU_SS, CPU_BP + sizeof(IF4INTR)); TRACEOUT(("do_redir: %.4x", mode)); switch(mode) { case 0x5f02: @@ -979,8 +979,8 @@ static void do_redir(INTRST intrst) { fail(intrst, 0x12); return; } - i286_memword_write(CPU_DS, CPU_BX + 2, 4); - i286_memword_write(CPU_DS, CPU_BX + 4, 1); + MEML_WRITE16(CPU_DS, CPU_BX + 2, 4); + MEML_WRITE16(CPU_DS, CPU_BX + 4, 1); tmp[0] = (char)('A' + hostdrv.stat.drive_no); tmp[1] = ':'; tmp[2] = '\0'; @@ -1294,7 +1294,7 @@ void hostdrv_intr(const void *arg1, long TRACEOUT(("hostdrv: AL=%.2x", intrst.r.b.al)); - if ((intrst.r.b.al >= sizeof(intr_func) / sizeof(HDINTRFN)) || + if ((intrst.r.b.al >= NELEMENTS(intr_func)) || (intr_func[intrst.r.b.al] == NULL)) { return; }