Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Werner ! (Registered 2024-05-30) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > sprites disappears when using d011
2010-07-23 13:10
turtle
Account closed

Registered: Mar 2005
Posts: 44
sprites disappears when using d011

I have 6 split .8 sprite each split.

sprites disappears when using the d011 as scroll, for each second line?

is there any type of timing to use ?
i know that it can be error in the end of ploting the sprite, it its on a split. i think =)
pliz help =)

lda#$32
cmp$d012
bne*-3

lda #%00011111
sta $d011
(ok)
lda #%00011110
(error.sprites disappears in one line)
lda #%00011101
(ok)
lda #%00011100
(error)................)


sprites

lda#$48
cmp$d012
bne*-3

sprites

lda#$5e
cmp$d012
bne*-3

sprites

lda#$74
cmp$d012
bne*-3

sprites

lda#$8a
cmp$d012
bne*-3

sprites

lda#$a0
cmp$d012
bne*-3

sprites

lda#$ff
cmp$d012
bne*-3
2010-07-23 13:25
JCB
Account closed

Registered: Jun 2002
Posts: 241
You might be experiencing "badlines" :)

Badline is where the C64 fetches the new character data from screen RAM (every 8 pixels vertically, top of each new character line), to do so it must steal cycles from the CPU. Do a google for C64 badlines, there's lots of explanations. Basically you're seeing it when changing D011 because the badlines are moving vertically and coinciding with one of your CMP $D012 positions.

It will all kind of depend on how your "sprites" (in your code listing) works, you can only do so much before the raster has passed the line the VIC would need the registers to be changed for it to know it has to display the sprites again.


Pete
2010-07-23 15:08
WVL

Registered: Mar 2002
Posts: 886
these bits of code

lda #$xx
cmp $d012
bne *-3
Are very dangerous when combined with badlines and sprites. You better change this to

lda $d012
cmp #$xx
bcc *-5   ;keep looping as long as value of $d012 is smaller than #$xx
or even better :

lda #$xx
cmp $d012
bcs *-3   ;keep looping as long as #$xx is bigger then or equal to $d012
Now find out why for yourself :)
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
t0m3000/HF^BOOM!^IBX
Pajda/Faith Design
X-jammer/G★P
Sokratekk
Flexman
BlackJack/Civitas
Guests online: 104
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.7)
6 Aliens in Wonderland  (9.6)
7 No Bounds  (9.6)
8 Comaland 100%  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Happy Birthday Dr.J  (9.7)
2 Layers  (9.6)
3 It's More Fun to Com..  (9.6)
4 Cubic Dream  (9.6)
5 Party Elk 2  (9.6)
6 Copper Booze  (9.6)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Rainbow Connection  (9.5)
9 Dawnfall V1.1  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Original Suppliers
1 Black Beard  (9.7)
2 Derbyshire Ram  (9.5)
3 hedning  (9.2)
4 Baracuda  (9.1)
5 Jazzcat  (8.6)

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