The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Research & Development (https://www.pokecommunity.com/forumdisplay.php?f=195)
-   -   Research X and Y positions of textbox? (https://www.pokecommunity.com/showthread.php?t=204961)

~Teh Panda~ January 6th, 2010 5:32 PM

X and Y positions of textbox?
 
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 January 7th, 2010 6:33 AM

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.

Logan January 7th, 2010 6:35 AM

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

~Teh Panda~ January 7th, 2010 7:45 AM

Quote:

Originally Posted by Full Metal (Post 5456969)
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

Quote:

Originally Posted by The Doctor (Post 5456970)
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.

Logan January 7th, 2010 7:46 AM

Here's a screenshot of the aforementioned problem. http://i46.tinypic.com/2nq7hat.png

Full Metal January 7th, 2010 9:42 AM

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~ January 7th, 2010 3:48 PM

Quote:

Originally Posted by The Doctor (Post 5457037)
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

Quote:

Originally Posted by Full Metal (Post 5457189)
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 January 7th, 2010 3:50 PM

I was messing around a lot in a hex editor and tile molester. But, I guess I can try to replicate it.

~Teh Panda~ January 7th, 2010 3:52 PM

Quote:

Originally Posted by The Doctor (Post 5457894)
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?

Logan January 7th, 2010 4:05 PM

I hadn't edited it yet. :P

~Teh Panda~ January 7th, 2010 4:09 PM

Quote:

Originally Posted by The Doctor (Post 5457954)
I hadn't edited it yet. :P

Ooh, that splains it then :). So looks pretty cool then. I suppose you would figure out how to move the Oak over also and his lil stand :).

interdpth January 7th, 2010 4:30 PM

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~ January 7th, 2010 8:59 PM

Quote:

Originally Posted by interdpth (Post 5458039)
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 January 8th, 2010 2:42 PM

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~ January 8th, 2010 6:09 PM

Quote:

Originally Posted by davidthefat (Post 5460380)
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

Tropical Sunlight January 11th, 2010 7:59 AM

So it would be posssible to have a textbox on top of the screen?
What else will they make :)

Darthatron January 20th, 2010 7:49 PM

Is anyone working on this? If not I wouldn't mind doing so.

~Teh Panda~ January 20th, 2010 8:44 PM

Quote:

Originally Posted by Darthatron (Post 5488981)
Is anyone working on this? If not I wouldn't mind doing so.

Go for it Darcy! *But on Ruby first :3*

Shiny Quagsire November 23rd, 2010 3:07 PM

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 November 23rd, 2010 3:32 PM

This offset doesn't seem to work. Can you give me offsets of code associated with it?

Shiny Quagsire November 23rd, 2010 3:41 PM

Quote:

Originally Posted by knizz (Post 6304204)
This offset doesn't seem to work. Can you give me offsets of code associated with it?

I've found it mostly around 08003014. It's also around 08004950, but other than that, there isn't much reference to it.

looper January 15th, 2011 1:22 PM

I tried it out, it works even with german ROMs, after trying, I found out, that the Data is refreshed when refreshing the Map.

So you can easy edit it with a levelscript on each Map, to set it for all Texts.

writebytetooffset 0x2 0x020204b5

will set the box to the top

Tropical Sunlight January 16th, 2011 12:14 AM

Quote:

Originally Posted by looper (Post 6400787)
I tried it out, it works even with german ROMs, after trying, I found out, that the Data is refreshed when refreshing the Map.

So you can easy edit it with a levelscript on each Map, to set it for all Texts.

writebytetooffset 0x2 0x020204b5

will set the box to the top

And when the map is refreshed, it will come back down?
Does it work with all the textboxes? (normal, sign)

looper January 16th, 2011 1:02 AM

it works with all textboxes.

When the Map is refreshed(eg.Warp) the Position of the Textbox is normal again

Logan January 16th, 2011 4:40 AM

I was thinking we could maybe get something cool going with this. My thoughts are to maybe move the textbox into the middle of the screen and use a fadescreen for cutscenes. But that's not just it, it'd also be cool if we could find a way for the textbox to disappear and just have the text on top of the fadescreen, y'know?


All times are GMT -8. The time now is 8:58 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.