--- np2/io/pit.c 2004/07/01 11:42:54 1.22 +++ np2/io/pit.c 2005/05/20 13:59:47 1.25 @@ -126,12 +126,18 @@ void rs232ctimer(NEVENTITEM item) { if (item->flag & NEVENT_SETEVENT) { pitch = pit.ch + 2; + if (pitch->flag & PIT_FLAG_I) { + pitch->flag &= ~PIT_FLAG_I; + rs232c_callback(); + } if ((pitch->ctrl & 0x0c) == 0x04) { // レートジェネレータ setrs232cevent(pitch->value, NEVENT_RELATIVE); } + else { + setrs232cevent(0, NEVENT_RELATIVE); + } } - rs232c_callback(); } @@ -337,10 +343,8 @@ static void IOOUTCALL pit_o73(UINT port, return; } setbeepevent(pitch->value, NEVENT_ABSOLUTE); - if (!(pitch->ctrl & 0x0c)) { - beep_lheventset(1); - } - else { + beep_lheventset(1); // ver0.79 + if (pitch->ctrl & 0x0c) { beep_hzset(pitch->value); } (void)port; @@ -355,6 +359,7 @@ static void IOOUTCALL pit_o75(UINT port, if (pit_setcount(pitch, dat)) { return; } + pitch->flag |= PIT_FLAG_I; rs232c_open(); setrs232cevent(pitch->value, NEVENT_ABSOLUTE); (void)port; @@ -428,7 +433,9 @@ void itimer_reset(void) { pit.ch[4].ch = 4; #endif setsystimerevent(0, NEVENT_ABSOLUTE); + beep_lheventset(1); // ver0.79 beep_hzset(beepcnt); +// setrs232cevent(0, NEVENT_ABSOLUTE); } void itimer_bind(void) {