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

Pages: 1 ... 14 15 [16]
226
Ndless / ELF Loader for Ndless - (now ready for non-dev use)
« on: December 15, 2011, 04:41:52 am »
The ELF loader has reached a stage where most people can use it to load basic stuff.

When you run the program, it installs a hook. After that, you can load ELF files as if you'd load a normal Ndless binary.

More instructions on how to compile the loader and how to develop applications that take advantage of it are described in the README.

You can get the source code on Github.

Happy deving!

I'd also like to thank everyone who contributed to Ndless. I did borrow some of Ndless's code for use in this loader.

Original post:

I'm not sure if it's relevant here, but I'm developing an opensource ELF loader for Ndless.

I'm writing this because the current Ndless way of loading binaries doesn't work for code that relies on static initialization of pointers.

I.e. code like this doesn't work:

Code: [Select]
void foo() {
  //blah
}

int main() {
  static void (*var)() = foo; //Since it's static, the address will be inserted at link time (which is 0x8000+offset on my machine)
  var(); //The GOT based relocation code in Ndless currently does not update the static variable function pointer.
  return 0; //Crash
}

Unfortunately, there's no way to fix this because Ndless binaries are converted into a memory image before running. That means the relocation code doesn't know what to update in the .data section of the memory because it doesn't know what symbols exist and need updating and where they're located.

Loading from an ELF file works because the symbol definitions are there and the relocation code knows where to find the bits that need patching. That's why I wrote this ELF loader.

Anyway, the core code is there, just needs a lot of polishing up.

If anyone wants to help, the source code is available on Github https://github.com/tangrs/ndless-elfloader
I'm hoping eventually, it will be integrated into the program loader on Ndless.

Thanks for your time,
Apologies if this is the wrong forum to post.

227
ASM / Re: The worst TI code I've ever seen
« on: September 30, 2011, 05:14:07 am »
Maybe it's deliberately obfuscated code?

228
TI-Nspire / Re: NSpire Gamekit - a game framework for Ndless (WIP)
« on: September 13, 2011, 05:46:08 am »
Hmm, the thought of the NSpire CX had not occurred to me. I'll take a look at the libraries you posted, thanks for the heads up :)

Thanks for the feedback guys!

229
TI-Nspire / NSpire Gamekit - a game framework for Ndless (WIP)
« on: September 13, 2011, 04:29:19 am »
I got bored and decided to try and write homebrew for the calcs again.

Bascially, I wanted to port a game but I thought it might be better to write a reusable framework instead. That would mean for future games, I wouldn't have to rewrite a lot of the stuff relating to graphics and all and others could potentially use it.

So here it is: https://code.google.com/p/nspire-gamekit/

The code probably isn't the most prettiest you've seen and it doesn't exactly run fast but it does the job. It's a work in progress.
I hope this could be useful to some people and would appreciate some feedback.

Cheers,

Pages: 1 ... 14 15 [16]