Alternatively, join us on Discord.

HP Prime and HP-PPL Statistics and useful tips and tricks

Started by alexgt, May 10, 2016, 11:34:15 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alexgt

So this is the place to share any tests or tricks you have learned while programming/ using the HP Prime!

So DJ was wondering about if the new firmware made any speed differences with the speed of displaying GROBs, I have updated to the firmware 107701 (if that is the right number xD) and here is the speeds (in milliseconds):

G1 is set to 320x240
G1 no zoom, no alpha blending: 3-12 (consistent mostly on 3 with some spikes)
G1 2x zoom, no alpha blending: 29-41 (we see a significant speed drop here but I didn't specify the exact cords on G1 on what to display, when I did that it went down to 29-35 which isn't that big of a drop though)
G1 no-zoom, 50% alpha blending: 17-26 (it jumped once to 40 but that was only once)
G1 2x zoom, 50% alpha blending: 49-53 (this is super high so don't use this combo unless you are not drawing to the screen frequently)
G1 4x zoom, no alpha blending: 29-37, I don't know why 2x and 4x are so similar but it is probably because it stops drawing pixels after the coords are more than 320,240 or less than 0,0.
G1 4x zoom, 50% alpha blending: 49-56 again with the zoom and alpha the render time is high but like the others it is about the same to 2x zoom for some reason.

There is one bug with BLIT however and that is when you try and use 12 arguments. I saw a post on hp museum that said something about it and @timwessman confermed that it was a problem with the amount of args and it is a known bug. So that means you can't do zoom with alpha blending <_<. but that only means that 2 tests cannot be complete...

I used this program to time them:

EXPORT LineTime()
BEGIN
DIMGROB_P(G1,320,240);
A:=TICKS;
BLIT_P(G0,G1,[other arguments]);
B:=TICKS;
END;

DJ Omnimaga

Interesting, but didn't he say that you can simply omit the G0 at the start (since it defaults to G0 for BLIT_P)? IIRC that allowed you to squeeze the extra blending argument in.

Also you totally misspelled Tim Wessman's name there so I fixed it <_<

alexgt

Quote from: DJ Omnimaga on May 10, 2016, 08:07:58 pm
Interesting, but didn't he say that you can simply omit the G0 at the start (since it defaults to G0 for BLIT_P)? IIRC that allowed you to squeeze the extra blending argument in.

Also you totally misspelled Tim Wessman's name there so I fixed it <_<

Oops, about the name and the command xD. Sorry Tim. But yeah, I will edit that tomorrow since I need to do homework.

EDIT: And on a side note is HP selling wireless connectivity kits because I really want one <_<

DJ Omnimaga

I don't remember if the wireless kit is available for sale yet, but you need hardware C anyway so if your calculator is too old then it might not be compatible. If the HP Prime was more mainstream then the wireless unit would have ruled, since we could have gotten some multiplayer games.

alexgt

I think I have hardware version C since I got a new calc off the warranty for since mine had a broken screen :P

DJ Omnimaga

Oh right, but again we never know, since on HP website they still sold both hardwares as separate item IDs not so long ago.

By the way, did you have any luch testing the speed of alpha-blended graphics with the method I suggested?

alexgt

sorry, I haven't done that but I will on the bus today ;)

DJ Omnimaga

Ah ok. Let me know when you did it (maybe edit the first post and @mention me in a new post). Or report if it doesn't work (it might also be wise to report the issue on HP Museum if even omiting G0 doesn't work)

alexgt

Sure thing, I am posting the results now

EDIT: @DJ Omnimaga the results are posted ;)

DJ Omnimaga

Thanks for the tests. I think the speed isn't bad so that could still be handy for stuff that doesn't require speed. :) (and maybe make it easier to do :walrii: Maker

alexgt

Yeah, come to think of it if I made a walrii mob then I would have the colors randomized O.O

DJ Omnimaga

That could work. My idea actually was to use alpha blending for the shading of the walrus sprites, such as making a 2nd layer with white and black pixels displaying at 36% opacity and a third layer with 18% opacity or something like that. So I could change the gray in the Walrii sprite to anything without losing the rest. I would also need to allow choosing different types of shading, though (since some walrus sprites like Walriichu did it differently)

alexgt

Yeah, that would be cool. Especially if you had an auto up loader to apps that then could use them as sprites. Or if you could somehow return the GROB data  for DIMGROB() :P

DJ Omnimaga

An uploader could be nice, but then we might as well do the Walrii maker on the PC or web :P. On0calc the easiest way would be to get the user to manually copy/paste each frame from the emulator screenshot utility into an image software, although that wouldn't be convenient.

alexgt

Well if you had it on calc then you could just make the final GROB an AFile and then you wouldn't have to use  PC at all, what I have gathered from Tim Wessman is that GROBs are .png images so they are ready to be implemented in Apps ;)

Powered by EzPortal