Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
24 May, 2013, 00:29:22 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 ... 5 6 [7] 8 9 ... 23   Go Down
  Print  
Author Topic: nSDL 1.1.1 Anniversary Edition—The Ultimate TI-Nspire Graphics Library! -  (Read 15301 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 12:02:44
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1197


Total Post Ratings: +185

View Profile WWW
« Reply #90 on: 11 March, 2012, 15:08:42 »
0

non-CX working too ?

Awesome Cheesy
Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
hoffa
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Yesterday at 16:11:27
Date Registered: 28 May, 2011, 20:26:32
Posts: 302


Topic starter
Total Post Ratings: +115

View Profile
« Reply #91 on: 11 March, 2012, 15:15:02 »
0

Indeed, yeah. Damn sweet.



Here's the todo list from the README, so you can see what's still left to do:

1
2
3
4
5
6
7
8
Todo:
- Add SDL_GetTicks() for CX
- Map more keys to SDLKs
- Add support for diagonal arrow keys in events & joystick
- Should the joystick continuously fire events if an arrow key is held down?
- Put all the compiled objects in one folder, along with libSDL.a?
- Add some own function to load images stored in arrays (?)
- Add mouse support
A few of those are trivial to do, but as you can see there's not much left before a beta, if everything goes well and if I don't find any other issues.
« Last Edit: 11 March, 2012, 16:09:29 by hoffa » Logged
Lionel Debroux
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 19:43:41
Date Registered: 17 December, 2009, 09:37:25
Location: France
Posts: 1854

Total Post Ratings: +208

View Profile WWW
« Reply #92 on: 11 March, 2012, 16:33:12 »
0

IOW, you made the same thing for Clickpad/Touchpad ? Smiley
Logged

Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.
hoffa
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Yesterday at 16:11:27
Date Registered: 28 May, 2011, 20:26:32
Posts: 302


Topic starter
Total Post Ratings: +115

View Profile
« Reply #93 on: 11 March, 2012, 17:19:19 »
+2

Yes, or more generally, I fixed most of the blitting issues. Here's a short video so you can more or less see how blitting a big image runs speed-wise:

<a href="http://www.youtube.com/watch?v=WYT-2Redhy0" target="_blank">http://www.youtube.com/watch?v=WYT-2Redhy0</a>

EDIT: I actually forgot to pass the surface through SDL_DisplayFormat() to convert to the screen's pixel format. With SDL_DisplayFormat() it's a lot snappier.

EDIT2: Here's another video that gives a better impression of the blitting speed (and seems like there are some issues with timers I need to fix):

<a href="http://www.youtube.com/watch?v=fElSYkqvr-U" target="_blank">http://www.youtube.com/watch?v=fElSYkqvr-U</a>
« Last Edit: 11 March, 2012, 23:15:35 by hoffa » Logged
hoffa
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Yesterday at 16:11:27
Date Registered: 28 May, 2011, 20:26:32
Posts: 302


Topic starter
Total Post Ratings: +115

View Profile
« Reply #94 on: 12 March, 2012, 22:07:56 »
+2

While I'm dealing with the timer stuff, I decided to implement fonts. There are 4 fonts included by default, but it's easily extensible. See for yourself:



Drawing fonts is as easy as calling the SDL_NSP_DrawString() function (any TI-Nspire-specific functions I add will be prefixed with SDL_NSP_*).
« Last Edit: 12 March, 2012, 22:09:29 by hoffa » Logged
njaddison
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 15 May, 2013, 02:46:53
Date Registered: 08 November, 2011, 03:56:20
Location: South Carolina(USA)
Posts: 153


Total Post Ratings: -5

View Profile
« Reply #95 on: 13 March, 2012, 00:41:21 »
0

While I'm dealing with the timer stuff, I decided to implement fonts. There are 4 fonts included by default, but it's easily extensible. See for yourself:



Drawing fonts is as easy as calling the SDL_NSP_DrawString() function (any TI-Nspire-specific functions I add will be prefixed with SDL_NSP_*).

Is nSDL far enough to start porting SDL programs to the nspire? Or do you need to do more work? (I know nothing about SDL, so I have no clue what you have to do to finish it) Also, could I put custom fonts off of my computer on my nspire using nSDL without having to make the font over again?

Yes, or more generally, I fixed most of the blitting issues. Here's a short video so you can more or less see how blitting a big image runs speed-wise:

<a href="http://www.youtube.com/watch?v=WYT-2Redhy0" target="_blank">http://www.youtube.com/watch?v=WYT-2Redhy0</a>

EDIT: I actually forgot to pass the surface through SDL_DisplayFormat() to convert to the screen's pixel format. With SDL_DisplayFormat() it's a lot snappier.

EDIT2: Here's another video that gives a better impression of the blitting speed (and seems like there are some issues with timers I need to fix):

<a href="http://www.youtube.com/watch?v=fElSYkqvr-U" target="_blank">http://www.youtube.com/watch?v=fElSYkqvr-U</a>

Also, the video isn't showing, maybe it's because youtube is blocked at my school? I had no problem viewing youtube videos off of omnimaga before...
« Last Edit: 13 March, 2012, 00:44:13 by njaddison » Logged


NerdTests.com says I'm a Highly Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!


hoffa
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Yesterday at 16:11:27
Date Registered: 28 May, 2011, 20:26:32
Posts: 302


Topic starter
Total Post Ratings: +115

View Profile
« Reply #96 on: 13 March, 2012, 00:52:57 »
0

Is nSDL far enough to start porting SDL programs to the nspire? Or do you need to do more work? (I know nothing about SDL, so I have no clue what you have to do to finish it) Also, could I put custom fonts off of my computer on my nspire using nSDL without having to make the font over again?
I wouldn't say it is yet. Depends what programs of course, but a few crucial things are missing, and it needs some testing (but that's when it comes to porting more sophisticated programs in the current state; writing your own shouldn't be that big of an issue though). Also many programs use floating point math, and it doesn't seem like Ndless in its current states supports any of that. I'd say if everything goes nicely there might be an early beta at the end of the week.

Also, the video isn't showing, maybe it's because youtube is blocked at my school? I had no problem viewing youtube videos off of omnimaga before...
Yeah it's just you, the video works.
« Last Edit: 13 March, 2012, 00:54:18 by hoffa » Logged
calc84maniac
Epic z80 roflpwner
Coder Of Tomorrow
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: 20 May, 2013, 21:27:24
Date Registered: 28 August, 2008, 05:09:05
Location: Right behind you.
Posts: 2735


Total Post Ratings: +373

View Profile
« Reply #97 on: 13 March, 2012, 01:30:42 »
0

I'm pretty sure the GCC we use supports floating point. Of course, it can be slow since the floating point math has to be emulated with integer instructions.
Logged

"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
Chockosta
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 22 May, 2013, 20:19:59
Date Registered: 03 June, 2011, 20:14:17
Location: France
Posts: 440


Total Post Ratings: +159

View Profile
« Reply #98 on: 13 March, 2012, 16:59:01 »
0

Floating point operations work.
But floating point numbers can't be displayed with printf("%f") or sprintf("%f").
Logged

Chockosta (Loic Pujet) - Sorry for my poor English...
Look at my projects :
in C code : Periodic table, Space invaders, Fall, Snake, Minesweeper, nCraft (WIP)
in Lua : Snake, Space invaders, Bobby Carrot, Minesweeper, Mazes 3D, nSpaint, FreeCell, Tiny3D-Viewer, CubeField, Gravity Guy
hoffa
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Yesterday at 16:11:27
Date Registered: 28 May, 2011, 20:26:32
Posts: 302


Topic starter
Total Post Ratings: +115

View Profile
« Reply #99 on: 15 March, 2012, 21:14:14 »
+2

Alrighty guys, I'm happy to announce the first beta version of SDL for the TI-Nspire will come out very soon. Smiley

But before I can do that, I need someone to check one thing on their physical CX. It's everything but complicated; download the attachment, send it to your calculator and enjoy the nice fonts and just observe how the timer increases. It should output the number of milliseconds since SDL initialization, so it should increase at a rate of 1000 a second. Press any key to update that value. If it increases way too fast, just tell me. That's all I need you to do, it should take just a few seconds. Thank you a lot for whoever helps me; the faster I get the info the faster I can release SDL. Smiley

I've made quite a few changes since last update. I changed to a much faster, more flexible and cleaner font system, updated the timer stuff, fixed some issues and whatnot.

* sdl_test.tns (362.03 KB - downloaded 13 times.)
« Last Edit: 15 March, 2012, 21:14:55 by hoffa » Logged
atiatinini
LV1 Newcomer (Next: 20)
*
Offline Offline

Gender: Male
Last Login: 19 November, 2012, 01:04:19
Date Registered: 02 March, 2012, 20:49:13
Location: Portugal
Posts: 19

Total Post Ratings: 0

View Profile
« Reply #100 on: 15 March, 2012, 21:35:02 »
0

It's working very well, and the timer is very accurate! Cheesy
Logged
hoffa
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Yesterday at 16:11:27
Date Registered: 28 May, 2011, 20:26:32
Posts: 302


Topic starter
Total Post Ratings: +115

View Profile
« Reply #101 on: 15 March, 2012, 21:42:53 »
0

It's working very well, and the timer is very accurate! Cheesy
Good to hear, seems like the problem's only on the non-CX models then (the value increases at the speed of light). Once I finish studying I'll go and beat the crap out of that timer bug, do some housekeeping and release the beta (very probably tomorrow, unless I once again end up going to bed at around 1 AM). Thanks again.

EDIT: I'll probably make some how-to thread for those new to SDL with instructions, links to tutorials and such things once something's ready.

EDIT2: Just released TI-Nspire SDL 0.1.0. Smiley
« Last Edit: 16 March, 2012, 00:32:19 by hoffa » Logged
hoffa
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Yesterday at 16:11:27
Date Registered: 28 May, 2011, 20:26:32
Posts: 302


Topic starter
Total Post Ratings: +115

View Profile
« Reply #102 on: 16 March, 2012, 17:37:39 »
+4

Just finished rewriting the thread, it's still missing a lot of things (how-to, screenshots, etc.) but it's a nice start.

Also removed yesterday's 0.1.0, as it was missing the headers and still had the old clumsy SDL_NSP_* functions. So I quickly rolled out 0.1.1, that'll be the starting point. I haven't written any instructions yet, but those who know their way around SDL and static libraries can already start playing around with it. Smiley I also renamed the project to nSDL; I wasn't to fond of the n-prefix, but TI-Nspire SDL just seemed too massive, so nSDL it is then.
Logged
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 21:55:27
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« Reply #103 on: 16 March, 2012, 17:38:49 »
0

Very nice!

Need to see to test this when I installed Ndless (again) on my CX Smiley
Logged

alberthrocks
Coder Of Tomorrow
LV8 Addict (Next: 1000)
*
Offline Offline

Last Login: 11 May, 2013, 04:49:27
Date Registered: 01 May, 2010, 16:51:27
Posts: 743

Total Post Ratings: +88

View Profile
« Reply #104 on: 16 March, 2012, 17:57:39 »
0

Once again, great job! You've worked really hard Cheesy
Logged

Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! Sad Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. Smiley

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler for "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it Tongue)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it Tongue)
wxWabbitemu: 40% done (NEED MOAR FEATURES Tongue)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming Tongue)
Pages: 1 ... 5 6 [7] 8 9 ... 23   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.307 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.