Re: A89: Reading Keypresses Directly
[Prev][Next][Index][Thread]
Re: A89: Reading Keypresses Directly
Not unless the batteries run low on the emulator, too =) I've tried
doubling and tripling the loop with the Zelda keypress routines, I'll try it
with yours. . . also, I noticed that some routines send an extra bit (such
as %0000000111111110) to the port - does a word mask with the least
significant bit of the upper word have any effect?
-Scott Noveck (SMN)
smn@calc.org
Lead Programmer:
Pokemon 89 - Zelda 80
http://ccia.calc.org
>
>are your batteries low? it's possible that you need a bigger delay w/ low
>batteries.try changing the \wait from 5 loops to 10>
>
>>> I'm having some trouble with detecting keypresses directly from the
port..
>> . somehow, no matter what mask I store in ($600019), it is ignored and
>> treated as if it was %00000000 (check all rows in the keyboard
matrix),and
>> so whenever I try to check for a bit in the resulting mask from
($60001B),
>> it is on as long as any key in that column is pressed. For example, in
>> using the matrix below, if I store %11111110 number at all in
($600019)and
>> test Bit 3 (for the right key), it will be set if either right, *, 9,
8,7,
>> OR | are pressed, and my mask has no effect on this. I've tried
2different
>> keyboard reading routines (one from the Zelda 89 source and one below
from
>> ti89.acz.org), neither of which make a difference. Someone PLEASE let me
>> know why this isn't working -- it's the only thing keeping me
fromreleasing
>> a public Pokemon Beta (and it's had me stuck for a week. . .
I'mdesperate)
>> and creating some pretty nasty crash bugs -- Thanks =)>
>> -Scott Noveck (SMN)>
smn@calc.org
>> Lead Programmer:
>> Pokemon 89 - Zelda 80
>> http://ccia.calc.org>>> (from ti89.acz.org:)
>> Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1
Bit0
>> -------------------------------------------------------------------------
---
>> %1111110 Alpha Diam Shift 2nd Right Down Left Up
>> -------------------------------------------------------------------------
---
>> %1111101 F5 Clear ^ / * - +
Enter
>> -------------------------------------------------------------------------
---
>> %1111011 F4 BkSpc T . 9 6 3
(-)
>> -------------------------------------------------------------------------
---
>> %1110111 F3 Catalog Z ( 8 5 2 .
>> -------------------------------------------------------------------------
---
>> %1101111 F2 Mode Y ) 7 4 1 0
>> -------------------------------------------------------------------------
---
>> %1011111 F1 Home X = | EE STO>
Apps
>> -------------------------------------------------------------------------
---
>> %0111111
ESC
>> -------------------------------------------------------------------------
--->
>> Key Reading Routine:
>> move.b #%11111110,($600019) ;set the row with 2nd in it> move.b
#5,d0
>> \wait:> nop
>> dbra.b d0,\wait ;wait for this to take effect
>> move.b ($60001b),d0 ;read back keypress data
>> btst.b #4,d0 ;bit 4 is column 4
>> beq p2nd ;if bit reset, 2nd is pressed>>>>