Little Things Aplenty

16 years ago by Mato

After last week’s craziness I wanted to take a little break, so I did some little stuff today.


  • Word wrap working again

  • Mushrooms make Mario big

First, I continued to test the battle text some more by doing lots of battles throughout the game, including weird ones that might result in some strangeness just because they’re not normal fights. I came across two bugs before long. One was that my hack wasn’t treating non-[BREAK] and non-[WAIT] codes correctly, the game would get stuck in an infinite loop on these until a variable somewhere would roll over. Fixing this was easy enough though. The other bug was in the auto-word-wrap stuff, I forgot to make [WAIT]s and [BREAK]s jump at a certain spot, so the game would try to calculate their widths, even though they didn’t have valid ones. Easily fixed. Everything coming along nicely πŸ™‚

Did some tests late in the game with some unusual battles and found another bug, this one having to do with how the battle hack is initialized. Now that the hack is working though, I’ve been finding that I can now remove parts safely and rely more on the game’s values, so this bug was VERY easy to fix, made initialization much cleaner, and meant I could take out a couple lines of code now. Optimizing stuff like that is always a cool feeling, it’s what I think a lot of programmers find addictive about programming stuff. It’s kind of like mathematical equations and being able to factor stuff out and cross stuff out and make things a lot simpler. It’s cool. Anyway, now the battle text hack is working better than ever. Very proud of it πŸ™‚

This of course leaves the “Do you want to throw this item away?” menu you get in battle if your inventory is full and you get an item. This text uses different code entirely, so it’s still not in VWF form.


I started to look into the technical stuff with this, and it looks like it uses the same basic concepts as the normal battle text, but just slightly different, too. How annoying. It looks like it’s gonna take 4 separate things at least to get this working, but I was too burnt out to try this today, so I decided to leave it for another time. I’m not going to cross out the battle text stuff off of the to-do list until this “item throw away” menu stuff is done, though.

So I decided to take on a few simpler tasks. I thought about doing the sprite text welding stuff, since it’d be really nice to have item descriptions working, but that might wind up being harder than expected, so I went to something else — adding a hack to make the game load names correctly for the gray name boxes.

The game loads names for this from like 4 or 5 different sources, depending on who’s talking. And sometimes the name is in RAM, not ROM. And since we have some stuff in 8-bit and some stuff in 16-bit (RAM names are all 16-bit, for example), this caused issues. So I decided to fix this stuff with another 8-bit hack. The hack needed to know when to load stuff in 8-bit and when to load in 16-bit. Nothing too tough at all.

The next problem was making the game know how to count the size of name strings correctly — it used to assume 16-bit names, but now a name will be in 16-bit in RAM but 8-bit in ROM, so it was necessary to make some big changes. The original routine that counted these strings was overly complicated, inefficient, and even seemed to call a subroutine for no good reason except for faulty logic. We’re also running low on room in our area we use to put our hack code, so I opted to write a new string length counting hack right on top of the original code. It turned out to be only 1/3 the size of the original 😯

So blah blah blah, what does this all mean?

One: Names now always appear in the gray boxes properly, regardless of what list it comes from, and regardless of whether it’s a RAM or ROM name. This means we can cross this thing off the to-do list!

“Add an 8-bit hack to a key part of the routine. This may also work on other parts of the game, so that’d be a bonus. But this is required to make names loaded from the enemy list work correctly.”


  • Before

  • After

Incidentally, this MAY allow me to undo some “cheating” hacks I did about a month ago to get extra-long names to work. I haven’t tested it yet, but if it works, that’d be even awesomer πŸ™‚

Two: 8-letter RAM names now work. This means long player names like “Kumatora” will now display correctly. Fixing this only took two lines of code in my hack 😯 And that means we can cross this off the list too!

“Hack it so the name box can print 8-letter player names correctly. It currently barfs and prints crazy stuff in such cases.”


  • Before

  • After

