• 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!

Changing Menu Text

Le Golden Magikarp

Smash Rookie
Joined
Jul 3, 2015
Messages
9
Location
Colorado

Karker

Smash Rookie
Joined
Aug 20, 2014
Messages
16
Location
Terre Haute IN
I spent about 5 minutes, got the jist of hex editing down, including how to find hex strings and edit them and reimport back into a melee iso.

Im trying to change the Name Entry button on the very first page to a diffirent set of text (20XXTE or Crazy Mod) but i cant seem to find the hex for name entry
20 17 20 24 20 30 20 28 1a 20 0e 20 31 20 37 20 35 20 3c
anywhere in the SdMenu.usd file.
im hoping that someone will see this and offer some assistance.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
I spent about 5 minutes, got the jist of hex editing down, including how to find hex strings and edit them and reimport back into a melee iso.

Im trying to change the Name Entry button on the very first page to a diffirent set of text (20XXTE or Crazy Mod) but i cant seem to find the hex for name entry
20 17 20 24 20 30 20 28 1a 20 0e 20 31 20 37 20 35 20 3c
anywhere in the SdMenu.usd file.
im hoping that someone will see this and offer some assistance.
Texture. MnMaAll.usd. Open with DAT Texture Wizard. Font is A-OTF Folk Pro, a download link is somewhere in this forum. Search.
 

Karker

Smash Rookie
Joined
Aug 20, 2014
Messages
16
Location
Terre Haute IN
Awesome, thanks man, great help, now i just have to get the gist of texture editing, which ive already read a bit about.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
I spent some time yesterday trying to figure out what kind of encoding these characters are in. At first I thought maybe it might be some multi-byte form of UTF or Unicode, or maybe something in one of the ISO standards. Fundamentally it still seemed a bit weird, since there are so many redundant '20' bytes, and normally encodings stay far away from wasting space (although some of them still do, to avoid complexity). But I couldn't find anything after quite a bit of searching. However, I realized that the characters are textures, and I've seen these textures before; they're in the DOL. Not just that, the hex values in the character table shown in the OP actually correlate to the order that the characters appear in the file! So it's some proprietary encoding/mapping system.

The characters are in a consecutive section in the DOL (the 5th data section), which ranges from 0x3B6840 to 0x42E6C0, and resides in RAM at 0x803B9840. These textures can be accessed and edited in DTW, and if you open it up, you'll see that the first texture starts at 0x409D60 (shoutout to Achilles1515 Achilles1515 who pointed out this address to me in the past), and each texture's data is 0x200 in length. So, you can locate any particular character by its hex value with this simple formula:

fileOffset = (0x200 * hexValue) + 0x409D60​

Conversely, if you want to add a new character or symbol to use in your menus, and want to overwrite an arbitrary Japanese character, you can get the hex value you would need to reference it with by taking the texture's file offset and plugging it into:

hexValue = (fileOffset - 0x409D60) / 0x200​


