>I still don't understand the AND/OR values for reading joystick status from
>the Portar documentation ?!?!???!?!??? ? ?!?!?!? ?!??!?!?:
>
>This rotine will read joystick 1 or 2:
>F3    di
>3E 0F ld a,0fh         Write this for          Write this for
>D3 A0 out (0a0h),a     Joystick port 1:        Joystick port 2:
>DB A2 in a,(0a2h)
>E6 DF / E6 AF          and 11011111b; 0DFh     and 10101111b; 0AFh
>F6 4C / F6 03           or 01001100b; 04Ch      or 00000011b; 003h
>D3 A1 out (0a1h),a
>3E 0E ld a,0eh
>D3 A0 out (0a0h),a
>DB A2 in a,(0a2h)

I lost the reply someone (Laurens?) did to my message. It was stated the
utility of AND/OR againt multiple BIT/SET instead of the actual meaning of
the bit salad regarding joystick reading.

I of course know the AND/OR vs BIT/SET! I was poking Z80 opcodes right in
1984 when the rest of the classroom was learning "present continuous"! 8:D

I wanted to know the reason of these values. According to the Portar doc it
should be enough to toggle the joystick select line. The lower bits seem to
be for touchpad handshaking and all 4 should be "1". The AND instruction
also wipes another bit apart from joystick select.

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.

Kiss you.

        MK2



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