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

Pages: 1 ... 11 12 [13] 14 15 ... 21
181
nSDL / Re: SDL for the TI-Nspire
« on: March 04, 2012, 06:13:18 pm »
Nice, keep up the good work!  ;)

Also, will it be possible to port VisualBoyAdvance? It's SDL-based.  :D
Depends what exactly are the libraries used by VBA, but sure, with some trimming it shouldn't be too big of an issue.
EDIT: Reo, are you sure about it? I honestly don't have an idea, but VBA might be optimized quite a bit as it's already a robust and mature program.

182
nSDL / Re: SDL for the TI-Nspire
« on: March 04, 2012, 05:29:28 pm »
Actually this'll be the last update for today. On the previous screen you can see that gradient, but it only shows 7 colors and it doesn't seem to be consistent. That's because SDL's palette color mapper is crap (or not suited for 4-bit displays), so I decided to get completely rid of the palette and replace the color mapper code by a one-liner. It should be faster, much better, and should simplify and speed things up generally as all the bytes in the screen buffer are already within the 0-15 range. I'm not entirely sure that it won't cause any issues later (not sure how SDL deals with blitting surfaces with different formats etc.), but currently it seems to be working well, and here's the result (compare with the previous one, it's the same code for the gradient) (oh, also notice odd coordinates work well):



Here are the basic things I still need to do before we have a first beta version of SDL for the TI-Nspire:
- Get the BMP blitting to work
- Fix the events (it currently sends loads of them and at inappropriate moments; also some stuff with the joystick I need to fix)
- Implement the timers system fully
(- Add own function to blit images from array data)

Those are the most important things and the first things that come to my mind.

BTW, on my calculator performance-wise it seems quite fast, it's rather snappy and responsive although it's updating the whole screen every time and a lot more than it should (event system that needs working on). It's a very simple program but it's good to see it runs fast.

183
News / Re: OS 3.2 blocks Ndless
« on: March 04, 2012, 04:54:49 pm »

Don't be too fast at saying nDoom is not interesting for teachers.

Anybody wondering  how it works is going to find out very interesting trigonometry equations :)
And all kinds of weird hacks for lightning fast mathematical functions and whatnot.

