2012-10-18

Interesting blog

I found an interesting blog over at http://benryves.com. It belongs to a guy that seems to share my passion for low end systems. He's working on a 2.5D engine for the TI-83 and has a bunch of different hardware and software projects.


2012-10-10

GBA 3D Rendering

I've finally put all the pieces together, and it turned out pretty good imo. The video shows a rotating torus with a rotating directional light. I'd love to do point lights, but the inverse square root needed for normalization is extremely expensive in terms of CPU time needed.

2012-10-05

Fixed point division

Found an interesting article about fast fixed point division and multiplication on ARM processors over at Henry Thomas consulting. Originally I claimed that it didn't work for the GBA, but that was a lie. Some minor tweaks and now it runs like a charm. Fixed point division used to be a major bottleneck in my attempt at 3D rendering on the GBA, and now it's not a problem at all.

2012-09-29

Refreshing my memory (3d math)

So.. it's been a while since the last time I did all the 3D calculations myself. Nowadays I just use libraries since every decent graphics API have it build in, but that isn't the case for the GBA. I started implementing the functions needed for matrix transformations and quickly concluded with that I suspected before starting: a naive implementation will be way too slow. You still need the background information to start optimizing though. The following is a good starting point at least: Egon Rath's Notes: Basic 3D Math: Matrices.

2012-09-26

GBA: Useful links

Here are some useful links when developing for the GBA:

GBA
ARM
Math

GBA: Place functions/variables in iwram

Placing functions and variables in iwram will *seriously* speed up your program. You only have limited amounts on the other hand (32K). I made the following defines based on The Dev'rs GBA Dev FAQs.

Defines:
#define IWRAM_FUNCTION __attribute__((section (".iwram"), long_call))
#define IWRAM_VARIABLE __attribute__((section (".iwram")))
Usage:
const int somearray[] IWRAM_VARIABLE = { ... }
void IWRAM_FUNCTION SomeFunction( ... ) { ... }
I figured out that there's some more info on this over at tonc after I posted.

2012-09-25

One of my many 2d sprite projects

This is a test of a 2d engine with custom physics I worked on a while ago. Art credits goes to Zelda :)