Post

Couldn't sleep last night, head full of ideas, so did a late coding session converting the clipLine routine from C to asm. There was a bug I couldn't fix, so slept on it and identified it straight away this morning. I can now start on clipping filled triangles now clipLine is in the asm domain.

3 reposts42 likes

This is now more or less at the stage I got the 3D engine at originally on the 48K Spectrum. Practically game ready. I never finished it. Though it was part of my portfolio that got me my first job at Software Creations.

The bug, by the way, was a schoolboy error. A stackframe imbalance caused by me incorrectly declaring a parameter type as uint8_t (a byte) rather than int_t (a word). The single byte difference caused the stack frame to move by one byte every time the function was called. Mucho crasho.