|
|
| version 1.1, 2003/10/16 17:58:22 | version 1.5, 2004/01/13 05:30:58 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| #include "parts.h" | |
| #include "timemng.h" | #include "timemng.h" |
| #include "i286.h" | #include "cpucore.h" |
| #include "memory.h" | |
| #include "pccore.h" | #include "pccore.h" |
| #include "iocore.h" | #include "iocore.h" |
| #include "parts.h" | |
| #include "calendar.h" | #include "calendar.h" |
| #include "bios.h" | #include "bios.h" |
| #include "biosmem.h" | #include "biosmem.h" |
| Line 13 | Line 12 |
| void bios0x1c_03(void) { | void bios0x1c_03(void) { |
| iocore_out8(0x71, 0x00); | iocore_out8(0x71, 0x00); |
| if (pc.cpumode & CPUMODE_8MHz) { | if (pccore.cpumode & CPUMODE_8MHz) { |
| iocore_out8(0x71, 0x4e); // 4MHz | iocore_out8(0x71, 0x4e); // 4MHz |
| } | } |
| else { | else { |
| Line 26 void bios0x1c(void) { | Line 25 void bios0x1c(void) { |
| BYTE buf[6]; | BYTE buf[6]; |
| switch(I286_AH) { | switch(CPU_AH) { |
| case 0x00: // get system timer | case 0x00: // get system timer |
| calendar_get(buf); | calendar_get(buf); |
| i286_memstr_write(I286_ES, I286_BX, buf, 6); | i286_memstr_write(CPU_ES, CPU_BX, buf, 6); |
| break; | break; |
| case 0x01: // put system timer | case 0x01: // put system timer |
| i286_memstr_read(I286_ES, I286_BX, buf, 6); | i286_memstr_read(CPU_ES, CPU_BX, buf, 6); |
| mem[MEMB_MSW8] = buf[0]; // ver0.29 | mem[MEMB_MSW8] = buf[0]; // ver0.29 |
| calendar_set(buf); | calendar_set(buf); |
| break; | break; |
| case 0x02: // set interval timer (single) | case 0x02: // set interval timer (single) |
| SETBIOSMEM16(0x0001c, I286_BX); | SETBIOSMEM16(0x0001c, CPU_BX); |
| SETBIOSMEM16(0x0001e, I286_ES); | SETBIOSMEM16(0x0001e, CPU_ES); |
| SETBIOSMEM16(0x0058a, I286_CX); | SETBIOSMEM16(0x0058a, CPU_CX); |
| iocore_out8(0x77, 0x36); | iocore_out8(0x77, 0x36); |
| bios0x1c_03(); | bios0x1c_03(); |
| break; | break; |