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

Research: X and Y positions of textbox?

~Teh Panda~

Back in hacktion
918
Posts
16
Years
    • Seen Jul 20, 2022
    Well I have been interested in this for quite a while now. While completely pointless it would still add something quite unique to your game. Now what I was meant to ask and maybe would help research if we found offsets in the ram or something of the x and y offsets for the textboxes location on screen and if you would need a routine for keeping this permanent. I was speaking with ZodiacDaGreat about this and he seemed to think it would need some extensive ASM. I may have explain it bad though as it may have sounded if I wanted to appear like this only sometimes... But I am not too deep in ASM yet. I know some simple commands such as push, pop, load, etc and the registers and such. So maybe someone such as Juan or Interdpth could give an opinion?

    ----------

    What I would think of doing is placing a break for when the textbox appears and see if we could pinpoint the X and y locations in the disassembler. But if we did this we probably would need to find the X and Y locations of not only the textbox but all which goes in it. The individual letter spaces etc.

    Thanks and I hope this doesn't sound like a quaint pointless idea.
     

    Full Metal

    C(++) Developer.
    810
    Posts
    16
    Years
  • well...this is just a guess...i'm going to say that the x position is "0" for easiness sake. BUT the gba screen 9x 240x160, divide that by 8...30x20, we know that the textbox takes up 4 "rows" in a tilemap, so take away four from our 20. 30x16= 480. So, in tilemap terms, the position (notice the lack of x/y specifier) is 480. so yea....there isn't really an x/y co-ordinate so to speak, if there was though, it would be 0x16 (not hex,but like XxY) no, this is not for certain, like i said, just a guess.
     

    ~Teh Panda~

    Back in hacktion
    918
    Posts
    16
    Years
    • Seen Jul 20, 2022
    well...this is just a guess...i'm going to say that the x position is "0" for easiness sake. BUT the gba screen 9x 240x160, divide that by 8...30x20, we know that the textbox takes up 4 "rows" in a tilemap, so take away four from our 20. 30x16= 480. So, in tilemap terms, the position (notice the lack of x/y specifier) is 480. so yea....there isn't really an x/y co-ordinate so to speak, if there was though, it would be 0x16 (not hex,but like XxY) no, this is not for certain, like i said, just a guess.

    Wow I completely forgot it must be in tilemap form as in Tilemolester they just use the simple amount of tiles etc. But still that must mean we could find that? ;P

    I've managed to accidentally move my textbox into the top left corner. :)

    Ooh ooh, did all the text still work though? Since my theory is the text has different data just telling where it places it on the screen no matter where the text box may be.
     

    Full Metal

    C(++) Developer.
    810
    Posts
    16
    Years
  • care to share how u did that --or fixed it-- ?
    and panda....since the text and textbox are on the same pallette, plus going off the screenshot that doc gave us, i would expect to find that the text is put onto the screen relative to the textbox.
     

    ~Teh Panda~

    Back in hacktion
    918
    Posts
    16
    Years
    • Seen Jul 20, 2022
    Here's a screenshot of the aforementioned problem. http://i46.tinypic.com/2nq7hat.png

    Looks like a nice start. I would also wish to know how you did this

    care to share how u did that --or fixed it-- ?
    and panda....since the text and textbox are on the same pallette, plus going off the screenshot that doc gave us, i would expect to find that the text is put onto the screen relative to the textbox.

    You are right probably. I am interested more in Ruby with this so I believe Firered uses this method you state. Not sure of ruby though (Probably same xD)
     

    Logan

    [img]http://pldh.net/media/pokecons_action/403.gif
    10,417
    Posts
    15
    Years
  • I was messing around a lot in a hex editor and tile molester. But, I guess I can try to replicate it.
     

    ~Teh Panda~

    Back in hacktion
    918
    Posts
    16
    Years
    • Seen Jul 20, 2022
    I was messing around a lot in a hex editor and tile molester. But, I guess I can try to replicate it.

    Ahhh, well in Ruby they structure a lot similarly so I bet it wouldn't be much different. But did something screw up in the pallet on yours or did you just not edit it yet?
     

    interdpth

    I've seen things, man.
    275
    Posts
    19
    Years
    • Seen Jun 8, 2021
    IIRC the messagebox gets set to memory address 2001840 then throw into 0x600fb80

    I decided to eat dinner after I found that out, i'm sure further enlightment will follow
     

    ~Teh Panda~

    Back in hacktion
    918
    Posts
    16
    Years
    • Seen Jul 20, 2022
    IIRC the messagebox gets set to memory address 2001840 then throw into 0x600fb80

    I decided to eat dinner after I found that out, i'm sure further enlightment will follow

    Wow sounds cool yet I am not yet capable of making this all out hahaha. I still am learning more advanced stuff but thanks for the memory address. Ill tweak around a bit with that! Maybe I can ask Zodiac some more about this now.

    By the way is this Ruby? Or Firered and that such.
     

    davidthefat

    I Love C++
    437
    Posts
    14
    Years
    • Age 30
    • Seen Mar 3, 2012
    So Im not exactly an ASM genius (in fact IDK any ASM) but I would assume that you can make variables and plug them in like as a more traditional language. So if you find the location of the coordinates, you can potentially change it in-game via the d pad. You can create a function that takes in the input of the d pad and then replacing the old coordinates with the new one, but IDK what that would do... its pointless, a text box you can move... LOL
     

    ~Teh Panda~

    Back in hacktion
    918
    Posts
    16
    Years
    • Seen Jul 20, 2022
    So Im not exactly an ASM genius (in fact IDK any ASM) but I would assume that you can make variables and plug them in like as a more traditional language. So if you find the location of the coordinates, you can potentially change it in-game via the d pad. You can create a function that takes in the input of the d pad and then replacing the old coordinates with the new one, but IDK what that would do... its pointless, a text box you can move... LOL

    Well if this theory was possible then I assume you could implement a feature with ASM to the settings where you can place the textbox where ever you would like around the screen
     

    Shiny Quagsire

    I'm Still Alive, Elsewhere
    697
    Posts
    14
    Years
  • Tee Hee! I Figured it out on fire red, and I'll try and find it on ruby.

    The textbox data is stored at 0x020204b4. The amounts all relate to the amount of 8x8 squares. It goes in this format:

    byte: Unknown
    byte: Text X position. Textbox follows
    byte: Text Y position. Textbox follows
    byte: Text X amount. Textbox follows.
    byte: Text Y amount. Textbox becomes cut open. Never modify.
    byte: Text properties (I have yet to figure this out, but it changes font, background, ect.
    6 bytes: unknown, and havn't found any functions relating to them.

    Try opening VBA's memory viewer and fiddling with the values. Your text box will be at your command :)
     

    knizz

    192
    Posts
    16
    Years
    • Seen Oct 28, 2020
    This offset doesn't seem to work. Can you give me offsets of code associated with it?
     
    Back
    Top