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 > Anti badline trick/strech charline 7
2009-08-04 18:11
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....
 
2009-08-05 13:45
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!
2009-08-05 17:43
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.
2009-08-05 18:23
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...
2009-08-06 08:50
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.
2009-08-06 09:12
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
2009-08-06 09:39
Testa
Account closed

Registered: Oct 2004
Posts: 197
thanks WVL... this is very handy.. shame on me becoz i didn't know this....

2009-08-06 10:27
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
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
iAN CooG/HVSC
Mike
Jazzcat/Onslaught
E$G/HF ⭐ 7
XmikeX
Guests online: 339
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

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