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 - CiriousJoker
16
« on: July 25, 2014, 05:19:46 pm »
A friend of mine asked me to code some sort of tool to trade Pokémon with friends while in school, and here it is: nTrade AdvancedIt's a small application which allows you to trade Pokemon between third gen Pokemon games. Note that it may fail with modded ROMs if they use another structure for the savefile. Yes, I'm looking at you, Pokémon Glazed It works the way that your friend sends you his savefile, nTrade trades the Pokémon and you send back the changed save file. This way you still have the ability to clone your Pokémons. I also included the functionality to repair savefiles. Note that this only works, if the save file is corrupt because of incorrect checksums. ~CiriousJoker edit: all bugs should be fixed now
17
« on: July 24, 2014, 06:01:14 pm »
I don't know if you still need this, but can't you use something like this? char choice[1]; nio_printf(csl, "> "); // wait for input nio_fgets(choice,3,csl); // store input in choice[] return (int)choice[0]; // return choice If it doesn't help you, maybe it helps others However it doesn't accept buttons like the keypad, etc. only printable chars If you set it to unsigned char, you may be able to use the second part of the ascii table, but i haven't tested it ~virus
18
« on: July 22, 2014, 04:53:41 pm »
For now, it works fine and if the user has so much folders, its not my fault Right now i dont notice any delay and i have quite some folders... I don't think this much of a problem. I just used this version with the messagebox because i was too lazy to make my own console function, this way its one line + some stuff around to get the data into a struct. However, thanks for the notice, if i feel some delay, i'll make use of it EDIT: tryed it out on my real calculator and it really slowed it down, thanks, i fixed it <3
19
« on: July 20, 2014, 10:23:47 am »
Problem solved now: if you want to display messageboxes and console together, you have to switch between grayscale mode and color mode with lcd_incolor(); lcd_ingray(); else it produces such graphic bugs
20
« on: July 20, 2014, 10:12:38 am »
seems to be a problem with the grayscale mode...
if i add lcd_incolor();when i call the function, it "just" makes this graphical bug
EDIT: when i use the f10 (connect) command of the emulator, the screen is refreshed and it displays correctly. Is there any similiar method in c or any ndless related library?
21
« on: July 20, 2014, 09:30:31 am »
Ye i noticed the problem with the arrays however malloc works fine
22
« on: July 20, 2014, 09:17:10 am »
Lets say i have this function:
int main() {
nio_console csl; lcd_ingray(); clrscr(); nio_InitConsole(csl, 54, 30, 0, 0, 0, 15); nio_DrawConsole(csl); nio_drawing_enabled(&csl,TRUE); nio_cursor_type(&csl, NIO_CURSOR_UNDERSCORE); doSomething(); }
int doSomething() {
const char * title = "Title"; const char * subtitle = "Sub titile"; const char * msg1 = "Element 1"; const char * msg2 = "Element 2"; char * defaultvalue = "default value"; char * value; int len;
int value1 = 42; int value2 = 1337; char popup1_result[256]; char popup2_result[256]; if (show_1numeric_input(title, subtitle, msg1, &value1, -42, 9001) != 1) return 0; sprintf(popup1_result, "%s:%d", msg1, value1); show_msgbox(title, popup1_result); }
(It's some code of the "ndless_popup_tests" example)
Than that results in a completely awkward screen. If i use standard messagebox with title and content then it works perfectly and the box will be drawn over the console window. However, using the used messagebox works so its just a graphical problem. Is there a possibility to close the console window somehow and open it afterwards?
23
« on: July 19, 2014, 10:03:17 pm »
Can't you just cast it?
if u want to printf it then use %f
Sorry but you have to explain what you want and what doesnt work. Maybe some example code.
24
« on: April 13, 2014, 04:15:24 pm »
Why shouldnt i use makros and how do i use the debugger??I dont know any assembler and i dont know anything about this debugger... I just know that the emulator stops working if i "debug"
25
« on: April 13, 2014, 05:58:51 am »
So i "just" have to find the right addresses?Does this page help?In the Link with the interrupt guy he talked about an address which i can find on this page:http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_portsBut cause hes talking about interrupts, im not sure anymore, if this page could help me...I need to fill hook_addr[] with all the addresses for all the ndless versions / hardware versions and#define HOOK_ADDRjust decides which is used right?How can i find these addresses? When i open the debugger, my emulator freezed (both emulators so it seems to be normal)
26
« on: April 12, 2014, 06:51:24 pm »
Vogtinator told me that the os interrupt handler is a good place to set up a hook. You tell me that the key code translator is the better place. I "just" wanted a little code example cause i cant rly figure out how i can manipulate the ram(?)
I just wanted something like this if its possible:
installhook(ram_address, function_to_activate_when_ram_has_a_specific_value());
//or
installhook(ram_address); //launches my program, when user presses ctrl+return
Afaik, a hook means a ram address and if the value is changed, my code activates(?) Plz correct me if im wrong
28
« on: April 12, 2014, 10:17:10 am »
bump
rly noone?
30
« on: April 11, 2014, 05:58:47 pm »
Is there any good hooking tutorial for ndless on the ti-nspire 3.6?
I wanted to make a notepad which i can activate by something like ctrl+return. I found "example" code in nClock (clock overlay in upper right corner). The Problem is that i dont know what part of the code actually installs the hook. I found some lines that probably have to do with the hook (and hopefully only these):
/* Shared data between hook and nclock */ static long * display12hrs = 0; ... (same style as the line above) static long * checkTimeOnStartup = 0; static long * noMiniClock = 0;
/* Install hook */ HOOK_INSTALL(HOOK_ADDR, hook_nclock);
/* If hook isn't already installed */ if(*((int*)HOOK_ADDR) == HOOK_VALUE) {
}
HOOK_DEFINE(hook_nclock) { if(!*noMiniClock) mini_nclock(1); HOOK_RESTORE_RETURN(hook_nclock); }
// Defines the adresses and value(?)
static const int hook_addrs[] = {0x100B66C8, 0x100B6988, // Clickpad / Touchpad 3.1 0x100EAAAC, 0x100EADC4, // CX 3.1 0x100E72CC, 0x100E75E4, // CM 3.1 0x101122b8, 0x100eb288, // Clickpad / Touchpad 3.6 0x10111cfc, 0x1011201C}; // CX 3.6
//What does this mean? what does nl_osvalue(... , ...); do? #define HOOK_ADDR (nl_osvalue((int*)hook_addrs, sizeof(hook_addrs)/sizeof(hook_addrs[0])))
static const int hook_values[] = {0xe92d47f0, 0xe92d47f0, 0xE59F1030, 0xE59F1030, 0xE59F1030, 0xE59F1030, 0xE59F1030, 0xE59F1030, 0xE59F1030, 0xE59F1030};
#define HOOK_VALUE (nl_osvalue((int*)hook_values, sizeof(hook_values)/sizeof(hook_values[0])))
The full code of nclock is attached.
|