| |
Golara Account closed
Registered: Jan 2018 Posts: 212 |
Black background when sideborder open
I've got this effect where I open almost the whole sideborder to show a "raster bar" go by the screen. Everything was working like normal until I replaced my macro loops with proper code generators. The effect is still working, but I've got a black background.
When you look at the normal view it looks like the sideborder is still closed but there's a sprite on top of it.
Any ideas ? |
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
its the "ghostbyte", ie the last byte in the videobank. make it 0 :) |
| |
Golara Account closed
Registered: Jan 2018 Posts: 212 |
thanks. I'm kind of scared of clearing 3fff since the last time my code grew past it and I was injecting a brk into my code, debugging longer than I want to admit. |
| |
Smasher
Registered: Feb 2003 Posts: 520 |
Quote:I'm kind of scared of clearing 3fff (...)
it's called the ghost byte for a reason! :)
put a sprite at $3fc0 and $3fff is safe |
| |
Raistlin
Registered: Mar 2007 Posts: 680 |
Yep, what they said. This is a really annoying thing with C64 as it means that if you use the $C000 bank, it gets nasty - $FFFF being part of the IRQ vector of course. |
| |
Golara Account closed
Registered: Jan 2018 Posts: 212 |
Yeah that's why I never used the last vic bank. |
| |
Raistlin
Registered: Mar 2007 Posts: 680 |
It can be handy at times as well - D000-DFFF is a great place for static sprite data :-) |
| |
Golara Account closed
Registered: Jan 2018 Posts: 212 |
That's true. Honestly though I thought the ghostbyte is displayed in the sideborder too if it's open. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting Raistlinif you use the $C000 bank, it gets nasty - $FFFF being part of the IRQ vector of course. Not so nasty, actually. Put 0 there and have the vector point to somewhere in zeropage, where you put a JMP to your interrupt handler. Only downside is 3 cycles delay of the handling code.
You can also enable extended background colour mode, and the idle pattern will be fetched from $FBFF instead of $FFFF.
Quoting GolaraHonestly though I thought the ghostbyte is displayed in the sideborder too if it's open. While this would be quite cool, actually, there is no reason the idle pattern should be displayed in the sideborder.
It's displayed by part of the character/bitmap output logics, which only operates in the area between the sideborders, while not being fed actual character/bitmap data but the idle pattern instead due to running in the opened top and bottom borders or with disabled/delayed DMA (badline) generation. |
| |
algorithm
Registered: May 2002 Posts: 705 |
Also as your irq covers the display area due to sideborder removal per line. you can write $00 to $ffff and then before irq ends, write back the hibyte of the irq |
| |
Compyx
Registered: Jan 2005 Posts: 631 |
Quoting KrillYou can also enable extended background colour mode, and the idle pattern will be fetched from $FBFF instead of $FFFF.
I always thought that was $F9FF ? |
| |
Golara Account closed
Registered: Jan 2018 Posts: 212 |
All cool tricks posted here which I didn't think of. Another misconception that I had was that the 3fff byte was an index to the current charset, not just a representation of one line of graphics (is it ? I think it is...). Thinking back to the OFFENCE part from their x2010 demo where they seem to have a 3fff scroller and logo (big letters but inside is filled with small characters saying OFFENCE scrolling up and to the side)... I thought they are just ROLing that one char in the charset... so much cooler :D
Or maybe it's just sprites ? I thought it's a sprite mask covering up the 3fff. |
| |
Raistlin
Registered: Mar 2007 Posts: 680 |
Judging from the screenshot, that just looks like they're changing $3fff on each rasterline. The value will repeat across the line and then be read again at HSYNC for the next line. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
krill, cool workaround didnt think of that so far :D what I did sometimes is simply change ffff back and forth sometimes you can have that irq outside the display area. |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Quoting CompyxI always thought that was $F9FF ?
It is. EBCM zeros the address lines that would ordinarily select which quarter of a charset VIC is accessing, so in this instance it just shifts the ghost byte down from the end of the bank by 1536 bytes (3/4 of the 2k a charset occupies). |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Yes, $F9FF. Sorry, brainfart. :) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting RaistlinJudging from the screenshot, that just looks like they're changing $3fff on each rasterline. The value will repeat across the line and then be read again at HSYNC for the next line. It's read continually, actually. Changing the visible pattern mid-line is possible, so you can have $3FFF-splits. :) |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
with an REU you can change it per char to make a "picture" |
| |
Perplex
Registered: Feb 2009 Posts: 255 |
Quoting KrillYes, $F9FF. Sorry, brainfart. :)
A shame it's not $FAFF, that would be the perfect address for the idle byte. |
| |
Golara Account closed
Registered: Jan 2018 Posts: 212 |
Quote: Quoting KrillYes, $F9FF. Sorry, brainfart. :)
A shame it's not $FAFF, that would be the perfect address for the idle byte.
why ? |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Wiktionary and Urban Dictionary are your friends. :) |
| |
Firehawk
Registered: Aug 2011 Posts: 31 |
@oziphantom: Yes, check out the QI demo where James did some exellent raster/3fff images. |