>> I've been using this routine blindly for some time and it works, but I'd
>> like to know exactly the electrical reasons behind the process.
>
>**sigh** okay I'll explain...
>
>By the way, the AND and ORs you say belong to port 2 belong to port 1. You
>accidentally (I hope?)swapped them.

I'm aware. This listing is pasted "as is" from the Portar docs.

>Well, bit 6 is used as port select for register 14. (1=port 2, 0=port 1)
>Bit 0, 1 and 4 correspond to pins 6, 7 and 8 of port 1
>Bit 2, 3 and 5 correspond to pins 6, 7 and 8 of port 2
>
>Well, here are the reasons why they are set: officially, the joystick only
>works when pin 8 is 0. So the joystick-routines set the pin to 0. Further,
>pins 6 and 7 only give input as long as the output is 1. So in order to read
>pins 6 and 7 they first set them.

Aaaah. That's neither explained on Portar nor The Red Book.

> Ofcourse this won't have to be done
>everytime, but if they for example don't set bits 6 and 7 then if some nerdo
>changes bits 6 and 7 into 0 the buttons can't be read anymore until the next
>reset.

Nice.

>Well that's the reason.

Thanks.

>By the way, the joystickroutines on the interrupt also (re)set those pins,
>unfortunatly. And that is stupid because therefor JoyNet can't function with
>the normal interrupt enabled.

Something to do with touchpad handshaking, perhaps?

        MARK 2



****
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