Author Topic: Nspire keypress errors...  (Read 8877 times)

0 Members and 1 Guest are viewing this topic.

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Nspire keypress errors...
« on: August 31, 2010, 10:29:14 pm »
Ever since I set up my new computer, I have been experiencing serious problems with keypresses in the programs I am compiling.  I have found that the programs themselves are running slower (I have had to lower my key delay by about half) and pressing a key for an extended period of time, say 5 seconds, causes the calculator to completly freeze...

Does anyone know what could be causing this.  I have tried compiling Block Dude, Trapped, the Ndless demo, Ncaster, and bwang's picture viewer and the problem persists in each case. 

Also, would someone be willing to compile Block Dude for the Nspire CAS for me? I had a compiling error in the version I uploaded to ticalc.org (I used the NON CAS header), and I need to upload a new version ASAP.  I have attached a .zip of a skeleton containing the block dude files.


Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire keypress errors...
« Reply #1 on: August 31, 2010, 10:36:33 pm »
Are the problems on the emulator or on hardware?
If someone hasn't done so yet, I'll compile bd for you once I get back to my dorm. I don't have a development environment set up on the campus system yet.

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: Nspire keypress errors...
« Reply #2 on: August 31, 2010, 10:37:47 pm »
Both, I have only experienced them on hardware, but in an e-mail conversation with someone using a fixed version for the CAS, they told me they had problems too.


_player1537

  • Guest
Re: Nspire keypress errors...
« Reply #3 on: September 01, 2010, 12:06:07 am »
I just did a Make in the file directory.  Or did I miss what we were supposed to do?

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: Nspire keypress errors...
« Reply #4 on: September 01, 2010, 04:33:05 am »
apcalc, I'm not sure if this is related to your issue, but could you try to add the "volatile" keyword to the definition of isKeyPressed in common.h ?

Code: [Select]
#define isKeyPressed(key)       (!((*(volatile short*)(KEY_MAP + (key).row)) & (key).col))
The behavior may be  undefined with some versions of GCC without it.

Also, thanks _player1537 for compiling this for me :)
« Last Edit: September 01, 2010, 04:13:01 pm by apcalc »
Ndless.me with the finest TI-Nspire programs

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: Nspire keypress errors...
« Reply #5 on: September 01, 2010, 04:12:22 pm »
ExtendeD, that seems to fix the issue for me.  Thanks! :D

Another intresing thing that happened while I had this problem was that the "home" key was completly unresponsive, unlike the other keys, which would only freeze up after holding them down for a little while.

Also, thanks _player1537 for compiling this for me!
« Last Edit: September 01, 2010, 04:14:08 pm by apcalc »


Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire keypress errors...
« Reply #6 on: September 01, 2010, 04:13:16 pm »
Hmm...I should update the skeleton accordingly.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire keypress errors...
« Reply #7 on: September 01, 2010, 05:53:43 pm »
Ever since I set up my new computer, I have been experiencing serious problems with keypresses in the programs I am compiling.
My concern is the first part of this sentence, though. I am curious why this problem seemed dependent on the computer setup o.o? Is it just because you were using different software versions before?

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: Nspire keypress errors...
« Reply #8 on: September 01, 2010, 05:57:02 pm »
This problem is not caused by my computer OS (thankfully)!

Before my computer was reset, I used to compile/store my programs in the Ndless folder, using the header files from Ndless.

When I started fresh on this computer, I started using bwang's skeleton, which did not contain "volatile" in the "isKeyPressed(" function.  The problem was caused because I was including a different header.


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire keypress errors...
« Reply #9 on: September 01, 2010, 06:06:08 pm »
Ooh ok, I'm glad this is not a computer issue. It would suck if people Nspire dev would be hindered by such dependencies x.x

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: Nspire keypress errors...
« Reply #10 on: September 02, 2010, 03:30:52 am »
The behavior probably depends on the version of GCC.
Ndless.me with the finest TI-Nspire programs

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Nspire keypress errors...
« Reply #11 on: September 02, 2010, 09:14:59 am »
Also probably depends on the optimization level used.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman