| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
FLD/FPP question.
I know how to delay char line visualization using FLD. I'm trying to do the same for every raster line. I tought to use something like FPP playing with D011 on cycle 58 and before 14 but i can't figure out if is possible to show gfx/char data during delay.
Can someone help me?
There is a way to stop vic updating internal gfx pointers at X rasterline, then delay the visualization to Y line and testart painting even if RC <> 7? |
|
| |
Fungus
Registered: Sep 2002 Posts: 686 |
The normal way to do FPD (flexible pixel distance) which looks like per line FLD, is to use FPP to do it. You just need to arrange the data for the graphics so that the first character in the set is the blank one, and the first character line is also filled with that blank character. You can then display any slice of your graphics, as well as having an empty one you can display to create the FPD effect. |
| |
Ksubi Account closed
Registered: Nov 2007 Posts: 87 |
Flavioweb: codebase has some nice examples by HCL:
http://codebase64.org/doku.php?id=base:introduction_to_vertical..
|
| |
HCL
Registered: Feb 2003 Posts: 728 |
So.. i guess you got your answer? It's not possible to *just do* FLD every line instead of every 8:th. If it was, i guess noone would ever have come up with the every 8:th line version :). It's FPD that you need, or FPP. Just choose your gfx mode :). |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
Yep HCL you catch the point!
I asked about "FLD" just to "give the idea" but i thought to use FPP/FPD.
Reading VIC article i realized the point is to play with $d011 in the first phase of cycle 58 of a line and probably do something else before cycle 14 of next line...
But, even if i can see the "idle gfx" during delay, i can't u derstand if i can "break" the visualization from a line to another or i'm just obtaining some delays without the possibility to show a "line of gfx" after each delay...
I done just a few experiment in char mode but i'm start to think to use gfx pages to better understand what i'm doing...
For now i have only a screen delayed some lines down, with an area with some delayed "lines" that show only bgcolor and "idle pattern" from char $ff (or $3fff) without gfx...
If it's possible to do... i'm missing something but don't know what... |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
what helped me a lot to understand this kind of things.... make a stable raster, add a routine that lets you delay by arbitrary number of cycles (both can be found on codebase, i guess) and then play around with storing values to d011 and shifting the timing forth and back. compare the results with whats written in the vic article. at some point everything will be very logical and solve itself =P |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
I've always used the technique Groepaz describes as well. That way it's pretty easy to do most d011-tricks without even knowing at which cycle things are happening, or why the VIC behaves like it does. What really matters is how many cycles you use between each d011-incrementation.
Using all 63 cycles lets you do FLD or linecrunch/char stretching, which is the same trick just with different gfx modes. Using 23 cycles with 40 cycles free lets you do FLI. Using between 23 and 63 cycles gives you FLI with a varying bug size. Using less than 23 cycles gives you stretched FLI.
And then you just need to combine these tricks with each other as well as storing to other VIC registers to do FPP, FPD, techtech, etc. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Also, sprite FPP is not to be underestimated. There are up to 16 ($d018) * 3.5 ($dd00) = 56 unique lines to combine arbitrarily, plus you can extend the effect to the borders.
Of course, char-based FPP gives you a lot more lines to play with (128 * 3.5 = 448, double the amount for hires using the EBCM trick, memory size and layout issues notwithstanding).
|
| |
HCL
Registered: Feb 2003 Posts: 728 |
@Krill: Just to be picky.. You get 16*8=128 lines in the clean banks and 12*6=72 it the others -> 400 lines theoretical maximum. Make more demos, and you don't forget stuff like that ;). |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
I see the "sprites fpp" in "time machine" demo, uses borders to show gfx with same kind of fx i try to understand but done with "normal" bitmaps...
So i need to start from FLI then play around with timings and D011.
Now things starts to be interesting...
(^ム^) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quote: @Krill: Just to be picky.. You get 16*8=128 lines in the clean banks and 12*6=72 it the others -> 400 lines theoretical maximum. Make more demos, and you don't forget stuff like that ;).
Yeah okay, i made the mistake of assuming that'd be covered with the 3.5 instead of 4, but i overlooked that you lose not only charset data, but also screen data.
I actually have a (semi-)FPP-based part somewhere in the pipeline, really should get it out some day. :) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: @Krill: Just to be picky.. You get 16*8=128 lines in the clean banks and 12*6=72 it the others -> 400 lines theoretical maximum. Make more demos, and you don't forget stuff like that ;).
dont you get 256 unique lines in sprite fpp? arrange sprites by incrementing Y coord -> stretch sprites -> each sprite displays a different line of the same sprite gfx -> 256 different sprite gfx thus lines possible -> profit. then if you add to each sprite's y coord 8, you get another 256 possibility, and we're still in the same vic bank. 672 different lines possible, but maximum only 256 is freely selectable during one frame.
you are only limited by d018 if you want to save the cycles needed to rewrite sprite gfx pointers. :P :) I guess there's just about enough time to rewrite all 8 sprites, if you selfmod the raster code from the outside. |
| |
HCL
Registered: Feb 2003 Posts: 728 |
@Oswald: Correct, but i was talking about FPP in char mode :).
@Flavioweb: Doing FPD on a normal bitmap pic is not easy at all, assuming you are talking about bitmap as using more colors than 3+bg.. like in The Bubble Tale / Crest. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: @Oswald: Correct, but i was talking about FPP in char mode :).
@Flavioweb: Doing FPD on a normal bitmap pic is not easy at all, assuming you are talking about bitmap as using more colors than 3+bg.. like in The Bubble Tale / Crest.
while we're at it hows it done?:) |
| |
HCL
Registered: Feb 2003 Posts: 728 |
Hmm, feels like we hijacked the thread there, but.. I haven't checked, but i think it is done more or less like a fli-stretcher.. but without fli :P. That is, use all 8 bitmap banks, and let each bank represents one line within each 8-line chunk, so copy one bitmap line to all 8 lines in each bank. Then stretch each 8-line chunk by inserting new badlines -> restart display from the first line in 8-line chunk, until big enough to fit the distance of all 8 lines in the chunk. Meanwhile switch bitmap bank (with d018 and dd00) when desired plus switch d011 between bitmap mode and bla(n)k mode ($7x) to get empty lines inbetween the gfx. Comprende?
..in other words, not very straight forward, and not done in 5 minutes either -> no go ;) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
urgh, thats some dirty business. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
unless there is sideporder DYSP on top, who cares =P |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quote: urgh, thats some dirty business.
I find the need to play that stupid "game" to reach the parts much dirtier. This and the fact that the demo, like a few of that era in Crest's history, comes on a disk personalized to select sceners. :) |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
Quoting KrillI find the need to play that stupid "game" to reach the parts much dirtier.
Just press fire without move.
Then select parts from the menu.
=P |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
Quoting HCL@Flavioweb: Doing FPD on a normal bitmap pic is not easy at all, assuming you are talking about bitmap as using more colors than 3+bg.. like in The Bubble Tale / Crest.
Thanks a lot for this one... and yes, i mean this.
I know that isn't easy but now i have some info to study...
I think my "missed thing" was to use "FLI organized bitmap".
Now i go to listening at the ingame music of the Crest's demo... it's awesome!!! |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quote: Quoting KrillI find the need to play that stupid "game" to reach the parts much dirtier.
Just press fire without move.
Then select parts from the menu.
=P
Oh, i see. Also, on second thought, it seems that this demo wasn't released on personalized disks but merely not uploaded in mint condition. I withdraw earlier statements. :) |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
About Crest's demo... i'm surprised to see that the fli-fpp routine was coded without stable raster at all...
just cycle-calculated code triggered by normal raster irq.
Fashinated... |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
IIRC, FLI auto-stabilizes pretty much after the first line. This may be blacked out in the demo. Add a jmp * in the main loop, and you only have 3 cycles variance for the IRQ entry. Put a few sprites there, and it might get stabler.
There are many dirty ways and a bit of luck to get a stable raster, but the clean method is always superior and keeps you from stumbling over unpleasant surprises or weird bugs. :) |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
I tought to code my versio of this fx over my stable raster routine because, my final goal, is to make it both pal/ntsc compliant and maybe works also on drean and others...
But first of all i need to exactly know how things works here, because a lot of things need to collime to make fx works. How and why ECM bit is used? Only to "blank" initial side effects or for more?
I know how to use the dma-delay to stabilize things... but here seems this is a very margnal question. A lot of D011 and bank switching trickery involved...
I think ECM is needed to compensate jitter side-fx on the standard irq call...
Let me study...
◑▂◐ |
| |
HCL
Registered: Feb 2003 Posts: 728 |
Quoting Flaviowebi'm surprised to see that the fli-fpp routine was coded without stable raster at all I'm sorry are we still talking about the bitmap-fpd? There is no FLI in there and also no FPP, so lets be clear for once ;). |
| |
Danzig
Registered: Jun 2002 Posts: 440 |
Quote: IIRC, FLI auto-stabilizes pretty much after the first line. This may be blacked out in the demo. Add a jmp * in the main loop, and you only have 3 cycles variance for the IRQ entry. Put a few sprites there, and it might get stabler.
There are many dirty ways and a bit of luck to get a stable raster, but the clean method is always superior and keeps you from stumbling over unpleasant surprises or weird bugs. :)
Not to forget jsr * :D
check out One Year Crest f.e. the intro. |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
Quoting HCLso lets be clear for once ;).
Ok, quoting demo scrolltext:
Quote:
so here you can take a look at the ultimate version of a single pixle fld, flexibel pixel distance, diffrent y pixel possition or multi-expaned-unidentified-black-area-in/decrasing-between-various-numbers-of-pi xel-lines (or however you wanna name it) routine !!!
This is what we are talking about.
|
| |
HCL
Registered: Feb 2003 Posts: 728 |
Yeah, that's the reason.. If this stuff were not invented by teenagers, perhaps we would have less confusion today. We just gotta live with it :P. But still you are a grownup today, and should of course be able to tell the difference between bitmap and fli, fpp and fpd, right? :) |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
Ok. I want to avoid confusion, but this kind of code is an hybrid between fli, fpp and fpd to achieve a single pixel line FDL... and is a FLI used to show a "normal bitmap" reorganized ad-hoc.
Same people who invented this don't know exactly how to call it...
That's the problem, but now we know what is it...
And still have no name... |
| |
HCL
Registered: Feb 2003 Posts: 728 |
Well, he is using stretch-fli (22 cycles loop) to increase the char-size from 8 lines to whatever, then there is no fli while letting the last 8 lines draw. Changing d018/dd00 does not make an fpp, since only 8 lines are available within each char. In fact only 7 lines are available here.. one bank is used for empty (black) lines and another bank is used for two(!) of the lines where one of them only work during the stretch-fli. So there we have it :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
"this kind of code is an hybrid between fli, fpp and fpd to achieve a single pixel line FDL"
even after reading the thread again - i have no idea what that means =D |
| |
Danzig
Registered: Jun 2002 Posts: 440 |
Quote: "this kind of code is an hybrid between fli, fpp and fpd to achieve a single pixel line FDL"
even after reading the thread again - i have no idea what that means =D
hehehe, and I thought it's just me :D |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
TBH I can't really figure out what this thread is about. What is FDL to start with? |
| |
Danzig
Registered: Jun 2002 Posts: 440 |
Quote: TBH I can't really figure out what this thread is about. What is FDL to start with?
My first thought was "Flexible Dick Length" but I'm just a swine ;) |