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 > Clever Routines
2007-04-20 07:35
Cruzer

Registered: Dec 2001
Posts: 1048
Clever Routines

Post your unreleased clever routines here...
 
... 124 posts hidden. Click here to view all posts....
 
2007-04-27 11:26
Scout

Registered: Dec 2002
Posts: 1570
Quote: I love it!

Thanx.

I hope there will be some moderation because it's just a matter of time when inc $d020 jmp *-3 stuff will be added...


And besides the moderation issue, if you look at for instance the fli-fpp-scroller sourcecode (http://wikholm.dyndns.org/~cswiki/doku.php?id=fli-fpp-scroller) you can see that some binary includes are used.

These are missing which makes the example useless because it ain't gonna work this way.
Ofcourse, somebody with coding experience will get this to work but we're all lazy. Just admit it :)

What I'm trying to say here is that adding articles is more than copy/paste into the wiki alone.
2007-04-27 12:42
Jayce
Account closed

Registered: Dec 2001
Posts: 39
Indeed, to make this work the additional data files are almost obligatory to make some pieces of code actually work :)
2007-04-27 12:58
Oswald

Registered: Apr 2002
Posts: 5094
Frantic, I think only registered users should be able to edit, so we know who did that. In this case we could tell him to upload the binaries that are missing.
2007-04-27 17:06
Luke

Registered: Dec 2004
Posts: 19
Quote: On Tour is my contrbution to where you can find a dysp using that technique..



I saw that one...
Sry man, but you don't understand :)
In your production you have no free cycles.

For explain example:

sei
lda #$35
sta $01
lda #$02
sta $fffe
lda #$dc
sta $ffff ;$dc02 as irq vector

lda #$4c
sta $dc02
lda #$00
sta $dc03 ; jmp $xx00
lda #62
sta $dc04
lda #0
sta $dc05

lda #$7f
sta $dc0d
lda $dc0d
lda #$81
sta $dc0d
lda #$0b
sta $d011
bit $d011
bpl *-3
lda #$01
sta $dc0e
lda $dc0d
cli


(routine)

...and now here from $2c00-$3900 per $100 memory bytes
somth like this:


*=$3900

nop
nop
bit $dc0d
dec $d020
inc $d020
rti


*=$3800

bit $ea
bit $dc0d
dec $d020
inc $d020
rti

....
....

....

....
*=2x00 (last one)

nop
dec $d020
inc $d020
bit $dc0d
rti


This is only idea, first need to synchronize irq with
39th column of chars.

It working, but need a NMI irq to stop it in $yy raster line, bcoz timer is continous.

After calculating with 2 sprites takes near 15-23 free
cycles out of irq routine per rasterrline.
2007-04-27 18:00
Oswald

Registered: Apr 2002
Posts: 5094
platine, this was already done by ninja, and maybe by others too, you can see it for example here: Real the every 2nd line fli screens (tunel and julia) uses this trick to leave cycles free :)
2007-04-27 22:17
JackAsser

Registered: Jun 2002
Posts: 2014
I use a similar technique, however a bit developed in The Wild Bunch 4x4 tunnel part with sprite multiplexing. (Yes HCL, I know the multiplexer is a bit bad but let's not blame the actual technique, just blame my lazyness)

Problem with using this technique together with sprites and FLI-generation is that you must stabalize BEFORE the sprite fetches, but has to do the FLI AFTER the sprite fetches. Thus you have a variable amount of cycles between stabalization point and the $d011 write. However, since you're multiplexing and since it's only a matter every 4th line, the multiplexer can easily setup a table with 50 entiries telling the raster code how much to stall each FLI-line.

And since I always had 3x2 sprites I knew that I only had 0,2,4,6 or 8 sprites per line => less different timing routines. A somewhat bigger concern was that I used NMI toghether with IRQs. Timer IRQs are triggered differently using old and new CIA, which is a tiny problem. NMIs interrupting the IRQs setup phase however is a slightly bigger problem since the timing in VICE is b0rked in comparison to the real thing. So all in all I had to had quite many different timing routines to cover all cases.
2007-04-27 22:34
DCMP
Account closed

Registered: May 2003
Posts: 59
Thanks guys, for this initiative!
This can prove to be quite motivational.
2007-04-28 07:30
Copyfault

Registered: Dec 2001
Posts: 478
Quote: platine, this was already done by ninja, and maybe by others too, you can see it for example here: Real the every 2nd line fli screens (tunel and julia) uses this trick to leave cycles free :)

Oswald, we shouldn't discourage Platine to tell such ideas, should we ;)? You're right, it's been done'n'used before, but nevertheless the idea is really great! Sooner or later it _will_ be added to the codebase-wiki!

Thank you guys, esp. Cruzer, Frantic and Icon, for such a brilliant creation; the codebase-wiki for c64 routines is pure cyberheaven for me;p

CF
2007-04-28 07:59
Trash

Registered: Jan 2002
Posts: 122
@Platine: Now I understand what you were aiming at, and no my routine dont do just that..
2007-04-28 08:24
Frantic

Registered: Mar 2003
Posts: 1648
Thanks guys. It was inspiring to set this up because of all the positive feedback.

Now go add a lot of more stuff in there! I know you have zillions of sourcecodes lying around on your harddrives!
I think we should strike our hammers while the iron is hot, so to speak. ;)

/FTC
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 - 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
apprentix
Guests online: 98
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 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Sabbi  (9.5)
4 Morpheus  (9.4)
5 CreaMD  (9.1)

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