(TIP: In DTW, if you right-click on a texture in the DAT Texture Tree tab, there's an option called "Copy Offset to Clipboard".)

So one could easily use other fonts, symbols or other images, like so:
GALE01-3_02.png

Here's the shine image I made for this:
New Shine Insignia, 1.3, 32x32_0.png
Note that I had to move the image over to the right a bit. I'm not sure how it works, but the spacing between characters is not dependent on the image alone.

Accented characters aren't included in the same place, but they shouldn't be difficult to locate if anyone wants to find them.


When talking to Achilles recently, he suggested a Menu Text Converter to be built into MCM (like the [ASCII] Text to Hex converter), so I'm making a basic one now. It'll make writing text in this format super fast and easy. But even so, I can already imagine a more advanced version that would actually use the images in the DOL to create your strings, in case you've modified your character textures. If you guys like that idea, maybe it could be added to DTW at some point.
 

Cyjorg

tiny.cc/19XXTE
Joined
Nov 18, 2013
Messages
686
Location
Purdue University
I spent some time yesterday trying to figure out what kind of encoding these characters are in. At first I thought maybe it might be some multi-byte form of UTF or Unicode, or maybe something in one of the ISO standards. Fundamentally it still seemed a bit weird, since there are so many redundant '20' bytes, and normally encodings stay far away from wasting space (although some of them still do, to avoid complexity). But I couldn't find anything after quite a bit of searching. However, I realized that the characters are textures, and I've seen these textures before; they're in the DOL. Not just that, the hex values in the character table shown in the OP actually correlate to the order that the characters appear in the file! So it's some proprietary encoding/mapping system.

The characters are in a consecutive section in the DOL (the 5th data section), which ranges from 0x3B6840 to 0x42E6C0, and resides in RAM at 0x803B9840. These textures can be accessed and edited in DTW, and if you open it up, you'll see that the first texture starts at 0x409D60 (shoutout to Achilles1515 Achilles1515 who pointed out this address to me in the past), and each texture's data is 0x200 in length. So, you can locate any particular character by its hex value with this simple formula:

fileOffset = (0x200 * hexValue) + 0x409D60​

Conversely, if you want to add a new character or symbol to use in your menus, and want to overwrite an arbitrary Japanese character, you can get the hex value you would need to reference it with by taking the texture's file offset and plugging it into:

hexValue = (fileOffset - 0x409D60) / 0x200​


(TIP: In DTW, if you right-click on a texture in the DAT Texture Tree tab, there's an option called "Copy Offset to Clipboard".)

So one could easily use other fonts, symbols or other images, like so:
View attachment 123216
Here's the shine image I made for this: View attachment 123217 Note that I had to move the image over to the right a bit. I'm not sure how it works, but the spacing between characters is not dependent on the image alone.

Accented characters aren't included in the same place, but they shouldn't be difficult to locate if anyone wants to find them.


When talking to Achilles recently, he suggested a Menu Text Converter to be built into MCM (like the [ASCII] Text to Hex converter), so I'm making a basic one now. It'll make writing text in this format super fast and easy. But even so, I can already imagine a more advanced version that would actually use the images in the DOL to create your strings, in case you've modified your character textures. If you guys like that idea, maybe it could be added to DTW at some point.
Isn't MCM built in python? I feel like @CeLL wrote one already so maybe ask him for the source.

For fonts it's pretty common for their to be space on one side or the other otherwise when printing text to the screen, the characters would touch each other. I'd expect the space to be on the character to be on the right and the space on the left but maybe that's just how I formatted mine. Anyway, good luck DRGN DRGN . I'm still around if you guys ever need anything from me/have questions about things I've worked on.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
Wow, almost a 2-year bump! Kinda hard to believe it's been so long.


Earlier this year, I helped PushDustIn PushDustIn decode parts of the Japanese alphabets in the game, in terms of the textures and the "menu text" addressing scheme that points to them (as discussed in this thread). While Hiragana and Katakana are located in the DOL after English characters, I found that the Kanji (a more complex and much larger alphabet), is stored in SdMenu.dat. (The SdMenu.usd variant only has a small handful of characters.)

DOL:

Version: | Table start:| Total Textures: | Table end:

1.00 | 0x407d80| 287 | 0x42bb80
1.01 | 0x409060| 287 | 0x42ce60
1.02 | 0x409d40| 287 | 0x42db40
PAL | 0x40c4e0| 146 | 0x41e8e0

SdMenu.dat:

Version: | Table start:| Total Textures: | Table end:

1.00 .dat| 0xd4e0 | 501 | 0x4bee0
1.01 .dat| 0xd500 | 501 | 0x4bf00
1.02 .dat| 0xd500 | 501 | 0x4bf00

SdMenu.usd:

Version: | Table start:| Total Textures: | Table end:

1.00 .usd| 0x12ec0 | 7 | 0x13cc0
1.01 .usd| 0x12ec0 | 7 | 0x13cc0
1.02 .usd| 0x12ec0 | 7 | 0x13cc0

None of PAL's 5 variations of the SdMenu file appear to have textures.

As most here probably know by now, MCM has a Menu Text to Hex converter in the Tools tab (I probably should have mentioned the fact that that tool exists in this thread before). It's used to easily generate the hex needed for a string of characters for menu texts, and vice versa. And as of the latest update (4.1 as of this writing), it now supports all of the Hiragana and Katakana characters in the above tables as well. If you open the settings.py file that comes with the program and scroll to the bottom, you can see the dictionary that the tool uses, containing all of the characters and their respective hex values. Those are all of the characters the tool supports, and you can add to it if you'd like.

MCM's settings.py file breakdown.png

(Shoutouts to my gf for helping to build that dictionary!)


Changing and using these characters:​

Previously, DTW didn't recognize these, because the textures don't have image data header structures associated with them like character/stage/menu objects do. However, the latest version of DTW now can.

Like those in the DOL, these characters can be changed just like any other texture; so you could change these out to be different fonts or even images to add to your menus. However, note that Kanji is in the SdMenu.dat file, not .usd. As you may know, the game loads .usd versions of files when the game is set to English, and the .dat variation when you've set the game to Japanese (usd is presumably short for "U.S. DAT"). Besides actually switching the game's language, you could probably instead just rename your SdMenu.dat file to SdMenu.usd (and rename/remove the original .usd), so that that will be loaded instead. Then manually change the Japanese menu text back to English strings. The end result should be English everything, except you then have 496 new images/font characters available for your menu description texts. If someone ends up doing that, please share and upload it here, as others might be wanting to do the same thing.

Cyjorg Cyjorg Yeah, it is, and he did make one, but I made a new one so that it could work both ways and interface with my GUI.
 
Top Bottom