News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] Changing music (code) [solved]

Started by JAM, April 15, 2011, 05:01:26 PM

Previous topic - Next topic

JAM

I'm looking for a code that will change the music inside room. Well, I can change song (03, 04, 05, 06, 07 etc.) using this code:

LDA #$0003
JSL $808FC1

But what should be placed into A to change instuments (00, 03, 06, 09, 12, 15 etc.)? Collection, if use SMILE terms.

Scyzer

Set the high byte to $FF.

LDA #$FF36
LDY #$0008
JSL $808FF7

or

LDA #$FF36
JSL $808FC1

JAM

Yes, it suppose to work, but... just not working. Music just stops and I hear silence.

Both codes I've placed into FX2 that will checks for the game time and change music after $10 seconds is passed and FX2 will be nullified, of course. I've tried to using Door Out scroll pointer. Same effect.

Looks like, extra operators are needed, but I don't sure what else should be done.

Scyzer

Dunno, but I've been able to change music using blocks (as in Super Hauntroid). Never tried with FX2, but you'll also need to set a bit so the music isn't constantly updating, which would probably lag the game anyway.

Smiley

This is the code from Kejardon's Kraid music patch:

LDA #$FF4B         ;Load 4B song data ("Collection" in SMILE)
JSL $808FC1
LDA #$0005         ;Load song track 5 (First track from song data) ("Play" in SMILE)
JSL $808FC1
RTS

Obviously change 4B and 05 to whatever you need.

I can guarantee this can be used to change the song with no problems. Should work with FX2 too.

JAM

SMILEuser96
Yes! It's working! Under FX2 and under Layer1_2 too.

Before that I've copied a code like this from boss AI (don't remember from which exactly):

LDA #$0000
JSL $808FC1
LDA #$FF09
JSL $808FC1
RTS

That's why I've got the silence. I thought that first 2 lines are required just to change music set.