Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Zerbob

Pages: [1]
1
Introduce Yourself! / Greetings, fellow programmers
« on: January 14, 2012, 12:27:06 pm »
Hello!
My name is not Zerbob (who would've guessed it ?), I'm from Paris and I study mathematics (I'm in MPSI for those who know about the freench school system).
I discovered omnimaga around March 2011 when I got my TI-Nspire cas (I previously owned a TI82 Stats) and installed ndless, gbc4nspire and a few cool game boy games (zelda, tetris, bomberman...). I created an account at that time but it's only been a few weeks since I really started looking into it.
I've got some experience (little) with PC-programming (mostly C++ and OCaml) and I'd like to develop something for the Nspire (in C), though I'm not quite sure what (possibly a strategy game like advance wars). I've already made some experiments with input handling and scrolling.
That's a nice website you have, by the way. :thumbsup:

2
Calculator C / A few questions about Nspire C programming
« on: January 05, 2012, 06:02:55 pm »
Hello, I've just started programming on TI-Nspire and I'd like to ask a few questions. I know there's documentation on hackspire but it's not always clear (such as, does this particular piece of information refer to ndless 1,2 or 3 etc), besides I don't know much about hardware and direct access to memory (I usually program in OCaml ;D ).
So, here are my questions (for some of them I could just check the source code, I know):
  • os.h seems to be the only necessary file to include. Is there anything else I might want to use or is the whole of libndls and the stdlib in os.h? A lot of programs have an "utils.h" include directive, but it isn't in the sdk - is it replaced by something else?
  • Do you need to do something particular when entering/exiting the program (saving and restoring the screen, disabling some os function...)? All my test programs trigger a reboot in nspire_emu at exit...
  • When should I use TCT_Local_Control_Interrupts (or anything related to interrupts)?
  • Is there any graphics library available? or some project I could contribute to?
  • (if the answer to last question is no) How to actually write on the screen? I suppose it is something like that (adding an extra pointer and a memcpy for double buffering):
    unsigned char * scr = (unsigned char*)SCREEN_BASE_ADDRESS;
    *(scr + /*some operation with ints x and y*/) = (unsigned char) color; //how are color coded, by the way?
  • How do you get the time? I gather that you can get the time in seconds with:
    int time = *((volatile int*)0x90090000); //not sure about the types though
    Can you get a more precise value?
  • Are ints 32 or 16 bits?
  • Is there anything to do to have float support? I tried to compile a program with floats using yagarto and I got "undefined reference to __arm__addf" or something like that (I'm on Linux right now I can't check).
  • Unimportant: Did anyone get nspire_emu or ncubate working on 64bits Linux? It crashes when you press I to load the os for me (but i have a dual boot, I don't really need it. Btw, the nspire-gcc script doesn't work out of the box on Ubuntu because packaged versions of gcc have a version number: the script looks for arm-linux-gnueabi-gcc (or ld etc) but it's arm-linux-gnueabi-gcc-4.5 (or 4.6), you've got to edit it manually.).
  • Really unimportant: how do you change your profile with this forum? ???
That's about it, I know those are quite noobish questions but being noobish is my nature, I can't help it. :-[

Pages: [1]