184
nSDL / Re: SDL for the TI-Nspire
« on: March 04, 2012, 02:28:27 pm »
And last update today: I wrote a first version of the non-CX video code. It works poorly with anything odd (as opposed to even; doesn't handle single nibbles when copying data), but I have some results:



(Oh, and I got to try it on my own TI-Nspire, which is nice; seems to be working well with that primitive example)

185
nSDL / Re: SDL for the TI-Nspire
« on: March 04, 2012, 01:21:38 pm »
Oh boy finally I have some code that initializes and runs stably on both calculators. I eventually noticed there was an extremely annoying memory leak that caused completely unpredictable and inconsistent behavior only with non-CX code (in non-graphical parts). It's so reliving to see this showing up in the console no matter how many times you run the program:


Feels good man.

It also now prevents you from launching any code not compiled for the current calculator:

186
News / Re: OS 3.2 blocks Ndless
« on: March 03, 2012, 01:26:21 pm »
Two major differences and disadvantages compared to iOS jailbreaking for instance is that the userbase is a lot smaller (i.e. less people hacking around) and a calculator is a lot less complex than a mobile phone with a full-fledged operating system (i.e. less vulnerabilities). I have to admit this is quite demotivating as far as the SDL port I'm working on is concerned.

187
nSDL / Re: SDL for the TI-Nspire
« on: March 02, 2012, 07:00:14 pm »
It shouldn't, no. Weird, works very well on the emulator.
It's still some early code though, I haven't thoroughly tested it (and more generally, the tinspire_test.tns on github doesn't necessarily have to work; I just push the changes when I feel like it). I think I'll write the video driver for non-CX first so that I have a better idea of the behavior on both machines.
Thanks again anyway, I'll look into it more tomorrow.

EDIT: It does try to load a BMP, but I don't think it should stop it from running, as it just returns NULL and moves on. It's normal that it doesn't work when holding the key, that's how events work in SDL. SDL_EnableKeyRepeat() should enable that behavior though, but I'm not entirely sure if it works currently as I haven't fully implemented the timers system (in fact there's only SDL_Delay()).

188
nSDL / Re: SDL for the TI-Nspire
« on: March 02, 2012, 04:29:33 pm »
Thanks for the information! I think the freezes and clock icon appearing might be caused by some issues with the input code that sends a gazillion events (and needs fixing), or then by the main loop that runs too fast (or, in the worst case, too slow). Seems like I'll have to slowly start writing the non-CX graphics code so I can myself try it on my Touchpad so as to see how it runs.

Anyway, I added "classical" SDL events (those SDLK_* things for instance) which took quite a bit of time for the keymaps and whatnot, but again it behaves a bit weird with SDL_PollEvent.

EDIT: SDL doesn't seem to handle 4-bit color at all, which is a bit trickier. I think I'll have to pretend it's an 8 BPP display and just before copying to the framebuffer pack it in 4 bits or something.

189
nSDL / Re: SDL for the TI-Nspire
« on: March 02, 2012, 01:17:11 am »
You're trying it on the classical TI-Nspire I suppose (and hope)? I forgot to mention it but I'm only working on the CX right now (the classical one is another story because of its annoying 4-bit pixels, which requires some special care), and as such it should only work on that calculator (which, funnily enough, I do not own; relying fully on the emulator).

EDIT: I'd appreciate it if somebody could check if the TNS works as it should on their physical CX. :)

190
nSDL / Re: SDL for the TI-Nspire
« on: March 01, 2012, 02:15:12 pm »
I wrote an early version of the joystick input driver (i.e. the TI-Nspire's keypad works as a SDL "joystick"). I behaves a bit weird with SDL_PollEvent (endless events once the first one is fired), but with SDL_WaitEvent it seems to be behaving as it should. It has two axes obviously (left/right and up/down) and 24 buttons (only the most used ones are currently included). No hats, but the touchpad could be used as a joystick trackball though. Anyway if you want to try it out yourself grab the tinspire_test/tinspire_test.tns on github, you should be able to paint the screen using the arrow keys and exit using esc. Check the tinspire_test.c file if you want to see what the code looks like (it's a big SDL hell though, I just quickly add code to test it).



BTW, should the joystick fire events as long as an arrow key is pressed or should it just fire the very first one? The former seems more logical to me when it's about joysticks.

191
nSDL / Re: SDL for the TI-Nspire
« on: February 28, 2012, 04:28:31 pm »
1) None currently, but it's sometimes a bit of a mystery to know whether or not a certain issue is caused by global variables (e.g. I'm currently unable to blit BMPs although reading and loading seems to be working; it takes quite a bit of time to go through the code always having in mind the problem might not be caused by the code itself).

2) Video, events, timers and input (i.e. "joystick") are the main things I'm planning to implement. I haven't looked at audio, but it's not impossible that it'll also be included. EDIT: SDL_image and SDL_gfx shouldn't be too difficult to port.

SDL_DisplayFormat is a practically platform-independent function, so it should already work.

192
nSDL / Re: SDL for the TI-Nspire
« on: February 28, 2012, 11:38:09 am »
Alrighty back from the mountains, I can resume the work. It seems that the current code works well when it comes to drawing rectangles and updating specific parts of the screen, which is great. This might mean drawing sprites (and more generally, BMP images) will work without having to do too much work.


193
nSDL / Re: SDL for the TI-Nspire
« on: February 16, 2012, 01:05:57 pm »
I'm now able to fill the screen (which by itself isn't too amazing, but it does prove that the underlying stuff works) and update it (and update any part of the screen for that matter, although with a solid-colored surface it's hard to tell if it works as it should). This is where I'll leave it for a week, going to the French alps tomorrow; gotta pack my skiing gear.


194
nSDL / Re: SDL for the TI-Nspire
« on: February 15, 2012, 10:50:55 am »
Oh wow, thanks. I'm quite surprised as I tried the same code as you except without the &-operator; I thought prefixing a function name with the ampersand was optional, both should return the address of the said function AFAIK.

EDIT:
This is great news as I'm now able to initialize the barebone video driver:


195
nSDL / Re: SDL for the TI-Nspire
« on: February 12, 2012, 06:56:42 am »
Thanks, but it unfortunately did not fix it. What exactly does size refer to--what size does it refer to (in bytes I presume)? I'll experiment around a bit, but if there is no solution yet I will kindly wait for any future developments.

EDIT:
What do you mean relocating NULL? bootstrap is not NULL, nor is the quotient equal to zero.

Pages: 1 ... 11 12 [13] 14 15 ... 21