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 > Movable sprites over chunky FLI
2019-11-10 16:01
Digger

Registered: Mar 2005
Posts: 448
Movable sprites over chunky FLI

I need to have a freely moving block (2x2, 3x3 or 4x4) of sprites positioned above chunky FLI routine (badline triggered every 4 lines).

Could you suggest on how to approach it?

There's a part by Xbow with sprite block freely flying over FLI:
https://youtu.be/Y0O7zmD7MDE?t=209

Cheers!
 
... 10 posts hidden. Click here to view all posts....
 
2019-11-11 21:14
Copyfault

Registered: Dec 2001
Posts: 487
My idea was in the direction like Oswald stated in his last post.

So in a nutshell:
- use 25 irqs
- set up a timer irq that fires every 8 rasterlines, irq trigger on rasterline 3 (mod8, i.e. of every char) on a non-sprite-cycle
- proceed with your favourite dejitter routine to cycle-align a 2nd dejitter routine...
- ...which "takes care" of the different sprite configs on that line (0, or 2-4) (see example code below)
- set $D011 to $34 (or $3C) exactly @cycle#11 of rasterline 4 (mod8)
- set $D011 to $30 (or $38) directly afterwards


The example code (mainly for the second dejittering mentioned above) would look as follows:
LDX #$3C
LDA #19
SEC
SBC $DC04 (or any timer that's still free to use)
STA bra+1
bra:
BCS xx
JMP next
next:
LDA #$A9
LDA #$A9
LDA #$A9
LDA #$A9
STX $D011
LDX #$38
STX $D011

This routine needs a little extra care, like

- the timer-irq trigger must happen at a cycle cycle >14 and <55 on rasterline 3 (mod8) of every char SUCH THAT after the first dejitter routine the [SBC $DC04] has its last read cycle @cycle#55
- the $DC04-timer must be configured SUCH THAT it gives value #19 on cycle 55 (the timer for the irq can be used for this, too, but that [LDA #val : SEC : SBC timer] must then be adjusted accordingly)
- the X-values plus the STX-Opcodes in the snipplet above are for setting the badlines, the rest is for dejittering
- the routine goes bork if more than 4 sprites are needed on one line
- all the sprite blocks must be configured SUCH THAT they always begin with sprite0 and use the next sprite numbers as needed, i.e. sprite0+1, sprite0+1+2 or sprite0+1+2+3


This should do the trick.
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
Advanced
Users Online
Guests online: 129
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 Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 Tim  (9.7)
4 Irata  (9.7)
5 hedning  (9.7)

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