• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other] [Problem] Editing tile map of Textbox in Emerald (aka "where the heck is it?")

30
Posts
20
Years
    • Seen Apr 21, 2020
    Hello. I'm not sure if this is the right forum as "beginner" is not exactly how I would describe myself, but heh. Anyways, as title describes, I am trying to edit the text box graphics in Emerald. Specifically, I would like to replace it with FireRed's instead of that god awful neon green one Emerald had in the first place.

    Now, this would be as simple as replacing the graphics you would think, but the text box in Emerald only has 11 tiles to it while FireRed's has something like 18. Okay, so I repoint the graphics, that's not an issue. The problem is of course that the tilemap is now going to be all wrong. Yes, I already tried searching for the tilemap in memory and no matches exist in the ROM.

    I then attempted to find it using SWI logging and various other features in VBA, and the closest I got was that it seems to get the tilemap in memory from 0x02001bc0, so I set a breakpoint for any writes to that and my VERY rudimentary ASM knowledge seems to have me believe the values there are loaded from 0x03007d24....which ends up being the stack pointer at some point in the function? I guess? So uh...needless to say, I think I've way over-complicated this and gotten in over my head over something that should probably be painfully simple.

    My questions are as follows:

    -Where would one find the tilemap for the textbox in Emerald (and for that matter, FireRed, so that I can copy it over)?
    -Is there a way to tell the game to load more than 11 tiles, or will simply just changing the pointer to the new graphics be enough in this case?
    -For future reference, how did YOU find it? Was I going about it all wrong, or was I pretty close in my method? It would be cool to be self sufficient for these kind of things!

    also:
    -Unrelated to the issue of textbox graphics, but tangentially related: is it possible to change the X/Y position of text? I noticed the alignment is different between games, and nothing is more apparent than in battles. I would ideally just copy the values from FireRed for all in-game text alignment, but for all I know they could work completely differently.

    Spoiler:


    thanks for the help, I appreciate it!
     

    Touched

    Resident ASMAGICIAN
    625
    Posts
    9
    Years
    • Age 122
    • Seen Feb 1, 2018
    It might not have a static tilemap. Sometimes the routine that loads it just generates the tilemap on the fly to save physical space - its very easy to do if you have just a sequence of incrementing numbers. This is likely since you say it's being loaded from the stack - you can allocate a bit of space there to generate a tilemap. In order to change this you need to change either the tilemap generating function, or alter the routine so that it loads a tilemap from a location in the ROM. Since these are quite difficult hacks (and I'm not sure how good your RE skills are), I can help you find the routine in question if you give me the offset of the map tiles.
     
    30
    Posts
    20
    Years
    • Seen Apr 21, 2020
    Thanks, I would really appreciate that! I'm willing to give this a shot, anyway.

    If by the offset of the tiles you mean the graphics themselves, it would be...

    Emerald: 0xDDD748
    FireRed: 0x41F1C8

    if you meant the offset in memory, both games shoot the tile GFX to 0x0600C000 and the tilemap to 0x0600FB80...the latter of which seems to have a connection to 0x2001BC0 in Emerald, like I'd mentioned, which appears to get it from the stack in a manner like you mentioned. That's all I got offset-wise, hope this helps as a starting point. Never would have suspected it was handled in this manner!
     
    Back
    Top