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: 437
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: 478
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
Chesser/Blazon
Airwolf/F4CG
jicas/Patagonia
DivertigO
Chesoner/House Designs
Martin Piper
Freeze/Blazon
Mike
The MeatBall
Perplex/Offence
Guests online: 109
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 Layers  (9.6)
2 No Listen  (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 Diskmag Editors
1 Magic  (9.8)
2 hedning  (9.6)
3 Jazzcat  (9.5)
4 Elwix  (9.1)
5 Remix  (9.1)

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