• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Alt stage song forcer code guide

wiiztec

Smash Journeyman
Joined
Dec 19, 2007
Messages
402
Location
Houston, TX
NNID
wiiztec
This code allows forcing a single song from any tracklist to always play on a certain alt or default stage or for multiple songs that corrispond to the frequencies on the stages tracklist

In order to customize this code you'll need to download asmwiird here http://filetrip.net/dl?rmsMB9g0fu

8010F9FC <- Paste this into the top textbox

#paste this into the bottom textbox, and don't touch these first 4 lines
lis r12,0x815F
lhz r12,0xFFFF8422(r12)
slwi r0,r0,16
srwi r0,r0,16

#each stage you want to deal with with this code will have a chunk of code for it
#each cmpwi r27 should be preceeded by the number of the code chunk s1 is for
#stage 1, after the first bne should be s(# of the next code chunk) unless it's the
#last stage then it should be end SS is hex for the stage ID which can be found here
#http://opensa.dantarion.com/wiki/Stage_Module_Files AAAA is the hex of the
#GCC button combination of the alt you can find that out here
#http://geckocodes.org/index.php?arsenal=2 MMMM is the hex of the song ID
#which can be found here http://opensa.dantarion.com/wiki/Song_IDs
#this is your basic code chunk for 1 song forced for 1 alt

s1: cmpwi r27,0xSS
bne s2
cmpwi r12,0xAAAA
bne end
li r0,0xMMMM

#And this is a code chunk for multiple alts each forcing 1 song hopefully the
#pattern is clear enough that you can figure out how to extend it as necessary

s2: cmpwi r27,0xSS
bne s3
s2a1: cmpwi r12,0xA1A1
bne s2a2
li r0,0xM1M1
s2a2: cmpwi r12,0xA2A2
bne s2a3
li r0,0xM2M2
s2a3: cmpwi r12,0xA3A3
bne end
li r0,0xM3M3

#this is a code chunk example for a single alt with multiple songs the IFM's
#are the songs that must be on the stages tracklist when the game picks them
#the code will force it to play the THM's instead

s3: cmpwi r27,0xSS
bne s4
cmpwi r12,0xAAAA
bne end
s3m1: cmpwi r0,0xIFM1
bne s3m2
li r0,0xTHM1
s3m2: cmpwi r0,0xIFM2
bne end
li r0,0xTHM2

#this is a code chunk example for multiple alts with multiple songs hopefully the
#pattern is clear enough that you can figure out how to extend it as necessary

s4: cmpwi r27,0xSS
bne end #(s5 if not last chunk)
s4a1: cmpwi r12,0xA1A1
bne s4a2
s4a1m1: cmpwi r0,0xIFM1
bne s4a1m2
li r0,0xTHM1
s4a1m2: cmpwi r0,0xIFM2
bne end
li r0,0xTHM2
s4a2: cmpwi r12,0xA2A2
bne end
s4a2m1: cmpwi r0,0xIFM1
bne s4a2m2
li r0,0xTHM1
s4a2m2: cmpwi r0,0xIFM2
bne end
li r0,0xTHM2

#don't touch this last line

end:stw r0,0(r29)



Keep a copy of your ASM in order to make future edits because if you use asmwiird to disassemble it'll convert everything to decimal and make it a huge pain in the ass to edit

As a further example here is the code as it is in my Project M 3.6 edition

lis r12,0x815F
lhz r12,0xFFFF8422(r12)
slwi r0,r0,16
srwi r0,r0,16

s1: cmpwi r27,0x03
bne s2
cmpwi r12,0x0140
beq end
li r0,0x2722

s2: cmpwi r27,0x0D
bne s3
cmpwi r12,0x0140
bne end
li r0,0x2754

s3: cmpwi r27,0x2A
bne s4
cmpwi r12,0x0140
bne end
li r0,0x2803

s4: cmpwi r27,0x29
bne s5
cmpwi r12,0x0140
bne s4a2
li r0,0x2735
s4a2: cmpwi r12,0x0110
bne end
li r0,0x2740

s5: cmpwi r27,0x01
bne s6
cmpwi r12,0x0140
beq end
li r0,0x26FC

s6: cmpwi r27,0x04
bne s7
cmpwi r12,0x0110
bne end
li r0,0x27CD

s7: cmpwi r27,0x06
bne s8
cmpwi r12,0x0100
bne s7a2
li r0,0x27D5
s7a2: cmpwi r12,0x0110
bne s7a3
li r0,0x27CB
s7a3: cmpwi r12,0x0140
bne end
li r0,0x27D5

s8: cmpwi r27,0x30
bne s9
cmpwi r12,0x0140
bne end
li r0,0x281A

s9: cmpwi r27,0x32
bne s10
cmpwi r12,0x0140
bne end
li r0,0x2802

s10: cmpwi r27,0x2F
bne s11
cmpwi r12,0x1040
bne end
li r0,0x2800

s11: cmpwi r27,0x21
bne s12
cmpwi r12,0x0110
bne end
s11m1: cmpwi r0,0x27B3
bne s11m2
li r0,0x27A5
s11m2: cmpwi r0,0x27B4
bne end
li r0,0x27A7

