Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in 
CSDb User Forums


Forums > C64 Coding > Open Border and bitmap
2017-01-15 11:17
oziphantom

Registered: Oct 2014
Posts: 153
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 11:24
Stryyker

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

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

Registered: Oct 2014
Posts: 153
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 17:18
Angel of Death

Registered: Apr 2008
Posts: 168
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 07:59
oziphantom

Registered: Oct 2014
Posts: 153


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 08:06
tlr

Registered: Sep 2003
Posts: 1122
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 08:44
JackAsser

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

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

Registered: Oct 2014
Posts: 153
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 12:27
Perplex

Registered: Feb 2009
Posts: 194
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
Knut Clausen/SHAPE
cba
Didi/Laxity
Røly/MYD^STHD^TSA
eightbits
Guests online: 49
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 The Shores of Reflec..  (9.6)
5 Lunatico  (9.6)
6 Comaland 100%  (9.5)
7 Incoherent Nightmare  (9.5)
8 Quad Core 100%  (9.5)
9 Wonderland XII  (9.5)
10 Comaland  (9.5)
Top onefile Demos
1 Pandemoniac Part 2 o..  (9.6)
2 Dawnfall V1.1  (9.5)
3 Daah, Those Acid Pil..  (9.5)
4 Treu Love [reu]  (9.4)
5 Dawnfall  (9.2)
6 Veterans of Style  (9.2)
7 KAOS 64  (9.2)
8 One-Der  (9.2)
9 Game of Thrones [2sid]  (9.2)
10 Tunnel Vision  (9.2)
Top Groups
1 Booze Design  (9.4)
2 Censor Design  (9.4)
3 Oxyron  (9.4)
4 Crest  (9.3)
5 Finnish Gold  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.3)
2 hedning  (9.2)
3 Jazzcat  (9.1)
4 Irata  (9.0)
5 Fungus  (9.0)

Home - Disclaimer
Copyright © No Name 2001-2017
Page generated in: 0.218 sec.