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.
Messages - Levak
Pages: 1 ... 15 16 [17] 18 19 ... 68
241
« on: January 24, 2013, 09:06:57 am »
Hi I have a question : what are the limitations (unless time) to have Nspire linux to work with the NAND filesystem ? We know it uses Datalight Reliance v2.10 Build 1150 and Datalight FlashFX Pro v3.00 Build 1358 and after some research on them I found that it has "somewhere" a support for bootstrapping linux : http://embedded-computing.com/white-papers/white-flash-flashfx-tera-reliance-nitro/I cannot find sources (even the "free 30-days source demo" doesn't work when logged in), but maybe already packaged libs exist for Linux running on ARM9 ?
242
« on: January 23, 2013, 09:11:28 am »
Ok. 'cause there's written:
101 = 24 bpp (not applicable to TI-Nspire's STN LCD) . So apparently even 16 bit are possible? That'd be even better! But why doesn't TI use this? SRAM can't be the reason
Speed issues ? Also, yes, they have SRAM problems, even in 4bpp.
243
« on: January 22, 2013, 03:32:29 pm »
Lua is not fast enough for those kind of games. Not even in 2D.
fix: Lua on the TI-Nspire
244
« on: January 22, 2013, 03:14:13 pm »
I suppose that this can't be solved ? (my stuff is absolutly not up to date, if it is the problem) Don't bother on the yyyyyyyyyyyyyyyy... stuff, I know it has been solved.
245
« on: January 21, 2013, 10:00:24 pm »
Not sure what is "rt" but yeah, should work if the devel directory exits.
246
« on: January 21, 2013, 09:26:07 pm »
Hi Sadly you have to indicate the full path (if someone has the solution im interested :p).
So "/documents/file.tns" is the root. You can get the program path using argv[0]
247
« on: January 21, 2013, 02:20:56 pm »
I'm using nspire_emu_easy from Ti-Planet, it's a version with Ndl3ss already in it. Do you think it could be the wrong version ?
I've never heard of that before and I cannot find any archive having this name on TI-Planet. But yeah, if Ndless is included in the archive, it is surely outdated. Ndless updates syscalls and developments tools in background a lot of times. And there is a SaveAs popup ? O.o I didn't see it.
Yes and No. It is a syscall I did not added to Ndless for the moment as it is part of nFrame, still under development. If you really want it, pick it up from ThemeEditor sources.
248
« on: January 21, 2013, 02:01:44 pm »
This code crashes :int main() { char *filename; if(show_msg_user_input("A", "B", "C", &filename) != -1) free(filename); return 0; } It runs fine for me. Update your Ndless (on the handheld) to the latest. And I can't find any libndls directory in /ndless/ ... (I use the Ndl3ss SDK)
Okay ... in the sources, so here is the sample code : const char * title = "Title"; const char * msg = "Element"; char * defaultvalue = "default value"; char * value; unsigned len = show_msg_user_input(title, msg, defaultvalue, &value); if (len >= 0) { printf("%s (%d)\n", value, len); free(value); } else puts("Canceled");
EDIT : second question on the go : why does libndls's refresh_osscr() crashes ?
Same, I think your Ndless version on the handheld is not up to date. Indeed, you don't know its size and putting arbitrary size (here 256) is a bad programming behavior.
I don't want to be a nitpicker, but I have to disagree. In a practical context, using "big enough" buffers when dealing with arbitrary-sized strings is in many cases better than hassling around with a bunch of pointers and dynamically allocated memory. Using the latter method complexifies and bloats the code unnecessarily, gives the programmer additional responsibility (gotta compute the size of the data, malloc it, remember to free the memory, etc.), decreases the programs maintainability (as the code for that filename container is scattered around, when modifying bigger chunks better check it doesn't cause any undefined behavior), and generally the whatever academic perfection of the code doesn't outweigh the pain of dealing with such trivial stuff. We're not talking about security-critical government-class programs here, and it's not like there aren't any functions to avoid buffer overflows and whatnot. I'm not saying you should be using statically allocated data for everything (quite the contrary usually), but for string buffers and such, a char buf[BUF_SIZE]; is usually good enough.
I know, but this applies in a context you can't control the length of the string. Here, the popup does not limit the number of characters entered, and at first it was a 256 buffer. Some people complained because it crashes when you enter a 120 chars string, and indeed ... the popup does not limit it. Thus, without having to allocate a 1024 buffer, I prefer using the dynamic length String API the Nspire uses. I think this API is the only one that runs really nicely compared to a lot of things on Nspire development. On the other hand, there is a place in the OS where it limits the string length to 256 because the buffer is 256 : The SaveAs popup. And this has sense, I agree.
249
« on: January 21, 2013, 01:52:15 pm »
I tried that, it didn't speed it up that much. Probably because I have WAY too many files.
I think you did not launched hide.tns, did you ? If the /hidden/ directory is not visible, then try to put more stuff you don't usually use in that directory ...
250
« on: January 21, 2013, 10:19:18 am »
Plop,
I've been encountering some problems with Ndless' UI features. This code :show_msgbox_2b("Title", "Text", "Button 1", "Button 2"); Gives that :
And it's basically the same with show_msgbox_3b (displays a dialog box with 3 buttons) ; the labels are "Button 1Button 2Button 3", "Button 2Button 3" and "Button 3".
Not sure why, but in _show_msgbox.c, I found this char button1_16[14]; char button2_16[14];
This explains your problem. Do not make your button text longer than 7 characters (without the \0). If you have a text larger than 7 characters and don't want to wait ExtendeD to change the trunk, you can change it to char button1_16[(strlen(button1) + 1) * 2]; char button2_16[(strlen(button2) + 1) * 2];
And later, change char button3_16[14];
to char button3_16[(strlen(button3) + 1) * 2];
And recompile libndls.a (Ndless). Also, this code just crashes nspire_emu :char filename[256]; show_msg_user_input("Test", "Test this", "Default", &filename); printf("%s", filename); free(filename); return 0; I think that it's a bug with Ndless ...
1) free() on a char filename[256] does crash, even in a computer program. filename[256] is a static allocation contrary to malloc. 2) filename[256] : you surely don't need this, look at the example in ndless/libndls/show_msg_user_input.c You have to pass a pointer to your char array, but you should not initialize it ! Indeed, you don't know its size and putting arbitrary size (here 256) is a bad programming behavior. 3) Do not free if the popup returned -1, because the popup was canceled, there is no result, and your char array is not initialized. Again, checkout the sample code in ndless/libndls/show_msg_user_input.c
251
« on: January 21, 2013, 06:27:02 am »
tried this: dh=(Dh^4-Dh*Dm^4)^(1/4) But now it doesn't calculate anything.. nvm, I already know it by now xp
As said Adriweb, dh and Dh are in TI-Basic the same variables (it removes the case). Since FormulaPro uses math.eval() in order to solve part of the problem with CAS, this will leads to a confusing formula you're not looking for. Try this : dh_=(Dh^4-Dh*Dm^4)^(1/4)
252
« on: January 20, 2013, 10:19:56 pm »
How did you tell the calculator that 0x34 corresponds to "Theme Editor"?
It is the case. Remember that a Theme Editor was introduced in development builds, but sadly (or luckily for us) the string remained in the resources.
253
« on: January 20, 2013, 08:06:30 pm »
How do I extract the resource strings using "get_res_string(lib, id)" ? Say I added that in the C file somewhere, how would I be able to see the array that is returned?
#include <os.h> #include <libndls.h>
static unsigned get_res_string_addrs[] = {0x100E9B20, 0x100E9E10, 0x100E9634, 0x100E994C}; #define get_res_string SYSCALL_CUSTOM(get_res_string_addrs, char *, int, int)
enum { CLNK = 0x636C6E6B, CTLG = 0x63746C67, DCOL = 0x64636F6C, DLOG = 0x646C6F67, DTST = 0x64747374, GEOG = 0x67656F67, MATH = 0x6D617468, MWIZ = 0x6D77697A, NTPD = 0x6E747064, PGED = 0x70676564, QCKP = 0x71636B70, QUES = 0x71756573, SCPD = 0x73637064, SYST = 0x73797374, TBLT = 0x74626C74, };
int main() { char *undef = "U\0n\0d\0e\0f\0i\0n\0e\0d\0\0"; int i = 0; char *utf16; String s = string_new(); do { string_set_utf16(s, get_res_string(SYST, i)); if (memcmp(undef, s->str, 20) == 0) break; char ascii[s->len + 1]; printf("0x%X : %s\n", i, string_to_ascii(s)); ++i; } while (1); string_free(s); puts(""); return 0; }
Or simply : https://www.dropbox.com/sh/orpup682k3f7nkd/fQRyPHoVvv
254
« on: January 20, 2013, 05:37:41 pm »
This is the simplest way to do : A global variable "modified" (flag) A hook that sets "modified" to 1 in every single place in the OS that modifies the folders content. A hook in the call_doc_brower in order to have it in a singleton that checks "modified". If set to 1, re-scan everythin like TI does. If 0, just return the current content.
255
« on: January 20, 2013, 03:00:57 pm »
Does it keep an up to date "database" of files and their file sizes or does it re-scan the file sizes and locations every time?
It re-scans it every single time you access the My Documents screen from the Home screen. The longest is to build the overall screen with multi-depth objects with multiple sons etc ... This should not be as long as it is, so I guess it tries to open the files (I did not checked, its a pure supposition), but for what ?
Pages: 1 ... 15 16 [17] 18 19 ... 68
|