News: 11 March 2016 - Forum Rules

Author Topic: MegaED X, the Megaman X hacking tool (Now with MMX2 support)  (Read 194369 times)

Ice Man

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #220 on: May 27, 2017, 03:52:09 pm »
Actually, in the original LC example there's no MegaManX but I found it on someone's github. Might've been a modified version? Either way, the offset for the font is actually wrong.

It's 2BPP located at E6A99. I was able to add special signs that way and reinsert back.

E6BB4 had some signs missing.


However, I'm curious, what format does MMX2, MMX3 and Rockman & Forte use? Does anyone know?
I'm planning to do complete German translations for all of them. I know some exist but they're old, unfinished and have alot of errors.
Thanks in advance for any help!

Sorry for derailing this topic too much though but I think this fits best in here. :x

pianohombre

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #221 on: May 28, 2017, 06:14:24 am »
Ice Man,
no problem as far as I know I'm the only one working on the source code. The offset you listed earlier worked for me on a headered rom. I checked afterwards with tile molester. (it's in the lunar compress readme file). I can tell you right away that the same offset won't work for Megaman X2 because I tried it. I actually thought it was a good idea to add a font editor to the program, and it won't necessarily be so hard since the tile editor window has all the color editing functions for it already. I wanted to add a titlescreen editing window into the program as well, which would be practically identical.

The reason I mentioned that x2/x3 probably uses lz-22 compression, which justin3009 (praise be to his megaman prowess) disputed, is because the LoadFont function in the program uses graphics decompression involving lz-22 not the typical rle3. I did take a look at the program the other day and one of the parameters returns a so-called font pointer offset, but it returns the same value for each game (and a wrong value nonetheless) so I'm not exactly sure how it pulls the font, because it definitely does for debug info in the editor. I was going to trace through bsnes debugger this week for some values so I can pm you, unless you're too impatient to wait a couple days or just find them yourself.

Happy programming,
pianohombre
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

justin3009

  • Hero Member
  • *****
  • Posts: 1659
  • Welp
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #222 on: May 28, 2017, 09:49:46 am »
http://www.romhacking.net/documents/205/ - Here's the document for the decompression routine for X3.  It works for X2 as well from what I had to test way, way back.

http://www.romhacking.net/utilities/552/ - There's also this for X3.  No source unfortunately but it definitely works.
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

Ice Man

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #223 on: May 28, 2017, 03:36:29 pm »
pianohombre,
adding that would be really sweet. Either way, my address worked on a headerless Mega Man X 1.0 US ROM.

Anyway, sounds good from my side. I'm in no rush with my translations. I can already work on the scripts and add additional things later on and keep notes. :)


justin3009,
thanks for the document. Definetely going to check it. I'm aware of that tool for MMX3 but it actually expands the ROM to 4MB and stores the graphics in another format (?) at 20000+ in PC address. I'd love to actually decompress them myself without expanding the ROM. The document might be of good help. Thanks again!

pianohombre

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #224 on: May 29, 2017, 06:40:53 am »
I was looking through the graphiX3 and decompression script today. Finally got the decompression working, after I removed the header from my X3 rom. bin file works great just cuts off the titlescreen a little, so probably have to edit the size somewhere to fix this change. graphiX3 also works ok, just extracts everything into multiple bin files. it basically does the same thing as the decompression script, but for each graphics pointer location (there's 200 or so), plus it can restore the compressed graphics but only for MMX3. I found the pointer table and after some number crunching was able to find the font pointer for X3.

font pointer=E1CA4
size=A000

You can use the original decompression script in Visual Studio or whatever just change the pointer location and size it will extract the font fine. I noticed Lunar Compress isn't able to do this. That's the plus side of these scripts (although megaEd X can of course do this as well). I think I found the font pointer table in MMX2 it would be nice of graphiX3 was open source I could just change a couple values and find the other pointers quicker too. I'll try tracing this week. Hopefully it isn't too tedious.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

justin3009

  • Hero Member
  • *****
  • Posts: 1659
  • Welp
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #225 on: May 29, 2017, 07:52:35 am »
Well, X2's menu graphics and menu font I think are at: 22:8FB9 (LoROM address) with the size of 1600.

However, the font itself is at: 15:C1B0 (PC Address) decompressed if I'm seeing this right.
« Last Edit: May 29, 2017, 08:07:19 am by justin3009 »
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

Ice Man

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #226 on: May 30, 2017, 05:07:13 am »
The weird thing is, the font is also decompressed for X3 as well as compressed.
Thing is, both are actually used in X2 and X3. The compressed font is used for the stage select layer 3 and ending text while the decompressed font is used for the intro cutscene, dialogue boxes, etc.

pianohombre

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #227 on: May 30, 2017, 09:58:32 pm »
The font is like 95% decompressed in the rom. Some of the bigger text is cut off and when decompressed it fixes this. Too bad the values in tile molester don't relate to actual hex pc addresses. I found some of the original source code online he posted it in a forum, so I can just copy/paste and then decompress all the graphics into separate bin files. This will help me find the pointer I'm looking for since there's about 150-200 of them. This will also be helpful for mmx1 and rockman & forte.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

Ice Man

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #228 on: June 01, 2017, 05:35:51 am »
I just found a tool that can compress and decompress MMX2 graphics so I'm all set actually.
If you're interested, here's a link: http://romhackers.org/modules/PDdownloads2/viewcat.php?op=&cid=3

Also has tools for MMX, MM7 and R&M.

However, R&M one seems to be buggy when reinserting edited graphics back since it doesn't insert them to their correct locations but rather right after the next file.

Thanks for all the help though! I might as well make a MMX hack one day. :D

pianohombre

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #229 on: June 02, 2017, 02:04:41 am »
Thanks IceMan,
it looks like these programs probably store the pointer locations in the log.txt file. This will save me some time finding the pointers. Hopefully someone will find it useful to be able to edit the font and titlescreen once I'm finished adding these functionalities in.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

NiO

  • Full Member
  • ***
  • Posts: 130
  • Let's bring order to chaos
    • View Profile
    • https://www.facebook.com/groups/retrogamersmx/
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #230 on: June 02, 2017, 03:55:57 am »
Thanks IceMan,
it looks like these programs probably store the pointer locations in the log.txt file. This will save me some time finding the pointers. Hopefully someone will find it useful to be able to edit the font and titlescreen once I'm finished adding these functionalities in.

Time ago I was helping a guy with a Protoman hack in mind, but we weren't able to edit the tittle, so I'm sure there will be people that will find that really useful!

Ice Man

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #231 on: June 02, 2017, 04:26:08 pm »
Glad it's useful to you guys, however, if anyone actually figures out how to compress/decompress graphics properly with the Rockman & Forte tool, I'd appreciate it.

I know it creates a XML file with all pointers but changing them nor the size does anything to me. So I actually went to fix it manually since my edits made the compressions for the font smaller. This way I could put the untouched graphics back to its original location but I'm stuck with another file that turns out 20000 bytes larger than the original due to my edits. I've got no idea how to properly repoint it with that program, assuming that's even possible. In case it isn't I'll have to find the pointers manually, I guess.

pianohombre

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #232 on: June 05, 2017, 01:01:04 am »
So I actually went to fix it manually since my edits made the compressions for the font smaller. This way I could put the untouched graphics back to its original location but I'm stuck with another file that turns out 20000 bytes larger than the original due to my edits. I've got no idea how to properly repoint it with that program, assuming that's even possible. In case it isn't I'll have to find the pointers manually, I guess.

If you just use the MMX3 decompression code you're able to decompress the graphics without touching the rom. For some reason graphiX3 expands the rom during re-compression (possibly because it can't get it exactly right). An extra 20kb for a translation patch shouldn't be that big of a deal. Anyways, with the Rockman&Forte tool I had some trouble at first, but I got it to work. Make sure you use an original Japanese rom, because it will give an error msg for Megaman & Bass (the English translation). Usually, in my experience the pointers are typically in the same location for Japanese/English roms.

Font table in English for Rockman&forte(unheadered rom): (snes address/hi-rom) offset- D96A9C size- AE4
Font table in English for MMX2(unheadered rom): (snes address/lo-rom) offset - 1cc180 size- 0663

**note: even though the size is listed as "0663" for MMX2 you'll get the same decompressed graphics in the rom. Use A00 for the size to get the full font.

On a separate note, I'm not sure if anyone knows this, but there was a PSP remake of Megaman X called 'Megaman Maverick Hunter X'. Capcom was planning on redoing a lot of the X games, but it didn't sell very well so they dropped plans. Iceman, you may also want to look into translating that game, although I couldn't find any tools for that. The game has a 25min movie unlocked after you beat the game. You can also defeat Vile in the intro stage, but other than that it's about 90% the same, other than a 2.5D graphics update.
« Last Edit: June 06, 2017, 08:10:35 pm by danke »
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

Ice Man

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #233 on: June 06, 2017, 03:34:18 am »
I was talking about Rockman & Forte.
Mega Man X2/X3 are done. I got everything finished there for my German translation.

The Rockman & Forte tool itself is not the problem. I can extract and insert original graphics just fine, even with AGTP's translation. Just edit the ROM Header at 0xFFC0 to ROCKMAN&FORTE and it works.

The problem with the tool is, if you edit a graphics file (e.g.grafico_c1e4ea (stage select symbol)) it turned out 20000 bytes larger for me as said before and it doesn't repoint the graphics anywhere resulting the game to load garbage.
When inserting umlauts to my German Rockman & Forte translation the file was 8 bytes or so smaller than the original so I had to actually copy the rest of the graphics back to their original location cause the tool did not repoint them..

pianohombre

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #234 on: June 07, 2017, 05:35:38 am »
The Rockman & Forte tool itself is not the problem. I can extract and insert original graphics just fine, even with AGTP's translation. Just edit the ROM Header at 0xFFC0 to ROCKMAN&FORTE and it works.
The problem with the tool is, if you edit a graphics file (e.g.grafico_c1e4ea (stage select symbol)) it turned out 20000 bytes larger for me as said before and it doesn't repoint the graphics anywhere resulting the game to load garbage.

So you got it working? You just needed to have the graphics file the same size. That's normal. A lot of these roms and programs are very restrictive.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

Ice Man

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #235 on: June 07, 2017, 08:50:38 am »
Yeah, except I had to change the graphics locations manually afterwards but it worked.

pianohombre

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #236 on: June 08, 2017, 07:02:57 pm »
Good to hear. Any plans to translate the Megaman X remake for the PSP? There's video in the game so you'd have to add subtitles.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

Ice Man

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #237 on: June 10, 2017, 02:56:54 am »
No idea yet. Still working on Rockman & Forte in German. Got everything done, just missing like half of the entries in the database.

pianohombre

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #238 on: June 22, 2017, 06:16:41 am »
Looks pretty great! Saw the translations on the homepage of RHDN. I'm doing a Spanish translation of a videogame, but I've been pretty busy so haven't had much time to release another version with updated translations and fixes. Hopefully you had someone test it. It's easy to overlook something and have it buggy in the game.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

Ice Man

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #239 on: June 24, 2017, 04:03:20 am »
I didn't have anyone testing the game but I played through the game mulitple times with Mega and with Bass.
However, if anyone actually finds problems, I won't mind updating it (assuming the person knows German well though) :P