-----Oorspronkelijk bericht-----
Van: shevek <[EMAIL PROTECTED]>
Aan: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: dinsdag 2 maart 1999 22:42
Onderwerp: Re: Joynet and BIOS


>On Tue, 2 Mar 1999, Laurens Holst wrote:
>
>> The MSX BIOS changes the pins of the joystickport while reading the
>> joystickports. Therefor, you can only send/recieve while interrupts are
>> disabled, or -I perfer this option- you can write your own
interrupt-routine
>> which doesn't modify
>> the pins of the joystick-port on which JoyNet is connected.
>
>Of course, that is what I do as well. But when I want to access the disk
>(BDOS), I need to have the bios in page 0 (or at least the slot switching
>routines). I don't have them in my own 0-page code, or at least not in a
>dos-compatible way. (They will be dos2-compatible, but they don't switch
>the usual way on rst 20). So does the BIOS always switch 1's in the
>buttons and a 0 in the strobe, or is it random?

Use Dos... :)

...or...

Information about SCNCNT (#F3F6):
A counter which keeps track if the keyboard has to be scanned on a
VDP-interrupt. This counter is ontrolled by the VDP-interrupt. The value of
this counter goes from 3 to 0; if zero is reached then the keyboard is being
scanned SCNCNT (ScanCount) is reset to 3.

I recently took a look (- :) -) at the BIOS, and I saw that it only looks at
the Keyboard when the keyscan-counter SCNCNT reaches 0. If the counter isn't
0 then the BIOS jumps to the end of the hook immediately. But the Joystick
read-routines are AFTER the Keyboard-routines so you should be able to
(temporarely) disable the Joystickroutines (and the keyboardroutines!!!) by
setting SCNCNT to a high value like 255, then it waits 255 interrupts before
the next keyboard/joystick readout...

Now you can make a nice hook which sets SCNCNT to 255 so that the BIOS
key/joy-routines aren't used, and then run a copy of the keyboard-routine
and add a Joystick-routine which doesn't affect the JoyNet pins...

Hey, you got that??? Now you don't even have to do difficult things to a
*complete new* interrupt-routine, you can still use your own, and IT WORKS
UNDER BASIC!!! And Basic is cool because you can then easily program little
test-progs or small games etc... Good idea of me, eh???

Ofcourse, I'm not sure if this works on every MSX since I can't test it, but
I really think it will work...


~Grauw



****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to