| |
Dr.j
Registered: Feb 2003 Posts: 277 |
help with delay table making tech tech
Hey there again. i want to do a little tech tech effect.
i think i manage Ok with the charsets (took me some time to
arrange right the chars) and i have $d018 and $d016 tables
the main problem is now.. Delay tables . i use this routine
what is the best technique to do "Fine tune" the delays?
i will gladly hear your ideas to do fast delay tables.
i first tried to replace $d016+$d018 with $d021 but it didnt help me much. please don't send me to "missing cycles" article..hehe . btw i don't have any problems to make "rasters" delays but here its different.
ldx #$00
loop:
lda d018tab,x
sta $d018
lda d016,x
sta $d016
ldy delaytab,x
dey
bne *-1
inx
cpx #$2f
bne loop
|
|
| |
Dr.j
Registered: Feb 2003 Posts: 277 |
lda d016,x means lda d016tab,x ofcoz.. sorry for that |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
There's nothing special with the timing for "tech-tech". It's the same as setting up e.g two MC-colors each line.
Using a timing table might not be the easiest way though.
Setting up to four registers each line shouldn't be a problem if you unroll the code a bit.
EDIT: perhaps two of them have to contain the same value in that case. (e.g $d020/21 + $d016 + $d018).
|
| |
enthusi
Registered: May 2004 Posts: 677 |
make sure your tables do not cross a page boundary
(and test your code with d020/d021 to see how stable it is, etc. - oops, you did that) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
i wouldnt use a timing table for something like that, better make a loop for 8 rasterlines, thats much easier (and maybe even shorter) |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
What groepaz said. Most sensible way to deal with the fact that every 8th line is a badline. |
| |
Dr.j
Registered: Feb 2003 Posts: 277 |
Okey i got it guyz. delay tables suck in this case (and i believe in more cases) i will unroll the loop ,7 for
normal line and 8th for "bad line" (21 cycles) thanks
for the help ! appricated |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
i think this delaytable thing really only works ok for simple rasterbars type of things... and even then its probably often shorter to unroll the loop. (for some tricky counterexamples, check crossbows supersmall fli display routine on codebase :)) |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
count = *+$0001
ldx #$00
loop
ldy d018tab,x
lda d016tab,x
ldx $d012
cpx $d012
beq *-3
sty $d018
sta $d016
inc count
ldx count
cpx #$2f
bne loop
start this one raster line before where effect should start. |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
@flavioweb: I can imagine that as being not entierly glitch free... ;) |
| |
Danzig
Registered: Jun 2002 Posts: 440 |
what tlr said. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
why mess up x with d012 compare?
edit: oh I see now. |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
Quote: @flavioweb: I can imagine that as being not entierly glitch free... ;)
Maybe it don't work, i have not tested, but what you see wrong in this code? Do you think there is a timing problem, or you see some other error? |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
you should try it out :) use d020 and d021 for testing, you'll see what the problem is then :) |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
Quote: you should try it out :) use d020 and d021 for testing, you'll see what the problem is then :)
I can't test now, but i know isn't stable. But i also think we have sufficient time to set registers before raster reach visible area so for a tech-tech effect may work.
May be wrong... of course =} |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Flavioweb: http://thedarkside.ath.cx/commodore/vic/vic_article_3.4.htm#3.5. |
| |
algorithm
Registered: May 2002 Posts: 705 |
How are you able to change d018 at any vertical position? You would need to force a badline unless the sinus wave is calculated in a way taking into account when d018 can be switched. |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
@algorithm: the usual way is to switch the charsets not the screen memory. |
| |
algorithm
Registered: May 2002 Posts: 705 |
I was thinking of the other method involving screen mem instead of gfx data and adjusting d018 with a long sinus wave. This elimates the issue of using forced badlines |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
are you sure what tech tech is? how would a specialised sine table help at all? |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Groepaz: Well, if you could construct your table so that xscroll would cross character boundraries only on even 8th lines it would work... Never heard of it being used though, and it seems pretty limiting compared to the standard shifted charset method. |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
If you combine the screen method with the charset method you could do a much wider tech-tech without requiring too many charsets. |
| |
Conjuror
Registered: Aug 2004 Posts: 168 |
tlr: The consequence of that is the FLI bug as you need to trigger a bad-line to change the charset every line as I did here Better
|
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Conjuror: Nah, if your slope isn't too steep you'd only need to update screen RAM location every 8 lines. |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Yes, what radiantx said. I'm sure it's been done already. |
| |
algorithm
Registered: May 2002 Posts: 705 |
I may be wrong but i believe one of the crest demos from maduplec had a part with full 320x200 tech tech utilizing the method of non drastic sine in d016 and changing d018 after 8 raster lines or so allowing the changing of msb nybble (screen ram) which allows more x positions this method
edit: Just seen that part, did not analyse the code, but that demo seems to not use full 320x200 |