DSP-1 pseudo-3D: a cube tumbling in 3D, rotated by the coprocessor. More...
Functions | |
| int | main (void) |
Variables | |
| static const s16 | cube [8][3] |
| static const u8 | dot_pal [4] = { 0x00, 0x00, 0xFF, 0x7F } |
| static const u8 | dot_tile [32] |
DSP-1 pseudo-3D: a cube tumbling in 3D, rotated by the coprocessor.
Each frame the DSP-1 builds a rotation matrix (dsp1Attitude) and transforms the cube's 8 corners through it (dsp1Objective). The corners are drawn as 8 sprites at their orthographically-projected positions, so the cube visibly tumbles in 3D — all the 3D math runs on the NEC uPD77C25, not the 65816.
| int main | ( | void | ) |
|
static |
The cube's 8 corners in model space (DSP-1 integer coordinates).
|
static |
Two colours: index 0 transparent, index 1 white ($7FFF).
|
static |
8x8 4bpp tile, colour index 1 everywhere. In the SNES 4bpp layout planes 0/1 interleave per row, so plane 0 all-set is the ODD bytes 0,2,…,14.