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

Forums > C64 Coding > Static sprite multiplexing under moving FLD
2018-12-07 22:59

Registered: Mar 2005
Posts: 312
Static sprite multiplexing under moving FLD

So, I have an 8-sprite static multiplexer under a classic moving FLD and need to switch sprite pointers at constant rasterlines.

Since FLD pushes badlines down too, the pointer switching code executes at various places (including badlines), which basically desyncs everything including the FLD itself.

Any known (and simple enough) solutions to this?
Should I try a clockslide with a delay cycles LUT to compensate?

... 3 posts hidden. Click here to view all posts....
2018-12-08 08:28

Registered: Oct 2014
Posts: 249
how is your raster set up, are you just burning clocks per line? Could you switch to putting the triggers on a NMI off a Timer? then use a table to switch the NMI ptr to handle the cases where you need to set ptrs, just exit, restore sprite data etc?
2018-12-08 09:32

Registered: Mar 2005
Posts: 312
@Oswald: Exactly, but I meant I have to switch my sprite pointers after FLD, at the same rasterline every time despite of various FLD offsets.
@oziphantom: Thought about timers too, but then is variable timing too, depending on the FLD and badline offset, right?
2018-12-08 09:42

Registered: Oct 2014
Posts: 249
I was thinking you just fire it off every line, not sure how much FLD or what type of FLD you are doing exactly. and so each timer you change the NMI handler to do what you need for that line. which might just be, dec line counter and rti
2018-12-08 13:52

Registered: Dec 2001
Posts: 9021
without saying what *exactly* you are trying to do, nothing can be said :) i dont see a problem at all with switching sprite pointers _after_ FLD for that matter - just do it :)
2018-12-08 15:09

Registered: Apr 2002
Posts: 4365
how about manipulating a speedcode from the outside, speedcode does d011, d018 access every line, but it is either lda or sta, then if you need new spritepointers you stick in an sta d018, if you are in fld you stick in sta d011's, if you are in an unfld-d char row have lda d011's instead of sta d011's. then timing is same for all lines at the price of a complicated manipulator running in the top / bottom borders.

edit: badlines will stop this from working correctly, well then some bne's to for skipping nops on badlines ? :P
2018-12-08 15:21

Registered: Dec 2001
Posts: 9021
might also want to use overlapping sprite data. ever since i worked that out i use it for all kinds of things, makes "all of sprite" things like this almost trivial =)
2018-12-08 15:24

Registered: Apr 2002
Posts: 4365
btw I remember a release from recently doing just this? fullcr sprite layer + fld ?
2018-12-08 18:09

Registered: Mar 2005
Posts: 312
I am just an idiot. It won't work with waiting by wasting cycles comparing $d012, but obviously switching to a new IRQ just solved it.

Fine to close this thread.
2018-12-08 18:12
Rastah Bar

Registered: Oct 2012
Posts: 165
@Oswald: probably this one
Ghosts'n Goblins Demo

I think Digger's problem is that he sometimes needs to switch sprite pointers on a badline (when the change in sprite images has to appear one line after a badline). Groepaz made a good suggestion of using overlapping sprite data to solve that.
2018-12-09 05:43

Registered: Oct 2014
Posts: 249
You can patch and fix as well.

So you put the top of the sprite into the bottom of the sprites.. switch the ptrs, then mid sprite you restore the bottom back, no vertical loss, loose timings ( credit to DanP for the tip )
Previous - 1 | 2 - 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
Users Online
JackAsser/Booze Design
Guests online: 46
Top Demos
1 Unboxed  (9.7)
2 Uncensored  (9.7)
3 Edge of Disgrace  (9.7)
4 Coma Light 13  (9.6)
5 Comaland 100%  (9.6)
6 The Shores of Reflec..  (9.6)
7 Lunatico  (9.6)
8 Wonderland XII  (9.6)
9 C=Bit 18  (9.6)
10 X Marks the Spot  (9.5)
Top onefile Demos
1 Smile to the Sky  (9.6)
2 Daah, Those Acid Pil..  (9.5)
3 Dawnfall V1.1  (9.4)
4 FMX Music Demo  (9.4)
5 Crystal Gazer  (9.4)
6 Rewind  (9.4)
7 Pandemoniac Part 2 o..  (9.4)
8 Official X2018 Report  (9.4)
9 Arok 20 Invitation  (9.4)
10 Party Horse  (9.3)
Top Groups
1 PriorArt  (9.7)
2 Performers  (9.5)
3 Oxyron  (9.5)
4 Booze Design  (9.4)
5 Censor Design  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 S!R  (9.8)
3 Mr Zero Page  (9.8)
4 Mitch  (9.7)
5 Snacky  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2019
Page generated in: 0.062 sec.