123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|49|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> Cramming the Code

Mon, 07 Dec 2015, 12:16
spinal
Can anyone think of a faster way to do the following? is it possible?


-=-=-
Check out my excellent homepage!
Mon, 07 Dec 2015, 12:16
Jayenkai
One slight slowdown, you're creating a "u32 v" for every pixel.. No idea on the speed of modern systems, but that used to slow things down, which is why you'll see me using those nasty globals everywhere.

In addition, if this is inside a function, take it out and hardcode it to reduce all the function in-and-out jumping.

-=-=-
''Load, Next List!''
Mon, 07 Dec 2015, 13:26
spinal
hehe, tried both you ideas. They seemed to slow it down rather than speed it up I dropped 5fps.

-=-=-
Check out my excellent homepage!
Mon, 07 Dec 2015, 13:41
Jayenkai
LOL!.. Let that be a lesson to you.. Never take coding advice from the crazy 80s guy!!

-=-=-
''Load, Next List!''
Mon, 07 Dec 2015, 14:04
cyangames
I can't see anything there myself, sorry. Thought maybe switching multiplication to addition could be faster on the processor but it probably isn't when bitshifting would do the same thing.

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Tue, 08 Dec 2015, 00:15
HoboBen
can you combine all three palettes? Like screen[v] = palette_rgb[col]

-=-=-
blog | work | code | more code
Tue, 08 Dec 2015, 00:37
spinal
I don't see why not...
Tue, 08 Dec 2015, 23:03
spinal
I think that would be impossible to correct fully, the screen on the 3DS is sideways, meaning you have the bottom left corner as 0,0 and the top right corner as 400,240. The emulator is writing the a buffer using top left as 0,0 as everyone would expect. So either way, one of the arrays will have to be read wonky.

It's not too bad though right now I'm getting 40-50 fps on a couple of challenging games (graphically) so I'm reasonably happy.

-=-=-
Check out my excellent homepage!