s12: cmpwi r27,0x33
bne s13
cmpwi r12,0x1010
bne end
li r0,0x27A3

s13: cmpwi r27,0x1C
bne end
cmpwi r12,0x0140
beq end
li r0,0x27A0

end:stw r0,0(r29)

 
Last edited:

jackal27

Smash Journeyman
Joined
Jul 27, 2015
Messages
419
Location
Missouri
YOU ARE A HERO. This is going to save me SOOOO much headache!

Somebody turn this into a tool!

EDIT: Nvm, I can't figure out what to edit haha. I'm such a hex editing noob. It seems pretty simple, but I just can't make heads or tails of what represents what. I'll either wait for someone to explain or for a tool for now. Awesome to know that this is possible though!
 
Last edited:

jackal27

Smash Journeyman
Joined
Jul 27, 2015
Messages
419
Location
Missouri
Did you read the guide? I explained what all the variables represented
Yeah I read it a few times. I'm just having trouble grasping it. I don't really understand what the number that precedes r27 is for one. Also, when you make an alt only play one or a few songs, does it disable those songs for other alt or default stages?
 
Last edited:

jackal27

Smash Journeyman
Joined
Jul 27, 2015
Messages
419
Location
Missouri
The code chunks are the chunks of code for each stage, s# is a branch lable so you don't have to calculate the branches manually
I understand the first half of that sentence haha. So what actually ends up being put in place of "0xSS"? Thank you for being patient.
 

jackal27

Smash Journeyman
Joined
Jul 27, 2015
Messages
419
Location
Missouri
New question! Where do I paste the code at in my .gct once I'm finished?

EDIT: Alright I seem to have figured out how to put codes into my .gct *whew* that took a while. New question though...

So if I add multiple songs to an alt, the code basically tells the game "hey if you pick this song, play this other one instead." Right? So what if I have a lot of songs that I want to play over the default stage, but not over the alt? Like if I had 5 songs total, but I only wanted 2 to play over the alt without the others ever showing up is that possible? Basically it would be weird to put a Mario stage as an alt to a Zelda stage, but still have Zelda songs pop up once in a while when it's selected.
 
Last edited:

Amazerommu

Smash Lord
Joined
Jan 4, 2013
Messages
1,147
Location
Kentucky
I think being that it forces whatever tracks you want to load... say in your example of the Mario alt for the Zelda stage... if you edited the OP code to play 2 songs on the Mario stage... the game would ONLY choose between those two songs... At least that's how I understand it... Although... I do wonder... would you have to make a code to choose what songs play on the normal Zelda stage so that it doesn't perhaps choose one of the 2 Mario songs?

Also @OP just so I understand... with this bit of delicious magic... you could... for example I'll use FD's song list... If there were 2 alts for FD... so 3 stages altogether and songlist is this:

X05 - Final Destination
T01 - Credits (Super Smash Bros.)
T03 - Opening (Super Smash Bros. Melee)
W25 - Final Destination (Melee)
W31 - Giga Bowser (Melee)

It would be possible... to have the normal version of the stage (using correct Hex IDs) play X05, T01 and T03, have alt stage 1 play T03 and W25 and have alt stage 2 play W25 and W31. The game would choose randomly between only the tracks set for each individual stage? And of course since it takes Hex ID's... would it be possible to use songs that aren't on that stages tracklist? Saaay using stuff from Subspace or some such?
 
Last edited:

jackal27

Smash Journeyman
Joined
Jul 27, 2015
Messages
419
Location
Missouri
I think being that it forces whatever tracks you want to load... say in your example of the Mario alt for the Zelda stage... if you edited the OP code to play 2 songs on the Mario stage... the game would ONLY choose between those two songs... At least that's how I understand it... Although... I do wonder... would you have to make a code to choose what songs play on the normal Zelda stage so that it doesn't perhaps choose one of the 2 Mario songs?
Well I mean, you could always fix it by just disabling those songs in My Music and having them only play on the stages you assign them to in that case. Still, I just don't see how this code is going to limit the alts to only the songs I want them to play. I guess there's only one way to find out. Going to test this right now.

EDIT: Unfortunately it appears my hypothesis was correct...

This does not magically turn off the songs other than the ones you tell it play if you're wanting to use multiple songs. HOWEVER! I have found a sort of ghetto work around. There is no limit on how much you can tell the code to use one song. So, simply tell the code to replace EVERY song you don't want to play.

Let's say you have 3 Mario songs and 4 Zelda ones. Tell the code to replace Zelda songs 1, 2, and 3 with Mario songs 1, 2, and 3. Sometimes that Zelda song 4 is still going to pop up. So, also tell the code to replace Zelda song 4 with Mario 1. Now, you're going to get Mario song 1 twice as much now, so this isn't a perfect method, but it works ok.
 
Last edited:

Sundark

Smash Apprentice
Joined
Oct 20, 2014
Messages
99
Struggling to wrap my head around all this... I think I've mostly got it outside of actually trying to do it, but I'm unclear on one thing: Is it possible to make an alt stage forced to play multiple songs without interfering with the regular stage's tracklist? For example, I have 5 good songs on Brawl Battlefield, and I want to make Melee Battlefield play 2 different ones. If I plug those 2 in under unused tracks elsewhere, can I get the code to point to those?

