|Re: [hatari-devel] Hatari ACIA TX interrupts|
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
- Most bits in the ACIA's status + control registers are currently
- Check when we have to clear the ACIA_SR_INTERRUPT_REQUEST bit in the
ACIA status register (it is currently done when reading or writing to
the data register, but probably it should rather be done when reading
It would be good to improve that, is there documentation
somewhere how it should work?
At least MIDI playback works in all the sequencers I've tested.
I didn't try replay in one Hatari instance with recording in
> Setting TX interrupt enable on the MIDI ACIA seems to have no effect - no
> interrupts are generated when writing to the MIDI data port.
I'm not really familiar how this should work at the HW level,
what means "interrupts being generated" in case of writing to
Hatari's internal MIDI interrupts happen constantly at fixed
interval. Only thing that depends on reads/writes, is what is
done with MIDI/ACIA register bits.
What happens at the code level on MIDI data reg write ($FFFC06):
0. Nothing happens if MIDI emulation is disabled, or
Hatari MIDI output file is specified, but not writable
(in which case MIDI output & interrupts are disabled)
1. Otherwise, ACIA_SR_TX_EMPTY & ACIA_SR_INTERRUPT_REQUEST bits
are cleared for MidiStatusRegister variable
2. at MIDI interrupt interval:
if (!(MidiStatusRegister & ACIA_SR_TX_EMPTY))
/* Do we need to generate a transfer interrupt? */
if ((MidiControlRegister & 0xA0) == 0xA0)
LOG_TRACE(TRACE_MIDI, "MIDI: WriteData transfer
/* Acknowledge in MFP circuit, pass
MFP_InputOnChannel ( MFP_INT_ACIA , 0 );
MidiStatusRegister |= ACIA_SR_INTERRUPT_REQUEST;
MidiStatusRegister |= ACIA_SR_TX_EMPTY;
What "--trace midi" tells you? Does it show any errors?
|Mail converted by MHonArc 2.6.19+||http://listengine.tuxfamily.org/|