|
|
| version 1.18, 2004/01/30 01:29:13 | version 1.23, 2004/03/06 18:25:35 |
|---|---|
| Line 17 enum { | Line 17 enum { |
| }; | }; |
| static BYTE mtr_c = 0; | |
| static UINT mtr_r = 0; | |
| // ---- FDD | // ---- FDD |
| static BOOL setfdcmode(REG8 drv, REG8 type, REG8 rpm) { | static BOOL setfdcmode(REG8 drv, REG8 type, REG8 rpm) { |
| Line 97 static BOOL biosfd_seek(REG8 track, BOOL | Line 93 static BOOL biosfd_seek(REG8 track, BOOL |
| } | } |
| } | } |
| fdc.ncn = track; | fdc.ncn = track; |
| mtr_c = track; | |
| if (fdd_seek()) { | if (fdd_seek()) { |
| return(FAILURE); | return(FAILURE); |
| } | } |
| Line 298 static REG8 fdd_operate(REG8 type, REG8 | Line 293 static REG8 fdd_operate(REG8 type, REG8 |
| BYTE hd; | BYTE hd; |
| int result = FDCBIOS_NORESULT; | int result = FDCBIOS_NORESULT; |
| UINT32 addr; | UINT32 addr; |
| UINT8 mtr_c; | |
| UINT mtr_r; | |
| mtr_c = 0xff; | mtr_c = fdc.ncn; |
| mtr_r = 0; | mtr_r = 0; |
| // とりあえずBIOSの時は無視する | // とりあえずBIOSの時は無視する |
| Line 494 static REG8 fdd_operate(REG8 type, REG8 | Line 491 static REG8 fdd_operate(REG8 type, REG8 |
| else { | else { |
| accesssize = size; | accesssize = size; |
| } | } |
| i286_memx_read(addr, fdc.buf, accesssize); | MEML_READ(addr, fdc.buf, accesssize); |
| if (fdd_write()) { | if (fdd_write()) { |
| break; | break; |
| } | } |
| Line 563 static REG8 fdd_operate(REG8 type, REG8 | Line 560 static REG8 fdd_operate(REG8 type, REG8 |
| if (fdd_read()) { | if (fdd_read()) { |
| break; | break; |
| } | } |
| i286_memx_write(addr, fdc.buf, accesssize); | MEML_WRITE(addr, fdc.buf, accesssize); |
| addr += accesssize; | addr += accesssize; |
| size -= accesssize; | size -= accesssize; |
| mtr_r += accesssize; // ver0.26 | mtr_r += accesssize; // ver0.26 |
| Line 664 static REG8 fdd_operate(REG8 type, REG8 | Line 661 static REG8 fdd_operate(REG8 type, REG8 |
| fdd_formatinit(); | fdd_formatinit(); |
| pos = CPU_BP; | pos = CPU_BP; |
| for (s=0; s<fdc.sc; s++) { | for (s=0; s<fdc.sc; s++) { |
| i286_memstr_read(CPU_ES, pos, ID, 4); | MEML_READSTR(CPU_ES, pos, ID, 4); |
| fdd_formating(ID); | fdd_formating(ID); |
| pos += 4; | pos += 4; |
| if (ID[3] < 8) { | if (ID[3] < 8) { |
| Line 678 static REG8 fdd_operate(REG8 type, REG8 | Line 675 static REG8 fdd_operate(REG8 type, REG8 |
| break; | break; |
| } | } |
| fdd_int(result); | fdd_int(result); |
| fddmtr_seek(fdc.us, mtr_c, mtr_r); | if (mtr_c != fdc.ncn) { |
| fddmtr_seek(fdc.us, mtr_c, mtr_r); | |
| } | |
| return(ret_ah); | return(ret_ah); |
| } | } |
| Line 891 void bios0x1b(void) { | Line 890 void bios0x1b(void) { |
| i286_memword_write(CPU_SS, sp - 14, CPU_CX); // +4 | i286_memword_write(CPU_SS, sp - 14, CPU_CX); // +4 |
| i286_memword_write(CPU_SS, sp - 16, CPU_BX); // +2 | i286_memword_write(CPU_SS, sp - 16, CPU_BX); // +2 |
| i286_memword_write(CPU_SS, sp - 18, CPU_AX); // +0 | i286_memword_write(CPU_SS, sp - 18, CPU_AX); // +0 |
| #if 0 | |
| TRACEOUT(("bypass to %.4x:0018", seg << 8)); | TRACEOUT(("bypass to %.4x:0018", seg << 8)); |
| TRACEOUT(("AX=%04x BX=%04x %02x:%02x:%02x:%02x ES=%04x BP=%04x", | TRACEOUT(("AX=%04x BX=%04x %02x:%02x:%02x:%02x ES=%04x BP=%04x", |
| CPU_AX, CPU_BX, CPU_CL, CPU_DH, CPU_DL, CPU_CH, | CPU_AX, CPU_BX, CPU_CL, CPU_DH, CPU_DL, CPU_CH, |
| CPU_ES, CPU_BP)); | CPU_ES, CPU_BP)); |
| #endif | |
| sp -= 18; | sp -= 18; |
| CPU_SP = sp; | CPU_SP = sp; |
| CPU_BP = sp; | CPU_BP = sp; |
| Line 947 void bios0x1b(void) { | Line 948 void bios0x1b(void) { |
| ret_ah = 0x40; | ret_ah = 0x40; |
| break; | break; |
| } | } |
| #if 0 | #if 1 |
| TRACEOUT(("%04x:%04x AX=%04x BX=%04x %02x:%02x:%02x:%02x\n" \ | TRACEOUT(("%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(CPU_SS, CPU_SP+2), | i286_memword_read(CPU_SS, CPU_SP+2), |