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

Pages: [1] 2
1
Ndless / Re: Ndless bFLT loader
« on: June 28, 2012, 04:36:19 pm »
I managed to build the toolchain on Windows with MSYS (after a lot of errors and hours). I've also patched Ndless (r632 instead of r573, because I have not found the r573 here) and I successfully make(d) it.

But when I tried to run the "test" (here), the nspire_emu console give me :
Quote from: nspire_emu
bFLT: Begin loading
bFLT: Version number does not match
bFLT: Bad header
bFLT: Caught error - exiting

<EDIT>: The true error message is :
Quote from: nspire_emu
bFLT: Begin loading
bFLT: Magic number does not match
bFLT: Bad header
bFLT: Caught error - exiting
But I tried to change the magic number ("ELF" to "bFLT") of the .tns and I obtained the error message above.
</EDIT>

I don't know what to do, because the test is supposed to work... So if you have an explanation :)

totorigolo
Sorry for my English, I'm French :)

2
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: April 22, 2012, 11:33:07 am »
* How do I draw images/sub-images?

Take a look at the RPG sample.

Code: [Select]
   // Create the sub-image
    ImageSubrect tile;
    setImage(&tile, &img);

    tile.w = CELL_SIZE;
    tile.h = CELL_SIZE;
    tile.x = 0;
    tile.y = 0;
    tile.offset_x = CELL_SIZE * 3;
    tile.offset_y = CELL_SIZE * 2;

    drawImagesubrect(&tile, buffer);

edit 1:
* Also, could sub-images possibly be used as sprites?
I don't know what is exactly a sprite, but you can use it to draw tiles from a tileset, or to draw an animated sprite.
A sub-image is just like a frame on an image, where you can change its height, width and position.

I hope you understand me...

edit 2:
Sub-Images are like SDL_Rect in these tuto : http://vally8.free.fr/coinprog/sdl/tut5/sprite.php - http://www.aaroncox.net/tutorials/2dtutorials/sdl_sprite.pdf. But SDL_SetColorKey() doesn't exists yet.


3
Ndless / Re: Standalone relocator - Ndless-Elfloader alternative
« on: April 22, 2012, 10:22:33 am »
I'm now getting:
ELF: call to elf_begin() failed
makeself.exe: Unable to parse ELF file "testlibm.elf"

Tell me if you want more tests, or maybe you now prefer to invest efforts on the bflt loader.

I also have this error.
The error is in xread(), which is in <libelf/input.c>.

Code: [Select]
static int
xread(int fd, char *buffer, size_t len) {
    //...
    while (done < len) {
n = read(fd, buffer + done, len - done);
if (n == 0) {
    /* premature end of file */
            // HERE
    return -1;
}
        //...
}

As ExtendeD said, tell me if your want more tests, or if you wish me to use the bflt loader.

4
Calculator C / Re: nRaze progresss
« on: April 20, 2012, 06:28:31 pm »
I don't know if you are still on this project, but I've just discovered it. You should have said me that you were using nRGBlib :)

If you want images in your program, you can use the last nRGBlib version to have them. However, I didn't understand your previous code.

5
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: April 19, 2012, 12:05:15 pm »
Yay!

What was that double-buffering thing?

If you are talking about "PS: For epic7, I haven't change your code, but I've just added the double-buffering :", I was seemingly wrong because I use only one buffer... I actually don't know how to name it, but it's a buffer ;)

If you are talking about the code, here it is : http://pastebin.com/UPmJT0nB. There are not several changes.

---------------------------------------------------

You can download the v0.3 samples here !

6
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: April 17, 2012, 06:09:33 pm »
nRGBlib v0.3 has just been released.
The main post has been updated.
A new has been published on TI-Planet : http://tiplanet.org/forum/viewtopic.php?p=123024.

7
News / Re: Dive into Critor's TI collection...
« on: April 07, 2012, 02:12:35 pm »
I count 99 true calculators  :P One is missing  ._.

8
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: April 01, 2012, 03:56:24 pm »
Thanks you :D

If you want to play, or create your map, you will have to wait  :P
  • Image transparancy
  • Delete tiles
  • Open PNG / BMP
  • Optimizations on 4bpp

9
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: April 01, 2012, 03:24:42 pm »
Here is an example of nRGBlib's current features.

The map editor is coded in C + + with SFML. It was created thanks to this tutorial.


