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 > Freely moving sprites over a triggered VSP?
2025-02-16 22:59
JackAsser

Registered: Jun 2002
Posts: 2038
Freely moving sprites over a triggered VSP?

The clock slide itself is not a problem since it's outside the sprite DMA area anywas, but we need to kick it off at a well known cycle, regardless of sprite DMA. Is it even possible?

Currently I do a hack by detecting if sprite 0 interfere and adjust appropriately. Double timer won't cut it since the first timer will trigger in the middle of the sprite fetches.

Only idea I have so far is to stabalize before the sprite fetches and the via sprite y-positions perform a series of compares to get a delay value via some table. I did something similar in The Wild Bunch for the sprite multiplexer balls over 4x4-fli, but there I knew the sprites always came in pairs, so the combinations were only 16.
2025-02-16 23:17
chatGPZ

Registered: Dec 2001
Posts: 11523
I'd just say it is impossible and wait for crossbow to do it anyway :)
2025-02-16 23:20
JackAsser

Registered: Jun 2002
Posts: 2038
Quote: I'd just say it is impossible and wait for crossbow to do it anyway :)

A sound idea! Not sure I wanna wait 15-20yrs though. :D
2025-02-16 23:33
Skate

Registered: Jul 2003
Posts: 506
You'd probably considered this but wasting one or more sprite rows and a few extra cycles, $d017 stretch would stabilize the timings. I wouldn't call it "freely moving sprites" but it looks like it at the end. It may not be suitable in your scenario but it'd give it a go if it's possible.
2025-02-17 00:04
JackAsser

Registered: Jun 2002
Posts: 2038
Quote: You'd probably considered this but wasting one or more sprite rows and a few extra cycles, $d017 stretch would stabilize the timings. I wouldn't call it "freely moving sprites" but it looks like it at the end. It may not be suitable in your scenario but it'd give it a go if it's possible.

Yeah I know. But in this case I can’t have look’a’like.

It’s for Monkey Island. There are other workarounds, but solving this would be the clean solution.
2025-02-17 00:08
JackAsser

Registered: Jun 2002
Posts: 2038
@Skate: your suggestion actually made me remember an option I considered like halv a year ago, so thanks.

Basically ensure there are ALWAYS 8 sprites on that line to get predictable timing. By multiplexing all sprites 21 lines down the raster line before. I'll try that!
2025-02-17 01:10
Krill

Registered: Apr 2002
Posts: 3098
Quoting JackAsser
Basically ensure there are ALWAYS 8 sprites on that line to get predictable timing. By multiplexing all sprites 21 lines down the raster line before. I'll try that!
I'm not sure i've understood the actual OP problem here, but...

You might want to take advantage of the sprite gap with this approach.
That is, 5 sprites (e.g., 0 2 4 7 and the fifth any of 1 3 5 6) would give you the same effect at potentially less cost, as the CPU isn't running in those measly 2-cycles DMA gaps.
2025-02-17 01:56
JackAsser

Registered: Jun 2002
Posts: 2038
Quote: Quoting JackAsser
Basically ensure there are ALWAYS 8 sprites on that line to get predictable timing. By multiplexing all sprites 21 lines down the raster line before. I'll try that!
I'm not sure i've understood the actual OP problem here, but...

You might want to take advantage of the sprite gap with this approach.
That is, 5 sprites (e.g., 0 2 4 7 and the fifth any of 1 3 5 6) would give you the same effect at potentially less cost, as the CPU isn't running in those measly 2-cycles DMA gaps.


Yeah yeah I know, but in MI I don't know what sprites are where, I can just assume that any 0..7 hit the VSP line at any given time. Solvable you think?
2025-02-17 02:07
Skate

Registered: Jul 2003
Posts: 506
Quote: @Skate: your suggestion actually made me remember an option I considered like halv a year ago, so thanks.

Basically ensure there are ALWAYS 8 sprites on that line to get predictable timing. By multiplexing all sprites 21 lines down the raster line before. I'll try that!


Even if you start at the correct position, there is always the problematic 168th line issue as you know. But since this is for a game engine, little glitches can be ignored. Of course always go for the perfection but don't let little glitches block you for weeks or months. Monkey Island is a serious project after all.

I'll be looking forward to it, good luck!
2025-02-17 02:21
Krill

Registered: Apr 2002
Posts: 3098
Quoting JackAsser
Yeah yeah I know, but in MI I don't know what sprites are where, I can just assume that any 0..7 hit the VSP line at any given time. Solvable you think?
Missing some context here. :)

VSP (hardware X-scroll) happens in the top border, i guess? And there you may or may not have random sprites reaching into the top border?
And the problem is that the interrupt can be stabilised all right, but you'd need to go across sprite DMA of indeterminate runlength to then do the VSP stuff in the next rasterline?
2025-02-17 05:22
oziphantom

Registered: Oct 2014
Posts: 502
In S.P.R.E.R.O. V1.4 I have clock perfect timing with arbitrary moving sprites. In case you missed the trick, this a "sprites only" compo entry and hence there is no background, the background is "$3FFF" writes.

The combinations of sprites isn't 256 give the C64 doesn't clock back for missing sprites i.e 0,2 is the same a 0,1,2 etc So I was able to make a bunch of "waste X clocks" and then a 256 entry table for number of clocks I need to waste which it then dynamically updates the code for those lines to compensate for the clocks.

Although to be fair I don't have to worry about badlines, and I think I had some illegal sprite combinations that I could not make a matching clock delay for that I had to have the level data sort the sprites to ensure that said combos could not happen etc.

You could probably do the same thing with the VSP before line and then adjust the VSP delay amount to compensate for how much further the sprites will shunt you clock wise. Might reduce the VSP range from full 40 though.
 
... 34 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
Guests online: 119
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Black Beard  (9.2)
3 Baracuda  (9.2)
4 hedning  (9.1)
5 Irata  (8.8)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.046 sec.