Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Black background when sideborder open
2018-09-15 00:38
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 ?
2018-09-15 00:49
chatGPZ

Registered: Dec 2001
Posts: 11100
its the "ghostbyte", ie the last byte in the videobank. make it 0 :)
2018-09-15 01:11
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.
2018-09-15 09:10
Smasher

Registered: Feb 2003
Posts: 512
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
2018-09-15 10:45
Raistlin

Registered: Mar 2007
Posts: 549
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.
2018-09-15 10:54
Golara
Account closed

Registered: Jan 2018
Posts: 212
Yeah that's why I never used the last vic bank.
2018-09-15 12:16
Raistlin

Registered: Mar 2007
Posts: 549
It can be handy at times as well - D000-DFFF is a great place for static sprite data :-)
2018-09-15 12:48
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.
2018-09-15 13:42
Krill

Registered: Apr 2002
Posts: 2825
Quoting Raistlin
if 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 Golara
Honestly 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.
2018-09-15 14:19
algorithm

Registered: May 2002
Posts: 702
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
2018-09-15 21:20
Compyx

Registered: Jan 2005
Posts: 631
Quoting Krill
You 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 ?
2018-09-15 21:49
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.
2018-09-16 00:09
Raistlin

Registered: Mar 2007
Posts: 549
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.
2018-09-16 00:20
Oswald

Registered: Apr 2002
Posts: 5017
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.
2018-09-16 06:40
ChristopherJam

Registered: Aug 2004
Posts: 1370
Quoting Compyx
I 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).
2018-09-16 08:07
Krill

Registered: Apr 2002
Posts: 2825
Yes, $F9FF. Sorry, brainfart. :)
2018-09-16 08:11
Krill

Registered: Apr 2002
Posts: 2825
Quoting Raistlin
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.
It's read continually, actually. Changing the visible pattern mid-line is possible, so you can have $3FFF-splits. :)
2018-09-16 09:24
oziphantom

Registered: Oct 2014
Posts: 478
with an REU you can change it per char to make a "picture"
2018-09-17 14:07
Perplex

Registered: Feb 2009
Posts: 254
Quoting Krill
Yes, $F9FF. Sorry, brainfart. :)


A shame it's not $FAFF, that would be the perfect address for the idle byte.
2018-09-17 14:52
Golara
Account closed

Registered: Jan 2018
Posts: 212
Quote: Quoting Krill
Yes, $F9FF. Sorry, brainfart. :)


A shame it's not $FAFF, that would be the perfect address for the idle byte.


why ?
2018-09-17 14:58
Krill

Registered: Apr 2002
Posts: 2825
Wiktionary and Urban Dictionary are your friends. :)
2018-09-18 08:01
Firehawk

Registered: Aug 2011
Posts: 31
@oziphantom: Yes, check out the QI demo where James did some exellent raster/3fff images.
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
Alakran_64
McMeatLoaf
St0rmfr0nt/Quantum
tlr
radius75
wil
cobbpg
Guests online: 84
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

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