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


Forums > C64 Composing > Put x .sid-files together to one
2016-01-21 19:30
Nobody

Registered: Jan 2014
Posts: 20
Put x .sid-files together to one

Hi,
can someone tell me, how to make from x .sid-files one exactly?

What/how do I need to do?

How are the instruments shared between them? Does every ´subtune´ use its one set then, or is there any way to share them beteween the 7 tunes if they are the same?

And what about the startadress, actually every is at $1000, do I need to change them? To what? How do I find out how long the track is -
and how do I put everything together exactly?
Greets
 
... 5 posts hidden. Click here to view all posts....
 
2016-01-21 21:40
Nobody

Registered: Jan 2014
Posts: 20
I am able to load and save something in Tass and being able to change border/backgroundcolors :)

But maybe I can do something If I see how....C64Studio already is running, I only need some more input...
2016-01-21 21:55
TheRyk

Registered: Mar 2009
Posts: 2053
Quick and primitive code could look sth like this (for 2 tunes, 1st initialised with LDA #$00, 2nd with LDA #$01)

*= $c000
InitAddress
   bne +; Accumulator not Zero -> 2nd tune
   lda #<$1003; 1st PlayAdress LowByte
   sta PlayAdress+1
   lda #>$1003; 1st PlayAdress HighByte
   sta PlayAdress+2
   jmp $1000; 1st tune's init address no JSR/RTS as Init should end with RTS

+  lda #<$2003; 2nd tune's play adress
   sta PlayAdress+1
   lda #>$2003
   sta PlayAdress+2
   jmp $2000; 2nd tune's init no JSR/RTS as Init should end with RTS

*= $c080
PlayAdress
   jmp $1003; JMP because play routine ends with RTS

In your SID-File header flag
Init as $C000
Play as $C080

Did not compile/test this, but hope you get the idea :)

Of course it's getting somewhat more complicated if you merge SIDs with various subtunes on their own. And there are more effective ways of doing this, esp if the no. of merged files is higher than just a few.

PS: In that case insert CMP #$00 at beginning of Init, CMP #$01 at "+", #$02 at "++" and so on...
2016-01-21 22:49
Nobody

Registered: Jan 2014
Posts: 20
Ok, I´ll definately need a programmer *lol*:
!to "BT2rmx.prg", cbm

* = 1000
!bin "BT2-1r.sid",, $7c+2
* = 2100
!bin "bt2-2r.sid"
* = 3300
!bin "bt2-3r.sid"
* = 4400
!bin "bt2-4r.sid"
* = 5500
!bin "bt2-5r.sid"
* = 6600
!bin "bt2-6r.sid"
* = 7700
!bin "bt2-7r.sid"


*= $1000
InitAddress
   bne +; Accumulator not Zero -> 2nd tune
   lda #<$1003
   sta PlayAdress+1
   lda #>$1003
   sta PlayAdress+2
   jmp $1000; no JSR/RTS as Init should end with RTS

+  jsr $2100; 2 init adress
   lda #<$2103
   sta PlayAdress+3
   lda #>$2103
   sta PlayAdress+4
   jmp $2100;

+  jsr $3300; 3 init adress
   lda #<$3303
   sta PlayAdress+5
   lda #>$3303
   sta PlayAdress+6
   jmp $3300;

+  jsr $4400; 4 init adress
   lda #<$4403
   sta PlayAdress+7
   lda #>$4403
   sta PlayAdress+8
   jmp $4400;

+  jsr $5500; 5 init adress
   lda #<$5503
   sta PlayAdress+9
   lda #>$5503
   sta PlayAdress+10
   jmp $5500;

+  jsr $6600; 6 init adress
   lda #<$6603
   sta PlayAdress+11
   lda #>$6603
   sta PlayAdress+12
   jmp $6600;

+  jsr $7700; 7 init adress
   lda #<$7703
   sta PlayAdress+13
   lda #>$7703
   sta PlayAdress+14
   jmp $7700;


*= $c080
PlayAdress
   jmp $1003; JMP because play routine ends with RTS

Who can tell me what is missing and what is wrong? (more detailed than "everything", pls :D)

And does this .asm-file also need a playroutine like
sei
lda #$00
tax
tay
jsr $1000

again

lda #$40
cmp $d012
bne *-3
inc $d020
jsr $1003
dec $d020

jmp again
?
2016-01-21 23:24
TheRyk

