Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > *newbie* Raster Bars ....
2006-03-26 16:10
Trifox
Account closed

Registered: Mar 2006
Posts: 108
*newbie* Raster Bars ....

Hi all, i am wondering how to implement as nice
raster bar algorithm, i started with:
http://www.ffd2.com/fridge/vic/stableraster.txt

for a stable entry point, how do i now change raster bar color in each subsequent line ? i was fiddling around with after the irq3 exits, it calls irq1 with a subsequent line, and then start it over, the problem is, when initiating the interrupt routine more than once in a it shifts abit to the right so the starting position of the change of color is visible on screen ... any hints to fill subsequent lines at allways the same x-position ?!
 
... 5 posts hidden. Click here to view all posts....
 
2006-03-27 11:17
Trifox
Account closed

Registered: Mar 2006
Posts: 108
har har, but this way i have full screen bars .... but i can not do anything else then displaying those bars...
2006-03-27 12:05
Oswald

Registered: Apr 2002
Posts: 5094
both methods allows you to have fullscreen bars.
2006-03-27 12:20
Graham
Account closed

Registered: Dec 2002
Posts: 990
Quote: har har, but this way i have full screen bars .... but i can not do anything else then displaying those bars...

You want to do an IRQ every rasterline so you can use some "remaining time"? Forget about this, even if you do almost nothing there are not enough clock cycles to have an IRQ each rasterline.
2006-03-27 12:23
Oswald

Registered: Apr 2002
Posts: 5094
graham, if ninja can do every 2nd line fli with separated irqs, how much impossible is this ? :)
2006-03-27 12:36
Graham
Account closed

Registered: Dec 2002
Posts: 990
Yes, every 2nd line FLI is ofcourse the perfect beginner example :P

Anyway, you might be able to do every line IRQ, but it wont help you. Your rasterbars will be buggy because you change colors in the middle of the screen, and you wont have much cycles free.
2006-03-28 16:25
Trifox
Account closed

Registered: Mar 2006
Posts: 108
hmm, but i do not get it exactly, to repeat what i know :

Q: How to Make C64 Raster Bars ( Changing Color of subsequent Raster lines without jitter ( like on the good old amiga with help of copper ))

A: 1. Catch a certain rasterline
- via Double Interrupt, so it is stable
- via single interrupt, but it jitters
- via loop and check for $d012
2. Delay exactly 63 clock cycles between colors
- problems: Bad Lines
- how to handle bad lines ?
- use a delay table so that each 8th line waits less
- query for bad line status
- switch off display

what you say, what is the best method now ??! i managed rasterbars only with a stable interrupt and switching of the display .. :/
2006-03-28 17:50
Oswald

Registered: Apr 2002
Posts: 5094
trifox, its really not that complicated, just invest some time into it.

I suggest to you to try my irq setup with the color change routine from the other topic.

then debug debug debug.

a non double irq will jitter, but there's enough wide invisible area on the sides to hide that with correct timing.

#1 make sure the 1st line that set by the routine is a bad line, and the first color change is on the left, invisible, side of the screen.

#2 check the routine with 1 color change, 2, 3, 4, 5,6.. 8, and adjust the timing / delay, its not that hard to see whats going on, and wether the delay is too short or not.

#3 you may count every cycle and design a loop on paper so it does 63 cycles 7 times and 23 cycle one time. (more likely the (63*7)+(23*1) time for one char height will be constant, than cycle times for each raster line)


#4
keep in mind that the delay routine adds 5 cycles at each loop, except the last which is 4. I'm not sure but maybe the outside loop needs an extra nop. when I posted that routine my calculations told me its incorrect, but I clearly remember it worked this way.


(I have done my part of (flickerfree) rasterbars, and I never needed a stable irq..., secondly there was noone there to tell me how, I had to work out everything, even setting up the damn raster irq, I've copyed some code from a booklet, and used it for years without having the slightest idea what it really does... so be happy with all the help here;)
2006-03-28 17:56
Trifox
Account closed

Registered: Mar 2006
Posts: 108
yes, iam and it is really funny that there are so many people who still know what is going on in the c64
2006-05-21 10:10
moz
Account closed

Registered: May 2006
Posts: 7
I'm messing around with raster bars at the moment too. That ASM was a nice example, although I don't understand it all yet (I need to spend more time reading).

I was also trying to set sprite multi-colour 2 for each line but found that it really slowed everything down, should this be expected? I thought it would simply be a case of changing a memory address, but the more sprites I have on the specified line the greater the delay seems to be.

I'd love to be able to change border+screen+MC2 per line. Am I asking for too much?
2006-05-21 11:01
Honesty

Registered: Jan 2003
Posts: 121
Read the posts...

Problem is that vic needs more time to fetch sprite data and put it to the screen...

So u have less time each line for lda/sta stuff.
So far i know also the sprites have different values for how long the data fetch take.

Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
morphfrog
Slator/Arsenic/Stone..
Thierry
Urban Space Cowboy
Meikel aka ZUX/Sparks
Guests online: 125
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Pal  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.272 sec.