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 Productions > Limitations - Sprites in the Borders
2006-08-26 19:38
Wile Coyote

Registered: Mar 2004
Posts: 636
Limitations - Sprites in the Borders

hello,

I was thinking, has anyone drawn up a doc with (pictures :)explaining *all known* possibilities with placing sprites into the border areas of the screen.

I know:
8 sprites can be placed in the upper and lower borders.
7 sprites can be placed in the side borders.

I was thinking, what about the corner borders,is that classed as a sideborder or a top or bottom border (8 sprites).

Another question :) when 7 sprites are placed into the sideborders can the 8th free sprite be placed into the main (center) screen areas or by opening up the side borders, is the option for an 8th sprite not available.

I am asking these questions as i am thinking about designs that use the border areas :)

thanks
/wec
2006-08-26 20:17
tlr

Registered: Sep 2003
Posts: 1702
All restrictions are based on raster line, not column.
You can consider the corners the same as the upper/lower border. i.e 8 sprites.

These sprites can of course all have different x/y-expansion, different x- and y-positions, multicolor/hires and so on.
A number of these parameters could change on every rasterline if desired.

The center area of the top and bottom border is covered by an idle-fetch byte. These are 8 repeated pixels (black or background).
They may be changed dynamically and combined with different background colors to create graphics (mainly in the Y-direction).
2006-08-26 20:42
Jetboy

Registered: Jul 2006
Posts: 211
One good example of what can be done is Deus Ex Machina

Notice, that to cover the lower border, most of the sprites has to be x-expanded.

Anything I can do to help?
2006-08-27 07:01
Oswald

Registered: Apr 2002
Posts: 5017
there's not really such thing as corner borders. the sideborders are in reality one border starting at the right side and ending at the left side in the next rasterline throughout the whole height of the screen. The top/ bottom borders are aswell one single border starting at the bottom of the screen and ending in the next frame at the top. (think of it in the way as the electron beam draws up the screen)

you can place 8 sprites on the sideborders the restriction factors are: not enough free cycles for the cpu to open the border on badlines and that some of the sprite data is fetched while the side border is displayed, thus you might get distorted/no gfx at specific sprites.

last, notice that sprites can be freely multiplexed, the only restriction here is that you cant have more than 8 sprites on a single rasterline.

read the vic article for confusing in depth details.

edit: X coord 0 of the sprite is not to the left enough to cover the left sideborder u have to set the 9th bit of the x coord and use some ridiculously high x coord value to have the sprite to show up more to the left than xcoord=0.
2006-08-27 09:17
Wile Coyote

Registered: Mar 2004
Posts: 636
Quote: One good example of what can be done is Deus Ex Machina

Notice, that to cover the lower border, most of the sprites has to be x-expanded.

Anything I can do to help?


The intro picture of Deus Ex Machina is very well thought out.


.at the moment Tlr i'm just looking into design ideas :)
2006-08-27 09:20
Wile Coyote

Registered: Mar 2004
Posts: 636
Quote: there's not really such thing as corner borders. the sideborders are in reality one border starting at the right side and ending at the left side in the next rasterline throughout the whole height of the screen. The top/ bottom borders are aswell one single border starting at the bottom of the screen and ending in the next frame at the top. (think of it in the way as the electron beam draws up the screen)

you can place 8 sprites on the sideborders the restriction factors are: not enough free cycles for the cpu to open the border on badlines and that some of the sprite data is fetched while the side border is displayed, thus you might get distorted/no gfx at specific sprites.

last, notice that sprites can be freely multiplexed, the only restriction here is that you cant have more than 8 sprites on a single rasterline.

read the vic article for confusing in depth details.

edit: X coord 0 of the sprite is not to the left enough to cover the left sideborder u have to set the 9th bit of the x coord and use some ridiculously high x coord value to have the sprite to show up more to the left than xcoord=0.


thanks for that, you kinda lost me when at this point:
"X coord 0 of the sprite is not to the left enough to cover the left sideborder u have to set the 9th bit of the x coord and use some ridiculously high x coord value to have the sprite to show up more to the left than xcoord=0."

So to play it safe my best bet is to design with 7 sprites in mind :)

As for desiging an image that makes use of border sprites, i guess it is better to leave the carving up of the sprite (data within a sprite) to the coder ;)

2006-08-27 09:41
JackAsser

Registered: Jun 2002
Posts: 1987
Also, if you wanna use sprites in the sideborder together with badlines (i.e. char data or bitmap data) you're limited to only 4 sprites per raster line iirc. At least not as high as 7.

Bad line = 40c
Sprite setup = 1-3c
Cycles per sprite = 2c
Cycles per line = 63c
Minimum cycles requires for removing the sideborder = 8c (higly theoretical)

63-40-1-8 = 14c

14/2 = 7 sprites, but this assumes 1 cycle sprite setup time and 8 cycles for removing the sideborder, I'm sceptical... F.e. to make use of the 2 cycles in the sprite setup time you need to use a RMW-instruction to remove the border which will in practice make the border removal 10cycles, i.e. nothing gained.

