|
|
| version 1.3, 2003/10/21 11:22:05 | version 1.5, 2003/11/29 00:36:00 |
|---|---|
| Line 80 static BOOL biosfd_seek(BYTE track, BOOL | Line 80 static BOOL biosfd_seek(BYTE track, BOOL |
| static UINT16 fdfmt_biospara(BYTE fmt, BYTE rpm) { // ver0.31 | static UINT16 fdfmt_biospara(BYTE fmt, BYTE rpm) { // ver0.31 |
| UINT16 seg; | UINT seg; |
| UINT16 off; | UINT off; |
| UINT16 n; | UINT16 n; |
| n = fdc.N; | n = fdc.N; |
| Line 108 static UINT16 fdfmt_biospara(BYTE fmt, B | Line 108 static UINT16 fdfmt_biospara(BYTE fmt, B |
| if (fmt) { | if (fmt) { |
| off += 2; | off += 2; |
| } | } |
| return(i286_memword_read(seg, off)); | return(i286_memword_read(seg, LOW16(off))); |
| } | } |
| static void change_rpm(BYTE rpm) { // ver0.31 | static void change_rpm(BYTE rpm) { // ver0.31 |
| Line 208 static void b0patch(void) { | Line 208 static void b0patch(void) { |
| UINT32 addr; | UINT32 addr; |
| UINT size; | UINT size; |
| UINT cnt; | UINT cnt; |
| BYTE c; | REG8 c; |
| BYTE cl; | REG8 cl; |
| BYTE last; | REG8 last; |
| addr = ES_BASE + I286_BP; | addr = ES_BASE + I286_BP; |
| size = I286_BX; | size = I286_BX; |
| cnt = 0; | cnt = 0; |
| Line 219 static void b0patch(void) { | Line 219 static void b0patch(void) { |
| c = i286_memoryread(addr++); | c = i286_memoryread(addr++); |
| cl = 0; | cl = 0; |
| do { | do { |
| BYTE now = c & 0x80; | REG8 now = c & 0x80; |
| c <<= 1; | c <<= 1; |
| b0p.pos++; | b0p.pos++; |
| if (now == last) { | if (now == last) { |
| Line 241 static void b0patch(void) { | Line 241 static void b0patch(void) { |
| } | } |
| if ((b0p.pos >> 3) < I286_BX) { | if ((b0p.pos >> 3) < I286_BX) { |
| UINT32 addr; | UINT32 addr; |
| BYTE c; | REG8 c; |
| addr = ES_BASE + I286_BP + (b0p.pos >> 3); | addr = ES_BASE + I286_BP + (b0p.pos >> 3); |
| c = i286_memoryread(addr); | c = i286_memoryread(addr); |
| c ^= (1 << (b0p.pos & 7)); | c ^= (1 << (b0p.pos & 7)); |
| Line 994 UINT16 bootstrapload(void) { // | Line 994 UINT16 bootstrapload(void) { // |
| void bios0x1b(void) { | void bios0x1b(void) { |
| BYTE ret_ah; | BYTE ret_ah; |
| BYTE flag; | REG8 flag; |
| switch(I286_AL & 0xf0) { | switch(I286_AL & 0xf0) { |
| case 0x90: | case 0x90: |
| Line 1044 void bios0x1b(void) { | Line 1044 void bios0x1b(void) { |
| } | } |
| } | } |
| #endif | #endif |
| #if 0 // def TRACE | #if 0 |
| { | TRACEOUT(("%04x:%04x AX=%04x BX=%04x %02x:%02x:%02x:%02x\n" \ |
| char buf[256]; | |
| wsprintf(buf, "%04x:%04x AX=%04x BX=%04x %02x:%02x:%02x:%02x\n" \ | |
| "ES=%04x BP=%04x \nret=%02x", | "ES=%04x BP=%04x \nret=%02x", |
| i286_memword_read(I286_SS, I286_SP+2), | i286_memword_read(I286_SS, I286_SP+2), |
| i286_memword_read(I286_SS, I286_SP), | i286_memword_read(I286_SS, I286_SP), |
| I286_AX, I286_BX, I286_CL, I286_DH, I286_DL, I286_CH, | I286_AX, I286_BX, I286_CL, I286_DH, I286_DL, I286_CH, |
| I286_ES, I286_BP, ret_ah); | I286_ES, I286_BP, ret_ah)); |
| TRACE_(buf, 0); | |
| } | |
| #endif | #endif |
| I286_AH = ret_ah; | I286_AH = ret_ah; |
| flag = i286_membyte_read(I286_SS, I286_SP+4) & 0xfe; | flag = i286_membyte_read(I286_SS, I286_SP+4) & 0xfe; |
| if (ret_ah >= 0x20) { | if (ret_ah >= 0x20) { |
| flag |= 1; | flag += 1; |
| } | } |
| i286_membyte_write(I286_SS, I286_SP+4, flag); | i286_membyte_write(I286_SS, I286_SP+4, flag); |
| } | } |