| |
oziphantom
Registered: Oct 2014 Posts: 490 |
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? |
|
| |
Stryyker
Registered: Dec 2001 Posts: 468 |
Have you tried adjusting $3fff to contain something other than garbage?
Keep the bottom 3 bits of $d011 the same. |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
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. |
| |
Angel of Death
Registered: Apr 2008 Posts: 211 |
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. |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
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" |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
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. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Correct, for hires bitmap, lower-nybble color of the char at column 39 will continue into the sideborder. |
| |
Angel of Death
Registered: Apr 2008 Posts: 211 |
Why put $03 in $d011?
I don't really get what you are trying to do here? |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
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. |
| |
Perplex
Registered: Feb 2009 Posts: 255 |
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. |