While playing FalldownCE by Iambian, I found out that when I hold down both the right and left arrows, the ball goes right. It never goes left. I was wondering if this is just this particular program, or it's made like that. (Or I have a faulty calculator)
Doesnt sound like a faulty calculator, maybe wire length on the mainboard (connecting keys to chip)?
This is an issue with the individual program.
The keypad is accessed as an array of 7 one-byte registers, with each bit corresponding to one key being pressed or released. This means that you can access each key individually if you do it right.

However, the actual program is probably something like this:
Code:
if(kb_Data[7] & kb_Right) {
  goRight();
} else if(kb_Data[7] & kb_Left) {
  goLeft();
}


If you wanted to make the two mutually exclusive you could do something like

Code:
(kb_Data[7] & kb_Right) && !(kb_Data[7] & kb_Left)


Or you could store the previous keypress and, if both are pressed, use the that one.
Thanks! (I don't want to edit the program, though.) I'l keep this for future reference!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement