News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: How do I change Mario's hat/shirt to look like Luigi's hat/shirt with Hex Edits?  (Read 4319 times)

FlyingFire64

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
I started a SMB3 hack that's in similar vein to Super Luigi Bros from NES Remix 2(because I don't know how to consider my Speed Mario Bros remake from Ultimate NES Remix an actual hack). I'm aware that there's already a Super Luigi Bros 3 on this site, but this one's gonna(try to) have inverted levels and graphics to match the levels. I already got down the title screen graphics and applied a 1 Player Only patch that came with SMB3 Workshop, but I still need to change Mario's clothes to green, and change all text relating to Mario to text that relates to Luigi(if I were able to get SMB3 Text Editor to work at all, but I'm saving that for another thread). However, since hex edits are my main issue, right now, my question is: Where do I find the hex for Mario's pallete on the map, in the levels, and even the Mario Bros-style mini game that won't be playable anyway thanks to the 1 Player Only patch, and how do I change them all to the green that Luigi has for his sprites?

EricThaDead

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
    • DECI.ML
Open up the ROM in FCEUX, use the PPU viewer and find the 4 colors in Mario's palette. Then, search for the color hex values in your hex editor of choice and change the red to green's hex value.

FlyingFire64

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
Open up the ROM in FCEUX, use the PPU viewer and find the 4 colors in Mario's palette. Then, search for the color hex values in your hex editor of choice and change the red to green's hex value.

Ok, so I found the hex code(00 16 36 0F), replaced 16 with 1A(the darker shade of green on Luigi's map sprite), and it only worked for Luigi's in-level sprites. Because I want this to be accurate I changed 1A to 2A(Luigi's brighter shade of green outside of the map), and it looks fine, but the Mario on the title screen and the map screen are both red(still), and all use the same hex as in-game level Luigi. How do I fix this?

Sinis

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Of what you'll have to do is locate each area where Mario is used within the game and then locate the hex values to those palettes.  Reason for this is that certain character sprites throughout the game use different palettes as they are used in animations/cutscenes so they'll be different.  However, most cutscenes will use the same hex values and sprite so you won't have to change much or hopefully won't have to change much depending on the type of hack you are doing/working on.

Do take note that certain in game sprites from other characters and/or backgrounds may use those same hex values so keep a close eye and notes jotted down so you don't run around in circles wondering why this or that changed when something else was edites  ;)
Castlevania ROM Center on Discord
https://discord.gg/eXDzAyg

Discord: Sinis#4332

FlyingFire64

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
Of what you'll have to do is locate each area where Mario is used within the game and then locate the hex values to those palettes.  Reason for this is that certain character sprites throughout the game use different palettes as they are used in animations/cutscenes so they'll be different.  However, most cutscenes will use the same hex values and sprite so you won't have to change much or hopefully won't have to change much depending on the type of hack you are doing/working on.

If by "locating each area where Mario is used, and locating the hex values to Mario's palletes", you mean something like opening the rom in FCEUX, select debug and click on PPU Viewer, and locate the pallate for Mario and it's hex, then that would be exactly what I did. The pallete for Mario on the title screen and Mario on the map are both located in the same exact area as the pallete for Mario in a level, and both they all use the same hex. Therefore if I go in to my hex editor, change something about "00 16 36 0F"(the hex that's apparently used for map Mario, level Mario, and intro Mario), only level Mario's pallete will change, and looking map/title screen Mario will still use 00 16 36 0F(which would be non-existant if I already changed it to something else).

Also, level Mario's pallete also works with the airship intros(I'm not sure about the ending, though because I haven't played the hack to that point.), and I may put up a Help Wanted ad after I finish the graphics and hex editing(I'm not good with making custom maps(all the level tiles I place down bring me to a black void in which I die immediately.), editing text(SMB3 Text Editor is too stubborn to load, and I'm not going through risky .dll junk again. I already have a .dll fixer software that's engraved on my PC because of trying to those kinds of issues.)editing the behavior of certain blocks and generators, and this hack will basically be like Super Luigi Bros from NES Remix 2, but it's SMB3 instead, therefore, almost everything will be reversed.)

Jorpho

  • Hero Member
  • *****
  • Posts: 4037
  • The cat screams with the voice of a man.
    • View Profile
SMB3 Text Editor is too stubborn to load, and I'm not going through risky .dll junk again. I already have a .dll fixer software that's engraved on my PC because of trying to those kinds of issues.
I agree there is no shortage of dodgy sites proferring quick and easy solutions to DLL problems, but it is entirely possible to do these things safely, as I explained in your other thread.  Certainly, trying to hammer out these things from scratch or to find someone else to hammer it out from scratch is probably many times more difficult.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

Sinis

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
If by "locating each area where Mario is used, and locating the hex values to Mario's palletes", you mean something like opening the rom in FCEUX, select debug and click on PPU Viewer, and locate the pallate for Mario and it's hex, then that would be exactly what I did. The pallete for Mario on the title screen and Mario on the map are both located in the same exact area as the pallete for Mario in a level, and both they all use the same hex. Therefore if I go in to my hex editor, change something about "00 16 36 0F"(the hex that's apparently used for map Mario, level Mario, and intro Mario), only level Mario's pallete will change, and looking map/title screen Mario will still use 00 16 36 0F(which would be non-existant if I already changed it to something else).


Something like that.  It's a type of method that I use to go throughout the game while having a palette info tool up to see which is being used.  It's a tedious method but I like doing that so I can find every single line where each and every palette is stored at on the ROM itself.  One thing to keep in mind that the hex values for each possible Mario Sprite used will be located at different locations so say 00 16 36 0F is in line 0032 and the same hex value is in another line say maybe 0048.  Whichever one that is used in game, let's go with the 0032 example, will be the one used where ever you may see game play (it will differ from ROM to ROM so keep a sharp eye out) and the hex value in line 0048 may be used for something else that the Mario sprite relies for it's palette.

This may not always be the case either.  Certain cut scenes may 'feed' off of a different hex value altogether while still using the same Mario Sprite.  I don't know if it's like that in any of the Mario NES games since I never looked at them yet but it's always best to see if it does use the same sprite by doing a few simple edits in YYCHR like add a few pixels here and there around Mario's head to see if it uses the same character sprite and if it does then you'll have to get the palette hex value from that cut scene and go hunt it down in the hex value locator in whatever hex editor  you are using  :P



This is from what I taught myself, results will vary from each of us on here from whatever methods that we use.  Hope it gave you a somewhat idea to base an idea off of!
Castlevania ROM Center on Discord
https://discord.gg/eXDzAyg

Discord: Sinis#4332

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Didn't someone disassemble and annotate the entire game? That would obviously include every palette in the game.

Jorpho

  • Hero Member
  • *****
  • Posts: 4037
  • The cat screams with the voice of a man.
    • View Profile
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

FlyingFire64

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
I downloaded SMB3 Color Editor, because I thought it would help, and it did(except for the fact that the Mario palete used on the map is still red if you exit a level with a Super Mushroom. I've also located System32, and dropped Comdlg.ocx in there, but I can't seem to access the Command Prompt(I use Windows 8.). Then again, I'm about to go to sleep soon, so if tomorrow I find out how to do it myself, then I probably won't need any help for launching SMB3Txt.

Also, of the disassemblers are for SMB1, apparently. If you can find one for SMB3 please tell me, unless I overlooked and the disassembler also works with SMB3.
« Last Edit: September 18, 2014, 08:47:37 pm by FlyingFire64 »

Isao Kronos

  • Hero Member
  • *****
  • Posts: 1180
  • Dogman
    • View Profile
if you're on w8 hit windows+x for command prompt and other neat stuff

Jorpho

  • Hero Member
  • *****
  • Posts: 4037
  • The cat screams with the voice of a man.
    • View Profile
Also, of the disassemblers are for SMB1, apparently.
Oh, right.  (Also, these are disassemblies, not disassemblers.  Disassemblers are used to disassemble and produce a disassembly.)

Quote
If you can find one for SMB3 please tell me
The first Google hit for <super mario bros 3 disassembly> is http://www.sonicepoch.com/sm3mix/disassembly.html .  (See http://www.sonicepoch.com/sm3mix/ for the download link.)

Quote
unless I overlooked and the disassembler also works with SMB3.
Anything can be disassembled; it's just that the result is difficult to work with unless someone goes through the entire thing very, very slowly and annotates the code.

I've also located System32, and dropped Comdlg.ocx in there, but I can't seem to access the Command Prompt(I use Windows 8.).
I hope you took note that you shouldn't be using the System32 folder if you are running the 64-bit version of Windows 8.  If you're not sure if you're using the 64-bit version, I suggest you take fifteen seconds to do a Google search and find out.
« Last Edit: September 18, 2014, 11:24:10 pm by Jorpho »
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

FlyingFire64

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
I hope you took note that you shouldn't be using the System32 folder if you are running the 64-bit version of Windows 8.
The only thing I modified about the folder was inserting Comdlg32.ocx in it. If I don't move it out, will it cuase any problems, and will I have problems if I DO move it out?

Jorpho

  • Hero Member
  • *****
  • Posts: 4037
  • The cat screams with the voice of a man.
    • View Profile
I don't really know what will happen if you leave it there, aside from it taking up space.  But since it wasn't there before, I would be surprised if removing it caused any problems, especially if you didn't run regsvr32 yet.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

FlyingFire64

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
Ok, so I move Comdlg32.ocx in to SysWOW64(assuming that Windows 8 would follow the Windows 7/Windows Vista method), opened command prompt and typed in "regsvr32 c:\Windows\SysWOW64\comdlg32.ocx". I got an error saying it couldn't connect to the .DLLRegister, so I place it in system32, typed in "regsvr32 c:\Windows\system32\comdlg32.ocx, and it said Comdlg32.ocx had to be in a specified path or I'd have to debug it to check for problems with the binary. I moved it back in to SysWOW64, put in the command again, and got the same problem as I did with the "System32" method.

Jorpho

  • Hero Member
  • *****
  • Posts: 4037
  • The cat screams with the voice of a man.
    • View Profile
I got an error saying it couldn't connect to the .DLLRegister
Didn't you read the part about starting the Command Prompt as an Administrator?

Quote
so I place it in system32
I don't know why you would do that if you are running the 64-bit verison of Windows.

Quote
I moved it back in to SysWOW64, put in the command again, and got the same problem as I did with the "System32" method.
So you did the same thing twice and a different thing happened?
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!