| |
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 |
|
| |
TheRyk
Registered: Mar 2009 Posts: 2475 |
Shared instruments are not gonna happen, unless you create one .SID-File and do subtunes yourself in the tracker.
Rest's quite easy.
First you must relocate all the files, so they do not interfere with one another.
Use this:
Sidreloc V1.0
Next you need to build an own init routine which allocates via registers (accu, x-reg, y-reg) which tune is supposed to be initialised via its Init-Adress (after relocating) and then modifies the address for JSR $PLAY using the Play-Address (again the one after reloc of course).
Be warned, normally you'll sooner or later come across tunes that SIDReloc won't relocate and/or that write into RAM out of their own range, fixing this requires no geniius but some good old hacking effort :)
Finally dump the full memory you use including your own init routine as .PRG and make a SID header, e.g. using SID-Edit V4.02
PS: Especially if you wanna include older tunes, you should also include some decent reset of $d400-$d417 yourself in your init, just to be on the sure side.
PPS: You find songlenghts.txt in each HVSC "Documents" folder, http://csdb.dk/release/?id=139393. If this plays any role in your code, you need to build a counter via CIA/TOD registers or VIC frame counter to calculate playing time. |
| |
Nobody
Registered: Jan 2014 Posts: 20 |
Ok, (I understand nothing but want to fight myself through it) step by step:
Sidreloc usage:
---------------
I opened sidreloc and have my .sids in the same folder.
As I can see there are some options set with default-values (page, zp-reloc, frames...) - can I simply leave them as they are? I do know nothing about zeropages, bits and bytes - I am happy that I was able to get a hexeditor installed and being able to change some .sid-properties like track-titles with it until today...
Regarding option tolerance: what does wrong pitches mean? (how do I find them?)
In short words: How does Sidreloc work exactly, how exactly do I need to relocate my files step by step that they not interfere with each other?
While writing here I found a manual on the homepage, but it still is not completely clear to me:
EXAMPLE
The following command line can be used to relocate Zoids by Rob Hubbard from its original load address of $1000 to the address $4200, and move the zero-page variables from $fb-$fe to $c0-$c3:
sidreloc -p 42 -z c0-ff Zoids.sid Zoids-4200.sid
What are the zero-page variables, do I have these, too? How do I find out, furthermore, do I need to change mine? Or can I simply try to relocate my short 7 tracks to 1000, 1500, 2000, 2500 and so on for example? |
| |
TheRyk
Registered: Mar 2009 Posts: 2475 |
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
Don't worry too much about ZP regs atm. Unless you do not use ZP regs in the player code, they're not important for your purpose. IF they are important, just initialise the ones you need, e.g. dump default ZP values from $02 to $ff and restore them before init, _if_ you think, your SIDs clobber ZP regs. |
| |
Nobody
Registered: Jan 2014 Posts: 20 |
Ok, I´ll simply try around a bit.
Regarding the playroutine/.prg:
How to? With an assembler? Is there any easy example that I can use/modify/have a look into how to somewhere? |
| |
TheRyk
Registered: Mar 2009 Posts: 2475 |
Actually some(!) primitive assembler knowledge is unavoidable to set up new Init routine, sorry. If that's too much for you, just do the relocating and then get some coder's help, shouldn't take an average coder a great deal of time. |
| |
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... |
| |
TheRyk
Registered: Mar 2009 Posts: 2475 |
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... |
| |
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 ? |
| |
TheRyk
Registered: Mar 2009 Posts: 2475 |
hehehe, for a beginning, ALL(!) your binaries need to be free of SID header and load address ;)
think about the meaning of
,, $7c+2 |
| |
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 :) |
... 5 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 - Next |