Anyways, my VIC-schooling has taught me that 4 sprites in the sideborder + normal badlines is the max you can get. I'd like to hear a nice theoretical explanation for this though...

7 sprites + sideborder and char graphics is possible only if you dis-allow new badlines to form. The $d011 trick required to do this unfortunatly collides with sprite fetch 0, hence only sprites 1-7 are usable (I use this trick in Panta Rhei and LCP Memories f.e.). But not allowing badlines to form, limits the graphics possibilities quite alot, although having a WEC logo which is rather simple is not a problem at all, if you have that in mind.
2006-08-27 09:46
tlr

Registered: Sep 2003
Posts: 1702
Quote: The intro picture of Deus Ex Machina is very well thought out.


.at the moment Tlr i'm just looking into design ideas :)


Actually that was Jetboy's post, but I can help out too if you like. :)
Breakpoint 06 c64 Graphics Seminar does some explanation on how the Deus Ex Machina picture was created (in Photoshop), and much more.

Basically you can have 7 (usually just 4) sprites per line in the "screen" part of the y-coordinates, and 8 in the rest.
There are many restrictions based on this. I haven't seen anybody manage FLI every line with 7 sprites in the border for example.
If you stay on the standard VIC-II modes (MultiColor/Hires) + sideborder you'll be safe. Otherwise I suggest you present an idea, and then someone codes a viewer to test if it is possible to display it before you draw it.

Oswalds comment about the X-coordinates is just that coordinate 0 is not the leftmost location.

Also what usually limits you from displaying many sprites in the "screen" area is that every 8th line is a "badline", i.e less raster time to open the border.

There are ways to manipulate these badlines (e.g FLI which adds them).

You could for example work with the restriction that some parts of the screen have more sprites, but doesn't open the border in some of the raster lines. Note that when not opening the border in a line, the border color will show one raster line lower on the left side than on the right side.
2006-08-27 10:01
Graham
Account closed

Registered: Dec 2002
Posts: 990
I have to agree with JackAsser, under normal circumstances you won't get more than 4 sprites in the sideborders.

Quote:
I haven't seen anybody manage FLI every line with 7 sprites in the border for example.

And I haven't seen anybody managing FLI every line with even 1 sprite in the border.
2006-08-27 10:17
tlr

Registered: Sep 2003
Posts: 1702
Quote: I have to agree with JackAsser, under normal circumstances you won't get more than 4 sprites in the sideborders.

Quote:
I haven't seen anybody manage FLI every line with 7 sprites in the border for example.

And I haven't seen anybody managing FLI every line with even 1 sprite in the border.


@Graham: I stand corrected.
I must admit I stopped coding demos for the c64 in 1988, although I followed the developments since then. ;)
2006-08-27 11:08
Wile Coyote

Registered: Mar 2004
Posts: 636
Quote: Actually that was Jetboy's post, but I can help out too if you like. :)
Breakpoint 06 c64 Graphics Seminar does some explanation on how the Deus Ex Machina picture was created (in Photoshop), and much more.

Basically you can have 7 (usually just 4) sprites per line in the "screen" part of the y-coordinates, and 8 in the rest.
There are many restrictions based on this. I haven't seen anybody manage FLI every line with 7 sprites in the border for example.
If you stay on the standard VIC-II modes (MultiColor/Hires) + sideborder you'll be safe. Otherwise I suggest you present an idea, and then someone codes a viewer to test if it is possible to display it before you draw it.

Oswalds comment about the X-coordinates is just that coordinate 0 is not the leftmost location.

Also what usually limits you from displaying many sprites in the "screen" area is that every 8th line is a "badline", i.e less raster time to open the border.

There are ways to manipulate these badlines (e.g FLI which adds them).

You could for example work with the restriction that some parts of the screen have more sprites, but doesn't open the border in some of the raster lines. Note that when not opening the border in a line, the border color will show one raster line lower on the left side than on the right side.


thanks, although there is nothing to help out with at the moment. I have simply been thinking about possibilities and clever design :)

So 4 sprites is the way to go. 4 sprites for the side borders and the other 4 sprites can be used on the (main) screen (or should that be 3 (7 total)).

..and what about hires, multi colour, expanded sprites. Can this affect the timing? or is a sprite a sprite :)

Crossbow spoke of displaying a sprite, but not a whole sprite (during Krestage or Krestage 2). I'll have to see the demo again, i think he speaks of displaying only the first 16 or 18 pixels of the sprite.
 
... 35 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 | 4 | 5 - 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
Acidchild/Padua
Andy/AEG
Crimson/Wrath Designs
sln.pixelrat
krissz
rexbeng
Linus/MSL
Grue/Extend
zscs
Guests online: 114
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.9)
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 Webmasters
1 Slaygon  (9.7)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.5)
5 CreaMD  (9.1)

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