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 > Cycle Excact Timings and moving sprites
2016-09-19 06:16
oziphantom

Registered: Oct 2014
Posts: 490
Cycle Excact Timings and moving sprites

What fancy techniques to people have for handling the need for cycle exact timing for effects and then having sprites move over it?

I'm thinking of having side borders partially open in places which then may or may not have a number of sprites over. My current thinking is to have sets of 4 clock burners per sprite with a d015 sprite value per line when then looks up a num sprites per line value table per line that then indexes into a Branch offset table. so

lda SpritesValue,x
tay
lda ValueToNumBitsSetLUT,y
tay
lda BranchOffsetTable,y
sta BranchOffset
BranchOffset = *+1
bne $00
lda $00,x
lda $00,x
lda $00,x
lda $00,x ; I think 4 sprites will be enough
38 col
40 col
check num lines and loop

BranchOffsetTable 01,03,05,07,09 ; can't remember at the moment it if needs to be 1 or 0

but I might be over complicating it...
 
... 20 posts hidden. Click here to view all posts....
 
2016-09-20 16:47
chatGPZ

Registered: Dec 2001
Posts: 11386
sure does
2016-09-20 21:21
algorithm

Registered: May 2002
Posts: 705
Quote: Opening sideborders in the bottom border seems to work fine, but as I try and move the code to the top border, i.e Y=20, the sprites shown down the bottom of the screen where the border does open and at the top of the screen but the border is closed... Does it not work in the top border?

Are you updating sprite Y position before running the code at raster 20? (Even though the sprites appear at the bottom (and the bottom half at the top)
2016-09-21 14:05
oziphantom

Registered: Oct 2014
Posts: 490
Nope just me being an idiot, I was pretty sure that the D012/11 was going to be $100+ by the point I was checking to make sure D011 was positive, nope. So my is D011 positive check was happening just before $100 so it passed then my D012 loop to wait to 20 happened so the raster happened at 114.
Previous - 1 | 2 | 3 - 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
MWR/Visdom
Guests online: 108
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 Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

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