ROM Hack [Release] Sm4shCommand

darklordrs

Well-Known Member
Member
Joined
Aug 16, 2015
Messages
791
Trophies
0
Age
23
XP
434
Country
United States
I'm sorry, this is a very nooby question, but which homebrew should I be acessing while running New 3DS version 10.3.0-28U? It appears that I have too recent a version to load browserhax or homemenuhax (http://smealum.github.io/3ds/) Thanks for bearing with me.

Well, I'm sorry to say, but without a key few hard to access games you're pretty much SOL.
 
D

Deleted User

Guest
It could handle more than 8 as seen with Melee Fox's Firefox. Once the Spacies up special is figured out or the teleporters, applying angles to airdodges should be possible.

In that case, would anyone mind dropping the airdodge and Fox/Falco's up special code unedited here (Preferably .txt or similar unless I can open the given code in SC)? It'd give me something to mull over in my free time since I don't have an old enough system version to load homebrew. I'd appreciate it.
 

Trinitro21

Well-Known Member
Member
Joined
Oct 14, 2015
Messages
133
Trophies
0
Location
Userland
XP
206
Country
United States
In that case, would anyone mind dropping the airdodge and Fox/Falco's up special code unedited here (Preferably .txt or similar unless I can open the given code in SC)? It'd give me something to mull over in my free time since I don't have an old enough system version to load homebrew. I'd appreciate it.
Try looking at Mastercore. It's got all the same stuff we can see with AnimCmd.
 

Sammi Husky

Well-Known Member
OP
Member
Joined
Jul 6, 2014
Messages
312
Trophies
0
Age
29
XP
498
Country
United States
if/else and other control statements are non existent in acmd files in my experience. I have yet to find a single one. most control is probably done in mscsb script. Until i have that parsed and editable, there won't be much to do honestly
 

Megadude

New Member
Newbie
Joined
Dec 26, 2015
Messages
1
Trophies
0
Age
28
XP
42
Country
United States
I'm new to hacking so I have a question. I installed sm4sh command but I don't know where to go from there. How to I get the game files from my 3ds to my computer?
 
D

Deleted User

Guest
I'm new to hacking so I have a question. I installed sm4sh command but I don't know where to go from there. How to I get the game files from my 3ds to my computer?

I asked the same question about a week ago.

Basically, you need Homebrew for your 3ds. You can find all the current methods of accessing homebrew here: http://smealum.github.io/3ds/ Make sure the version of 3DS you're running is compatible with the homebrew method you're trying to launch. Then (Quoting darklordrs here)
- Dump your copy of smash 4. assuming 3ds, use braindump.

- Assuming you're using 3DS - the most accessible version to hack right now, as the tools to run your stuff are readily available without kernel level hacks - dump the 'dt' and 'ls' files using the DTLS file found in the OP, then navigate to dt>animcmd>fighter>(yourfighterofchoice). Those are the files that this program edits.

- make your edits, rebuild your stuff, etc etc. run with HANS.
 
Last edited by ,
  • Like
Reactions: Megadude

Yukc

New Member
Newbie
Joined
Dec 26, 2015
Messages
1
Trophies
0
Age
29
XP
51
Country
United States
Sammi,

I did a little bit of modding with AA and Think on Balanced Brawl back in 2010 and have recently found a new interest in the Smash 4 modding scene.

I have never used this site but would love to offer my help on any other projects that you may be working on.

Thanks
 

darklordrs

Well-Known Member
Member
Joined
Aug 16, 2015
Messages
791
Trophies
0
Age
23
XP
434
Country
United States
@Megadude I think @BeeMill summarized what you need to do nicely. And to Bee, well, I'd give you a "role model for new people" star if I could, because you're trying to save people who've already burned way too many days into this site some free time and that goes a long way.

@Yukc You should've probably read the two posts literally right above yours.
 
  • Like
Reactions: Deleted User

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
So I've been looking at Sm4sh CROs for some time and after a small realization about the nature of CROs my Sm4sh IDB has become at least 10 times better. In any case, I have some more insight on how the Sm4sh dt/ls file system works on a higher level (ie from a C++ standpoint). Fair warning in advance, it's entirely possible I'm misinterpreting the function of some things, but the names are definite:

rdgbLio.png


First the lib::resource class is instantiated, and lib::Resource::find is called, which returns a Resource instance. Usually the original instance is destroyed by lib::Resource::~Resource, sometimes sooner sometimes later. lib::Resource::lock takes the lib::Resource::find instance and a boolean (uncertain what it does as a boolean for now) and then returns a buffer, which is then copied out before calling lib::Resource::unlock which allows additional resources to be loaded.

Based on this, my guess as to the best way to redirect to SD would be to only intercept lib::Resource::lock, since Resource instances are actually passed around by several functions, so a direct mapping of each function to fopen/fclose/etc wouldn't work out well. lib::Resource:: path_str() exists, which might make the job a bit easier since we could use the instance passed to us to get the actual path, then do our file code using the path gained from the instance. Probably the only tricky part might be hooking the functions properly and making 100% sure to know how the code works before doing it.

