A86: Re: Lets Help Me Debug And Optimize


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

A86: Re: Lets Help Me Debug And Optimize




I think what happens is called "switch bouncing". This occurs when you press
any switch in a digital circuit, it switches from on-off and vise-versa a
few times initally, which means erranoues results might occur.

Ports are generally not good for menu routines because its harder to program
reading a keypress then just a key being held down. I'm not sure a good way
around this, the ROM has a pretty complex routine behind _getkey. It isn't
necessary to optimize menu code for speed.

I think Rabidcow has a good memory-mapped keyboard routine with one of his
grayscale routines that might work if you don't want to use _getkey. I'd
e-mail Josh at josh@smileyface.com
he seems to be the resident expert with key ports.

- Matt

>       Here's the code to a small personal project, with a problem- To
exit,
> you press exit twice, or some other miscellanious key twice. This is bad.
I
> want it to exit with one puss of only the exit key. Also, any other code
> optomizations you can think of (either speed or SIZE) will be greatly
> appreciated.





References: