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

RE: [MiNT] XBIOS function bending



Hi, 
 
> Please take a look on the MiNT src xbios.c for the midiws() system call. 
> You see it's not a good idea to replace it with your own function ... 
 
Well I did and indeed I saw that there is all the tty stuff there... 
I saw it doesn't directly calls the Midiws() but it calls something like 
*f->dev->write. I didn't dig to see what is the 'write' function of the 
device associated to the file pointer ... but I guess byte sending is not 
interrupt handled ! 
 
> Better you write a xdd for MiNT. Or I write it and you support the 
> hardware dependant functions. 
 
Thank you, Frank. I had a look at your UART driver, and for having worked 
on oAESis and its mouse driver, I know that a XDD is not that difficult to 
make. I just don't want to be too FreeMiNT dependant, that's why I want 
to cleanly patch BIOS as much as possible before I use FreeMiNT's features, 
so that most of my code is common to plain TOS and FreeMiNT. 
 
For now, I have a TSR that patches the bconout(3) and bcostat(3) BIOS 
vectors, as well as the midisys vector of the _KBDVECS. It installs a 
'MiDX' cookie. The sending of bytes is interrupt handled, and the bytes 
to be sent are stored in a standard _IOREC. It also expands the buffer 
of the original MIDI _IOREC. 
Bconout(3) calls don't block anymore, but as the Midiws doesn't use the BIOS 
vectors, it continues to use the old BIOS routine (blocking) instead of the 
new one. It's a pity as the effect of a non-blocking call would most be 
effective on Midiws ! 
 
If you want my sources, well there's no problem everything I do is PD, but 
the matter is I use assembly language (Brainstorm Assemble). The reason 
is I have no usable FreeMiNT compliant debugger but I have the very efficient 
Adebug, which works under plain TOS. The code is pure 68k (works on my 
1040Stf) and the objets are linkable with Pure C's ones (that's why I 
asked if there was a PureC<->A.OUT object format converter). 
 
I won't have too much time to play with my Falcon in the next 2 or 
3 months because I'm going to move to the USA and I have lots of things to 
do before my leaving. I just hope I'll be able to get my Falcon with me, 
otherwize I'll have to buy a Milan II there :-) 
 
 
Vincent