[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] XBIOS function bending



On Mon, Dec 20, 1999 at 08:48:20PM +0000, Vincent Barrilliot wrote:
> 
> I'm completely sure for I looked in the ROM ...
> A lot of things are done like that in TOS. For instance, the interrupt
> handlers which manage keyboard/MIDI don't get the keyboard vector base
> using Kbdvbase() but directly access it assuming that it is located at $1136
> (TOS 4.04). The MIDI functions of the _KBDVECS returned by Kbdvbase()

WHich is absolutely correct - since there is only a function to query the
location of _KBDVECS, but none to set it, it can not be moved, so TOS knows
where to look. Also, for a single struct of known, constant size, there would
not be any benefit if you could move it somewhere else - after all, you can
replace all the vectors in it, which is sufficient.

> directly jump to the ROM and don't use the vectors written in the _KBDVECS ...
> Same for Midiws, which doesn't use BIOS documented BIOS vectors ...

Which ones? Midiws jumps directly to midiwc which writes the byte to the
ACIA. There are no vectors in KBDVBASE for *sending* bytes AFAIK, only for
receiving.

As for the BIOS vectors: Midiws can't use these, because it is a *X*Bios
function. The BIOS uses the BIOS vectors (at $5xx) when using Bconout() on
the Midi device, and then calls the corresponding XBIOS function to get the
work done.

The point is: if you want to replace the low-level MIDI handling stuff to
use transmit interrupts, you need to replace the corresponding XBIOS
functions (and the BIOS vectors that point to them), and there are *no*
vectors for any XBIOS function. Either use Trapatch (recommended) or
directly hook into the trap. You should not need to modify anything in BIOS.

Unfortunetely, there is no BIOS function to read/write multiple characters
from/to a device - this would be helpful for serial ports, too.

cu
Michael
-- 
Michael Schwingen, Ahornstrasse 36, 52074 Aachen