| |
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
|
|
... 20 posts hidden. Click here to view all posts.... |
| |
Testa Account closed
Registered: Oct 2004 Posts: 197 |
wauw thanks for al the help,
Graham: i have tried some extra nops and i get the same result..
WVL: i use 7 sprites. not the 0 sprite becoz vic uses the whole bus to fetch it, just at the cycles needed for the anti badline trick.
i also tried the jam trick. witch is very cool. don't laugh but i never just the vice monitor...
when i add the jam byte $02 to my turbo assembler source,
i indeed go directly to the monitor. but where can i read the rasterline and cycle info.. this sounds really handy!
thanks!
|
| |
Monte Carlos
Registered: Jun 2004 Posts: 359 |
@testa: Poking the nibbles of $d012 into $d020 and $d021 shows you the current rasterline as colors.
@oswald: After the fld it should be possible to continue with increasing $d011, although with a little bit modified timing. Because a hardreset of vertical scroll position (bits 0-3 of $d011) is circumvented, one routine should be enough.
|
| |
Testa Account closed
Registered: Oct 2004 Posts: 197 |
Monte carlos: i understand. but what is the advange compared to lda $d012 sta $4000.
Skate: i have put the sinus amplitude from the fld off. so the fld stands still so $d011 is always $1b at line $8a..
i also didn't completly understand what you mean with different codeblocks
instead of different codeblocks i do in the anti badline rastercode each line..
and #%00000111
adc #1
ora #$38
sta $d011
so when the fld is moving and finescroll changes i only have to change the first $d011 write of the anti badline trick.. i hope this is what you mean...
but thanks anyway...
|
| |
Skate
Registered: Jul 2003 Posts: 494 |
What I meant was, if you don't have enough cycles per line for additional and, ora etc. stuff, alternatively you can generate 8 different subroutines out of a single macro.
!macro myMacro .yPosition {
lda #((0 + .yPosition) & 7) | $38
stx $d016
sta $d011
sty $d016
...
...
lda #((1 + .yPosition) & 7) | $38
stx $d016
sta $d011
sty $d016
...
...
lda #((2 + .yPosition) & 7) | $38
stx $d016
sta $d011
sty $d016
...
...
}
forYPosition0
+myMacro 0
rts
forYPosition1
+myMacro 1
rts
...
...
forYPosition7
+myMacro 7
rts
Something like this. Then you can call the suitable subroutine depending on the lowest 3 bits of $d011 at the start up raster position.
If you have enough free cycles, you don't need this of course. |
| |
WVL
Registered: Mar 2002 Posts: 902 |
Quote: wauw thanks for al the help,
Graham: i have tried some extra nops and i get the same result..
WVL: i use 7 sprites. not the 0 sprite becoz vic uses the whole bus to fetch it, just at the cycles needed for the anti badline trick.
i also tried the jam trick. witch is very cool. don't laugh but i never just the vice monitor...
when i add the jam byte $02 to my turbo assembler source,
i indeed go directly to the monitor. but where can i read the rasterline and cycle info.. this sounds really handy!
thanks!
When you jump to monitor, it says something like
** monitor 050 034
which means rasterline 50, cycle 34 on that line.
You can also check with the 'r' command :
** Monitor 260 048
(C:$0901) r
ADDR AC XR YR SP 00 01 NV-BDIZC LIN CYC
.;0901 00 00 00 f7 2f 37 00100000 260 048 |
| |
Testa Account closed
Registered: Oct 2004 Posts: 197 |
thanks WVL... this is very handy.. shame on me becoz i didn't know this....
|
| |
Ninja
Registered: Jan 2002 Posts: 411 |
radiantx: Uhrm, well, the difference is probably that I immediately understood which value means what in CCS while I never noticed the "monitor <x> <y>" thing in VICE up to now :D |
Previous - 1 | 2 | 3 - Next |