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

Registered: Jul 2013
Posts: 7
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: 463
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: 2980
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: 463
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: 2980
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: 463
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: 1790
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: 463
"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: 11386
LOL at those fractions
2014-12-22 20:33
tlr

Registered: Sep 2003
Posts: 1790
@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: 11386
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
X-Raffi/X-Rated
Guests online: 85
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 NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

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