Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Nicron ! (Registered 2024-05-21) You are not logged in - nap
CSDb User Forums


Forums > C64 Composing > How to find music that doesn't eat all that much rastertime?
2010-08-05 12:00
Shadow
Account closed

Registered: Apr 2002
Posts: 355
How to find music that doesn't eat all that much rastertime?

I'm messing about with some just-for-fun-coding, and now I wanted to add some music. However, I only have about $10 rasterlines of free time.
I've tried a bunch of songs from HVSC, but most players seems to go up to about $18 rasterlines.
Anyone know any particular composers that were known for using players which took little CPU time that I could look for?
Too bad that the maximum number of lines isn't included in the SID-info for each song, would have made it much easier.
My current method is:
1) Choose composer in HVSC randomly
2) Choose a tune by this composer randomly
3) Recompile
4) Test
5) Find out that tune takes too much rastertime
6) Make annoyed grumbling noise
7) GOTO 1

:)
 
... 12 posts hidden. Click here to view all posts....
 
2010-08-06 02:02
Flex

Registered: Feb 2002
Posts: 104
Artline Designs-routine by Antti Kangas (Scorpion) eats about $13 lines.
2010-08-06 06:50
Devia

Registered: Oct 2004
Posts: 401
The players don't need e.g. $18 CONTINUOUS rasterlines.. just to put some ideas in your head ;-)

writes to the SID need to be at roughly the same line each frame, though.
2010-08-06 07:09
The Human Code Machine

Registered: Sep 2005
Posts: 110
As far as I remember the Music from the game Heartland took less than 4 rasterlines (2 to 3 rasterlines most of the time) when reassembled and omptimized using only zeropage adresses for variables.
2010-08-06 10:01
Dane
Account closed

Registered: May 2002
Posts: 421
I think you'll find that most tunes made in JCH NP19 works for you. Try using Shorty. And if you need something a bit more custom made let me know.
2010-08-07 09:14
Shadow
Account closed

Registered: Apr 2002
Posts: 355
Thanks for the offer Dane!
If I ever get around to doing a 'serious' C64 demo again (this one is not) I'll most certainly be begging for your tunes!
2010-08-07 11:40
The Human Code Machine

Registered: Sep 2005
Posts: 110
Yeah, I found the old source to the heartland music on one of my discs and it seems to be even faster as I thought... the source should assemble with turbo-assembler. I know there's still room for improvement, but I think it's one of the simplest soundroutines and would perfectly suit a demo part with nearly no time left.

         *= $1000

counter  = $fe
pointer  = $ff

         jmp init
         jmp play

init     lda #$00
         sta pointer
         sta $d417
         ldx #$08
         stx counter
         inx
         stx $d40c
         stx $d405
         lda #$0b
         sta $d413
         lda #$0f
         sta $d418
         lda #$24
         sta $d406
         sta $d40d
         sta $d414
         rts

play     dec counter
         bne over2

         lda #$08
         sta counter

         ldy pointer

         ldx voice1,y
         beq exit1

         lda lo,x
         sta $d407
         sta $d400
         lda hi,x
         sta $d408
         sta $d401
         ldx #$20
         stx $d404
         stx $d40b
         inx
         stx $d40b
         stx $d404

exit1    ldx voice2,y
         beq exit2
         lda lo,x
         sta $d40e
         lda hi,x
         sta $d40f
         ldx #$20
         stx $d412
         inx
         stx $d412

exit2    iny
         cpy #$d2
         bne over1

         ldy #$00
over1    sty pointer
over2    rts

lo       = *-2
         .byte $70
         .byte $b4,$fb
         .byte $47,$98
         .byte $ed,$47
         .byte $a7,$0c
         .byte $77,$e9
         .byte $61,$e1
         .byte $68,$f7
         .byte $8f,$30
         .byte $da,$8f
         .byte $4e,$18
         .byte $ef,$d2
         .byte $c3,$c3
         .byte $d1,$ef
         .byte $1f,$60
         .byte $b5,$1e
         .byte $9c,$31
         .byte $df,$a5
         .byte $87,$86
         .byte $a2,$df
         .byte $3e,$c1
         .byte $6b

hi       = *-2
         .byte $04
         .byte $04,$04
         .byte $05,$05
         .byte $05,$06
         .byte $06,$07
         .byte $07,$07
         .byte $08,$08
         .byte $09,$09
         .byte $0a,$0b
         .byte $0b,$0c
         .byte $0d,$0e
         .byte $0e,$0f
         .byte $10,$11
         .byte $12,$13
         .byte $15,$16
         .byte $17,$19
         .byte $1a,$1c
         .byte $1d,$1f
         .byte $21,$23
         .byte $25,$27
         .byte $2a,$2c
         .byte $2f