However, getting some of this to work meant I had to undo some of my “cheating” hacks I used a month or two ago. In particular, the enemy names now only half-show up on the Battle Memory screen. But this was expected. To fix this, I’ll need to do another string-length counting hack, which will eventually probably result in fixing many of the main menu things left on the to-do list.

The short version of all this is that I fixed a couple things, had to break one thing in the process (though I was using a cheating method for it anyway), but fixing that thing will probably lead to many more fixes of other things anyway. So this is all very good news. Also good news is that it seems to take less time to do these hacks than before. Battle text leveled me up πŸ˜‰

The gray box hacking stuff is almost all done, too. You can see in a pic above that I still need to fix the alignment of especially long boxes, but after that, that leaves just the box width issue, which I already have plans for.

Right now, it seems like it’s just me running the show now, but Jeffman’s been busy with his own stuff, but whenever he gets the chance he’s still right there to help out πŸ™‚ Mostly it’s been little cosmetic things, but I’m also hoping he’ll be able to cook up a simple app that will let people change the character names in their save files, so that old save files from the Japanese ROM or the Menu Patch ROM will be compatible with the final translation. So although it may not look like it, stuff’s progressing nicely on several fronts.

And now I end this excessively long post with another random pic.

Posted on Monday, March 3rd, 2008 at 2:13 am by Mato, filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. Comments and pings are currently closed.

