|
|
| version 1.23, 2004/07/03 17:25:39 | version 1.27, 2011/01/15 18:04:43 |
|---|---|
| Line 126 void rs232ctimer(NEVENTITEM item) { | Line 126 void rs232ctimer(NEVENTITEM item) { |
| if (item->flag & NEVENT_SETEVENT) { | if (item->flag & NEVENT_SETEVENT) { |
| pitch = pit.ch + 2; | pitch = pit.ch + 2; |
| if (pitch->flag & PIT_FLAG_I) { | |
| pitch->flag &= ~PIT_FLAG_I; | |
| rs232c_callback(); | |
| } | |
| if ((pitch->ctrl & 0x0c) == 0x04) { | if ((pitch->ctrl & 0x0c) == 0x04) { |
| // レートジェネレータ | // レートジェネレータ |
| setrs232cevent(pitch->value, NEVENT_RELATIVE); | setrs232cevent(pitch->value, NEVENT_RELATIVE); |
| } | } |
| else { | |
| setrs232cevent(0, NEVENT_RELATIVE); | |
| } | |
| } | } |
| rs232c_callback(); | |
| } | } |
| Line 139 void rs232ctimer(NEVENTITEM item) { | Line 145 void rs232ctimer(NEVENTITEM item) { |
| static UINT getcount(const _PITCH *pitch) { | static UINT getcount(const _PITCH *pitch) { |
| SINT32 clock; | SINT32 clk; |
| switch(pitch->ch) { | switch(pitch->ch) { |
| case 0: | case 0: |
| clock = nevent_getremain(NEVENT_ITIMER); | clk = nevent_getremain(NEVENT_ITIMER); |
| break; | break; |
| case 1: | case 1: |
| Line 158 static UINT getcount(const _PITCH *pitch | Line 164 static UINT getcount(const _PITCH *pitch |
| return(pitch->value & (~1)); | return(pitch->value & (~1)); |
| #endif | #endif |
| } | } |
| clock = nevent_getremain(NEVENT_BEEP); | clk = nevent_getremain(NEVENT_BEEP); |
| #if defined(BEEPCOUNTEREX) | #if defined(BEEPCOUNTEREX) |
| if (clock >= 0) { | if (clk >= 0) { |
| clock /= pccore.multiple; | clk /= pccore.multiple; |
| if (pitch->value > 2) { | if (pitch->value > 2) { |
| clock %= pitch->value; | clk %= pitch->value; |
| } | } |
| else { | else { |
| clock = LOW16(clock); | clk = LOW16(clk); |
| } | } |
| return(clock); | return(clk); |
| } | } |
| #else | #else |
| break; | break; |
| #endif | #endif |
| case 2: | case 2: |
| clock = nevent_getremain(NEVENT_RS232C); | clk = nevent_getremain(NEVENT_RS232C); |
| break; | break; |
| #if !defined(DISABLE_SOUND) | #if !defined(DISABLE_SOUND) |
| Line 184 static UINT getcount(const _PITCH *pitch | Line 190 static UINT getcount(const _PITCH *pitch |
| #endif | #endif |
| default: | default: |
| clock = 0; | clk = 0; |
| break; | break; |
| } | } |
| if (clock > 0) { | if (clk > 0) { |
| return(clock / pccore.multiple); | return(clk / pccore.multiple); |
| } | } |
| return(0); | return(0); |
| } | } |
| Line 353 static void IOOUTCALL pit_o75(UINT port, | Line 359 static void IOOUTCALL pit_o75(UINT port, |
| if (pit_setcount(pitch, dat)) { | if (pit_setcount(pitch, dat)) { |
| return; | return; |
| } | } |
| pitch->flag |= PIT_FLAG_I; | |
| rs232c_open(); | rs232c_open(); |
| setrs232cevent(pitch->value, NEVENT_ABSOLUTE); | setrs232cevent(pitch->value, NEVENT_ABSOLUTE); |
| (void)port; | (void)port; |
| Line 405 static const IOOUT pito71[4] = { | Line 412 static const IOOUT pito71[4] = { |
| static const IOINP piti71[4] = { | static const IOINP piti71[4] = { |
| pit_i71, pit_i71, pit_i71, NULL}; | pit_i71, pit_i71, pit_i71, NULL}; |
| void itimer_reset(void) { | void itimer_reset(const NP2CFG *pConfig) { |
| UINT16 beepcnt; | UINT16 beepcnt; |
| Line 428 void itimer_reset(void) { | Line 435 void itimer_reset(void) { |
| setsystimerevent(0, NEVENT_ABSOLUTE); | setsystimerevent(0, NEVENT_ABSOLUTE); |
| beep_lheventset(1); // ver0.79 | beep_lheventset(1); // ver0.79 |
| beep_hzset(beepcnt); | beep_hzset(beepcnt); |
| // setrs232cevent(0, NEVENT_ABSOLUTE); | |
| (void)pConfig; | |
| } | } |
| void itimer_bind(void) { | void itimer_bind(void) { |