EDIT:
Full list of dt/ls Resource functions:
lib::Resource::Resource(char const*, bool)
lib::Resource::~Resource()
lib::Resource::clear()
lib::Resource::data_size()
lib::Resource::find(char const*, bool)
lib::Resource::findf(char const*, ...)
lib::Resource::is_exist()
lib::Resource::is_loaded(bool)
lib::Resource::is_locked()
lib::Resource::load(int)
lib::Resource::lock(bool)
lib::Resource::operator=(lib::Resource const&)
lib::Resource:: path_str()
lib::Resource::unlock()

Not sure what load and clear do, but I don't see them used much.
 
Last edited by shinyquagsire23,
  • Like
Reactions: I pwned U!

Sammi Husky

Well-Known Member
OP
Member
Joined
Jul 6, 2014
Messages
312
Trophies
0
Age
29
XP
498
Country
United States
So I've been looking at Sm4sh CROs for some time and after a small realization about the nature of CROs my Sm4sh IDB has become at least 10 times better. In any case, I have some more insight on how the Sm4sh dt/ls file system works on a higher level (ie from a C++ standpoint). Fair warning in advance, it's entirely possible I'm misinterpreting the function of some things, but the names are definite:

rdgbLio.png


First the lib::resource class is instantiated, and lib::Resource::find is called, which returns a Resource instance. Usually the original instance is destroyed by lib::Resource::~Resource, sometimes sooner sometimes later. lib::Resource::lock takes the lib::Resource::find instance and a boolean (uncertain what it does as a boolean for now) and then returns a buffer, which is then copied out before calling lib::Resource::unlock which allows additional resources to be loaded.

Based on this, my guess as to the best way to redirect to SD would be to only intercept lib::Resource::lock, since Resource instances are actually passed around by several functions, so a direct mapping of each function to fopen/fclose/etc wouldn't work out well. lib::Resource:: path_str() exists, which might make the job a bit easier since we could use the instance passed to us to get the actual path, then do our file code using the path gained from the instance. Probably the only tricky part might be hooking the functions properly and making 100% sure to know how the code works before doing it.

EDIT:
Full list of dt/ls Resource functions:
lib::Resource::Resource(char const*, bool)
lib::Resource::~Resource()
lib::Resource::clear()
lib::Resource::data_size()
lib::Resource::find(char const*, bool)
lib::Resource::findf(char const*, ...)
lib::Resource::is_exist()
lib::Resource::is_loaded(bool)
lib::Resource::is_locked()
lib::Resource::load(int)
lib::Resource::lock(bool)
lib::Resource::operator=(lib::Resource const&)
lib::Resource:: path_str()
lib::Resource::unlock()

Not sure what load and clear do, but I don't see them used much.

This is some great data, awesome stuff! Depending on how the system handles things, we might also only want to start redirecting access after it loads in update data (in case hans ever supports it). We might also be able to take advantage of the unix timestamps in resource entries and the ResourceFile header if it became necessary, though i dont think it would really.

What IDA loader do you use for CR0's? I only ever looked at the wiiu's binaries, but it'd be nice to look at the 3ds' as well since it's currently more accessible for modding.
 

darklordrs

Well-Known Member
Member
Joined
Aug 16, 2015
Messages
791
Trophies
0
Age
23
XP
434
Country
United States
Man, I have no idea what the above two posts mean but all I can tell is that good work is being done and I need to learn this shit eventually.
 

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
What IDA loader do you use for CR0's? I only ever looked at the wiiu's binaries, but it'd be nice to look at the 3ds' as well since it's currently more accessible for modding.
As of now I only have just dumped them manually and loaded menu/menu into IDA, but what I did for names is made a script which exports and demangles all the symbols exported by static.crs into an IDC-ish script. Documents a really large portion of called functions, it's great. I'd like to somehow get a CRO importer going at some point, not sure what the best way to go about that would be though.
 
Last edited by shinyquagsire23,

Godkarmachine

Member
Newcomer
Joined
Jun 1, 2015
Messages
13
Trophies
0
Age
23
XP
50
Country
United States
Question: What type of compression does dt and ls use? I'm semi curious because I noticed that some parts of the BCH files don't get compressed (like the BCH headers, and a lil info after that), and then it streams into compressed data. Reminds me of compression in CPK files.
 
Last edited by Godkarmachine,

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
Question: What type of compression does dt and ls use? I'm semi curious because I noticed that some parts of the BCH files don't get compressed (like the BCH headers, and a lil info after that), and then it streams into compressed data. Reminds me of compression in CPK files.
ZIP compression.
 

Godkarmachine

Member
Newcomer
Joined
Jun 1, 2015
Messages
13
Trophies
0
Age
23
XP
50
Country
United States
ZIP compression.
I literally opened dt in a hex editor and saw this:
6hsICY6.png

There's no PK header. They're no filenames. There's a long stream of Ì's.
Of course, the better question here is why would Nintendo and bamci use ZIP compression for a commercial game when nintendo are notorious data nazis
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BigOnYa @ BigOnYa: Nighty night