Registered: Mar 2009
Posts: 2053
hehehe, for a beginning, ALL(!) your binaries need to be free of SID header and load address ;)

think about the meaning of
,, $7c+2
2016-01-21 23:38
Nobody

Registered: Jan 2014
Posts: 20
In the meanwhile Ian has finished this job, a BIT faster...

I think I upload it now and hope that he simply can show me how he has done this, for understanding.

Yes, the ,, $7c+2 caught my eye, too :)
2016-01-22 00:05
TheRyk

Registered: Mar 2009
Posts: 2053
hmhkey :) Hopefully, you or someone has learned sth in this thread, anyway, and if it's just "use subtunes right from the start" :D
2016-01-22 00:24
Count Zero

Registered: Jan 2003
Posts: 1820
Ask someone to code a "proper" music collection for you :)
2016-01-22 00:32
Nobody

Registered: Jan 2014
Posts: 20
I still have another, larger, multifile-project in my pipeline...... (without subtunes cause I work on it since years). But 1. I need to finish them and 2. I think they are too large to put them all together - but I need to see when they´re ready.
2022-09-04 17:37
DeMOSic

Registered: Aug 2021
Posts: 126
Yes i know, reviving 6 year old thread, Stumbled upon this thread, decided to fix the Code uploaded by TheRyk (and added support for 4 subtunes! (you can add more))
Use with Init LDA #$00-03 JSR $c000 Play JSR $c080
Didnt compile it but it seems logical.

*= $1000
song1:
t1init = $1000
t1play = $1003
   .binary "songname1.sid",7c+2
*= $2000
song2:
t2init = $2000
t2play = $2003
   .binary "songname2.sid",7c+2
*= $3000
song3:
t3init = $3000
t3play = $3003
   .binary "songname3.sid",7c+2
*= $4000
song4:
t4init = $4000
t4play = $4003
   .binary "songname4.sid",7c+2
*= $c000
InitAdress:
   cmp #$01
   beq sub2 ; If what's in accumulator = #$01, Init 2nd Subtune
   cmp #$02
   beq sub3 ; If what's in accumulator = #$02, Init 3rd Subtune
   cmp #$03
   beq sub4 ; If what's in accumulator = #$03, Init 4th Subtune
 ; If what's in accumulator = #$00, Init 1st Subtune
   jmp t1init; 1st tune's init address no JSR/RTS as Init should end with RTS

sub2:
   lda #<t2play; 2nd tune's play adress Hi Byte
   sta PlayAdress+1
   lda #>t2play; 2nd tune's play adress Lo Byte
   sta PlayAdress+2
   jmp t2init; 2nd tune's init no JSR/RTS as Init should end with RTS

sub3:
   lda #<t3play; 3rd tune's play adress Hi Byte
   sta PlayAdress+1
   lda #>t3play; 3rd tune's play adress Lo Byte
   sta PlayAdress+2
   jmp t3init; 3rd tune's init no JSR/RTS as Init should end with RTS

sub4:
   lda #<t4play; 4th tune's play adress Hi Byte
   sta PlayAdress+1
   lda #>t4play; 4th tune's play adress Lo Byte
   sta PlayAdress+2
   jmp t4init; 4th tune's init no JSR/RTS as Init should end with RTS

*= $c080
PlayAdress:
   jmp t1play; JMP because play routine ends with RTS
2023-04-19 03:47
Bansai

Registered: Feb 2023
Posts: 33
Quoting TheRyk
Especially regarding "I understand nothing", I recommend to work with less complicated batch in SIDreloc, e.g.
sidreloc.exe -f -k -p 40 InfilePageXY.sid OutfileTo4000.sid
pause



Thanks. That tool is worth its weight in gold for identifying absolute addresses embedded in tune data areas (e.g., absolute "subroutine" addresses for patterns) in an automated fashion, epecially when they are discontiguous in memory such as if they're embedded in song data and are not in a table. I'll have to hack on the source as it looks extremely useful if I'd want to do something like extract only one subtune's song data then cut and paste it back into a player, modify it, etc.
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
radius75
CA$H/TRiAD
Alakran_64
AnonymousMOS
Mibri/ATL^MSL^PRX
iAN CooG/HVSC
Hobbit/Laser Inc.
Dymo/G★P
TPM/Silicon Ltd
wil
Guests online: 84
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

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