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 - CiriousJoker

Pages: [1]
1
TI-Nspire / Any updates to mySpire?
« on: January 23, 2016, 06:03:34 pm »
I found mySpire, for those who don't know it, it's supposed to edit the boot images for a unique calculator experience.

Sadly, this only works on 3.1 as stated on https://ndless-apps.org/

However it does start on 4.0.3.29 and i can successfully edit /phoenix/manuf.dat
The changes remain active until i reboot the calculator (reboot / crash doesn't matter)

How comes the manuf.dat file gets refreshed on every boot?

Also is there anyone able to build mySpire for 4.0.3.29?
I have hardware revision J, might that be the problem?

2
Sorry to bug you guys again, but i really cant figure out why this doesnt work :(

Here's the important code snipped im talking about:

Code: [Select]
class Level
{
public:
static bool InitLevel();

private:
static string LevelDataString;
};

bool Level::InitLevel()
{
if(( (Level::LevelDataString).size() % 6) != 0)
{
return false; // This line crashes it all
}
return true;
}


This crashes:
Code: [Select]
if(( (Level::LevelDataString).size() % 6) != 0)
{
char popup_result[256];
show_msgbox("Error", "The level seems to be broken.");
}
return true;


This also crashes:
Code: [Select]
if(( (Level::LevelDataString).size() % 6) != 0)
{
return false;
}
return true;


This works (but makes no sense, i just tested if ANY code makes it crash):
Code: [Select]
if(( (Level::LevelDataString).size() % 6) != 0)
{
int test = 1;
}
return true;

I seriously dont get why i cant just return false from a boolean function ...
I mean, does it crash in "normal" for pcs too or is this just an ndless problem?

3
TI-Nspire / Using strings with c++
« on: February 03, 2015, 06:52:22 pm »
Hey guys,
sorry to ask you again for something, but this time its that i dont know how to use strings.

Normally strings work like this:

Code: [Select]
#include <string>

using namespace std;

int main()
{
    string foo = "bar";
}

But this doesnt work, because i cant include the string library ...
Is there anything i forgot to download?
Do i really have to use c-strings?

Or am i just too dumb for this?

ps.: Am i posting in the right forum? I havent found a subforum for such questions ...

4
So here's what i have:

I've started a plain c++ project and i wanna make a little game to practise.
Now my sample c++ class test works, and the library sample (nRGB) works too.
But i'm stuck at that point where i want to combine them. It always says something like:

Quote
undefined reference to `<every function i wanted to use out of the library>'

I tried this for days now, would be awesome if someone could tell a noob what to do  :3

Solution:

Code: [Select]
extern "C" {
#include <nGEO.h>
...
}

5
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 Advanced


It'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 O.O


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.
Spoiler For Long Explanation:
A savefile contains 2 savestates, so that if your newest is broken, it loads the backup.

A savestate is divided into 14 sections, each 4096 bytes big.
The last few bytes of every section are reserved for a section number, the time code (to decide which savestate it belongs to) and a checksum.

If the checksums are correct, the game will always attempt to load the game.

My application recalculates the checksums, so you can always load the save file.

This will not recover bad eggs, as each Pokémon has its own checksum.
If the checksum is wrong, it shows up as a bad egg.


=> Give it a try if you want, but don't expect magic


~CiriousJoker

edit: all bugs should be fixed now

6
Lets say i have this function:


Code: [Select]


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?

7
Calculator C / Ndless Hooking Tutorial (especially key-hooks)
« 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):



Code: [Select]

/* Shared data between hook and nclock */
static long * display12hrs = 0;
... (same style as the line above)
static long * checkTimeOnStartup = 0;
static long * noMiniClock = 0;


Code: [Select]

/* Install hook */
HOOK_INSTALL(HOOK_ADDR, hook_nclock);


Code: [Select]

/* If hook isn't already installed */
if(*((int*)HOOK_ADDR) == HOOK_VALUE) {


}




Code: [Select]


HOOK_DEFINE(hook_nclock) {
    if(!*noMiniClock)
        mini_nclock(1);
    HOOK_RESTORE_RETURN(hook_nclock);
}


Code: [Select]
// 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.

8
TI-Nspire / Send Key event
« on: April 09, 2014, 01:52:14 pm »
I wonder how i can use keyevents (Im just starting coding and wanna learn from examples, i know how to code c++ a little)


Specifically i want to let my programm do an overlay, wait for userinput and send it to the os while being active.
I wanted to make an Overlay so i can activate my Code with a button or a mouseclick.
Something like the nClock Clock overlay but with more user interactions.


~

Pages: [1]