| |
Dr. Jay Account closed
Registered: Jan 2003 Posts: 32 |
Stable rasters
Was going through some of the old code I wrote, back when I knew how to progam on the C=64, and found this routine. I think it works great. Too bad it's not precise enough (I think) to open the side borders, but it does help with stable rasters. I've seen people do these huge loops with nop / incrementing dummy locations / etc. which I think works great for timing necessary like side borders, and I've also seen code like Xbows where there are actual subroutines that are timed perfect ... anyway, my simple little routine works for rasters:
1. Get a stable raster, either with the sprite method, double interrupt, etc. Then, simply:
ldy #$00
loop lda colors,y
ldx timing,y
synch dex
bne synch
sta $d020
sta $d021
iny
cpy #16 ; number of rasters in table
bne loop
|
|
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
you can also do stable rasters in a loop without a timing table. |
| |
xIII Account closed
Registered: Dec 2001 Posts: 38 |
Yes, I made such a routine in my 1K intro called Tranparent Rasterbars. If u want the source, mail me.
BTW: Graham: where's my CD !! ;) |
| |
Richard
Registered: Dec 2001 Posts: 621 |
Quote: you can also do stable rasters in a loop without a timing table.
How's that done? |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Richard: easy, instead of the timing table use a series of dummy instructions. for an example, look at the fli-displayer in crossbows "fli.txt" (i think published in go64 long ago)
|
| |
Merman
Registered: Dec 2002 Posts: 140 |
The timing loop like that is fine for colourbars, but I guarantee you will hit problems. Adding sprites will throw off your timing, particularly if they are anywhere near the colourbars.
As an example, I'm TRYING to get colourbars behind a sprite ROLscroller, and get it in the sideborders. The timing is horrible.
One tip - use those tedious code tables in the 64 Programmer's Reference Guide. NOP takes 2 cycles, LDA $00 (zeropage) takes 3, LDA #$00 takes 3, LDA $0000 takes 4 and so on.
Also, you have to take into account the "bad" lines - every 8 scanlines during the screen, VIC takes time to read the next row of character data. With that, your delay table would look like this:
.byte 8,8,8,8,8,8,8,1
for 8 rows
|
| |
Stryyker
Registered: Dec 2001 Posts: 468 |
lda #$02 is only 2 cycles :) VIC Article is a good read with PRG and 64Doc.
If you want sprites with colours then either keep Y positions the same to start off with or get a head ache :) |
| |
HCL
Registered: Feb 2003 Posts: 728 |
Gosh.. Guys made dysps in the sideborder with split rasters fifteen years ago. What's the big problem? A nice little timer-interrupt loop will do the trick smoothly :). |
| |
QuasaR
Registered: Dec 2001 Posts: 145 |
Try this one...
http://www.ffd2.com/fridge/vic/stableraster.txt |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quote: Gosh.. Guys made dysps in the sideborder with split rasters fifteen years ago. What's the big problem? A nice little timer-interrupt loop will do the trick smoothly :).
David, just accept that there *are* people with less coding skills than you have ;) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Krill: but he is right with his bottomline. "the info is known for years. the info is out there."
some ppl just dont seem to bother spending a night with google to get themselves the info they need.
stable raster in particular must be one of the most often explained things about c64 coding....
google "c64 coding stable raster" gets you 96 hits, of which the first 5 immediatly point to a sourcecode.
SO WHAT ?!?! |
... 6 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 - Next |