| |
Petey21 Account closed
Registered: Nov 2003 Posts: 49 |
Opening up borders
Here's a video (!) I found of a routine to open up the borders on a C64. No sound though, which would've been useful. Any comments on the code?
http://www.youtube.com/watch?v=Kh7xX1u3EME&NR |
|
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Fairly straight forward code, however quite volatile, as it depends on the IRQ getting triggered at exactly the same cycle of the jmp instruction in the main loop every frame, which works if you're lucky and the code is simple but is not a good way of doing it. I'd just have used a double IRQ to stabilize the raster instead; it would've been cleaner and could be done in about the same time if not faster. |
| |
Codey
Registered: Oct 2005 Posts: 79 |
i used to time side borders using $d020 as a visual guide where i was positioned in the current scanline. when everything looked good with no flicker, i'd change the $d020s to $d016s. it helped alot and i didn't have to worry about counting opcode cycles. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
yawn. |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Codey: It's actually simpler to just count them right from the beginning of the raster code, plus it helps your understanding of the VIC-II a lot more than trial & error until it looks right. :-)
Oh, almost forgot:
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
oh sorry, looks like I should've posted instead some dumb coding tips that everyone knows since 10 years or more. |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Quote: oh sorry, looks like I should've posted instead some dumb coding tips that everyone knows since 10 years or more.
Oswald: Not everyone has been coding for a long time, like me... |
| |
HCL
Registered: Feb 2003 Posts: 728 |
Wake up! Open sideborder was done about 20 years ago :). However, i'm still not sure that Oswald knows the trick ;). |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
HCL: Very true, not only is it old but also very simple (in principle at least), and I must admit I was a bit puzzled as to the very reason behind the post. :-)
However, the timing issues with the BA line etc can be quite confusing at first, so I see no harm in discussing it, especially since there are quite a few people here who haven't been at it for very long, myself included. |
| |
raven Account closed
Registered: Jan 2002 Posts: 137 |
This video cracked me up hehe
But, whoever programmed that is typing waaay too slow! :) |
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
Quote: This video cracked me up hehe
But, whoever programmed that is typing waaay too slow! :)
erm... too slow? wait 'till you see me ;) |
| |
Danzig
Registered: Jun 2002 Posts: 440 |
20 years but still a miracle for some people :D
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
HCL, hehe, well actually I have never opened the sideborders, except of a weak try which was a flickering one line opening. but that was when I had no idea of stable rasters, I didnt even knew why do rasters flicker :) |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote: HCL, hehe, well actually I have never opened the sideborders, except of a weak try which was a flickering one line opening. but that was when I had no idea of stable rasters, I didnt even knew why do rasters flicker :)
Actually most early sideborder code didn't use stable rasters.
With 8 sprites it can easily be made self-stablizing, assuming you allow a few wasted lines of flickering border.
People mostly used it for scrollers, so those lines were usually wastable.
An additional feature is that below the sideborder routine, you are on a stable cycle. |
| |
Danzig
Registered: Jun 2002 Posts: 440 |
that you also can have with a single line of fld
|
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Quote: that you also can have with a single line of fld
FLD = Flexible Line Distance; delayed bad line, which doesn't affect timing.
Don't you mean FLI? |
| |
Danzig
Registered: Jun 2002 Posts: 440 |
no
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Anyone else who wanna look smart (mmmm or stupid?:) just post your stabilizing and opening tips here :) how about showing off your skills in a demo instead trying to look smart in something that everyone knows since 20 years ? :P |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Quote: no
I'd very much like to see code using one line of FLD to stabilize the raster, I can't see how it could be done. |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
Quote: I'd very much like to see code using one line of FLD to stabilize the raster, I can't see how it could be done.
I guess what Danzig means that it is possible to stabilize the rasters and open the sideborders by delaying the badlines too (just like in FLD).
Downside (ofcourse) is that you can't show gfx/text @ that area. Only sprites.
---
8Bit Mayhem - The C64 Scenemusic Podcast
http://8bitmayhem.untergrund.net |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Scout: How could the raster become stable by delaying badlines? Since BA (and AEC) will only go low if there are sprites on the line there's no way to get it stable that way, and the only other solutions I can see is using a timer, double irq, light pen or half variance, and those have got nothing to do with FLD. |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Not trying to be a smartass, I just wanna know if I've missed something. :-) |