Login
Back to forumReply to this topicGo to last reply

Posted By

Ozyma​ndias
on 2008-11-24
16:23:05
 FLI

Hello!

Unfortunately my holidays are over. So I don't have much time anymore. But today I read the new glossary entry on FLI and it is very interesting.

I am not a programmer so I probably don't understand everything but I hope you can help me a little bit.

Does FLI work in character mode and in bitmap mode? And what are the limits if FLI is used instead of DFLI? From my understanding then only color is fetched and not the new character. But does that matter in character mode? So I can change color in every line then? And in bitmap mode FLI does what? It fetches only colors and not luminance?

Sorry if my questions are confusing. But I would really like to understand this completely.

A listing of all the different modes and limitations would help me a lot. And if someone could add a demo that uses this particular mode it would be even better. I know this is asking for much but I think it is interesting to others, too!

Thank you!

Posted By

Csabo
on 2008-11-25
22:49:01
 Re: FLI

Let me see.

FLI works in both character mode and in bitmap mode. You are right about the difference between FLI and DFLI. For character mode, the thing is, even though you CAN switch to new colors in every character, you only get that ONE color per character, since the other color, the background color, is taken from $FF15. An example would be To Be Ashamed - which looks quite stunning really, I don't know why this effect was not used more often. Doing the same in bitmap mode causes that much discussed "FLI color bug". One of the earliest implementations is in Compy Xmas, the 6th part. That effect is also quite stunning, I remember my shock when I first saw it happy TLC explains it all really well in FLI Editor note, it's worth a read.

So the holy grail of video modes is true FLI on the Plussy. With DFLI, you can color every 4x2 pixel area of the entire screen absolutely independently from each other. With FLI, this would be 4x1.

I'll mention something else here. The "buggy" FLI colors could be exploited with this palette:
1 (lum 1, gray)
A (lum 2, yellow-green)
3 (lum 3, cyan)
C (lum 4, blue-green)
5 (lum 5, green)
D (lum 5, light blue)
E (lum 6, dark blue)
F (lum 7, light green)

Basically, it wouldn't matter (much) which color and luminance levels mix, it would be in a cyan-ish hue. Could work well for a very high resolution plasma effect wink

Posted By

Ozyma​ndias
on 2008-11-26
11:48:58
 Re: FLI

First of all a big THANK YOU to you, Csabo, for taking the time to answer my questions.

I'm still a bit confused so maybe you can help to clarify a few things. Sorry if this is boring or just dumb to all those coders.

In that "To be ashamed" demo they do FLI in Hi-Res character mode?

Now if the color is fetched every line, what characters are displayed in those lines? If I only fetch the color no characters/pixels are there? Or is there something that will be just repeated? Some pattern? Or is there just the choice between 8 pixels in one color or 8 pixles in $FF15.

Another question. Maybe I should have asked this before: In which line does the first color-fetching happen? I just wondered because if I fetch color and then characters in the next line then how come I can see those characters in the first line? Logically, this should all happen, before the first line is displayed?

I have more questions but I think I should stop now happy

Posted By

Csabo
on 2008-11-26
14:38:32
 Re: FLI

Well, I keep waiting for the real gurus to come out of the woodwork and give some real answers, but they are not here yet. Maybe they are waiting for someone to shoot their mouth off and give incorrect info, then they can jump in wink So anyway, as fuzzy as my understanding is, here it goes.

I looked up To be ashamed again, and I was wrong, it's actually hires bitmap. So this means two things: I can't think of any released examples of FLI in character mode (although it's certainly possible, I've have a DFLI effect). Second, that effect is a single line FLI, and at least one set of the colors are "correct" (the second color isn't, you can see it in the little scroller, or if you enter F 6000 7000 F0 in YAPE monitor).

The color-fetching (aka DMA) happens in two raster lines, the two raster lines exactly before a new character line. So, at the start of a new character line, the colors and chars are already fetched. For the next character line, it's fetched in the last two raster lines.

Posted By

Ozyma​ndias
on 2008-11-27
14:33:26
 Re: FLI

I don't have YAPE installed on my Netbook only on my desktop PC so I can't look at it now. Of course that would help. I hope I'll have some time for that this weekend. But I think my kids rather want to do some Christmas things like making cookies happy

I'm still confused because there are so many options: charmode or bitmap, hi-res or multicolor, FLI/DFLI. These things were not even dreamt of in the C16 books I own.

In some demos I saw an effect called ECI or so. But it looks very similar to that in "To be ashamed". Is it some kind of FLI effect?

Posted By

Ozyma​ndias
on 2008-11-27
14:36:24
 Re: FLI

This is one of those effects I was talking about:

Hard Death

Posted By

MMS
on 2008-11-27
15:06:27
 Re: FLI

Hmm, a silly question (maybe I am dumb, or already drank too much beer): I do remember when almost 20 years ago I programmed some rasters working and running behind the basic code during programming (just for fun). At that time I manipulated the background and border color to get it each line differently. Just basic raster, nothing special.
If we have the limitation to have only 3 colors in a rasterline+1 own color per 4 pixel,why it is not use more widely in character mode to change the 3 fix $FFx colors for each rasterline (BTW, it is a crazy limitation) ? Too shaky? Certainly with extra colormap each character's own color could be changed 8 times too.
If it does not vibrate too much, and could be excellent for the sprites and games. Or the timing cannot be so precise?

Posted By

Csabo
on 2008-11-27
18:41:22
 Re: FLI

I'm pretty sure that what they call ECI is what we now call FLI. These are not official acronyms in any way wink

MMS, the converter that bubis wrote definitely uses what you're saying. (Or am I thinking of the one made by Larry? In any case, it's used.) So basically in DFLI mode, for each 2 rasterlines you have 2 independent colors per char, plus the 2 other colors (FF15, FF16) can be changed. Or is that even in Degauss' converter? Someone needs to make up a big chart that tracks all of these happy

