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 > Leftmost sprite position and opening borders
2014-12-10 22:17
Parody
Account closed

Registered: Jul 2013
Posts: 6
Leftmost sprite position and opening borders

I just noticed that x=0 for a sprite doesn't cover the "start" of the left side border, Is there any way to achieve this?
 
... 37 posts hidden. Click here to view all posts....
 
2014-12-22 11:15
Flavioweb

Registered: Nov 2011
Posts: 447
Ok, first of all... thanks for your replies, then i hope to be able to write some code regarding this...
Then... there is another "little strange thing" that goes around in my mind.
In the vic article, the "internal x coord register" was described as a 9 bits counter.
How can count more than 512 x positions with just 9 bits?
I'm thinking about also to sprite collision detection or lightpen matches in the "area" 513-520 "dots"...
How can vic know "where" is between this range?
2014-12-22 12:01
Krill

Registered: Apr 2002
Posts: 2839
I suspect it's 9 bits, but uses an extra flip-flop to alternate between resetting to $180 or not when reaching $188. Just shooting from the hips though :)
2014-12-22 12:12
Flavioweb

Registered: Nov 2011
Posts: 447
This "flip-flop" seems to "freeze" the counter instead of resetting it... but looks like a strange and too complex solution to me...
2014-12-22 12:18
Krill

Registered: Apr 2002
Posts: 2839
Which solution that is easier (and just needs a few gates) would you propose, then? And don't say anything about fractional counters :)
2014-12-22 14:40
Flavioweb

Registered: Nov 2011
Posts: 447
I don't have a solution... more simple o more complex, but if xpos is the same for sprites and lightpen, and we have the same value of xpos for 1 cycle = 8 pixels, how can vic detect a sprite collision correctly in this range of dots?
2014-12-22 19:13
tlr

Registered: Sep 2003
Posts: 1714
Collisions are not directly related to xpos. Collisions occur when data shifted out from the sprite shift registers fulfill a collision condition. Xpos is only used to trigger the sprite.

I don't believe the value of xpos stays the same. It seems like 0x180-0x187 repeats twice like I stated earlier.
2014-12-22 19:31
Flavioweb

Registered: Nov 2011
Posts: 447
"Trigger" a sprite mean "set" where it appears?
If so, in NTSC, where would appear 2 sprites with coord $184 and $187?
{ Phi1(62), 0x184, None, SprDma1(1), BaSpr3(1, 2, 3), None },
{ Phi2(62), 0x184, None, SprDma2(1), BaSpr3(1, 2, 3), None },
{ Phi1(63), 0x184, None, SprPtr(2), BaSpr2(2, 3), None

...here we have 6 possible positions between 12 "dots"...
2014-12-22 19:52
chatGPZ

Registered: Dec 2001
Posts: 11108
LOL at those fractions
2014-12-22 20:33
tlr

Registered: Sep 2003
Posts: 1714
@flavioweb: it can be shown that a sprite can only trigger once per line so there will a gap instead of two triggers.

Perhaps if you are really sneaky you could change xpos on the fly so it gets set to $0180-$0187 exactly at the cycle where the repeat occurs? Then it should be triggered 8 pixels later which is way nerdy cool.
2014-12-22 20:35
chatGPZ

Registered: Dec 2001
Posts: 11108
i demand a test program :)
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
MCM/ONSLAUGHT
kbs/Pht/Lxt
A3/AFL
Guests online: 145
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 The Ghost  (9.6)
9 Wonderland XIV  (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 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (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 Musicians
1 Rob Hubbard  (9.7)
2 Jeroen Tel  (9.7)
3 Stinsen  (9.6)
4 Mutetus  (9.6)
5 Linus  (9.6)

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