EDIT: Oh, after reading a bit closer it looks like yes, that does work. But do I have to kind of associate the tracks, such that 3 of the default tracks pick the first alt track, and then the other 2 default pick the second alt track? Would that be correct? Assuming I don't want any of the default tracks to play on the alt stage, that is.

EDIT2: Another thing occurred to me, if a stage doesn't actually have an alt, can you use the code to hold a button to force a song, outside of the regular stage, to play on the still-regular stage? Thereby making some sort of 'hidden' songs based on button presses? That sounds really cool to me, and the reason it occurs to me is that the whole process doesn't really seem based on having an alt stage at all, and more on the button press that would be used to load the alt stage, so if there just happened to not be an alt stage to even load... But again, I'm not sure if it would work.

Aaand I guess last question, once the code is fully generated, where in the code list does it go? Slap it onto the bottom in a hex editor and save? Thanks for any help in advance.

EDIT2: I'm going to attempt some things now and report on the results.
 
Last edited:

jackal27

Smash Journeyman
Joined
Jul 27, 2015
Messages
419
Location
Missouri
Struggling to wrap my head around all this... I think I've mostly got it outside of actually trying to do it, but I'm unclear on one thing: Is it possible to make an alt stage forced to play multiple songs without interfering with the regular stage's tracklist? For example, I have 5 good songs on Brawl Battlefield, and I want to make Melee Battlefield play 2 different ones. If I plug those 2 in under unused tracks elsewhere, can I get the code to point to those?

EDIT: Oh, after reading a bit closer it looks like yes, that does work. But do I have to kind of associate the tracks, such that 3 of the default tracks pick the first alt track, and then the other 2 default pick the second alt track? Would that be correct? Assuming I don't want any of the default tracks to play on the alt stage, that is.

EDIT2: Another thing occurred to me, if a stage doesn't actually have an alt, can you use the code to hold a button to force a song, outside of the regular stage, to play on the still-regular stage? Thereby making some sort of 'hidden' songs based on button presses? That sounds really cool to me, and the reason it occurs to me is that the whole process doesn't really seem based on having an alt stage at all, and more on the button press that would be used to load the alt stage, so if there just happened to not be an alt stage to even load... But again, I'm not sure if it would work.

Aaand I guess last question, once the code is fully generated, where in the code list does it go? Slap it onto the bottom in a hex editor and save? Thanks for any help in advance.

EDIT2: I'm going to attempt some things now and report on the results.
To answer your last question, I used the GCT fusionizer with it. I haven't used this in a while though so I'm struggling to remember the exact steps. Wish somebody would turn it into a tool haha.
 

Sundark

Smash Apprentice
Joined
Oct 20, 2014
Messages
99
Hm. GCT Fusionizer didn't cooperate with me last time I tried to use it, so I instead used Brawlbox after a quick google lead me to a subreddit post on how, but it didn't really work out how I wanted it to. Whether that was a problem with the code I wrote or how I implemented it, I don't know. The songs I wanted are definitely in the game easy enough, but they don't get triggered on either FD (the no-alt thing I wanted to do), or Battlefield (the 1-alt 1-song method).

Looking at my code though, I wonder if it's because the code I wrote was for only holding L (I used 0040 in the 0xAAAA slot), when you need to account for one of the two buttons needed to actually select the stage (Start or A). Judging from Wiiztec's sample code, I think this is actually super likely. I'll see if I can take one more shot at it.

EDIT: Welp, that didn't do it either. Maybe I'm putting in the codes wrong, or have it all wrong to start with. I'll post what I've written anyway, maybe the problem is trying to use weird song slots (which I am).

lis r12,0x815F
lhz r12,0xFFFF8422(r12)
slwi r0,r0,16
srwi r0,r0,16

s1: cmpwi r27,0x01
bne s2
cmpwi r12,0x0140
bne end
li r0,0x27F1

s2: cmpwi r27,0x02
bne end
cmpwi r12,0x0140
bne end
li r0,0x270A

end:stw r0,0(r29)
 
Last edited:

wiiztec

Smash Journeyman
Joined
Dec 19, 2007
Messages
402
Location
Houston, TX
NNID
wiiztec
Struggling to wrap my head around all this... I think I've mostly got it outside of actually trying to do it, but I'm unclear on one thing: Is it possible to make an alt stage forced to play multiple songs without interfering with the regular stage's tracklist? For example, I have 5 good songs on Brawl Battlefield, and I want to make Melee Battlefield play 2 different ones. If I plug those 2 in under unused tracks elsewhere, can I get the code to point to those?

EDIT: Oh, after reading a bit closer it looks like yes, that does work. But do I have to kind of associate the tracks, such that 3 of the default tracks pick the first alt track, and then the other 2 default pick the second alt track? Would that be correct? Assuming I don't want any of the default tracks to play on the alt stage, that is.