voice1   .byte $26,$00,$00,$2a
         .byte $00,$26,$28,$00
         .byte $00,$21,$00,$00
         .byte $26,$25,$26,$25
         .byte $00,$23,$2a,$00
         .byte $00,$1e,$00,$00
         .byte $23,$00,$23,$21
         .byte $00,$1f,$26,$00
         .byte $00,$1a,$00,$00
         .byte $1c,$00,$1c,$23
         .byte $00,$1c,$21,$00
         .byte $21,$28,$00,$21
         .byte $26,$00,$00,$2a
         .byte $00,$26,$28,$00
         .byte $00,$21,$00,$00
         .byte $26,$25,$26,$25
         .byte $00,$23,$2a,$00
         .byte $00,$1e,$00,$00
         .byte $23,$00,$23,$21
         .byte $00,$1f,$26,$00
         .byte $00,$1a,$00,$00
         .byte $1c,$00,$1c,$23
         .byte $00,$1c,$21,$00
         .byte $21,$28,$00,$21
         .byte $23,$00,$00,$00
         .byte $00,$00,$00,$00
         .byte $23,$21,$00,$1f
         .byte $26,$00,$00,$00
         .byte $00,$00,$1a,$00
         .byte $00,$1a,$00,$1c
         .byte $1e,$00,$00,$00
         .byte $00,$00,$00,$00
         .byte $1e,$1c,$00,$1a
         .byte $1c,$00,$00,$00
         .byte $00,$00,$23,$00
         .byte $00,$1c,$00,$23
         .byte $21,$00,$21,$28
         .byte $00,$00,$00,$00
         .byte $21,$28,$00,$21
         .byte $1e,$00,$00,$1c
         .byte $00,$1a,$21,$00
         .byte $00,$00,$00,$00
         .byte $23,$00,$00,$21
         .byte $00,$1f,$26,$00
         .byte $00,$00,$00,$00
         .byte $29,$00,$00,$26
         .byte $00,$29,$28,$00
         .byte $00,$00,$00,$00
         .byte $2b,$00,$00,$28
         .byte $29,$2b,$2a,$00
         .byte $00,$00,$00,$00
         .byte $00,$00,$00,$00
         .byte $00,$00

voice2   .byte $0e,$00,$1a,$0e
         .byte $00,$1a,$09,$00
         .byte $15,$09,$00,$15
         .byte $0b,$00,$17,$0b
         .byte $00,$17,$06,$00
         .byte $12,$06,$00,$12
         .byte $07,$00,$13,$07
         .byte $00,$13,$02,$00
         .byte $0e,$02,$00,$0e
         .byte $04,$00,$10,$04
         .byte $00,$10,$09,$00
         .byte $15,$09,$00,$15
         .byte $0e,$00,$1a,$0e
         .byte $00,$1a,$09,$00
         .byte $15,$09,$00,$15
         .byte $0b,$00,$17,$0b
         .byte $00,$17,$06,$00
         .byte $12,$06,$00,$12
         .byte $07,$00,$13,$07
         .byte $00,$13,$02,$00
         .byte $0e,$02,$00,$0e
         .byte $04,$00,$10,$04
         .byte $00,$10,$09,$00
         .byte $15,$09,$00,$15
         .byte $07,$00,$13,$07
         .byte $00,$13,$07,$00
         .byte $13,$07,$00,$13
         .byte $02,$00,$0e,$02
         .byte $00,$0e,$02,$00
         .byte $0e,$02,$00,$0e
         .byte $0b,$00,$17,$0b
         .byte $00,$17,$0b,$00
         .byte $17,$0b,$00,$17
         .byte $04,$00,$10,$04
         .byte $00,$10,$04,$00
         .byte $10,$04,$00,$10
         .byte $09,$00,$15,$09
         .byte $00,$15,$09,$00
         .byte $15,$09,$00,$15
         .byte $02,$00,$0e,$02
         .byte $00,$0e,$06,$00
         .byte $12,$06,$00,$12
         .byte $07,$00,$13,$07
         .byte $00,$13,$0a,$00
         .byte $16,$0a,$00,$16
         .byte $0a,$00,$16,$0a
         .byte $00,$16,$0c,$00
         .byte $18,$0c,$00,$18
         .byte $0c,$00,$18,$0c
         .byte $00,$18,$0e,$00
         .byte $1a,$0e,$00,$1a
         .byte $0e,$00,$1a,$0e
         .byte $00,$1a

2010-08-07 16:08
McMeatLoaf

Registered: Jan 2005
Posts: 106
The Jack House Built (also by Keith Tinman) is another very light tune CPU-wise; I did a very quick peek, and it looks like uses less than 3 rasterlines (closer to 2)
2010-08-08 10:20
Shadow
Account closed

Registered: Apr 2002
Posts: 355
THCM: Wow, now THAT was a seriously fast music routine. I tested it and at first I though "hmm.. almost sounds like it plays way too fast", turns out that on most frames it takes less than one rasterline, so my $d012-wait had time to trigger twice!
2010-08-08 13:29
The Human Code Machine

Registered: Sep 2005
Posts: 110
@Shadow: Yep, most of the time it leaves after three instructions ;) The tune makes happy and is better than no sound at all.
2010-08-08 14:48
Shadow
Account closed

Registered: Apr 2002
Posts: 355
Haha, yeah, I noticed later that the "bne over2" in the beginning just went straigth to the rts!
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
Menace/Spaceballs
Guests online: 63
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 No Bounds  (9.6)
7 Comaland 100%  (9.6)
8 Uncensored  (9.6)
9 Bromance  (9.5)
10 Lunatico  (9.5)
Top onefile Demos
1 Layers  (9.6)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Censor Design  (9.3)
4 Crest  (9.3)
5 Performers  (9.3)
Top Logo Graphicians
1 Sander  (9.9)
2 Facet  (9.6)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

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