|Re: [hatari-devel] Enabling of ACIA IRQs|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On perjantai 31 toukokuu 2013, Nicolas Pomarède wrote:
> I don't use midi, so I never really noticed.
> In midi.c Midi_Data_WriteByte(), we have :
> if (!ConfigureParams.Midi.bEnableMidi)
> So, if midi is not enabled, byte are not processed and nothing will
> happen (including irq).
I don't think 1) is really a problem. But MIDI should work if we
have an option for enabling it at run-time.
> As for 2), maybe the files to communicate via midi are only opened when
> Hatari starts, not later when you check/uncheck ? But Midi_Init()
> already seems to be called in change.c, so I don't know what is missing..
Midi_Reset() which starts the MIDI interrupt:
MidiControlRegister = 0;
MidiStatusRegister = ACIA_SR_TX_EMPTY;
nRxDataByte = 1;
Is called only when emulated is reseted.
couple of alternatives:
1) enabling MIDI triggers emulation reset
2) enabling MIDI calls Midi_Reset()
1) is probably the safer option.
I also guess the interrupt should be disabled in Midi_Reset(),
if MIDI isn't enabled...