Author Topic: TI-Nspire: needing help coding under Ndless  (Read 6702 times)

0 Members and 1 Guest are viewing this topic.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: TI-Nspire: needing help coding under Ndless
« Reply #15 on: October 26, 2010, 12:10:01 pm »
Use malloc(), free() and memcpy() (see http://hackspire.unsads.com/wiki/index.php/Syscalls).

For advanced LCD synchronization, calc84maniac could perhaps give you some hints (see http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#C0000000_-_LCD_controller and  http://hackspire.unsads.com/wiki/index.php/Interrupts).
Ndless.me with the finest TI-Nspire programs

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: TI-Nspire: needing help coding under Ndless
« Reply #16 on: October 26, 2010, 03:49:49 pm »
For the screenbuffer, use
Code: [Select]
char* scrbuf = (char*) malloc(SCREEN_BYTES_SIZE);where scrbuf is the name you want for the pointer to it.

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: TI-Nspire: needing help coding under Ndless
« Reply #17 on: October 26, 2010, 06:06:56 pm »
To set the screen black:

Code: [Select]
memset(buffer,0x00,SCREEN_BYTES_SIZE);

And yes, the two darkest shades (0 and 1) are the same on the Nspire.
« Last Edit: October 26, 2010, 06:08:03 pm by apcalc »


SirCmpwn

  • Guest
Re: TI-Nspire: needing help coding under Ndless
« Reply #18 on: October 26, 2010, 07:09:23 pm »
Thanks!