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 ... 9 10 [11] 12 13 ... 22
151
Other Calculators / The Future of TI-Nspire Programming
« on: April 07, 2012, 06:46:43 pm »
Tossing my two cents.

I'm a relatively new guy in the calculator community, but I've read and experienced enough of TI's actions to not give the slightest damn about morality as far as they're concerned. Sucking TI's big corporate dick hoping they'll change their ways is ridiculous (does not apply to people like adriweb who have contacts), they won't change for an insignificant minority, that's how business works (and I fully understand them), deal with it.

Let's be honest, if I had a non-CAS calculator, I'd work on getting a CAS OS installed on it, would spare me a few bucks. If it was possible to control the LEDs, I'd probably write a PTT simulator just for the heck of it (not sure if I'd cheat with it though, it's not like I can't walk to class with PTT already activated, documents stuffed on it and pretend I just put it on). It would be a nice big "fuck you" to TI, and through my cynical eyes I'd probably enjoy the eventual aftermath. Either you bend down and adapt, or then you go against the flow, relish the advantages, and deal with the consequences.

In other news, I think changing the theme to a lighter, more modern and less "intimidating" one would encourage others to participate (no offence to whoever made the theme, just my view). I'm pretty positive there's a great deal of psychology involved, and many might have the tendency to go away or just quickly pass by if it looks too much like a concentration camp of weird and sweaty basement dwellers (yeah, you'll have to get used with my way of expressing myself). Think what you think, but that was what made me doubtful before I joined the party.

152
Lua / Re: Updating WZGUILib
« on: April 07, 2012, 05:14:18 pm »
Oh and there's one thing i've seen on some places, what's that "for __," part? i mean, what does that __ sign to?
It's a convention (used in Python among others), it's no special character. Usually if we don't care about the variable we're looping with, it's better just to use "_" to explicitly show it's not important.

153
nSDL / Re: nSDL (0.1.4 beta)
« 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.

154
nSDL / Re: nSDL (0.1.4 beta)
« on: April 05, 2012, 02:50:12 pm »
However, I think a 256-entry palette mode could still be useful, as nDoom used that even in its original grayscale form.
In what way could it be useful? In its current form SDL uses a 256-color software palette; the result is exactly the same whether using software or hardware palette.

155
nSDL / Re: nSDL (0.1.4 beta)
« on: April 05, 2012, 09:56:11 am »
You'd have to fill the palette RAM with 256 grayscale color values
Oh of course, I was thinking about that.

each from 15 (black) to 0 (white)
So there after all is only 16 colors available? My main reason to even try to switch to 8 bpp is for some extra shades of gray, the speed increase is negligible.

156
nSDL / Re: nSDL (0.1.4 beta)
« on: April 05, 2012, 05:18:05 am »
Okay I tried switching to 8 bpp using nDoom as my main source of information. I then decided to draw--what I thought it would be--a gradient, just copying bytes from lower to higher, and this is what I got (actual calc and on the emulator):



Only the first 16 pixels show a gradient (the usual 16 "colors"), after that it's just a clusterfuck of seemingly random shades of gray. I thought it would be darker to lighter from 0 to 255.

In other news, atiatini ported some plasma demo effect, here's the result:



And on CX using the 8 bpp mode:



Also the mouse seems nice. How is the touchpad sensitivity? I know the cursor of the one in the OS stutters a lot when I move the finger around, but maybe it was the OS fault.

Seemed pretty fine to me when I tried, no stuttering as far as I could notice. :)

157
nSDL / Re: nSDL (0.1.4 beta)
« on: April 03, 2012, 09:18:06 am »
AFAICT (from watching DummyOS changing colors smoothly enough), the grayscale screen can do 256 shades of gray... or at least, it can do more than 16 shades :)
If that's true, I might be more inclined to try 8 bpp out.

The normal 320 x 240 x 4 bpp screen area is stored in SRAM, but the 320 x 240 x 8 bpp area cannot be stored there, it needs to be stored in SDRAM. Upon exit, one has to make sure that the memory is freed and the screen base address pointer is restored, otherwise funny stuff will occur.
And reading from display memory stored in SDRAM might have some unwanted effects (-> critor ?).
If I have some documentation and facts I can rely on, it should be very possible to implement. SDRAM should never be read anyway, in nSDL's case all reads go through the buffer. I could just write some experimental code through a bunch of #if's like I've been doing until now and add a static library to the list (libSDL-TC8.a or something) for those who want to try it out. It might very well be that the advantages of having a 8 bpp display outweight the disadvantages of the rare occasion when the calculator explodes because of access violations.

The case for hardware 8 bpp mode, on Clickpad & Touchpad, would be to reduce the risk that Clickpad & Touchpad users are left in the cold for SDL-based programs.
How so left in the cold?

