| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Clever Routines
Post your unreleased clever routines here...
|
|
... 124 posts hidden. Click here to view all posts.... |
| |
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. |
| |
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 :) |
| |
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. |
| |
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.
|
| |
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 :) |
| |
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.
|
| |
DCMP Account closed
Registered: May 2003 Posts: 59 |
Thanks guys, for this initiative!
This can prove to be quite motivational. |
| |
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 |
| |
Trash
Registered: Jan 2002 Posts: 122 |
@Platine: Now I understand what you were aiming at, and no my routine dont do just that.. |
| |
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 |