Re: TTL VIC-II, some ideas
Posted: Thu Oct 26, 2017 4:34 pm
Are you using SNES Mode 7 style rotozooming for this?
For other readers, basically you start off with a subpixel texel coordinate to display in the upper-left corner, and 2 deltas. For each horizontal pixel the raster travels, it adds one (dx,dy) to the texel coord, and for each new rasterline, it adds a different (dx,dy) to the texel coord. The actual color to draw for each pixel is independently fetched from memory based on that calculated texel coordinate; there's no per-character/tile caching.
So it only takes 8 fixed point registers (current coord, cached start of line coord, delta horizontal, and delta vertical; each with their own x & y) and addition to perform a screenful of affine rotozooming. For doing perspective graphics, usually the horizon is ... horizontal, and each rasterline gets its own (dx,dy) changed during horizontal raster interrupt, as each rasterline is at a different distance from the camera and thus at a different zoom level.
For other readers, basically you start off with a subpixel texel coordinate to display in the upper-left corner, and 2 deltas. For each horizontal pixel the raster travels, it adds one (dx,dy) to the texel coord, and for each new rasterline, it adds a different (dx,dy) to the texel coord. The actual color to draw for each pixel is independently fetched from memory based on that calculated texel coordinate; there's no per-character/tile caching.
So it only takes 8 fixed point registers (current coord, cached start of line coord, delta horizontal, and delta vertical; each with their own x & y) and addition to perform a screenful of affine rotozooming. For doing perspective graphics, usually the horizon is ... horizontal, and each rasterline gets its own (dx,dy) changed during horizontal raster interrupt, as each rasterline is at a different distance from the camera and thus at a different zoom level.