| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
plasma/linedoubling
Hi all, now i have a question about how to implement a nice plasma effect, i saw many of those in nearly any demo, but many use these ugly fli flickering modes
i want to achieve an effect like this:
http://www.digitalgott.com/c64/plasma_000.prg
but in gfx mode ... i believe y scroll register comes in handy when trying to do stuff like this ... how to start? |
|
... 16 posts hidden. Click here to view all posts.... |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
what is $dd00 then ?!?! |
| |
Krill
Registered: Apr 2002 Posts: 2839 |
Yes, Oswald referred to real 2d-plasmas, while trifox wanted to learn about 1d-plasmas that are just a wave applied to x-shift a colour line each screen line. |
| |
Krill
Registered: Apr 2002 Posts: 2839 |
.define CIA_PIO0 %00000001
.define CIA_PIO1 %00000010
.define CIA_PIO2 %00000100
.define CIA_PIO3 %00001000
.define CIA_PIO4 %00010000
.define CIA_PIO5 %00100000
.define CIA_PIO6 %01000000
.define CIA_PIO7 %10000000
.define CIA2_PRA CIA2_BASE+$00; Port register A
.define VIC2_BANK0 %00000000
.define VIC2_BANK1 CIA_PIO0
.define VIC2_BANK2 CIA_PIO1
.define VIC2_BANK3 CIA_PIO1|CIA_PIO0
.define RS232_OUT CIA_PIO2
.define SERIAL_ATN_OUT CIA_PIO3
.define SERIAL_CLK_OUT CIA_PIO4
.define SERIAL_DAT_OUT CIA_PIO5
.define SERIAL_CLK_IN CIA_PIO6
.define SERIAL_DAT_IN CIA_PIO7
I referred to the lowmost 2 bits of $dd00 that determine which of the 4 16k banks the VIC sees. |
| |
Oswald
Registered: Apr 2002 Posts: 5017 |
horizontally waved vertical color wash:
trifox, for this your stable source will come handy finally :)
set it up so that that your stretcher code starts on the first visible line.
each line will be 23 cycles "wide"
write to $d011 each line this:
$38,$39,$3a,$3b,$3c.. , $3f -> wrap back to $38
tweak the place (time) of the d011 writes horizontally, and the start of the $38... values until you see it stretches the first line all the way down.
what I'm unsure about is, that what value you have to start the $d011 writes, it might be anything between $38-$3f.
now you can set up different screens with different topmost gfx lines, and switch between them during the stretcher code.
add d018/d016/dd00 writes.
done.
example code for one rasterline:
lda #$3x ;x=8..f
sta $d011
lda table1,x
sta $d018
lda table2,x
sta $d016
lda table3,x
sta $dd00
(add nops to reach exactly 23 cycles)
dont forget: crossing 256 byte page boundaries with indexing costs an extra cycle -> kills your timing. put your tables at $xx00. |
| |
Mirage
Registered: Jan 2003 Posts: 113 |
...(add nops to reach exactly 23 cycles)
I count more than 23 cycles already in that routine and you forgot an inx... How many nops is he supposed to add? -5? :) |
| |
TDJ
Registered: Dec 2001 Posts: 1879 |
Negative nops .. now *that* is an illegal opcode you can sell! |
| |
Oswald
Registered: Apr 2002 Posts: 5017 |
Thank you sirs. Probably you could explain it all better than me. Why have you wasted your precious time to pick on me instead of doing so? |
| |
TDJ
Registered: Dec 2001 Posts: 1879 |
Don't put yourself down Oswald, picking on you is never a waste of time! |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
hi, i heard a bout a method to do the line doubleing/plasma effekt i want to achieve, called fpp with this method it is said that you can assign each screen row a particular/different row of a given image, can someone help me on how to implement this? |
| |
chatGPZ
Registered: Dec 2001 Posts: 11114 |
fpp==what oswald described :) i'd use a display routine like
lda #nn
sta $d018
sta $dd00
lda #$18+x
sta $d011
for every line. the nn values contain screen/videobank data and should be modified at runtime from another routine. (when you sit down and make a table of which bits are actually used by d018 and dd00 you will notice that you can conviniently merge them into one and save a lot of cycles) |
Previous - 1 | 2 | 3 - Next |