EDIT2: Another thing occurred to me, if a stage doesn't actually have an alt, can you use the code to hold a button to force a song, outside of the regular stage, to play on the still-regular stage? Thereby making some sort of 'hidden' songs based on button presses? That sounds really cool to me, and the reason it occurs to me is that the whole process doesn't really seem based on having an alt stage at all, and more on the button press that would be used to load the alt stage, so if there just happened to not be an alt stage to even load... But again, I'm not sure if it would work.

Aaand I guess last question, once the code is fully generated, where in the code list does it go? Slap it onto the bottom in a hex editor and save? Thanks for any help in advance.

EDIT2: I'm going to attempt some things now and report on the results.
Yeah that's all correct

Hm. GCT Fusionizer didn't cooperate with me last time I tried to use it, so I instead used Brawlbox after a quick google lead me to a subreddit post on how, but it didn't really work out how I wanted it to. Whether that was a problem with the code I wrote or how I implemented it, I don't know. The songs I wanted are definitely in the game easy enough, but they don't get triggered on either FD (the no-alt thing I wanted to do), or Battlefield (the 1-alt 1-song method).

Looking at my code though, I wonder if it's because the code I wrote was for only holding L (I used 0040 in the 0xAAAA slot), when you need to account for one of the two buttons needed to actually select the stage (Start or A). Judging from Wiiztec's sample code, I think this is actually super likely. I'll see if I can take one more shot at it.

EDIT: Welp, that didn't do it either. Maybe I'm putting in the codes wrong, or have it all wrong to start with. I'll post what I've written anyway, maybe the problem is trying to use weird song slots (which I am).

lis r12,0x815F
lhz r12,0xFFFF8422(r12)
slwi r0,r0,16
srwi r0,r0,16

s1: cmpwi r27,0x01
bne s2
cmpwi r12,0x0140
bne end
li r0,0x27F1

s2: cmpwi r27,0x02
bne end
cmpwi r12,0x0140
bne end
li r0,0x270A

end:stw r0,0(r29)
That code looks fine. maybe it's the slots but I'd think at least the boss battle one should be fine. I don't have experience with using brawlbox to add codes. I always use GCTedit and code manager (the version without the line limit) you just get the codes from GCTedit and remove the non code lines it spits out and take that whole chunk and add it as a new code in code manager calling it PM vWhatever then you're free to add your own codes to that PM version
 

Sundark

Smash Apprentice
Joined
Oct 20, 2014
Messages
99
Awesome, looks like the problem was indeed in adding the codes to the gct. Trying what you suggested I managed to get the first code in, and it worked just fine. Then I went back, tweaked some things, rewrote the code a bit, and pasted it over what I had before using HxD editor, and that also turned out perfectly, meaning now I have a song that's forced to play on Melee Battlefield, and a 'hidden' track that can play on FD. Thanks Wiiztec!
 

HyperLink

