Login
Back to forumSee the full topicGo to last reply

Posted By

Csabo
on 2019-01-05
10:50:45
 Re: LUMYDCTT - RenderGFX - Need some help

The idea behind DFLI is simple. By default, in one character line (which is 8 pixels tall), you have 2 colors per character; foreground and background in hires, and two ink colors in multi. The colors themselves come from the color and luminance maps, which are specified by $FF14. In short: 2 colors for every 8x8 pixel area.

With DFLI, at every 2nd raster line, you change the value of $FF14, so that it points to a different color and luminance map. Therefore, you now have 2 colors for every 8x2 pixel area (or 8 colors for every 8x8 pixel area, if you want to put it that way).

Why the "D" in DFLI? We originally borrowed the name FLI from C64, where this exact same trick is done. The first FLI effects were done the same way, the MB part in Compy Xmas being the most prominent. I remember seeing that and being blown away by it happy Anyway, so they changed $FF14 in every rasterline, which doesn't work out very well, and the color + luminance values get messed up. (This has been explained elsewhere, I don't want to go into the technical details.) To get around it, and have "proper" colors, we do this on every second line instead, so it's a "double" FLI.

That's it in a nutshell! Writing a DFLI routine is every coder's rite of passage, it's fine to look at other people's code, and then code your own variation, it's still going to be mostly the same.

Using interlace (quickly switching the pixels and colors at every frame) give even more colors at the cost of some flickering.



Back to top


Copyright © Plus/4 World Team, 2001-2024