Re: A82: Projects?


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

Re: A82: Projects?



At 11:01 AM 8/5/97 -0400, you wrote:
>I'm doing SameGame, but when I switched from using _GETKEY to the keyport, it
>got really messed up.
>I think the problem is that the port isnt reset properly (ya know, ld a, $FF
>\ out (1), a), but a quick look at the source tells me that there is nothing
>wrong.
>So here is the part that doesnt seem to work:
>(one note that since there are no non-alligned sprites in SameGame, de holds
>the cursor position, which is an address in the graph memory, and bc is what
>you add to the position when you move)

<source removed>

>wow, it must have became really bloated...can anyone find out what's wrong?
>when you move, it looks like the moves are just screwed up, but it really is
>moving so many times so fast that it flickers
>sometimes if you press clear or enter off of the opening screen, it rets you
>my opinion: some how it doesnt clear the keyport.  I hope someone can help

Use my Multi_Key routine found in the ASH <-> OShell-82 Development Kit.
It uses TI-Basic's GetKey syntax as its input and the zero register as its
output...it also masks out all the keys except the one you request.
"Ghost" key combinations are the only bugs (and that is a hardware
problem...nothing with my routine).  Also, only the flags register is
destroyed with this routine.  This routine will be the LAST keypad routine
you will EVER use.

About your problem with the keyport, it really is going that fast.  Direct
keypad access is mainly used for games that require speed.  SameGame is NOT
one of these games.  I recommend using call GETKEY in this case.
ROM_GETKEY (or ROM_CALL(_GETKEY) depending on whether or not you are using
the Development Kit) is used mainly as a pausing feature in games.  When
using call GETKEY, I recommend having some variable tell what key was last
pressed and another variable for key-repeats (if the key is held for a
while).  Based on these variables, you can determine whether to accept the
key received from GETKEY or not.

I hope I could be of help.


                 Thomas J. Hruska -- thruska@tir.com
Shining Light Productions -- "Meeting the needs of fellow programmers"
         http://www.geocities.com/SiliconValley/Heights/8504
                    http://shinelight.home.ml.org


References: