Author Topic: nSDL 1.1.1 Anniversary Edition—The Ultimate TI-Nspire Graphics Library  (Read 138644 times)

0 Members and 3 Guests are viewing this topic.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: nSDL (0.1.4 beta)
« Reply #165 on: April 05, 2012, 05:52:26 pm »
Yes, the CX supports 65536 colors. In theory, the Prizm can support 4 times as many colors (18-bit) but I haven't confirmed it yet, plus it would waste a lot of memory.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: nSDL (0.1.4 beta)
« Reply #166 on: April 05, 2012, 06:00:43 pm »
Thanks for the info, and I see. I think 256 for games on such small screen would be just fine enough anyway.

Also I just got a BSOD on my CX! O.O (well... not really, but the loading screen reminded me of one)

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #167 on: April 07, 2012, 02:09:09 pm »
I've now added hardware 8 bpp on both TC (i.e. Touchpad/Clickpad) and CX models. In fact I restructured the code and there are now 5 different bpp modes: CX SW16 HW16, CX SW8 HW16, CX SW8 HW8, TC SW8 HW8, TC SW8 HW4 (where SWx HWy is software x bpp, hardware y bpp display).

I'm considering implementing double buffering and wondering if it's worth the trouble (in TC models it's unnecessary, no tearing thanks to the slow and shitty LCD). Also I need to fix some mouse issues and do some further fine-tuning before 0.2.0.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: nSDL (0.1.4 beta)
« Reply #168 on: April 07, 2012, 03:26:27 pm »
Good, as usual :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #169 on: April 13, 2012, 02:47:16 pm »
Could somebody with a CX do me a favor?

Could you grab the the attached file, send it to your calculator and just see if everything works. Move your finger around the touchpad to move the mouse, if you press it you should see "SDL_MOUSEBUTTONDOWN" showing up. It uses hardware 8 bpp and the touchpad, so I'd like to know if everything works nicely. Thanks for whoever helps me. :)

(0.2.0 is advancing nicely, there'll be a lot changes and a bigger "launch" than usually)
« Last Edit: April 13, 2012, 02:52:58 pm by hoffa »

Offline atiatinini

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #170 on: April 13, 2012, 07:12:08 pm »
It works, but lags a lot. Sometimes the program completely freezes for a few seconds.
But is amazing, thanks!  :)
« Last Edit: April 13, 2012, 07:12:24 pm by atiatinini »

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: nSDL (0.1.4 beta)
« Reply #171 on: April 13, 2012, 08:37:48 pm »
I tried it on a CX CAS (don't know if there's anything different than a normal CX) and i have the same result. I shows up, shows the coordinates, shows the mousebuttondown and coordinates, but lags sometimes for a short while

edit: My calc did a reboot when i pressed [esc] ö i don't think that' normal.. i treid it 3 times, and everytime it did a reboot..
« Last Edit: April 13, 2012, 08:52:39 pm by Nick »

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #172 on: April 13, 2012, 10:36:08 pm »
Thanks a lot you both.

Not sure about the rebooting issue, but I fear it has something to do with the mouse, I had the same problem at first but thought I had fixed it (on Touchpad it works). When it comes to mouse lag, it's very weird behavior, but I remember having something like it on my Touchpad at first, fixed it by moving the touchpad scanning function a bit. Could you try the attached program for me? It reads raw values from the touchpad, I'd like if to know if the "Velocity" still lags and updates rarely or if it's fast:
Spoiler For Spoiler:
I can only bribe you with a thank you in the readme.

This is how the mouse works on my Touchpad:
« Last Edit: April 13, 2012, 10:41:54 pm by hoffa »

Offline atiatinini

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #173 on: April 14, 2012, 12:39:34 am »
The values change when I use the touchpad but the mouse doesn't appear.  :(

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #174 on: April 14, 2012, 12:53:44 am »
The values change when I use the touchpad but the mouse doesn't appear.  :(
That's normal, I disabled the mouse so that I can only read raw values (no SDL involved except for the font drawing). So it seems it does update it normally. I think the problem might be similar to the one had some time ago. Thanks a lot, I'll look into it. :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: nSDL (0.1.4 beta)
« Reply #175 on: April 15, 2012, 11:08:53 pm »
I'll give it a try when I have some time, but I have a bug to report for the Plasma program: After a few times running it, when you press enter to run the file, nothing happens at all, even if you ran another Ndless program before. Once your calc rebooted, it seems to work again.

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #176 on: April 18, 2012, 05:01:37 pm »
Just to keep you guys updated, the mouse now works on CX models when using SDL_WaitEvent() (thanks atiatini for the testing), but it still "lags" (actually input lag) when using SDL_PollEvent(), so that among other things remains to be fixed.

Also meanwhile I've been working on an extremely simple image format for those who might prefer to include images in the executable (useful for small sprites and such), along with a converter:



Oh and I'll probably be a bit less active as I plunged into some more serious indie game development.
« Last Edit: April 18, 2012, 05:08:48 pm by hoffa »

Offline atiatinini

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #177 on: April 18, 2012, 06:15:29 pm »
Nice, hopefully we will soon see awesome games (and emulators :)) being made with nSDL!  :D

And yes, there is a bug in the plasma demo, I'll probably release an updated version soon. ;)

EDIT: Here it is:

CX:
http://www.mediafire.com/?huad2sed9i378t3
Touchpad/Clickpad:
http://www.mediafire.com/?p36ze746p0ot847
« Last Edit: April 20, 2012, 02:23:06 pm by atiatinini »

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #178 on: April 20, 2012, 07:03:26 pm »
Some more updates...

I've added support for own extremely simple image format, and I added a SDL_nDrawStringInRect() function which draws a string within the boundaries of an SDL_Rect, as you could imagine. Here's a little screenshot showing off the NSP_FONT_AUTOSIZE feature (non-monospaced fonts), SDL_nDrawStringInRect() (the purple rectangle is only to show how it fits itself inside it, it's not part of the function), and an image included in the executable (everything is of course well integrated into SDL, the SDL_nLoadImage() function returns an SDL_Surface for example):



Here's also a more recent screenshot of the image converter that'll be included with nSDL 0.2.0:

« Last Edit: April 20, 2012, 07:08:36 pm by hoffa »

Offline atiatinini

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #179 on: April 20, 2012, 07:38:58 pm »
Amazing!  :)
Just wondering, how's the performance of this compared to BMP blitting?