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 > Open Border and bitmap
2017-01-15 10:17
oziphantom

Registered: Oct 2014
Posts: 478
Open Border and bitmap

Given ye standard open boarder code
openBorderIRQ
	pha
	#STAB #$00,$d011
	#STAB #kIRQD012.closeBorder,$d012
	#STAPW closeBorderIRQ,$FFFE
	lda $d019
	ora InteruptStatus
	sta InteruptStatus
	#STAB #$ff,$d019
	#STAB #$80,IRQDone
        pla
	rti

closeBorderIRQ
	pha
	#STAB #3,$d021
	#STAB #%00011000,$d016 
	#STAB #$3b,$d011	
        #STAB #kIRQD012.hires,$d012
        #STAPW hiresIRQ,$FFFE    
        lda $d019
	ora InteruptStatus
	sta InteruptStatus
	#STAB #$ff,$d019
	pla
	rti

With a Hires split in the middle 
hiresIRQ
	pha
	txa
	pha
	ldx #04
-	nop
	dex
	bpl -
	#STAB #%00001000,$d016 
	#STAB #kIRQD012.openBorder,$d012
	#STAPW openBorderIRQ,$FFFE
	#STAB #9,$d021
	lda $d019
	ora InteruptStatus
	sta InteruptStatus	
	#STAB #$ff,$d019
	pla
	tax
	pla
	rti


However this gives corruption down the bottom of the screen, so I set the Open D011 value to $03 which drops the corruption to 1 line. Which is due to it turning off Bitmap mode, so I set it to $23/$33. This causes the bottom border to go black. When it hits "closeBorder" it shows the correct border colour again. Is there away around this? I.e. have open border that shows a correct background colour and have bitmap to the last line?
2017-01-15 10:24
Stryyker

Registered: Dec 2001
Posts: 465
Have you tried adjusting $3fff to contain something other than garbage?

Keep the bottom 3 bits of $d011 the same.
2017-01-15 15:54
oziphantom

Registered: Oct 2014
Posts: 478
Yes XFFF is 00, it shows nothing at the top of the screen and if I turn of bitmap mode it also show the background colour. I tried changing X9FF just in case having bitmap enabled also invoked that use case, still the same.
2017-01-15 16:18
Angel of Death

Registered: Apr 2008
Posts: 210
Leave all bits in $d011 as is and only fiddle around with bit 3 (select 24/25 row text).
When you put 0 in $d011 you also set bit 5 (select bitmap mode) to zero and switching off bitmap mode is the cause of the "corruption".
In your case more proper values would be $3b and $33 respectively.
2017-01-16 06:59
oziphantom

Registered: Oct 2014
Posts: 478


So the top one is with it set to $03, and you can see the line with black corruption on it, then it stays Brown which is the background colour.
The bottom one is with $33, to which the corruption in gone, but its black below.
In both cases when we get to the top border and hence $d011 is $3b again its is cyan in the border area as expected by the $d021 change at the start of "closeBorderIRQ"
2017-01-16 07:06
tlr

Registered: Sep 2003
Posts: 1701
Quote:

So the top one is with it set to $03, and you can see the line with black corruption on it, then it stays Brown which is the background colour.
The bottom one is with $33, to which the corruption in gone, but its black below.
In both cases when we get to the top border and hence $d011 is $3b again its is cyan in the border area as expected by the $d021 change at the start of "closeBorderIRQ"


IIRC: in bitmap mode, the last pixel color displayed will continue into the border.
2017-01-16 07:44
JackAsser

Registered: Jun 2002
Posts: 1987
Correct, for hires bitmap, lower-nybble color of the char at column 39 will continue into the sideborder.
2017-01-16 07:59
Angel of Death

Registered: Apr 2008
Posts: 210
Why put $03 in $d011?
I don't really get what you are trying to do here?
2017-01-16 08:23
oziphantom

Registered: Oct 2014
Posts: 478
I just did a test with setting the last Screen RAM location to $11 and then CRAM to $11 and I still got Black. I'm opening the bottom border not the sideborder.

$03 is just to keep the Y Scroll the same. Probably doesn't make a difference but $30 or $33 does the same thing with regards to black.

What I want to do is open the bottom border and have it be brown until the top of screen where I want it to be Cyan. With a multicolour mode bitmap up the top 3/4 and a hires one on the bottom 1/4.
2017-01-16 11:27
Perplex

Registered: Feb 2009
Posts: 254
Set $D011 to $33 on the last line of the bitmap, then wait until you are in the right border and set it to $13. And of course back to $1B during vertical blanking and finally $3B right before the start of bitmap display in the next frame.
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
TheRyk/MYD!
katon/Lepsi De
Airwolf/F4CG
kbs/Pht/Lxt
csabanw
Mr. SID
Niki/ECS
Max/Flat3
SLC
Guests online: 360
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 No Bounds  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 Party Elk 2  (9.7)
2 Cubic Dream  (9.6)
3 Copper Booze  (9.5)
4 Rainbow Connection  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Onscreen 5k  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Nostalgia  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

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