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


Forums > C64 Coding > Timing rasters with sprites over
2006-04-04 00:06
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Timing rasters with sprites over

I am gone stuck in trying to get some rasters be stable under some sprites.

There are 8 sprites, not moving.

Here's what I have:

color .byte 0,6,14,1,14,6,0,14
timer .byte 4,3,5,5,10,4,5,1

ldy #4
_swap dey
bne _swap

ldx #0
_doit lda color,x
sta d020
sta d021
ldy timer,x
_wrap dey
bne _wrap
inx
cpx #8
bne _doit

I've never learned about the badlines, is it
something with that, if i wanna time these rasters ?

Thanks
 
... 5 posts hidden. Click here to view all posts....
 
2006-04-10 23:14
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Ok, with the help of a nice guy, I got stable rasters under sprites.

But there is a problem.

I get some garbage gfx, it looks like D020 color appearing in D021 area, or $3fff issues.

I cleared $3fff, but it had no effect..
The color of this garbage gfx is set nowhere by me.

?
2006-04-11 06:55
HCL

Registered: Feb 2003
Posts: 682
If you didn't put the garbage gfx, it wouldn't be there >:). Sounds like perhaps you're doing..

lda color
sta $d020
sta $d021

..a bit too late in your "loop". It's not possible to get a 100% bugfree raster with random sprites on top. You will always see some bugs in the outermost borders. However, the d021-area does not need to get buggy. Just check the demos from 1988-89.. full of stuff like that :).
2006-04-11 10:51
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
The buggy gfx changes when i change the timing.
It has color lightgreen, and my rasters are blue (0,6,14,1,14,6,0). The sprites are red/white.

It looks a lot like that D020/3fff trick you can do in the border to make 9 sprites.
2006-04-11 12:04
MRT
Account closed

Registered: Sep 2005
Posts: 149
Are you blocking badlines by altering $d011?
Because it sounds to me like you're filling the first 3 bits of $d011 with the first 3 bits of $d012. And thereby triggering a badline, showing the FLI bug on your screen...
2006-04-11 15:05
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
I do:

lda $d012
and #%00000111
ora #%00011000
sta $d011
lda rastercolors,x
sta $d020
sta $d021
nop
...
2006-04-11 15:19
MRT
Account closed

Registered: Sep 2005
Posts: 149
Well, there's your problem.
You're generating a bad-line when you set your raster colors.

Try this:
(this code takes 2 cc more!)
  lda $d012
  sbc #$03       ;no need for sec
  and #%00000111
  ora #%00011000
  sta $d011


If you can't handle the 2 extra clockcycles then try the following timing trick:
(using example values below)

on rasterline 40, do:
  lda $d012

then go to next rasterline in the following two lines of code
  and #%00000111
  ora #%00011000

on rasterline 41, do:
  sta $d012


2006-04-11 16:12
MRT
Account closed

Registered: Sep 2005
Posts: 149
Or even easier...

Try this:
  lda $d012
  and #%00000111
  eor #%00011100
  sta $d011


This takes exactly the same amount of cycles as your own routine, but makes sure that the first 3 bits of $d012 and $d011 aren't the same! (and therefore don't create a badline)
2006-04-12 07:48
Hein

Registered: Apr 2004
Posts: 841
or try a $d011 table, filled with goody goodlines.

lda nobad,x
sta $d011
lda color,x
sta $d020
sta $d021

2006-04-12 12:17
Oswald

Registered: Apr 2002
Posts: 4431
or drink a cofee with intensity.
Previous - 1 | 2 - 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
A3/AFL
Knut Clausen/SHAPE/F..
blendo75
Dipswitch/Up Rough
Nuckhead/Backbone So..
Dymo/G★P
celticdesign/G★P/M..
MaD ][/Starship
MightyAxle
Francesco Sblendorio
Alakran_64
hedning/G★P
DuncanTwain
Guests online: 48
Top Demos
1 Unboxed  (9.7)
2 Uncensored  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 The Shores of Reflec..  (9.6)
7 Lunatico  (9.6)
8 Wonderland XII  (9.5)
9 C=Bit 18  (9.5)
10 Old Men in Used Cars  (9.5)
Top onefile Demos
1 LSR 64 V0.31  (10)
2 Smile to the Sky  (9.5)
3 Dawnfall V1.1  (9.5)
4 Crystal Gazer  (9.5)
5 Daah, Those Acid Pil..  (9.5)
6 Rewind  (9.5)
7 Instinct  (9.5)
8 Pandemoniac Part 5 o..  (9.5)
9 Innervasion  (9.4)
10 Bad Boy  (9.4)
Top Groups
1 Fossil  (9.8)
2 PriorArt  (9.7)
3 Performers  (9.6)
4 Oxyron  (9.4)
5 Censor Design  (9.4)
Top Original Suppliers
1 hedning  (9.8)
2 Derbyshire Ram  (9.1)
3 Irata  (9.0)
4 Fungus  (9.0)
5 Jazzcat  (9.0)

Home - Disclaimer
Copyright © No Name 2001-2019
Page generated in: 0.057 sec.