| |
Testa Account closed
Registered: Oct 2004 Posts: 197 |
Anti badline trick/strech charline 7
hi,
i have a question about the anti badline trick,
in this case streched graphics, open sideborders and 7 sprites each line..
i have used this trick a vieuw times and i never had any problems..
what i did was;
$d011 = $3b
lda #$3c
stx $d016 ;open sideborder atrasterline $8a,charline 7
sta $d011 ;anti badline trick,
sty $d016
no problem
this time i also have some other stuff going on.
i use dma delay at line $30/$31
i use a fld, open borders and sprite fpp rastercode
so the dma delay swings the anti badline graphics from left to right and the fld rastercode moves the graphics up and down..
the problem i have is this..
after the fld/sprite fpp rastercode i want to do the
anti badline trick.
lets say $d011 = $1b and we are at line $8a
lda #$3c
stx $d016 ; open sideborders at line $8a, charline 7
sta $d011 ; anti badline trick
sty $d016 ;
at this point $d012 is $8d instead of $8b and there was a badline.
why was there a badline instead of the anti badline trick
and why is $d012 increased with 2 lines?
thanks
Testa
|
|
| |
Monte Carlos
Registered: Jun 2004 Posts: 359 |
I can only guess, what it is. You have sprites above the anti badline code. You surely have some instructions timing the start position of the anti badline trick. The sprites which were stretched the rasterlines before probably still have some unstretched parts. These parts hang over below the stretched parts of the sprites. They can fuck up the timing before the anti badline trick so that it starts at the wrong position. If the start falls into a badline, the code which was planned to need only one rasterline needs suddenly two rasterlines. |
| |
Testa Account closed
Registered: Oct 2004 Posts: 197 |
well the thing that confuses me is that the timing is correct,,
lda #$3c
stx $d016 ;de border is open now at $8a
sta $d011
sty $d016
if the timing was not correct the border should be closed.
about the sprites your are right.. at the moment i do the anti badline trick i already have 7 sprites at that line..
4 sprites from the spritestretcher and 3 new sprites...
but thanks anyway...
|
| |
Monte Carlos
Registered: Jun 2004 Posts: 359 |
It confuses me too. A last idea: Opening the border works in 7 of 8 lines, anti badline only in one. Have you checked $d012 (i mean poked it into $d020 and $d021)?
|
| |
Testa Account closed
Registered: Oct 2004 Posts: 197 |
i am not sure what you mean with poking $d012 into $d020/$d021... what must i measure?...
i don't know if i ask too much but is it alright i send you a snapshot???..
well thanks again..
|
| |
Stryyker
Registered: Dec 2001 Posts: 468 |
Any chance it is an emulator bug? |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
your anti badlne trick will only work with some given vertical finescroll values ($3b fex.) . the fld will change the finescroll val all the time when moving. also the $d011 write has to be done on the same rasterline inside the char rows.
anyway there's an easyer method, in each frame open the top/bottom border with screen OFF bit set (the modewhen all color si given by d020 and nothing else is visible) you will get a screen without badlines. |
| |
enthusi
Registered: May 2004 Posts: 677 |
Quote: your anti badlne trick will only work with some given vertical finescroll values ($3b fex.) . the fld will change the finescroll val all the time when moving. also the $d011 write has to be done on the same rasterline inside the char rows.
anyway there's an easyer method, in each frame open the top/bottom border with screen OFF bit set (the modewhen all color si given by d020 and nothing else is visible) you will get a screen without badlines.
But also without sprites? |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
Also, he wants to stretch line 7. The DEN bit trick will not display anything else than $3FFF idle byte.
@Testa: Add a few NOPs infront of the STA $D011 and see what happens. |
| |
WVL
Registered: Mar 2002 Posts: 902 |
Can you do some checks with VICE to see at what cycle you are?
I always use an illegal opcode to check when the code is being executed :
lda #$3c
stx $d016 ;de border is open now at $8a
.byte $02 ;JAM
sta $d011
sty $d016
VICE will immediately jump to monitor when the JAM gets executed and shows the rasterline and cycle.
Also, what sprites are you using exactly? Maybe it will help to switch from sprites 0-6 to 1-7. |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Quote: But also without sprites?
No, if you open the vertical border and turn off DEN you can still display sprites as long as you keep opening the border every frame, keeping the vertical border flipflop from ever getting set. |
... 17 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 - Next |