The sample run slower on 4bpp, because of non-optimization.


----

PS: For epic7, I haven't change your code, but I've just added the double-buffering :

10
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: April 01, 2012, 06:06:24 am »
I am currently adding many new things to nRGBlib, whose images. The system is currently functional, but I have not optimized for the moment only the CX (16bpp), because I absolutely wants to keep compatibility between 16bpp / 4bpp without recompilation, and I'm having some problems with void* pointers ...

So if someone wants to help me in optimizing 4bpp in order to accelerate the next nRGBlib's release.  :)

I also plan to open PNG and JPG (because right now the format is one that I created) by integrating the source code of mViewer (for BMP and PNG) and of Nspire and Movie Player (of tangrs) (for JPG), which are released under GPL v2 and v3.

11
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: March 12, 2012, 02:29:19 pm »
Your way seems good, but I can't help you much better, because I am just a French 15 years old boy who had learned thanks to the SdZ and alone to program :P So, nRGBlib's code is surely not optimized at all, and all suggestions / patch / help (/ ...) is obviously the welcome  ;) (→ https://bitbucket.org/totorigolo/nrgblib/issues?status=new&status=open)

The objects flash a lot with this tho

Indeed, I noticed that the ball is flashing a lot. Maybe, you can use drawBox instead of drawDisc to clear the previous ball, because it should be faster...
To draw circles or discs, I currently use Bresenham's algorithm (http://fr.wikipedia.org/wiki/Algorithme_de_trac%C3%A9_d%27arc_de_cercle_de_Bresenham (or in English http://en.wikipedia.org/wiki/Midpoint_circle_algorithm), thanks Excale for the link :)), and you can see my implementation here (https://bitbucket.org/totorigolo/nrgblib/src/d999e40ef8af/src/nRGBlib/drawDisc.c). Maybe an (more) optimized version exists.

Anyway, thanks you for your feedback :D

12
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: March 10, 2012, 06:55:02 pm »
Your Makefile seems to be good.

Quote
I'd just need to do
yvel=randMinMax(-128, 128)
do do what i need
I'm not sure to have understood, but if I have well understood, you're right :
Code: [Select]
while (players  == 0)
    {
        //seed++;
        rand();
        if (isKeyPressed(KEY_NSPIRE_CTRL))

        /* ... */

        //seed=randnum(seed); //my goal is to give yvel a random value -128 to 128
        //yvel=seed%257-128;
        yvel=randMinMax(-128, 128);
And I've checked yvel values and they are goods.

Sorry if I'm repeating me, but what is your problem exactly? What is the output of gcc if your code not compile?

13
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: March 10, 2012, 01:09:02 pm »
I have no problem with your code.

I've replaced like this:
Code: [Select]
        //seed=randnum(seed); //my goal is to give yvel a random value -128 to 128
        seed = randMinMax(-128, 128);
and it works pretty fine.

Can you send me your Makefile ?

14
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: March 06, 2012, 08:14:52 am »
Do you include <nMATHS.h> ? Otherwise show me your code.

In the current configuration of nRGBlib, it's not very useful to have sprites, because you can create as many shapes as you want, it's very light (for example, a box = int16_t x; + int16_t y; + int16_t w; + int16_t h;). This is why I have not yet implemented sprites so far.

Tell me if my English is bad  ;)

15
Ndless / Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: March 03, 2012, 09:27:53 am »
Above all, please excuse me epic7, Spyro543 and willrandship for not responding, I didn't receive any mail and this topic has more succes than the french one...

So, does "character drawing" mean sprite support or text?

Sprite support would be really nice. At arbitrary sizes, ideally.

Also, have you considered image importing?

"character drawing" means text. I was wondering about sprite support and images, but i had actually not work on nRGBlib since Ndless 3 out.

Is there a pixel test command? That would be highly useful.

I added one, but i had problems, so i deleted it for the public release. It will be added soon  :)

In nRGBlib, how do you make sprites? Or has that not been implemented yet?

Also, as ive posted multiple times :P, rand() doesnt work because RGBlib has a rand function that conflicts with yagarto's one, so how do I get it to work? The snake game uses rand() and it works fine.... I can't really spot any differences between snake's code and mine that could have made snake's work, other than that it included nMATHS, but that didn't change anything for me when I included it

Edit: Ouch, triple post D:

Did you manage to use rand() and to compile ? I will answer faster this time ;)


Pages: [1] 2