|
|
| version 1.31, 2005/02/07 14:46:07 | version 1.35, 2005/05/15 18:48:36 |
|---|---|
| Line 235 static void b0patch(void) { | Line 235 static void b0patch(void) { |
| REG8 c; | REG8 c; |
| REG8 cl; | REG8 cl; |
| REG8 last; | REG8 last; |
| addr = ES_BASE + CPU_BP; | addr = CPU_BP; |
| size = CPU_BX; | size = CPU_BX; |
| cnt = 0; | cnt = 0; |
| last = 0; | last = 0; |
| while(size--) { | while(size--) { |
| c = i286_memoryread(addr++); | c = MEML_READ8(ES_BASE, addr++); |
| cl = 0; | cl = 0; |
| do { | do { |
| REG8 now = c & 0x80; | REG8 now = c & 0x80; |
| Line 264 static void b0patch(void) { | Line 264 static void b0patch(void) { |
| } | } |
| } | } |
| if ((b0p.pos >> 3) < CPU_BX) { | if ((b0p.pos >> 3) < CPU_BX) { |
| UINT32 addr; | UINT addr; |
| REG8 c; | REG8 c; |
| addr = ES_BASE + CPU_BP + (b0p.pos >> 3); | addr = CPU_BP + (b0p.pos >> 3); |
| c = i286_memoryread(addr); | c = MEML_READ8(CPU_ES, addr); |
| c ^= (1 << (b0p.pos & 7)); | c ^= (1 << (b0p.pos & 7)); |
| b0p.pos++; | b0p.pos++; |
| i286_memorywrite(addr, c); | MEML_WRITE8(CPU_ES, addr, c); |
| } | } |
| } | } |
| } | } |
| Line 334 static REG8 fdd_operate(REG8 type, REG8 | Line 334 static REG8 fdd_operate(REG8 type, REG8 |
| } | } |
| if (!fdd_diskready(fdc.us)) { | if (!fdd_diskready(fdc.us)) { |
| fdd_int(FDCBIOS_NONREADY); | fdd_int(FDCBIOS_NONREADY); |
| if (CPU_AH == 0x84) { | ret_ah = 0x60; |
| return(0x68); // 新センスは 両用ドライブ情報も | if ((CPU_AX & 0x8f40) == 0x8400) { |
| } | ret_ah |= 8; // 1MB/640KB両用ドライブ |
| if (CPU_AH == 0xc4) { // ver0.31 | if ((CPU_AH & 0x40) && (fdc.support144)) { |
| if (fdc.support144) { | ret_ah |= 4; // 1.44対応ドライブ |
| return(0x6c); | |
| } | } |
| return(0x68); | |
| } | } |
| return(0x60); | return(ret_ah); |
| } | } |
| } | } |
| Line 444 static REG8 fdd_operate(REG8 type, REG8 | Line 442 static REG8 fdd_operate(REG8 type, REG8 |
| if (mem[fmode] & (0x01 << fdc.us)) { | if (mem[fmode] & (0x01 << fdc.us)) { |
| ret_ah |= 0x01; | ret_ah |= 0x01; |
| } | } |
| if (mem[fmode] & (0x10 << fdc.us)) { // ver0.30 | if (mem[fmode] & (0x10 << fdc.us)) { |
| ret_ah |= 0x04; | ret_ah |= 0x04; |
| } | } |
| } | } |
| if (CPU_AH & 0x80) { // ver0.30 | if ((CPU_AX & 0x8f40) == 0x8400) { |
| ret_ah |= 8; // 1MB/640KB両用ドライブ | ret_ah |= 8; // 1MB/640KB両用ドライブ |
| if ((CPU_AH & 0x40) && (fdc.support144)) { | if ((CPU_AH & 0x40) && (fdc.support144)) { |
| ret_ah |= 4; // 1.44対応ドライブ | ret_ah |= 4; // 1.44対応ドライブ |
| Line 873 void bios0x1b(void) { | Line 871 void bios0x1b(void) { |
| REG8 ret_ah; | REG8 ret_ah; |
| REG8 flag; | REG8 flag; |
| #if defined(SUPPORT_SCSI) | |
| if ((CPU_AL & 0xf0) == 0xc0) { | |
| TRACEOUT(("%.4x:%.4x AX=%.4x BX=%.4x CX=%.4x DX=%.4 ES=%.4x BP=%.4x", | |
| MEML_READ16(CPU_SS, CPU_SP+2), | |
| MEML_READ16(CPU_SS, CPU_SP), | |
| CPU_AX, CPU_BX, CPU_CX, CPU_DX, CPU_ES, CPU_BP)); | |
| scsicmd_bios(); | |
| return; | |
| } | |
| #endif | |
| #if 1 // bypass to disk bios | #if 1 // bypass to disk bios |
| { | |
| REG8 seg; | REG8 seg; |
| UINT sp; | UINT sp; |
| Line 920 void bios0x1b(void) { | Line 906 void bios0x1b(void) { |
| CPU_IP = 0x18; | CPU_IP = 0x18; |
| return; | return; |
| } | } |
| } | #endif |
| #if defined(SUPPORT_SCSI) | |
| if ((CPU_AL & 0xf0) == 0xc0) { | |
| TRACEOUT(("%.4x:%.4x AX=%.4x BX=%.4x CX=%.4x DX=%.4 ES=%.4x BP=%.4x", | |
| MEML_READ16(CPU_SS, CPU_SP+2), | |
| MEML_READ16(CPU_SS, CPU_SP), | |
| CPU_AX, CPU_BX, CPU_CX, CPU_DX, CPU_ES, CPU_BP)); | |
| scsicmd_bios(); | |
| return; | |
| } | |
| #endif | #endif |
| switch(CPU_AL & 0xf0) { | switch(CPU_AL & 0xf0) { |
| Line 984 UINT bios0x1b_wait(void) { | Line 980 UINT bios0x1b_wait(void) { |
| REG8 bit; | REG8 bit; |
| if (fddmtr.busy) { | if (fddmtr.busy) { |
| CPU_IP--; | |
| CPU_REMCLOCK = -1; | CPU_REMCLOCK = -1; |
| } | } |
| else { | else { |