|
|
| version 1.10, 2003/12/08 00:55:32 | version 1.13, 2003/12/26 03:41:05 |
|---|---|
| Line 3 | Line 3 |
| // | // |
| #include "compiler.h" | #include "compiler.h" |
| #include "cpucore.h" | |
| #include "pccore.h" | #include "pccore.h" |
| #include "iocore.h" | #include "iocore.h" |
| #include "sound.h" | #include "sound.h" |
| Line 103 void beeponeshot(NEVENTITEM item) { | Line 104 void beeponeshot(NEVENTITEM item) { |
| if (!(pit.mode[1] & 0x0c)) { // ver0.30 | if (!(pit.mode[1] & 0x0c)) { // ver0.30 |
| beep_lheventset(0); | beep_lheventset(0); |
| } | } |
| #ifdef uPD71054 | #if defined(uPD71054) |
| if ((pit.mode[1] & 0x06) == 0x02) | if ((pit.mode[1] & 0x06) == 0x02) |
| #else | #else |
| if (pit.mode[1] & 0x02) | if (pit.mode[1] & 0x02) |
| Line 154 static UINT pit_latch(int ch) { | Line 155 static UINT pit_latch(int ch) { |
| if (ch == 1) { | if (ch == 1) { |
| switch(pit.mode[1] & 0x06) { | switch(pit.mode[1] & 0x06) { |
| #ifdef uPD71054 // ? | |
| case 0x00: | case 0x00: |
| #endif | |
| case 0x04: | case 0x04: |
| return(pit.value[1]); | return(pit.value[1]); |
| #ifdef uPD71054 | #ifdef uPD71054 |
| Line 172 static UINT pit_latch(int ch) { | Line 175 static UINT pit_latch(int ch) { |
| clock %= pit.value[1]; | clock %= pit.value[1]; |
| } | } |
| else { | else { |
| clock >>= 16; | clock = LOW16(clock); |
| } | } |
| return(clock); | return(clock); |
| #endif | #endif |
| Line 256 REG8 pit_getcount(int ch) { | Line 259 REG8 pit_getcount(int ch) { |
| // system timer | // system timer |
| static void IOOUTCALL pit_o71(UINT port, REG8 dat) { | static void IOOUTCALL pit_o71(UINT port, REG8 dat) { |
| // TRACEOUT(("pic o71: %x", dat)); | |
| if (pit_setcount(0, dat)) { | if (pit_setcount(0, dat)) { |
| return; | return; |
| } | } |
| Line 338 void itimer_reset(void) { | Line 342 void itimer_reset(void) { |
| else { | else { |
| pit.value[1] = 1229; // 5MHz | pit.value[1] = 1229; // 5MHz |
| } | } |
| pit.intr[0] = 1; | |
| pit.mode[0] = 0x30; | pit.mode[0] = 0x30; |
| pit.mode[1] = 0x56; | pit.mode[1] = 0x56; |
| pit.mode[2] = 0xb6; | pit.mode[2] = 0xb6; |