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


Forums > C64 Coding > 16 rasterlines tall sprites
2003-06-10 10:11
Cybernator

Registered: Jun 2002
Posts: 154
16 rasterlines tall sprites

I need to multiplex 4 sprite rows. However, the sprites I use should be 16 rasterlines tall (instead of 21). If I move the sprite 16 pixels down after the first line has been displayed, will the next sprite be displayed from its 1st rasterline?
I mean because MCBASE is incremented by 3 after each rasterline, will it reset when the second sprite starts?

Quote from the VIC article:
"In the first phases of cycle 55 and 56, the VIC checks for every single sprite if the corresponding MxE bit in register $D015 is set and the Y coordinate of the sprite match the lower 8 bits of RASTER. If this is the case and the _DMA for the sprite is still off_, the DMA is switched on, MCBASE is cleared..."

Well, seems that if the Y coord. of the sprite matches the raster, MCBASE is cleared, BUT only if the DMA is STILL off.
Does this mean that if it's on, MCBASE contiunes counting from where it stopped? If so, I got a problem here. ;-P
2003-06-10 11:05
Puterman
Account closed

Registered: Jan 2002
Posts: 188
If sprite 0 is on line $50, you can't set it to $60 and expect it to be displayed there. It just won't show up. You can't start displaying a sprite again until it's finished. This is very basic knowledge, and you could easily have found out yourself by trying it.

There's a trick to shrink sprites vertically though, called sprite crunching. Check out Krestage by Crest if you absolutely want to do this.
2003-06-10 11:08
Graham
Account closed

Registered: Dec 2002
Posts: 990
if you change the Y position of a sprite while it's displayed nothing will happen to the sprite itself. it will still be 21 pixels high. the multiplexed sprite at the new Y position will only be displayed when the Y position is higher than old Y+20 because a sprite will only be started to display if it isnt being displayed currently.
2003-06-10 12:43
Cybernator

Registered: Jun 2002
Posts: 154
Puterman wrote:

> This is very basic knowledge,
> and you could easily have found
> out yourself by trying it.

In fact, I have noticed it when my knowledge about the internal functions of the VIC was practically zero. I was thinking if there's any way to reset MCBASE, so that the sprite could be displayed correctly. (something like reseting RC as in FPP). Obviously, there isn't.

Ah yes, whenever I post about VIC stuff, I end up with conversation about various of its features, not just the thing I have asked at first. :-D

I have never thought about how sprite-crunch works. IIRC, the sprites were 17 rasterlines tall in Krestage. Can this be used for 16? :)
2003-06-10 13:16
Puterman
Account closed

Registered: Jan 2002
Posts: 188
What I'd really like to know is why you absolutely need sprites that are 16 lines...
2003-06-10 13:46
cadaver

Registered: Feb 2002
Posts: 1153
If it's some sort of bitmap drawing or dual-layer thing, I'd recommend switching roles of chars & sprites, if possible..
2003-06-10 14:15
CreaMD

Registered: Dec 2001
Posts: 3034
I'm not 100% sure but I think all that crunching/read reseting stuff must have something to do with gfx-bank switching.
2003-06-12 20:49
Cybernator

Registered: Jun 2002
Posts: 154
Puterman wrote:

> What I'd really like to know is
> why you absolutely need sprites
> that are 16 lines...

Cadaver wrote:

> If it's some sort of bitmap drawing
> or dual-layer thing, I'd recommend
> switching roles of chars & sprites,
> if possible..

I don't _absolutely_ need this. An effect crossed my mind (rather poor one :)), where 16 rasterlines tall sprites would make it easier to code. Imagine squares which scale down (ie. become smaller), and as they do that, they uncover the background behing them. These squares are 16 rasterlines tall and 16 pixels wide (so that they can cover 2x2 chars). I wanted to use 8 sprites per row. So it would be nice if MCBASE could be reseted. The effect can also be achieved by covering the whole area with sprites, and writing into the sprites directly, instead of modifying the sprite pointer. Or by using 4 sprites per row (a cheap trick :)).

That doesn't matter now, since the project is canceled.
2003-07-28 21:22
Cruzer

Registered: Dec 2001
Posts: 1048
Sprite crunching is a pretty kewl effect, but pretty hard to master too I think. I remember discovering myself that you could fuck up the updating of the sprite gfx by changing $D017 randomly, but I didn't think it could be used for anything useful. Like lots of other VIC bugs it would probably never had been fully tamed if it hadn't been for the VIC-bug master himself, Crossbow/Crest.

For an effect with some blocks that reveal some gfx, I would suggest multiplexing the sprites at each 21st rasterline, and then having some different instances of the block animation that starts on different lines in the sprite, if you know what I mean...
2003-07-29 17:28
Cybernator

Registered: Jun 2002
Posts: 154
Cruzer wrote:

> and then having some different
> instances of the block animation
> that starts on different lines in
> the sprite, if you know what I mean...

Yes, that's even better way to do it. Did I say it was canceled? There was misunderstanding with some dudez, but it's not canceled after all. ;-)))
However, I've used another 3D-ish effect as the purpose has changed.
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
Alakran_64
Codey/Second Dimension
csabanw
iceout/Avatar/HF
Viti/Hokuto Force
St0rmfr0nt/Quantum
Mibri/ATL^MSL^PRX
CA$H/TRiAD
Walt/Bonzai
Guests online: 82
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

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