Smash Rookie
Joined
Jun 20, 2015
Messages
18
This is amazing! Thanks for putting this guide together!
It did take me a while to figure it out cuz I have very little coding experience, but I just assigned specific songs to each one of Mushroom Kingdom's alts (10), but I have a question.
I treated the base as an alt and gave it the GCT hex of 0100 (A button) but it still played alt songs (a lot less frequently ofc). Is that normal, or is there a way to force the base stage to always play a certain song? Looking at the 3.6 code it seems that you did something similar for s7 (Bowser's castle) to always play Bowser's lava lair, but it doesn't work for me and I suspect it plays a random song from the tracklist when I release the A button too quickly. Any ideas? here's my code:

Code said:
Addr:8010F9FC
#Start
lis r12,0x815F
lhz r12,0xFFFF8422(r12)
slwi r0,r0,16
srwi r0,r0,16

#----------Mushroom Kingdom----------
s1: cmpwi r27,0x1F
bne end

#Base
s1a1: cmpwi r12,0x0100
bne s1a2
li r0,0x2724

#Omega
s1a2: cmpwi r12,0x0110
bne s1a3
li r0,0x2724

#Alpha
s1a3: cmpwi r12,0x0900
bne s1a4
li r0,0x27C4

#Legal
s1a4: cmpwi r12,0x0140
bne s1a5
li r0,0x2724

#Remake
s1a5: cmpwi r12,0x0120
bne s1a6
li r0,0x2724

#North
s1a6: cmpwi r12,0x0108
bne s1a7
li r0,0x27CF

#South
s1a7: cmpwi r12,0x0104
bne s1a8
li r0,0x27CF

#East
s1a8: cmpwi r12,0x0102
bne s1a9
li r0,0x27CF

#West
s1a9: cmpwi r12,0x0101
bne s1a10
li r0,0x27CF

#Special
s1a10: cmpwi r12,0x0300
bne end
li r0,0x27D0

#End
end:stw r0,0(r29)
 
Last edited:

HyperLink

Smash Rookie
Joined
Jun 20, 2015
Messages
18
You're saying the defualt stage doesn't always play the song you force it to?
Sorry for the late reply, but I have been running some tests and found something interesting.
Yes, that's what I meant but turns out my code wasn't the problem, but rather the button pressing/holding. I tried using a different song ID (Pirate Ship's The Great Sea) for the base stage and it only loaded when I held the A button (as opposed to a quick/normal press). Otherwise it would load the default tracklist for that stage.
However, I also found out that if you use cmpwi r12,0x0000 it will load a song when using quick press.
So I guess the input listener used by the code takes a bit to read the button presses so we can either hold the button to make sure it forces a certain song, or quick-press it to load the stage's default tracklist. Either way, I like the idea of being able to force songs at will on the fly XD
Thanks again for making this! :bluejump:
 

HyperLink

Smash Rookie
Joined
Jun 20, 2015
Messages
18
Hi there again! I've been testing this code a bit more and I found out that mushroomy kingdom seems to override the code (I think it may be because it has an overworld subtracklist and an underground one). Also, I haven't been able to get expansion stages (STGCUSTOM_XX) to load different music with this code, even though I tried using 00 as the ID (as listed in here) or using the ID for STGCUSTOM stages (as listed in SSSEditor) I noticed that value I highlighted in the tool corresponds to the IDs of the stages, so I decided to test with one of the IDs listed for let's say CUSTOM06 (the last one at the bottom) and used its ID (45) but still didn't work. Also, I removed Oshtoby's Stage-dependent song loader codes and the other Song Forcer Code I used, but expansion stages now just play Battlefield songs (which if I'm not wrong is the default behavior of STGCUSTOM stages). I think I'm missing something or this just doesn't work at all. Any ideas?
 

Sundark

Smash Apprentice
Joined
Oct 20, 2014
Messages
99
I've been testing this code a bit more and I found out that mushroomy kingdom seems to override the code (I think it may be because it has an overworld subtracklist and an underground one).
I've noticed this tendency too, actually. Not through using the Forcer code, even, just that I noticed the top three songs on the list only play on the HD version of Metal Cavern, and the bottom three only play on the 64 version, regardless of what the tendencies are set to. Obviously a holdover from how Mushroomy Kingdom worked, but I was wondering if there was a way to change that. Although, since it's not a tournament-legal stage, and I could just as easily swap the tracklist with another stage, it's not a huge priority for me.
 

shaqnel

Smash Cadet
Joined
Dec 17, 2010
Messages
36
Im trying to use this code in combination with the sound engine. It seems force the songs on the tracklist but not my custom ones. This is for pokemon stadium and battlefield in projectm. Heres my code.

8010F9FC

lis r12,0x815F
lhz r12,0xFFFF8422(r12)
slwi r0,r0,16
srwi r0,r0,16

s1: cmpwi r27,0x2E
bne s2
cmpwi r12,0x0040
bne end
s1m1: cmpwi r0,0x276E
bne s1m2
li r0,0x4000
s1m2: cmpwi r0,0x2770
bne end
li r0,0x4001

s2: cmpwi r27,0x01
bne end
cmpwi r12,0x0040
bne end
s2m1: cmpwi r0,0x26FC
bne s2m2
li r0,0x4002
s2m2: cmpwi r0,0x27EE
bne end
li r0,0x4003

end:stw r0,0(r29)
 

Amazerommu

Smash Lord
Joined
Jan 4, 2013
Messages
1,147
Location
Kentucky
Im trying to use this code in combination with the sound engine. It seems force the songs on the tracklist but not my custom ones. This is for pokemon stadium and battlefield in projectm. Heres my code.

8010F9FC

lis r12,0x815F
lhz r12,0xFFFF8422(r12)
slwi r0,r0,16
srwi r0,r0,16

s1: cmpwi r27,0x2E
bne s2
cmpwi r12,0x0040
bne end
s1m1: cmpwi r0,0x276E
bne s1m2
li r0,0x4000
s1m2: cmpwi r0,0x2770
bne end
li r0,0x4001

s2: cmpwi r27,0x01
bne end
cmpwi r12,0x0040
bne end
s2m1: cmpwi r0,0x26FC
bne s2m2
li r0,0x4002
s2m2: cmpwi r0,0x27EE
bne end
li r0,0x4003

end:stw r0,0(r29)
You're putting your CSE tracks in the correct folder right? That could be a thing.
 

shaqnel

Smash Cadet
Joined
Dec 17, 2010
Messages
36
You're putting your CSE tracks in the correct folder right? That could be a thing.
I put my cse songs in the sound folders and it works for my custom stages. Do I need to put it in the sfx folder or something?
 

Amazerommu

Smash Lord
Joined
Jan 4, 2013
Messages
1,147
Location
Kentucky
I put my cse songs in the sound folders and it works for my custom stages. Do I need to put it in the sfx folder or something?
No that's the right folder. I should try to see if I can't get this working myself cause I intend to use the eff outta this thing with CSE. I'm gonna try it out myself and see if it works. In the meantime, wiiztec wiiztec , do you know if this code has any issues with using hex id's above the default Brawl values using the custom sound engine?

OH! Also for this code to work, you can't just quick tap the buttons to get the alt tracks to play, you have to hold whatever button combination you have chosen for the code to take effect, though I did see something about changing part of the code to allow a quick press to work.

Edit: After testing this thing, it does not work with CSE... I wonder what needs to be changed to make it work with it.
 
Last edited:

HyperLink

Smash Rookie
Joined
Jun 20, 2015
Messages
18
I put my cse songs in the sound folders and it works for my custom stages. Do I need to put it in the sfx folder or something?
No that's the right folder. I should try to see if I can't get this working myself cause I intend to use the eff outta this thing with CSE. I'm gonna try it out myself and see if it works. In the meantime, wiiztec wiiztec , do you know if this code has any issues with using hex id's above the default Brawl values using the custom sound engine?

OH! Also for this code to work, you can't just quick tap the buttons to get the alt tracks to play, you have to hold whatever button combination you have chosen for the code to take effect, though I did see something about changing part of the code to allow a quick press to work.

Edit: After testing this thing, it does not work with CSE... I wonder what needs to be changed to make it work with it.
Good news, guys. @PyotrLuzhin made it happen! Song Forcer code now works with the Custom Sound Engine (Don't know about the original 2.5, I only tested Pyotr's CSE 3.0). So head over to PyotrLuzhin's Lab for the new code.
 

Amazerommu

Smash Lord
Joined
Jan 4, 2013
Messages
1,147
Location
Kentucky
why would ASM--> WiiRD just be not giving me an output? I select the convert options but nothing is happening.
Usually that means there's an error with your code, or sometimes I have to restart the program and then it'll do it. I leave it inside the .zip file and just extract it everytime I wanna run it. Idk exactly what's causing it but something it's writing to a file after the first time you run it usually causes that.
 

HiroProtagonist

Smash Apprentice
Joined
Mar 31, 2014
Messages
100
Location
Richmond, Virginia
Restarting program didnt help. I know this is a huge code but its the same thing repeated for various stages so can anyone see any errors in it? I'm running it in conjunction with Phantom Wing's Tracklist modifier and I wrote the code to redirect those altered tracklists which might be the source of error. My goal was to make it so that whenever you held right trigger as a stage loaded you would get Distant Planet's Tracklist

[Spoiler/ "
lis r12,0x8058
lhz r12,22714(r12)
slwi r0,r0,16
srwi r0,r0,16

s1: cmpwi r27,0x01
bne s2
cmpwi r12,0x0020
bne end
s1m1: cmpwi r0,0x275C
bne s1m2
li r0,0
ori r0,r0,0x279E
s1m2: cmpwi r0,0x2757
bne s1m3
li r0,0
ori r0,r0,0x2799
s1m3: cmpwi r0,0x275B
bne s1m4
li r0,0
ori r0,r0,0x279F
s1m4: cmpwi r0,0x275A
bne s1m5
li r0,0
ori r0,r0,0x279A
s1m5: cmpwi r0,0x2758
bne s1m6
li r0,0
ori r0,r0,0x279C
s1m6: cmpwi r0,0x2762
bne s1m7
li r0,0
ori r0,r0,0x27A0
s1m7: cmpwi r0,0x275D
bne s1m8
li r0,0
ori r0,r0,0x279D
s1m8: cmpwi r0,0x275E
bne s1m9
li r0,0
ori r0,r0,0x27D8
s1m9: cmpwi r0,0x2759
bne s1m10
li r0,0
ori r0,r0,0x279B
s1m10: cmpwi r0,0x2760
bne s1m11
li r0,0
ori r0,r0,0x2799
s1m11: cmpwi r0,0x275F
bne s1m12
li r0,0
ori r0,r0,0x279C
s1m12: cmpwi r0,0x2761
bne end
li r0,0
ori r0,r0,0x27D8

s2: cmpwi r27,0x02
bne s3
cmpwi r12,0x0020
bne end
s2m1: cmpwi r0,0x2783
bne s2m2
li r0,0
ori r0,r0,0x279E
s2m2: cmpwi r0,0x2785
bne s2m3
li r0,0
ori r0,r0,0x2799
s2m3: cmpwi r0,0x2789
bne s2m4
li r0,0
ori r0,r0,0x279F
s2m4: cmpwi r0,0x2787
bne s2m5
li r0,0
ori r0,r0,0x279A
s2m5: cmpwi r0,0x2788
bne s2m6
li r0,0
ori r0,r0,0x279C
s2m6: cmpwi r0,0x2784
bne s2m7
li r0,0
ori r0,r0,0x27A0
s2m7: cmpwi r0,0x278E
bne s2m8
li r0,0
ori r0,r0,0x279D
s2m8: cmpwi r0,0x278A
bne s2m9
li r0,0
ori r0,r0,0x27D8
s2m9: cmpwi r0,0x278B
bne s2m10
li r0,0
ori r0,r0,0x279B
s2m10: cmpwi r0,0x278C
bne s2m11
li r0,0
ori r0,r0,0x2799
s2m11: cmpwi r0,0x278D
bne s2m12
li r0,0
ori r0,r0,0x279C
s2m12: cmpwi r0,0x280F
bne end
li r0,0
ori r0,r0,0x27D8

s3: cmpwi r27,0x21
bne s4
cmpwi r12,0x0020
bne end
s3m1: cmpwi r0,0x276C
bne s3m2
li r0,0
ori r0,r0,0x279E
s3m2: cmpwi r0,0x2764
bne s3m3
li r0,0
ori r0,r0,0x2799
s3m3: cmpwi r0,0x2763
bne s3m4
li r0,0
ori r0,r0,0x279F
s3m4: cmpwi r0,0x2765
bne s3m5
li r0,0
ori r0,r0,0x279A
s3m5: cmpwi r0,0x2766
bne s3m6
li r0,0
ori r0,r0,0x279C
s3m6: cmpwi r0,0x276D
bne s3m7
li r0,0
ori r0,r0,0x27A0
s3m7: cmpwi r0,0x2767
bne s3m8
li r0,0
ori r0,r0,0x279D
s3m8: cmpwi r0,0x276B
bne s3m9
li r0,0
ori r0,r0,0x27D8
s3m9: cmpwi r0,0x2769
bne s3m10
li r0,0
ori r0,r0,0x279B
s3m10: cmpwi r0,0x276A
bne s3m11
li r0,0
ori r0,r0,0x2799
s3m11: cmpwi r0,0x27CE
bne end
li r0,0
ori r0,r0,0x279C
s3m12: cmpwi r0,0x280F
bne end
li r0,0
ori r0,r0,0x27D8

s4: cmpwi r27,0x1C
bne s5
cmpwi r12,0x0020
bne end
s4m1: cmpwi r0,0x2778
bne s4m2
li r0,0
ori r0,r0,0x279E
s4m2: cmpwi r0,0x277A
bne s4m3
li r0,0
ori r0,r0,0x2799
s4m3: cmpwi r0,0x2779
bne s4m4
li r0,0
ori r0,r0,0x279F
s4m4: cmpwi r0,0x277B
bne s4m5
li r0,0
ori r0,r0,0x279A
s4m5: cmpwi r0,0x277C
bne s4m6
li r0,0
ori r0,r0,0x279C
s4m6: cmpwi r0,0x277D
bne s4m7
li r0,0
ori r0,r0,0x27A0
s4m7: cmpwi r0,0x277E
bne s4m8
li r0,0
ori r0,r0,0x279D
s4m8: cmpwi r0,0x277F
bne s4m9
li r0,0
ori r0,r0,0x27D8
s4m9: cmpwi r0,0x2780
bne s4m10
li r0,0
ori r0,r0,0x279B
s4m10: cmpwi r0,0x2781
bne s4m11
li r0,0
ori r0,r0,0x2799
s4m11: cmpwi r0,0x27D9
bne end
li r0,0
ori r0,r0,0x279C
s4m12: cmpwi r0,0x2810
bne end
li r0,0
ori r0,r0,0x27D8

s5: cmpwi r27,0x14
bne s6
cmpwi r12,0x0020
bne end
s5m1: cmpwi r0,0x27E7
bne s5m2
li r0,0
ori r0,r0,0x279E
s5m2: cmpwi r0,0x27E3
bne s5m3
li r0,0
ori r0,r0,0x2799
s5m3: cmpwi r0,0x27E4
bne s5m4
li r0,0
ori r0,r0,0x279F
s5m4: cmpwi r0,0x27E9
bne s5m5
li r0,0
ori r0,r0,0x279A
s5m5: cmpwi r0,0x27E5
bne s5m6
li r0,0
ori r0,r0,0x279C
s5m6: cmpwi r0,0x27E8
bne s5m7
li r0,0
ori r0,r0,0x27A0
s5m7: cmpwi r0,0x27E6
bne s5m8
li r0,0
ori r0,r0,0x279D
s5m8: cmpwi r0,0x27EB
bne s5m9
li r0,0
ori r0,r0,0x27D8
s5m9: cmpwi r0,0x27EC
bne end
li r0,0
ori r0,r0,0x279B

s6: cmpwi r27,0x2A
bne s7
cmpwi r12,0x0020
bne end
s6m1: cmpwi r0,0x27C9
bne s6m2
li r0,0
ori r0,r0,0x279E
s6m2: cmpwi r0,0x27C8
bne s6m3
li r0,0
ori r0,r0,0x2799
s6m3: cmpwi r0,0x27CA
bne s6m4
li r0,0
ori r0,r0,0x279F
s6m4: cmpwi r0,0x27C7
bne s6m5
li r0,0
ori r0,r0,0x279A
s6m5: cmpwi r0,0x280B
bne end
li r0,0
ori r0,r0,0x279C

s7: cmpwi r27,0x07
bne s8
cmpwi r12,0x0020
bne end
s7m1: cmpwi r0,0x272C
bne s7m2
li r0,0
ori r0,r0,0x279E
s7m2: cmpwi r0,0x272B
bne s7m3
li r0,0
ori r0,r0,0x2799
s7m3: cmpwi r0,0x2731
bne end
li r0,0
ori r0,r0,0x279F

s8: cmpwi r27,0x0B
bne s9
cmpwi r12,0x0020
bne end
s8m1: cmpwi r0,0x2746
bne s8m2
li r0,0
ori r0,r0,0x279E
s8m2: cmpwi r0,0x2748
bne s8m3
li r0,0
ori r0,r0,0x2799
s8m3: cmpwi r0,0x2747
bne s8m4
li r0,0
ori r0,r0,0x279F
s8m4: cmpwi r0,0x274A
bne s8m5
li r0,0
ori r0,r0,0x279A
s8m5: cmpwi r0,0x27DC
bne s8m6
li r0,0
ori r0,r0,0x279C
s8m6: cmpwi r0,0x27D7
bne end
li r0,0
ori r0,r0,0x27A0

s9: cmpwi r27,0x06
bne end
cmpwi r12,0x0020
bne end
s9m1: cmpwi r0,0x2725
bne s9m2
li r0,0
ori r0,r0,0x279E
s9m2: cmpwi r0,0x2726
bne s9m3
li r0,0
ori r0,r0,0x2799
s9m3: cmpwi r0,0x2727
bne s9m4
li r0,0
ori r0,r0,0x279F
s9m4: cmpwi r0,0x2728
bne s9m5
li r0,0
ori r0,r0,0x279A
s9m5: cmpwi r0,0x27D5
bne s9m6
li r0,0
ori r0,r0,0x279C
s9m6: cmpwi r0,0x27DE
bne s9m7
li r0,0
ori r0,r0,0x27A0
s9m7: cmpwi r0,0x27CB
bne end
li r0,0
ori r0,r0,0x279D
/spoiler}
 

wiiztec

Smash Journeyman
Joined
Dec 19, 2007
Messages
402
Location
Houston, TX
NNID
wiiztec
You're missing your end line, when you branch to a branch label but no line is marked with that branch label asmwiird will do nothing when you try to convert
 
Last edited:

Handy Man

Smash Ace
Joined
Jan 1, 2013
Messages
916
Location
SoCal
I tried adding this code to add one song to some of my stage alts, but I'm running across some issues. A couple of stages worked, but most outright don't and one even played the song and then crashed the game right after. I'm also using some custom stage slots if that means anything. Any help would be appreciated, thanks in advance!

lis r12,0x815F
lhz r12,0xFFFF8422(r12)
slwi r0,r0,16
srwi r0,r0,16

s1: cmpwi r27,0x52
bne s2
cmpwi r12,0x0010
bne end
li r0,0x2863

s2: cmpwi r27,0x47
bne s3
cmpwi r12,0x0040
bne end
li r0,0x2864

s3: cmpwi r27,0x58
bne s4
cmpwi r12,0x0010
bne end
li r0,0x2861

s4: cmpwi r27,0x2E
bne s5
cmpwi r12,0x0010
bne end
li r0,0x285C

s5: cmpwi r27,0x43
bne s6
cmpwi r12,0x0010
bne end
li r0,0x2855

s6: cmpwi r27,0x31
bne s7
cmpwi r12,0x0040
bne end
li r0,0x2853

s7: cmpwi r27,0x24
bne s8
cmpwi r12,0x0040
bne end
li r0,0x2852

s8: cmpwi r27,0x03
bne s9
cmpwi r12,0x0010
bne end
li r0,0x2851

s9: cmpwi r27,0x17
bne s10
cmpwi r12,0x0010
bne end
li r0,0x284E

s10: cmpwi r27,0x37
bne s11
cmpwi r12,0x0010
bne end
li r0,0x284C

s11: cmpwi r27,0x51
bne s12
cmpwi r12,0x0010
bne end
li r0,0x2847

s12: cmpwi r27,0x4A
bne s13
cmpwi r12,0x0010
bne end
li r0,0x2846

s13: cmpwi r27,0x47
bne s14
cmpwi r12,0x0010
bne end
li r0,0x2843

s14: cmpwi r27,0x52
bne s15
cmpwi r12,0x0040
bne end
li r0,0x2842

s15: cmpwi r27,0x58
bne s16
cmpwi r12,0x0040
bne end
li r0,0x2841

s16: cmpwi r27,0x0D
bne s17
cmpwi r12,0x0040
bne end
li r0,0x2840

s17: cmpwi r27,0x18
bne s18
cmpwi r12,0x0010
bne end
li r0,0x283F

s18: cmpwi r27,0x50
bne end
cmpwi r12,0x0010
bne end
li r0,0x283E

end:stw r0,0(r29)

EDIT: So I've done some further testing, and I got the alt songs to load for default stages like Pokemon Stadium 2, Delphino's Secret, and Flat Zone 2. However, I can't get the alt songs to work on custom stage slots at all. I guess custom stages don't work with this code, unless there's something I'm missing. I used SSS Editor to get the IDs for my stages too if that means anything.

EDIT 2: I found this code in Project M Legacy XP's codeset. I'm guessing that it's supposed to enable forced songs on alts for custom stages, but I've tried using it and it didn't work. It was also made by @PyotrLuzhin , so he probably knows how it works. Here is the code in qustion:

Expansion Stage SFC Fix [PyotrLuzhin]
* C210F9A4 00000004
* 90850000 38000033
* 2C1B0040 40800008
* 48000008 38000000
* 60000000 00000000
* 0410F9A8 40800054
 
Last edited:

C.YI

Smash Rookie
Joined
Jan 1, 2016
Messages
15
Has anyone gotten multiple alts to work? I am able to get 1 song to work per alternate stage perfectly, but trying to get multiple songs to work with any alternate stage does not seem to work at all. I've only tested this on custom stages so far with CSE.
 
Last edited:
Top Bottom