Xref: utzoo comp.os.os9:280 comp.sys.m6809:965
Path: utzoo!attcan!uunet!husc6!ukma!tut.cis.ohio-state.edu!rutgers!att!ihlpl!knudsen
From: knudsen@ihlpl.ATT.COM (Knudsen)
Newsgroups: comp.os.os9,comp.sys.m6809
Subject: Re: MIDI Interface Driver for CoCo 3
Keywords: OS-9, Driver, MIDI
Message-ID: <7869@ihlpl.ATT.COM>
Date: 28 Nov 88 19:23:54 GMT
References: <36830@clyde.ATT.COM>
Organization: AT&T Bell Laboratories - Naperville, Illinois
Lines: 48

Congratulations, Ag!  Now have you tried any freeware music
editors on the beat (hint, hint)?

Technically your drivers are not restricted to the VIRQ
polling interrupt.  After all, the ACIA driver(s) use interrupts
directly.

However, the MPI (actually the GIME's attempt to force all
peripherals into a narrow band of addresses) forces some
restrictions that are gradually becoming clear thru discoussions
on these nets and mail lists.  A fundamental requirement of
OS9's interupt server is that the device's status register
must be readable when the interrupt comes in.

So if your MPI slot is switched to slot 3 and a pak in slot 4
throws an interrupt, the "whodunit" polling in the interrupt server
can't see pak 4's device; instead, it may read slot 3's.
(This is why Sardis and Burke & Burke don't get along).

Also why the MPI only accepts interrupts from the CTS-enabled
slot, so only the "currently active" device's interrupts will
get thru.  If you hotwire all 4 slots' IRQs together, you
lose this protection, tho in practice the protection
was no use anyway.

As for running several serial devices at same address,
this would require some fancy selective enabling of interrupts
in the ACIA chips, and even then I don't see how two chips could
co-exist at the same address AND slot.

Ag, as far as recording MIDI performance under OS9, I think
you'd have to block all interrupts (orcc #$55 in assembler)
and run "raw RSDOS mode" during the performance, running sofware
timing loop and just writing received bytes into memory
(well you could take the time to parse them).
Monitor the Coco keyboard for a keypress to break out of the loop.
All multi-tasking and system clock stop during recording,
just as with floppy disk accesses only longer.

If you don't like locking up your system for minutes at a time,
someone suggested to me to buy an outboard hardware MIDI sequencer,
play your piece into that, then mass-dump it (in a few seconds)
into the Coco for editing, etc.  Reverse should work well too,
tho not necessary, as I hope you know from UltiMusE.
-- 
Mike Knudsen  Bell Labs(AT&T)   att!ihlpl!knudsen
"Lawyers are like nuclear bombs and PClones.  Nobody likes them,
but the other guy's got one, so I better get one too."