|
|
| version 1.11, 2004/02/21 16:35:31 | version 1.12, 2004/03/19 00:30:00 |
|---|---|
| Line 179 static void amd98_rhythm(UINT map) { | Line 179 static void amd98_rhythm(UINT map) { |
| // ---- | // ---- |
| static void setamd98event(BOOL absolute) { | static void setamd98event(UINT32 cnt, BOOL absolute) { |
| SINT32 cnt; | if (cnt > 8) { // 根拠なし |
| cnt *= pccore.multiple; | |
| if (pit.value[3] > 8) { // 根拠なし | |
| cnt = pccore.multiple * pit.value[3]; | |
| } | } |
| else { | else { |
| cnt = pccore.multiple << 16; | cnt = pccore.multiple << 16; |
| Line 197 static void setamd98event(BOOL absolute) | Line 195 static void setamd98event(BOOL absolute) |
| void amd98int(NEVENTITEM item) { | void amd98int(NEVENTITEM item) { |
| PITCH pitch; | |
| if (item->flag & NEVENT_SETEVENT) { | if (item->flag & NEVENT_SETEVENT) { |
| if ((pit.mode[3] & 0x0c) == 0x04) { | pitch = pit.ch + 4; |
| if ((pitch->ctrl & 0x0c) == 0x04) { | |
| // レートジェネレータ | // レートジェネレータ |
| setamd98event(NEVENT_RELATIVE); | setamd98event(pitch->value, NEVENT_RELATIVE); |
| } | } |
| } | } |
| pic_setirq(0x0d); | pic_setirq(0x0d); |
| Line 244 static void IOOUTCALL amd_odb(UINT port, | Line 245 static void IOOUTCALL amd_odb(UINT port, |
| if ((b & 1) > (dat & 1)) { | if ((b & 1) > (dat & 1)) { |
| b &= 0xc2; | b &= 0xc2; |
| if (b == 0x42) { | if (b == 0x42) { |
| // TRACEOUT(0xfff0, psg_1.reg.io2); | |
| amd98.psg3reg = psg1.reg.io2; | amd98.psg3reg = psg1.reg.io2; |
| } | } |
| else if (b == 0x40) { | else if (b == 0x40) { |
| // TRACEOUT(0xfff1, psg_1.reg.io2); | |
| if (amd98.psg3reg < 0x0e) { | if (amd98.psg3reg < 0x0e) { |
| psggen_setreg(&psg3, amd98.psg3reg, psg1.reg.io2); | psggen_setreg(&psg3, amd98.psg3reg, psg1.reg.io2); |
| } | } |
| Line 264 static void IOOUTCALL amd_odb(UINT port, | Line 263 static void IOOUTCALL amd_odb(UINT port, |
| static void IOOUTCALL amd_odc(UINT port, REG8 dat) { | static void IOOUTCALL amd_odc(UINT port, REG8 dat) { |
| pit_setcount(3, dat); | PITCH pitch; |
| setamd98event(NEVENT_ABSOLUTE); | |
| pitch = pit.ch + 4; | |
| if (pit_setcount(pitch, dat)) { | |
| return; | |
| } | |
| setamd98event(pitch->value, NEVENT_ABSOLUTE); | |
| (void)port; | (void)port; |
| } | } |
| static void IOOUTCALL amd_ode(UINT port, REG8 dat) { | static void IOOUTCALL amd_ode(UINT port, REG8 dat) { |
| pit_setflag(3, dat); | pit_setflag(pit.ch + 4, dat); |
| (void)port; | (void)port; |
| } | } |