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.


Messages - davetheant

Pages: [1]
1
General Calculator Help / Re: Hacking the TI Nspire CX Native OS?
« on: January 20, 2013, 10:27:13 pm »
Oh that makes total sense now. Thank you for all your help

2
General Calculator Help / Re: Hacking the TI Nspire CX Native OS?
« on: January 20, 2013, 10:01:55 pm »
How did you tell the calculator that 0x34 corresponds to "Theme Editor"?

3
General Calculator Help / Re: Hacking the TI Nspire CX Native OS?
« on: January 20, 2013, 06:22:52 pm »
Wow, I never thought that Levak himself would reply to my post! You cleared up a lot of my questions, so thanks a lot!

I think one last question will set me on the way to adding my own entries to the menus:
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?
Thanks again everyone

4
General Calculator Help / Re: Hacking the TI Nspire CX Native OS?
« on: January 19, 2013, 04:15:52 pm »
Alright thanks, so I played aroudn with theme editor and examined the source for a while, and the only part that seems useful is as follows (in C):

Code: [Select]
void hook_menu_handler(Button button, CallbackData button_data, EventCode eventCode)
{
if(eventCode == ENTER || eventCode == MOUSECLIC)
{
Config *conf = new_config();
char *filename = "/ThemeEditor.tns";
char *argv[] = {filename};
if (read_config(conf, 1, argv))
{
free_config(conf);
return;
}

if (conf->mode == 2)
conf->current_index = themeEditor(conf->current_index);
else
theme_editor_gui(conf);

write_config(conf);
free_config(conf);
}
}

static int32_t* new_menu = NULL;

void hook_menu ()
{
if(*((int*)HOOK_ADDR) == HOOK_VALUE)
{
int32_t new_menu_[] = {
1, 0xE5,  0xFFFFFFFF, 1, SYST,
2, 0xE7,  0,          0, SYST,
3, 0xEB,  0xFFFFFFFF, 2, SYST,
3, 0x16D, 0xFFFFFFFF, 3, SYST,
1, 0x176, 0xFFFFFFFF, 4, SYST,
1, 0x192, 0xFFFFFFFF, 5, SYST,
1, 0x5E,  0xFFFFFFFF, 6, SYST,
// sentinel 0x42133769 because we can't get absolute addressing in the declaration of a table
1, 0x34,  0x42133769, 0, SYST,
0, 0,     0,          0, 0
};

new_menu = malloc (sizeof (new_menu_));
unsigned i = 0;
unsigned n = sizeof (new_menu_) / sizeof (new_menu_[0]);
for (; i < n; ++i)
if (new_menu_[i] == (int32_t)0xFFFFFFFF)
new_menu[i] = (int32_t)MENU_CALLBACK;
else if (new_menu_[i] == 0x42133769)
new_menu[i] = (int32_t)hook_menu_handler;
else
new_menu[i] = (int32_t)new_menu_[i];

*((int32_t**)HOOK_ADDR) = new_menu;
puts("patched");
nl_set_resident();
}

I understand C fairly well, but I don't see where the code adds the "6: Theme Editor" to the Settings menu.. Any ideas?

5
General Calculator Help / Re: Hacking the TI Nspire CX Native OS?
« on: January 19, 2013, 10:18:49 am »
I can't seem to find Ndless on SVN at all, just an Unofficial Ndless clone with nothing in it

EDIT: I think I found a clone of Ndless, but where do I go from here? Say, to add some entries to the menu when the "menu" key is pressed?

6
General Calculator Help / Re: Hacking the TI Nspire CX Native OS?
« on: January 18, 2013, 07:29:50 pm »
Thanks. Now where would I begin modifying the OS to change some menus around? I see a bunch of asm files

7
General Calculator Help / Re: Hacking the TI Nspire CX Native OS?
« on: January 18, 2013, 07:07:50 pm »
Alright thank you for the clarification. I'll attempt to add hooks to the OS but I'm not sure where I would put them or how to get my custom OS onto my calculator.

8
General Calculator Help / Re: Hacking the TI Nspire CX Native OS?
« on: January 18, 2013, 09:05:57 am »
How difficult is it to create a custom Boot2? Could this brick my calculator if I messed up?

and are there any simple tutorials for adding hooks?

9
General Calculator Help / Re: Hacking the TI Nspire CX Native OS?
« on: January 17, 2013, 05:56:03 pm »
So from my understanding I can't really achieve this on the CX because there's no way to install my own OS?

10
General Calculator Help / Re: Hacking the TI Nspire CX Native OS?
« on: January 16, 2013, 10:45:18 pm »
Thank you for your replies! I'll check out dummyos mode and nLaunch. I don't plan on distributing the modified OS, it's for personal convenience only. Do you know anything about modding the original OS? What language(s) would I need to be familiar with?

11
General Calculator Help / Hacking the TI Nspire CX Native OS?
« on: January 16, 2013, 09:27:16 pm »
Hello everyone. I have a TI Nspire CX Cas and I've been wondering for some time whether it's possible to hack the native OS and add custom menus/key combinations, etc. If not, could this be achieved by installing a custom OS that I create from modifying the stock?

Thanks!

Pages: [1]