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 > 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: 902
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
The Syndrom/TIA/Pret..
t0m3000/hf^boom!^ibx
kbs/Pht/Lxt
Fungus/Nostalgia
McMeatLoaf
d0c
ΛΛdZ
Guests online: 106
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 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Pal  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

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