Post #4776 · 05-22-12 02:10:59 AM
Sounds like a depth buffer. Are you maybe reinventing OpenGL?
btw:
0x00078000-0x00079FFF - Linear Mirror of Pattern Table 0
0x0007A000-0x0007BFFF - Linear Mirror of Pattern Table 1
0x0008C000-0x0007DFFF - Linear Mirror of Pattern Table 2
0x0008E000-0x0007FFFF - Linear Mirror of Pattern Table 3
"an exponent to raise 2 to the power of" sounds a bit strange. Just "an exponent of 2" might be clearer?
bg_arr_x = affine_x + (window_x + affine_parallax) * x_increment
bg_arr_y = affine_y + (window_x + affine_parallax) * y_increment
Quite interesting machine... similar CPU to the N64, though slower, and 4 times as much memory... more sophisticated graphics than the GBA...

Does it not have the branch delay, though? On N64, the instruction after a branch executes before the branch itself (due to pipeline delays or some such), so you'll see code like:
LUI $a0, 0x8011
JAL somewhere
ADDIU $a0, $a0, 0x1234
(and if that instruction is also a branch, who knows what happens... it's undefined behaviour.) Even more fun, there are conditional branches for which the delay instruction executes only if the branch is taken, so you can find things like:
BEQL somewhere
ADDIU $a0, $zero, 1 ;skipped if the branch condition was false!
somewhere: ...____________________