67 Responses to “Little Things Aplenty”

  1. Twili said 16 years ago:

    Wow, it looks as though it’s coming along very nicely.
    It’s good that you got the name’s working.

    BTW, Awesome, I’m first.

  2. Dr. Meat said 16 years ago:

    Nice work as usual. Is the end in sight? Can you see the light at the end of the tunnel?

  3. bkero said 16 years ago:

    Your updates never displease me. I’ve been taking some x86 assembly classes, so I sort of know how this wacky ARM assembly stuff can make your eyes bleed.

    Godspeed Mato. Maybe I’ll send you a care package.

  4. Mato said 16 years ago:

    Dr. Meat: Just barely, but that’s probably because of the giant scary monsters between us and the end of the tunnel.

  5. Abadd said 16 years ago:

    will there be an updated to do list posted anytime soon?

    great work as usual

  6. Mother 3 bound said 16 years ago:

    i love you . sometimes i check in and get so involved with the whole hack process that i forget what it is you guys are hacking! always a pleasant reminder tho. πŸ™‚
    thanks for this its really special to me and a lot of other people

  7. Aevin said 16 years ago:

    Awesome! It always encourages me to see the progress you’re making.

    This is small in the grand scheme of things, but since you updated The List, shouldn’t you change the “as of” date to indicate your changes? Still reads “Feb 9” right now. Could be people are looking and not realizing it’s updated.

  8. Beck said 16 years ago:

    Keep up the good work.

  9. Aasimov said 16 years ago:

    Hahah, big scary monsters at the end of the tunnel.
    They’ll probably level you up too.
    You might have to die a couple times and respawn back at the phone, but you’ll get them eventually.
    You could always stay at the hotel or beat up some random small stuff to work up your exp even more and gain a little more pocket cash…
    Then you could use your pocket cash to purchase the new bat you needed to beat the big things in the first place!
    x3 I played M2 today. So I’ve kinda been looking at the world through rose coloured glasses.
    Also, look at your last paragraph.
    There’s several grammatical errors in the first sentence.
    *is shot* xD

  10. dr said 16 years ago:

    Dude, you are a hero.

    It’s an amazing thing, but honestly this site is my favorite on my feed reader. Every time I see you’ve posted, I come here right away. And lately, it’s seems like things are going more smoothly, right? It must be so satisfying for you when things just come together.

    Well, anyway, thanks for fighting the scary monsters in assembly for us! I hope that you’ll be able to put this on your resume in some way without fearing the wrath of the almighty N. I’m just another guy out there wishing you well. Ganbatte!

    -dr

  11. D said 16 years ago:

    An update this early/ late? you guys are crazy, but you rock!

  12. Unsavory Maggot said 16 years ago:

    So the Battle Memory has reverted? (That’s what I gathered from the above picture.) Does that mean also that the Sound Test has reverted?

    I’d be surprised though, you took alot of steps forward. It’s usually one step forward and two steps back I’ve noticed, but from what I’ve read it looks as though you’ve avoided alot of heavy backtracking this time. πŸ˜€ Do you know what this means?! You’re getting somewhere! πŸ˜€ Keep up the good work, man!

  13. cchen04 said 16 years ago:

    lots of small progress. but even that is just full of win. inching closer to finishing every day.

  14. Lol said 16 years ago:

    Mato, I was talking about updating the To-Do list generally, it hasn’t got an update since Feb. 9 πŸ˜‰

  15. Zip Code Ness said 16 years ago:

    Did you notice that there was a sudden pixel-wide space between the Nice Ghost’s grey box and the black text box in the after picture?

  16. RupeeClock said 16 years ago:

    It sounds like it’s almost finalised at this point, and all that mostly remains is testing.

    I hope you’ve got all the save-states and battery saves you need. XD

  17. JeffMan said 16 years ago:

    The battle text is only one of several huge problems; there still remains the main text RAM issue and the sprite welding, which I’ll try to tackle in that order very soon. I’ve just been very busy with school and stuff lately. I’ll be very busy this week again, but after that it’s smooth sailing because the following week is March Break and I won’t have any school projects to work on πŸ˜€

  18. squarepox said 16 years ago:

    Watching you make progress, takes the edge off another rough week–it’s like electrons rolling down a hill and going “ahh”

    That’s a good feeling, thank you!

  19. Poe said 16 years ago:

    Punch the tunnel, Mato!!

  20. droja_en_er_colacao said 16 years ago:

    Mushrooms make Mario big

    Yeah, and dogs make “guau, guau” and cats make “miau, miau” xD

  21. Moulinoski said 16 years ago:

    Before:
    K%4%ra: (Scared) AHHH!

    After:
    Kumatora: (Relieved) Ahhh!

    πŸ˜›

  22. PSI Supernova said 16 years ago:

    HOLY BORANGE THIS IS AWESOME! -Tomato

    The only thing I can say about it is THANKYOUTHANKYOUTHANKYOU!!!!!!! (note overuse of exclamation points) and I cannot wait to play this game. Wait a minute, that was two things! *bonks head on keyboard*

  23. Ninten said 16 years ago:

    This is looking very awesome. It is extremely cool how fast you are progressing. That battle text stuff definitely leveled you up, but you shouldn’t forget the rest of stuff you’ve worked on in the project giving you a lot of experience points to level you up to work throught the battle text. If you were to go back in time to when you started this and to show off your current abilities to yourself back then, you’d have probably thought of yourself as some sort of masterful hacker or something.

  24. GIANTSTEP said 16 years ago:

    Whoa! That was even Faster xD.

    Mato, Jeffman and Team, You guys are doing Earthbound fans in America a favor. Thanks a bunch.

  25. A Fan said 16 years ago:

    Well, hurry up and find a tiny font-welding torch, then πŸ™‚ The signs won’t read themselves, you know!

  26. Coconut of Enlightenment said 16 years ago:

    Wow. You fixed the things for which you had to do “cheating” hacks before. I would’ve been satisfied with the cheats. But it’s just as well. I don’t think going back and breaking what you fixed will be all that hard.
    So, even with all these fixes, is the game still freezing up, erasing data, messing up the graphics, etc? I just want to know how playable it is at this point.

  27. Earthsent said 16 years ago:

    Fantastic work, I can’t wait to see this finally released.
    I love the attention to detail that you guys are placing; this is not going to be any ordinary hack, that’s for sure!

  28. Geno_Whirl said 16 years ago:

    do you have a paypal account? me want to donate as soon as i have money 😯

  29. Sully said 16 years ago:

    You’re not getting paid for this but I sure hope that this project will serve as a real eye catcher on any resume you put together!!!

  30. Aphrodine said 16 years ago:

    I love you.

  31. RamblinEvilMushroom said 16 years ago:

    QUESTION: Will you have VERY user-friendly instructions on how to apply this patch? I’m kind of an idiot when it comes to this and applying the patch is scaring me!!!

  32. brandnizzlebaby said 16 years ago:

    12 out of 38 things crossed off the list. Almost half way there. Kind of. 7 more things and that’s half the list! Hell yeah, Mato!!

  33. tom_foolery said 16 years ago:

    WOOOOOOO!!!!!! Mato, you are great.

  34. SoreThumb said 16 years ago:

    Mato, now that you’re mostly a one-man hacking biz, you feel up to a few other games? πŸ˜‰

    Just kidding 8) Thank you for your hard work– as usual! What genius. πŸ˜€

  35. SoreThumb said 16 years ago:

    (PS: I know how you mentioned Jeffman in awhile and .. uhh.. other coders sometimes 8)

  36. Rod. said 16 years ago:

    .I woke up this morning…
    .
    .Checked this site.. saw that it was pretty long πŸ™‚
    . So…. I waited…
    . Until I was done my lectures for the day..
    . came home.. got a cup of tea ready, and sat down to enjoy the delicious read that I knew was in store

    and that’s always what I do when there’s a long enough update

    thanks for increasing my quality of life,
    and thanks for the finished translation that is yet to come..
    . its gonna be so awesome πŸ™‚

    Thank You

    work hard,
    rest well…
    enjoy yourself,
    enjoy life…

    **tips hat*

  37. ArashiSai said 16 years ago:

    YAYYAYAYAYAYAYAYAYAYAYAYAYAYAYAY!

  38. virusoul said 16 years ago:

    gentlemen if use finish this u will be considered gods in the hacking and gaming world
    although it is not finished i thank u! rock on

  39. Moulinoski said 16 years ago:

    Sully: I doubt Tomato would ever put the Mother3 hacking project in his resume. Hacking is not something you would want to put on a resume because it is a sort of an “illegal hobby”.

  40. wohdin said 16 years ago:

    Internet superheroes here man.
    γŒγ‚“γ°γ‚γ†γ‚ˆο½ž

  41. Mato said 16 years ago:

    Been working hard today when I can, the stuff I’m doing isn’t stuff that’s obvious on the outside, though. But with any luck we’ll be able to cross off another thing on the list soon, possibly tonight.

  42. Chris said 16 years ago:

    Hmm, I havent done much, and I am still not very familiar with the GBA, but correct me if I am wrong, I think I have an idea for your “sprite welding”.

    From my extremely limited GBA knowledge, We have some OAM memory which is keeping track of what tile gets displayed where. Every letter you print is a sprite in this OAM memory. However, exceeding your total of 1K is causing you to wrap around and delete/corrupt other memory. I am hoping I am correct so far, I don’t have the tools or much experience to test my theory.

    Anyway, so we have this problem. Now, I don’t know how large a typical tile is (I am going to guess 8×8), and I don’t know how much room and CPU cycles you have to do it in, but; While I was looking at Chaos Seed on the SNES, I noted how it handled text. It actually took the time to assemble the text box in RAM first. This threw the idea into my head for you guys.

    You just went around the problem with battle text boxes, maybe you should be looking TO them for an answer :). We obviously split the text box into these 8×8 tiles, then using a technique similar to a certain compression scheme, we create a sliding window of 2 tiles. The first tile is the tile we are working on, the second is the spill over.

    From those two tiles, we blit a glyph as much as we can fit, recording how far into the tile the last glyph took us. If we spilled over, sprite/tile 1 is done. Update the tile that tile 1 corresponds to in the text box. Slide the window so tile 2 is now tile 1, get the next tile as tile 2 rinse and repeat per line. This should yield us anywhere between 1-3(maybe even 4 if they are all ‘i’s) glyphs per tile. Scrolling, wait codes, etc. should be similar from the battle text. We will also probably have to keep track of how many times we slide the tiles down.

    To simulate typing, you can probably update tile 1 from the sliding window everytime a glyph is imprinted.

    What this doesn’t do, is account for word wrap, so we can have a counter that can check if the length needed between spaces, plus the length of current text is greater than the length of the line itself.

    What do you think :)?

  43. Mato said 16 years ago:

    Yeah, that’s basically the plan, but we just need to implement it, and that’s a lot easier said than done πŸ˜‰ Harmony managed it very easily a long time ago, and I don’t see there being anything too troublesome, just lots of annoying code to try to figure out and argue with. I see the sprite welding thing more as a matter of time thing than a difficulty thing… just need a time machine πŸ˜‰

    EDIT: Also, none of the text that uses sprites does fake-typing, it all just shows up instantly, which helps matters a bit πŸ™‚

  44. Lol said 16 years ago:

    Hey Mato… about the translation of the name Shimmy Zmizz… It couldn’t be also translitterated to Jimmy Smith? O_Γ²

  45. Mato said 16 years ago:

    No, because it’s meant to be LIKE the name, but not be THE name.

  46. Chris said 16 years ago:

    @Mato: Aww, but typing is so Earthbound-y πŸ˜€

  47. elmo_lol said 16 years ago:

    I’m no hacker but maybe you can try this to get a VWF-like format. Try to combine the letters. In game it reads F|l|i|n|t| Right so may be you can try putting the letters together like Fl|in|t. I just Flint as an example. Like I said I’m no hacker so this could be another “Boss Battle” to try my idea.

  48. Linkhasafan said 16 years ago:

    Dude, this is coming out along awesomely! I cannot wait! I hope this game will be awesome! You should add a extra mode in the game where you can play deleted enemies from the game :3

  49. Div033 said 16 years ago:

    Amazing progress. Checking this blog has become a highlight of my day. I salute you Mato, keep up the great work.

  50. ty said 16 years ago:

    I would like to give you my first child.

  51. whishky said 16 years ago:

    Kickass. Dont let it die man

  52. Mato said 16 years ago:

    Too sleepy now to really do anything more, but I did get a lot done today. I started by fixing the string-counting routine used by the battle memory menu, and like I figured, it was connected to many other main menu stuff, so I started writing code to convert all menu stuff to use 8-bit text. Normally, a hack like this only needs one file, but I’ve had to write about 10 separate hacks so far. Got many things working, even stuff that wasn’t working before, but right now I’m wrestling with the routines that deal with menu text messages, like “Blah blah recovered so much HP!” It’s being a pain, but eventually it’ll get done in. Already seeing good results with some stuff, though. For instance, the message here used to not work I don’t think.

    And that giant space that’s in there is manually added in there by the game, so when I go to look at that later on, I’ll be able to fix yet another thing on the list.

    For now I sleep, and I forget if I answered questions or not yet, but I’ll get to them tomorrows.

  53. neo said 16 years ago:

    No part of this job could be considered little, you are doing a HUGE favor to the Mother community, and I am in company when I say thank you for devoting your time to this project πŸ™‚

  54. Tsukimoon said 16 years ago:

    Congrats Tomato on leveling up!

    @elmo_lol: Not to be the whatever guy or anything, but that suggestion has been used at least twice by my reading of comments, and I don’t often read comments… very thourougly at least, I’m in love with this site! Anyways, he’s using a much more sophisticated way rather than using a cheap trick like that. I didn’t mean to sould mean either, but I hate that method.

    Tomato: You’re amazing in every way. I really can’t wait to play M3 in English. I wish I could help, but anything I could do someone else can do better. All, I can do is pray 9 times for your success.

    Aaand, Lena is that you from Chrono Crisis?! Once I found your website, albeit randomly, and I thought is was awesome! I posted a nice little story about how I found it on the forums here. But nobody wanted to read or respond. The comic is awesome.

  55. Nico said 16 years ago:

    Just posting to cheer you on and let you know how psyched I am (and how psyched I’ll be when it’s finished).

  56. kennyk said 16 years ago:

    Thanks for all the work you do Mato! And everyone else involved too πŸ™‚

  57. Coconut of Enlightenment said 16 years ago:

    Love it.

  58. Bologna? said 16 years ago:

    Get some sleep. And if you’re reading this after you slept, then get back to work. πŸ˜€ No Really Mato, sometimes I wonder if you are taking this almost too seriously. I really wish there were more like you working on the project just so you could have some time off. I know Jeffman is doing what he can, but the “Unified” translation seems like it’s just you now… yell at Exo to do something! πŸ˜€

  59. deviance said 16 years ago:

    mato is the last boss of the internet.

  60. EBIsumaru said 16 years ago:

    I don’t think you need to be fixin’ that end-of-battle text. Looks fine as it is. If it works fine, why change it? I think doing it just to make it fit with the other text would be a waste of time.

  61. Mato said 16 years ago:

    Aevin: Yeah, thanks for the reminder, I changed the date on the to-do list.

    dr: Nah, I doubt I’ll put it on my resume. There’s not much demand for ROM hackers in the real world πŸ˜‰

    D: I try to fit hacking work in later in the day so I can get real work done earlier in the day, so my updates usually come late late, especially lately.

    Unsavory Maggot: No, the sound player stuff was already in 8-bit and separate from the battle memory stuff. But like I mentioned in my mini-update, I got the battle memory stuff working again now. But getting that working broke a few other things in the main menus, so still working on fixing those. In the end, looks like everything’ll be 8-bit in the ROM, which is cool, because it at least means professional-ish consistency πŸ™‚

    Zip Code Ness: Yes, I mentioned it in the update.

    RupeeClock: There’s still maaany months left on this thing, don’t be fooled by the pretty pictures πŸ˜‰

    squarepox: I hate when electrons do that 😯

    Coconut of Enlightenment: The main script stuff still causes trouble, but we understand why. But fixing it will be even more difficult than the battle text. So it’ll be one of the last things we hack probably.

    RamblinEvilMushroom: Yeah. For now, I have this for the menu patch for people who aren’t good with computers. Is something like that easy enough?

    SoreThumb: After M3 I am so not working on game stuff for a while. I might work on the starmen.net M3 walkthrough, but I think even my EB0 remake hack will be on hold for a while too.

    Moulinoski: When I first grajerated from coolege I put my ROM translation stuff on my resume. In general, people didn’t seem to mind, but once I finally got picked up by FUNimation I wasted no time in clearing that stuff off my resume πŸ˜‰ I don’t see why I’d put MOTHER 3 on it now, but I dunno, maybe Jeffman or someone else will want to use it for theirs.

    Linkhasafan: Adding entirely new modes is way beyond the scope of translation hacking, also, most of the dummied-out enemies have weird stats, don’t do anything in battle, and/or don’t have all their graphics drawn. There’s that hidden tree enemy that’s almost fully complete, but it seems to be missing outside sprite graphics. If we add anything back in, it’d probably be that guy, but for now let’s just concentrate on getting the translation stuff done. Maybe while we’re working on the script edits and such Jeffman can goof around with stuff like that.

    EBIsumaru: I’m not sure what you’re talking about. The end of battle text works fine.

  62. ty said 16 years ago:

    Mato: Do you dream in binary? πŸ™‚

  63. 7ucky said 16 years ago:

    @Whisky – You have the same name as my cat!

    @Mato – You are a golden god! You’re making some serious strides, but don’t forget to take a breather every now and then.

  64. Damien Diablos said 16 years ago:

    i made a discovery today!
    karaoke actually has the ‘knit-cap man’ song!
    to the thorough confusion of my nipponjin friends…

    mato, you ROCK!

  65. Coconut of Enlightenment said 16 years ago:

    Yay!

  66. Kumatora said 16 years ago:

    You people are awesome!!!

    Take a day for yourself, get a soda and relax. =)

    I cant wait for this! This is my life, my unhealthy addiction. Don’t we all have one?

  67. mike said 16 years ago:

    just awesome, ive been in love with this series for so long!
    everyday we get a little close,
    thanks for making this!