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 > 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: 11108
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: 552
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: 552
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: 2839
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 ?
 
... 11 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 - 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
Apollyon/ALD
zscs
Clown
t0m3000/ibex-crew
bepp/ΤRIΛD
Guests online: 150
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 The Ghost  (9.6)
9 Wonderland XIV  (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 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (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 Original Suppliers
1 Derbyshire Ram  (9.5)
2 Black Beard  (9.4)
3 hedning  (9.2)
4 Baracuda  (9.1)
5 Irata  (8.5)

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