Author Topic: Snow  (Read 10776 times)

0 Members and 1 Guest are viewing this topic.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Snow
« on: December 08, 2014, 02:29:32 pm »
I've been very busy lately but still wanted to do something calc and programming related, so I made this:

It's a bit hard to see, but it's snow falling down :crazy: (I should have made a .gif...)

Uses the native OS thread functions, so if it crashes, it's the OS :P
Only works on CX CAS 3.6, haven't included the syscall addresses for other versions.
To get rid of it, turn it off and on again, although it will leak memory if you do that. It's not in any way a clean implementation, but who cares..

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Snow
« Reply #1 on: December 08, 2014, 02:44:27 pm »
Wait, you are german? O.O
Anyways, looking nice! ^.^

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Snow
« Reply #2 on: December 08, 2014, 03:11:56 pm »
Yup, although it's believed on cemetech that I'm French...

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: Snow
« Reply #3 on: December 09, 2014, 02:14:30 pm »
I think it's because MicroPython was first announced on TI-Planet and you contribute a lot to Ndless development.  :P

I personally didn't remember if you were German or Dutch, though, because German people are very rare in the calculator community.

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
Re: Snow
« Reply #4 on: August 13, 2017, 09:49:07 am »
Hey Guys,

I added to this to work on a few more calculators by plugging in some values from here: https://github.com/ndless-nspire/Ndless/tree/master/ndless/src/tools/MakeSyscalls/idc .  I only tested with the CX CAS 3.1 and CX non-CAS 3.6 so this may be incomplete.  But I included my small source update and so if it doesn't work for you I hope it will be easy to continue where I left off.

Well thanks for taking a look! :)

Offline nbenm

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Re: Snow
« Reply #5 on: March 25, 2019, 12:03:18 pm »
I've been very busy lately but still wanted to do something calc and programming related, so I made this:

It's a bit hard to see, but it's snow falling down :crazy: (I should have made a .gif...)

Uses the native OS thread functions, so if it crashes, it's the OS :P
Only works on CX CAS 3.6, haven't included the syscall addresses for other versions.
To get rid of it, turn it off and on again, although it will leak memory if you do that. It's not in any way a clean implementation, but who cares..
I wanted to try it using 4.5.0 value (0X103B18D4), but I have errors at compilation time.

Code: [Select]
nspire-g++ -Wall -W -marm -Wextra -Weffc++ -fno-exceptions -Os -std=c++11 -c main.cpp -o main.o
In file included from main.cpp:2:
main.cpp: In function 'void snow(int, char**)':
/usr/local/Ndless/ndless-sdk/bin/../include/libndls.h:164:95: error: expected ';' before '}' token
  #define SCREEN_BASE_ADDRESS ({"SCREEN_BASE_ADDRESS got removed in favor of the lcd_blit API."})
                                                                                               ^
main.cpp:67:21: note: in expansion of macro 'SCREEN_BASE_ADDRESS'
  void *old_screen = SCREEN_BASE_ADDRESS;
                     ^~~~~~~~~~~~~~~~~~~
/usr/local/Ndless/ndless-sdk/bin/../include/libndls.h:164:95: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
  #define SCREEN_BASE_ADDRESS ({"SCREEN_BASE_ADDRESS got removed in favor of the lcd_blit API."})
                                                                                               ^
main.cpp:67:21: note: in expansion of macro 'SCREEN_BASE_ADDRESS'
  void *old_screen = SCREEN_BASE_ADDRESS;
                     ^~~~~~~~~~~~~~~~~~~
/usr/local/Ndless/ndless-sdk/bin/../include/libndls.h:164:95: error: expected ';' before '}' token
  #define SCREEN_BASE_ADDRESS ({"SCREEN_BASE_ADDRESS got removed in favor of the lcd_blit API."})
                                                                                               ^
main.cpp:68:2: note: in expansion of macro 'SCREEN_BASE_ADDRESS'
  SCREEN_BASE_ADDRESS = screen;
  ^~~~~~~~~~~~~~~~~~~
main.cpp:68:24: error: lvalue required as left operand of assignment
  SCREEN_BASE_ADDRESS = screen;
                        ^~~~~~
make: *** [main.o] Error 1

I'm using Ndless v4.5 r2013 for TI-Nspire OS v4.5.0.1180

The goal is to understand how I can do some kind of multithreading.

Offline Sami Taâissat

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +1/-0
    • View Profile
Re: Snow
« Reply #6 on: April 27, 2019, 06:51:48 pm »
I've been very busy lately but still wanted to do something calc and programming related, so I made this:

It's a bit hard to see, but it's snow falling down :crazy: (I should have made a .gif...)

Uses the native OS thread functions, so if it crashes, it's the OS :P
Only works on CX CAS 3.6, haven't included the syscall addresses for other versions.
To get rid of it, turn it off and on again, although it will leak memory if you do that. It's not in any way a clean implementation, but who cares..
I wanted to try it using 4.5.0 value (0X103B18D4), but I have errors at compilation time.

Code: [Select]
nspire-g++ -Wall -W -marm -Wextra -Weffc++ -fno-exceptions -Os -std=c++11 -c main.cpp -o main.o
In file included from main.cpp:2:
main.cpp: In function 'void snow(int, char**)':
/usr/local/Ndless/ndless-sdk/bin/../include/libndls.h:164:95: error: expected ';' before '}' token
  #define SCREEN_BASE_ADDRESS ({"SCREEN_BASE_ADDRESS got removed in favor of the lcd_blit API."})
                                                                                               ^
main.cpp:67:21: note: in expansion of macro 'SCREEN_BASE_ADDRESS'
  void *old_screen = SCREEN_BASE_ADDRESS;
                     ^~~~~~~~~~~~~~~~~~~
/usr/local/Ndless/ndless-sdk/bin/../include/libndls.h:164:95: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
  #define SCREEN_BASE_ADDRESS ({"SCREEN_BASE_ADDRESS got removed in favor of the lcd_blit API."})
                                                                                               ^
main.cpp:67:21: note: in expansion of macro 'SCREEN_BASE_ADDRESS'
  void *old_screen = SCREEN_BASE_ADDRESS;
                     ^~~~~~~~~~~~~~~~~~~
/usr/local/Ndless/ndless-sdk/bin/../include/libndls.h:164:95: error: expected ';' before '}' token
  #define SCREEN_BASE_ADDRESS ({"SCREEN_BASE_ADDRESS got removed in favor of the lcd_blit API."})
                                                                                               ^
main.cpp:68:2: note: in expansion of macro 'SCREEN_BASE_ADDRESS'
  SCREEN_BASE_ADDRESS = screen;
  ^~~~~~~~~~~~~~~~~~~
main.cpp:68:24: error: lvalue required as left operand of assignment
  SCREEN_BASE_ADDRESS = screen;
                        ^~~~~~
make: *** [main.o] Error 1

I'm using Ndless v4.5 r2013 for TI-Nspire OS v4.5.0.1180

The goal is to understand how I can do some kind of multithreading.


It’s because these examples are using the old screen api (now depreceated)