--- np2/bios/bios1b.c 2003/10/16 17:58:22 1.1 +++ np2/bios/bios1b.c 2003/11/29 00:36:00 1.5 @@ -1,5 +1,4 @@ #include "compiler.h" -#include "dosio.h" #include "i286.h" #include "memory.h" #include "pccore.h" @@ -44,6 +43,7 @@ static void biosfd_setchrn(void) { fdc.N = I286_CH; } +#if 0 static void biosfd_resultout(UINT32 result) { BYTE *ptr; @@ -58,6 +58,7 @@ static void biosfd_resultout(UINT32 resu ptr[6] = fdc.N; ptr[7] = fdc.ncn; } +#endif static BOOL biosfd_seek(BYTE track, BOOL ndensity) { @@ -79,8 +80,8 @@ static BOOL biosfd_seek(BYTE track, BOOL static UINT16 fdfmt_biospara(BYTE fmt, BYTE rpm) { // ver0.31 - UINT16 seg; - UINT16 off; + UINT seg; + UINT off; UINT16 n; n = fdc.N; @@ -107,7 +108,7 @@ static UINT16 fdfmt_biospara(BYTE fmt, B if (fmt) { off += 2; } - return(i286_memword_read(seg, off)); + return(i286_memword_read(seg, LOW16(off))); } static void change_rpm(BYTE rpm) { // ver0.31 @@ -207,9 +208,9 @@ static void b0patch(void) { UINT32 addr; UINT size; UINT cnt; - BYTE c; - BYTE cl; - BYTE last; + REG8 c; + REG8 cl; + REG8 last; addr = ES_BASE + I286_BP; size = I286_BX; cnt = 0; @@ -218,7 +219,7 @@ static void b0patch(void) { c = i286_memoryread(addr++); cl = 0; do { - BYTE now = c & 0x80; + REG8 now = c & 0x80; c <<= 1; b0p.pos++; if (now == last) { @@ -240,7 +241,7 @@ static void b0patch(void) { } if ((b0p.pos >> 3) < I286_BX) { UINT32 addr; - BYTE c; + REG8 c; addr = ES_BASE + I286_BP + (b0p.pos >> 3); c = i286_memoryread(addr); c ^= (1 << (b0p.pos & 7)); @@ -993,7 +994,7 @@ UINT16 bootstrapload(void) { // void bios0x1b(void) { BYTE ret_ah; - BYTE flag; + REG8 flag; switch(I286_AL & 0xf0) { case 0x90: @@ -1043,22 +1044,18 @@ void bios0x1b(void) { } } #endif -#if 0 // def TRACE - { - char buf[256]; - wsprintf(buf, "%04x:%04x AX=%04x BX=%04x %02x:%02x:%02x:%02x\n" \ +#if 0 + TRACEOUT(("%04x:%04x AX=%04x BX=%04x %02x:%02x:%02x:%02x\n" \ "ES=%04x BP=%04x \nret=%02x", i286_memword_read(I286_SS, I286_SP+2), i286_memword_read(I286_SS, I286_SP), I286_AX, I286_BX, I286_CL, I286_DH, I286_DL, I286_CH, - I286_ES, I286_BP, ret_ah); - TRACE_(buf, 0); - } + I286_ES, I286_BP, ret_ah)); #endif I286_AH = ret_ah; flag = i286_membyte_read(I286_SS, I286_SP+4) & 0xfe; if (ret_ah >= 0x20) { - flag |= 1; + flag += 1; } i286_membyte_write(I286_SS, I286_SP+4, flag); }