For a full screen picture, this is very nice, you increase the color fidelity. For games though, it's not that useful, because when you change the 2 colors that affect the whole line (FF15, FF16), everything changes with it. So you couldn't use this to color just one sprite differently.

Posted By

Ozyma​ndias
on 2008-11-28
15:32:31
 Re: FLI

Something else I don't understand. When ist the bitmap data (?) fetched? I mean the stuff that is usually at $2000-$4000. From what I understood that DMA thing only fetches colors and chars in charmode - or just colors in bitmap mode but since they are stored differently it's the same amount of data.

I start to realise that having a TED register table to look up the functions doesn't help that much in understanding how demos work.

Posted By

Csabo
on 2008-11-28
16:14:59
 Re: FLI

I think that's fetched is as it's being drawn, so basically on the fly.

That is, if the raster is at the beginning of the first line (which reads from $2000, $2008, etc), and you modify a byte in the middle of the line, by the time the raster reaches that position, it will read what you just wrote there.

The one thing that I can add is that strangely enough, the bitmap address increase correctly takes into account the screen width. So, while FLI and the DMA fetching and colors and all that is always fixed to 40 bytes per line, the bitmap can support 320 +/- n * 8 wide lines (ie. when the side border is removed).

Don't let yourself become confused over this, graphics mode is basically pretty simple happy

Posted By

Ozyma​ndias
on 2008-11-29
13:36:25
 Re: FLI

Open side borders could be the next subject but first I'd like to understand FLI.

So bitmap is displayed anyway and doesn't need DMA. Would it be possible then to just display bitmap and skip that DMA thing somehow or let it happen only once in the beginning of the bitmap. If you don't need new colors, for example in a black and white picture, then would this result in more CPU time? My this is nonsense happy

And what about FLI in charmode. When I fetch colors every line, what characters are displayed then if I never fetch characters again? I wish I could program this and see for myself but I don't know any assembly language at all

Posted By

Ozyma​ndias
on 2008-11-29
13:37:59
 Re: FLI

I wanted to write: Maybe this is nonsense.

There's no edit option, or? happy

Posted By

Csabo
on 2008-11-29
16:28:47
 Re: FLI

What you said I think is entirely possible. With FLI, you do the opposite and cause more badlines than normal, but you can just as well skip them. So definitely not nonsense, although I'm not 100% sure on the implementation. You'll have to modify either FF06/FF1D/FF1F, and changing any of those can mess up the display.

(Sorry, no edit option yet, but if you guys keep bugging me for it, I may eventually add it. It'll only be for registered users though, if only there were a hidden screen that appeared after 10 posts from the same IP and told you how to register... Hmm... wink)

Posted By

Luca
on 2008-11-29
17:09:08
 Re: FLI

I'm starting to learn how to divide the screen in two bitmap halves vertically, I tried to simply put some:
NOP something
LDA bank_pic1
STA $FF12
LDA mask_pic1
STA $FF14
LDA background_color_pic1
STA $FF15
LDA 3rd_color_pic1
STA $FF16
NOP something else
...

I'm guessing:
- I should reduce NOPs when $FF1D is on line 0 or 1 in a char row, because of the DMA-cycle;
- I can set $FF14 on line 0 only;
- I'll have an useless dead area between the two halves.

Oh well, just testing as now, hope I'll have a result

Posted By

Rachy
on 2008-11-30
02:44:32
 Re: FLI

@Luca

You can enforce fetching of the character matrix data by modifying the $FF1F internal character line counter.



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024