mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 13:55:38 +00:00
Merge pull request #151 from gm-matthew/sound-irq
Sound IRQs are acknowledged by writing to MIDI data port
This commit is contained in:
commit
976f0208dc
|
@ -1419,7 +1419,10 @@ void CModel3::Write8(UINT32 addr, UINT8 data)
|
||||||
case 0x08:
|
case 0x08:
|
||||||
//printf("PPC: %08X=%02X * (PC=%08X, LR=%08X)\n", addr, data, ppc_get_pc(), ppc_get_lr());
|
//printf("PPC: %08X=%02X * (PC=%08X, LR=%08X)\n", addr, data, ppc_get_pc(), ppc_get_lr());
|
||||||
if ((addr & 0xF) == 0) // MIDI data port
|
if ((addr & 0xF) == 0) // MIDI data port
|
||||||
|
{
|
||||||
SoundBoard.WriteMIDIPort(data);
|
SoundBoard.WriteMIDIPort(data);
|
||||||
|
IRQ.Deassert(0x40);
|
||||||
|
}
|
||||||
else if ((addr&0xF) == 4) // MIDI control port
|
else if ((addr&0xF) == 4) // MIDI control port
|
||||||
midiCtrlPort = data;
|
midiCtrlPort = data;
|
||||||
break;
|
break;
|
||||||
|
@ -2133,9 +2136,7 @@ void CModel3::RunMainBoardFrame(void)
|
||||||
|
|
||||||
// Process MIDI interrupt
|
// Process MIDI interrupt
|
||||||
IRQ.Assert(0x40);
|
IRQ.Assert(0x40);
|
||||||
ppc_execute(200); // give PowerPC time to acknowledge IR
|
ppc_execute(400); // give PowerPC time to acknowledge IR
|
||||||
IRQ.Deassert(0x40);
|
|
||||||
ppc_execute(200); // acknowledge that IRQ was deasserted (TODO: is this really needed?)
|
|
||||||
dispCycles -= 400;
|
dispCycles -= 400;
|
||||||
|
|
||||||
++irqCount;
|
++irqCount;
|
||||||
|
|
Loading…
Reference in a new issue