158
nSDL / Re: nSDL (0.1.4 beta)
« on: April 03, 2012, 08:37:38 am »
Quote
8 BPP support for CX (thanks to atiatini for the idea; makes it possible to port 8 BPP programs for the CX),
FWIW, while their screen sucks beyond usability, the Clickpad & Touchpad models do support 8 bpp, as shown by nDOOM :)
In this case it's software 8 BPP for CX (i.e. if 8 BPP used, the 8->16 conversion is done at the very end), the same way as it's software 8 BPP for Touchpad/Clickpad (8->4 conversion done at the end). I indeed read that it was possible to change the bit depth on the grayscale display, but I suppose the screen'll still only have 16 shades of gray, and the advantages of switching to hardware 8 BPP are limited (not sure how it would behave in weird situations or sudden crashes).

Quote
many font-related changes (if you're the observing type you can notice one thing on the screenshot below)
Transparency ?
Nope, that should already work with SDL_SetAlpha(). It's non-monospaced fonts (e.g. see "quick"). I acknowledge the font isn't the best to show that, but it wasn't the point either.

159
nSDL / Re: nSDL (0.1.4 beta)
« on: April 03, 2012, 08:00:18 am »
Just to give you a quick heads up, the next version--0.2.0--and rather major step, will have numerous changes. Among those will be mouse support, 8 BPP support for CX (thanks to atiatini for the idea; makes it possible to port 8 BPP programs for the CX), many font-related changes (if you're the observing type you can notice one thing on the screenshot below) and a lot of under-the-hood modifications (performance, stability, etc.). Also a few surprises. Quick screenshot to show 16 BPP and palettized 8 BPP on CX (actually it's just an excuse to give the thread some color):


160
Ndless / Re: Ndless bFLT loader
« on: April 02, 2012, 05:37:54 pm »
At least when it comes to nSDL, having a working and stable loader would be absolutely great. It would right away open a lot of doors and remove the burden of tedious debugging. Newlib would work, giving access to a working libc and making porting a lot easier (math library and whatnot). SDL_image and other libs would work with quasi no changes and nSDL code would be considerably cleaner. Good job tangrs, this'll be a great plus.

161
nSDL / Re: nSDL (0.1.4 beta)
« on: March 29, 2012, 04:48:29 pm »
I managed to get the mouse to work, at least to some degree. Some very weird bug shuts down the program at seemingly random moments, as you can see:



EDIT: After numerous tests it seems that it crashes (or whatever happens) if the mouse goes to the y-coordinate 9. I see no logical explanation for this bug.

162
nSDL / Re: nSDL (0.1.4 beta)
« on: March 28, 2012, 10:38:11 am »
I'll try and port (wait, no, I will port) fdlibm (actually I think that's what newlib partly uses); it would be a nice add-on with the next nSDL release.

EDIT:

I compiled the fdlibm sqrt routine codes with _IEEE_LIBM and __LITTLE_ENDIAN defined, and it works nicely:



The "inside *" messages are there to prove that it is indeed using the new functions and those of the math lib magically included by GCC.
Maybe the same trick could be blindly used on newlib's libm code (which should be pretty much the same).

PS: It seems that GCC includes libm even without -lm, how do I force it not to use any libraries? Using -nostdlib with ld-nspire just makes it vomit all kinds of __aeabi_* errors.

EDIT2: I did a few changes and compiled fdlibm; it should implement all functions in <math.h> and it also contains the macros (were added from newlib's <math.h> manually). If it works well it could be a more or less lightweight replacement to newlib's libm.a. Library's attached.

163
nSDL / Re: nSDL (0.1.4 beta)
« on: March 28, 2012, 09:26:01 am »
The source code of Newlib's sqrt is this one:

http://sourceware.org/cgi-bin/cvsweb.cgi/src/newlib/libm/math/w_sqrt.c?annotate=1.1.1.1&cvsroot=src

_LIB_VERSION refers to the global variable __fdlib_version, I'm not sure why but it seems to require relocation, which cannot be provided by Ndless.
It actually doesn't work well without nSDL, it's just that the random access to memory falls to a valid address (but still not __fdlib_version).
I'm afraid we cannot trust any Newlib function without a full-featured relocator.
Can't Newlib "just" be recompiled with some nl_relocdata hacking meanwhile?

164
nSDL / Re: nSDL (0.1.4 beta)
« on: March 27, 2012, 05:35:09 pm »
I'd prefer that both of you contribute to find out the root cause of the issue.
I'll have a more thorough look at it tomorrow (or whenever I have the time). I checked newlib's sqrt() implementation (I'm pretty sure that's the one used), and there doesn't seem to be any global variable stuff that could cause issues.

165
nSDL / Re: nSDL (0.1.4 beta)
« on: March 27, 2012, 05:03:22 pm »
binutils: 2.21
gcc:      4.6.2
newlib:   1.19.0
gdb:      7.3.1

BTW, atiatini, meanwhile you could use the fast inverse square root function (used in Quake for example):

float inv_sqrt(float x) {
   union {
      float x;
      int i;
   } u = {x};
   u.i = 0x5f3759df - (u.i >> 1);
   return u.x * (1.5f - (0.5f * x * u.x * u.x));
}


It's quite "hackish", but just do 1/inv_sqrt() and you have an accurate and a very fast approximation of the square root.

Pages: 1 ... 9 10 [11] 12 13 ... 22