SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
1, find the sound routine, by finding the volume setting (d418)
2, look at the code, be sure it is music player, and not sound effects player (game)
3, narrow the mem area down, where it is roughly placed
4, find the demo/game main interrupt routine,
it is setting up 0314/0315 or fffe/ffff. if fffe is 24 and ffff is 10, then there something running in $1024, then go see what it is.
4.1, if you cannot find it. start from the beginning of the program, when it is RUN. debug it, set breakpoints, to stop at certain points, so you know where you are, and can say for certain, that "now i am on the screen that plays the music"
5, find one or more JSR from the interrupt code, going into the music area you found. one of them is the play!
6, go back, read the player you found, go backwards, to find the start of the player, it is very likely that both init and play of music, is at the start of it, but its not guaranteed.
7, code an interrupt, and jsr what you think is the init, and the play, see if you can get the tune to work from your own control
8, when it plays, save from start of player, and to what clearly is the end of the notedata + something extra because you cant be sure.
9, when this method is starting to work every time, your last address save buffer will go down to exact correct byte (you learn it)
it all sounds a lot of work, and it can be, but it can also be a 1 minute job. you need to know the few basics, which are:
SEI
STA FFFE/FFFF
STA 0314/0315
CLI
JSR ????
JMP ????
BNE ????
BEQ ????
CMP ??
CPY ??
CPX ??
LDA #$0F/#$1F
STA $D418
RTS
if you know these commands, and keep going and dont give up, it will work sooner or later :)
10, make code, if necessary, so the music can be initialized with LDA #0-1-2-3-4 etc., JSR init.
put this code somewhere, usually after the whole music+data, if needed, and make this the new init.
11, when the rip works, just save as a normal file.
12, if the noter allows it, load the ripped tune, and enter the correct init and play address, like your self made interrupt used to get it playing.
some noters can only load music in $1000+ .....
13, look at already ripped music. load .sids in sidedit, look at the init address code, look at the play address code, look at the hexdump of the note data (in a c64 monitor)
they dont all look the same, but there is a general pattern, especially how note data looks like.
this gives you an idea what to look for. |