Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → restoring the battle interface in japanese style?and other questions

#1 2013-04-12 12:49:25

95girl
Member
Registered: 2012-03-25
Post 18/82

restoring the battle interface in japanese style?and other questions

1-In japanese versions of red,green,blue,yellow pressing A on 'Fight' during battle shows attack names in a square textbox,with type of moves shown at the right of the textbox.is there a way to restore it in pokemon blue (international versions) via hexadecimal or asm hacking?
2-is there a way,via assembly or hex,to re-enable glitches related to Select button (like dokokashira,or skipping to level 100)?
3-the ending credits,with staff names etc,are they graphics or text?
4- i would like to get  translated lines about old man being drunk.
5- a way to switch positions for 'items' and 'pkmn' in battle,to resemble japanese versions.not just switching names,but options too of course.how?
6- in japanese versions,there are only 8 boxes,and they can hold 30 pokemons (20,in the localizations) each

Please explain me how to do the things above,if you know the answer(s).

If anyone wants to help me with these changes,contact me via pm.i don't have windows atm,so i can't apply the patch that makes (italian) blue version look like green
(I also would need to remove some text from it before patching)

Last edited by 95girl (2013-04-13 16:23:42)

Offline

#2 2013-04-12 15:27:14

tekcoR
Member
From: Celadon City
Registered: 2010-10-16
Post 136/165

Re: restoring the battle interface in japanese style?and other questions

1. Sure but you have to consider the character limit. A fixed version wouldn't look that good; covering most of the screen compared to the Western releases.
2. TCRF explained how it got fixed. Seems not like that much to undo.
3. Text, look around 0x74000 in the US releases.


Cya

Offline

#3 2013-04-13 07:38:47

95girl
Member
Registered: 2012-03-25
Post 19/82

Re: restoring the battle interface in japanese style?and other questions

If you know about asm,after i disassemble an italian BLUE rom,can you tell me which files contain the fight menu thing,select related glitches and data about boxes?

Last edited by 95girl (2013-04-13 07:39:25)

Offline

#4 2013-04-13 10:09:48

Tauwasser
Member
Registered: 2010-10-16
Post 379/447

Re: restoring the battle interface in japanese style?and other questions

There is no file system in Pokémon Blue, so it will be the only *.asm output file ;)

cYa,

Tauwasser

Offline

#5 2013-04-13 10:33:08

95girl
Member
Registered: 2012-03-25
Post 20/82

Re: restoring the battle interface in japanese style?and other questions

Yes,i meant that.in which asm files should i change?

Offline

#6 2013-04-13 15:16:11

FroggestSpirit
Member
Registered: 2012-03-12
Post 166/295
Website

Re: restoring the battle interface in japanese style?and other questions

Disassembling a game takes much more than you think...
Basically, it will give you one big ASM file, and from that you will have to separate everything yourself. By that point, you will know what you need to change. It's probably more so suggested to use the pokered disassembly here, or to hex edit it. If you know what youre doing, and have the time to commit to it, disassemble it yourself, but know that getting what you want from the ASM file is like... hide and seek per say.


This isn't easy to say, but…
Music and ASM hacker

Offline

#7 2013-04-13 16:02:29

95girl
Member
Registered: 2012-03-25
Post 21/82

Re: restoring the battle interface in japanese style?and other questions

I don't know how to edit the fight menu,restore SELECT glitches (reactivating select flag) or making box be 8 holding 30 pokemons each.my best bet would be repointing text in japanese versions,if i had windows.if you tell me which offsets should i change to restore things by hex in the pokemon blue rom,,my problems would be solved.

Last edited by 95girl (2013-04-13 16:03:38)

Offline

#8 2013-04-13 16:26:03

Vitharix
Member
Registered: 2011-12-29
Post 291/396

Re: restoring the battle interface in japanese style?and other questions

I don't think you quite understand how assembly or hex editing works...

Offline

#9 2013-04-13 16:33:15

95girl
Member
Registered: 2012-03-25
Post 22/82

Re: restoring the battle interface in japanese style?and other questions

I know text uses different pointers because of translation,but really i have no idea where are the things i want to change (while,if it's text,i load a tbl and search for it)

Offline

#10 2013-04-13 17:33:54

Vitharix
Member
Registered: 2011-12-29
Post 292/396

Re: restoring the battle interface in japanese style?and other questions

Most hex editors have a text search function that allows you to do that.

Offline

#11 2013-04-13 17:45:09

95girl
Member
Registered: 2012-03-25
Post 23/82

Re: restoring the battle interface in japanese style?and other questions

Yes,i already know about the text thing.but the problems are:
-making the text box of 'fight' menu look like japanese red/green
-switching position of 'pkmn' and 'items' options in battle
-reduce boxes to 8,holding up to 30 pokemons
-reactivating glitches that are caused by the select button flag

Offline

#12 2013-04-13 19:44:17

Vitharix
Member
Registered: 2011-12-29
Post 293/396

Re: restoring the battle interface in japanese style?and other questions

95girl wrote:

Yes,i already know about the text thing.but the problems are:
-making the text box of 'fight' menu look like japanese red/green
-switching position of 'pkmn' and 'items' options in battle
-reduce boxes to 8,holding up to 30 pokemons
-reactivating glitches that are caused by the select button flag

Ok, this stuff requires a lot of advanced knowledge of the inner workings of the game which I'm not familiar with. It's likely that you'd have to  rewrite the coding for these processes. And for the PC box thing, you'd have to reallocate RAM slots with the new size and number of boxes, if it can be done at all.

IIRC, there was a project that someone was undertaking that consisted of translating, or perhaps in that case localizing Japanese Blue Bersion, which might have accomplished some of the things you're trying to do here.

Offline

#13 2013-04-13 19:47:57

95girl
Member
Registered: 2012-03-25
Post 24/82

Re: restoring the battle interface in japanese style?and other questions

Using text and graphics from blue in japanese green/red is longer,but easier if i can't find help.if i knew the red jap/green jap offsets of text,i mean,what they are about (pokedex,battle,boxes,etc) i could have done it.

Offline

#14 2013-04-13 20:06:17

Vitharix
Member
Registered: 2011-12-29
Post 294/396

Re: restoring the battle interface in japanese style?and other questions

Graphics aren't anything difficult at all. Overworld graphics for tilesets are uncompressed in the ROM, and Stag has an image compressor/converter thingy that spits out the right file type for inserting into the ROM, for graphics such as Trainer sprites. But, have you opened up Red and looked for things with a hex editor?

Things like the battle interface are likely very complex and difficult to change, because things like text boxes are drawn dynamically (IIRC) using coordinates it's fed. So to add another one you'd likely have to be adding another piece of code into the battle mechanics.

Last edited by Vitharix (2013-04-13 20:09:30)

Offline

#15 2013-04-13 20:14:03

95girl
Member
Registered: 2012-03-25
Post 25/82

Re: restoring the battle interface in japanese style?and other questions

I did,long ago.at the moment i don't have windows,i hope a online hex editor does exist.i googled everywhere but there aren't any documents about the offsets of pokemon green.also,a text dumper and reinserter would have been great.if you could patch green with gbatemp's english patch,and divide your findings in 'categories' i would later text and reponnt things on my own using italian text.issues,however,are:
-needing to use firered's text for 'after-trade' speechs
-needing some lines translated (all the ones about drunk guy i mean)
-inserting à è È ù ò ì and other foreign characters in the rom
-repointing firered text entries
-change all the 'blu' words to 'green'

The last 2 points are easy,the first 3 not really.

EDIT; i don't need to add another one,i need to EDIT it.try a japanese rom,press 'fight' in battle,and see the different layout.understood? ;)

Last edited by 95girl (2013-04-13 20:15:31)

Offline

#16 2013-04-15 03:12:06

comet
Member
Registered: 2012-04-09
Post 210/672

Re: restoring the battle interface in japanese style?and other questions

Vitharix wrote:

Ok, this stuff requires a lot of advanced knowledge of the inner workings of the game which I'm not familiar with.

Vitharix wrote:

It's likely that you'd have to  rewrite the coding for these processes.

Vitharix wrote:

And for the PC box thing, you'd have to reallocate RAM slots with the new size and number of boxes, if it can be done at all.

Vitharix wrote:

Things like the battle interface are likely very complex and difficult to change

please stop posting things like this especially considering they are not true

you keep trying to discourage people from hacking

i guess because you are not sure how to do something yourself it means it must be impossible????

Offline

#17 2013-04-15 04:03:26

Vitharix
Member
Registered: 2011-12-29
Post 303/396

Re: restoring the battle interface in japanese style?and other questions

I'm not trying to discourage anyone from anything. Since no one replied to this topic I figured I would take a crack at it. Although now I am curious, how would this be accomplished?



If I am coming across as discouraging, 95girl, or anyone else for that matter, my apologies. It's not my intention nor place to do that

Last edited by Vitharix (2013-04-15 04:03:46)

Offline

#18 2013-04-15 12:47:33

95girl
Member
Registered: 2012-03-25
Post 26/82

Re: restoring the battle interface in japanese style?and other questions

I saw you are curious,vitharix :) in topic 160 i found out there's a command that draws a box.it's in hex,it starts with 04,indicates the pointer,then x and y coordinates.now i have better basis to start with,can you find that 04 etc looking in the hex of pokemon green,please?also,since you were curious,try to read that topic too where it says about 04 command,so perhaps you could explain better

Last edited by 95girl (2013-04-15 12:49:43)

Offline

#19 2013-04-15 12:57:13

Tauwasser
Member
Registered: 2010-10-16
Post 381/447

Re: restoring the battle interface in japanese style?and other questions

Why don't you search for it? Why do you expect everybody else to do work for you?

cYa,

Tauwasser

Offline

#20 2013-04-15 16:12:46

95girl
Member
Registered: 2012-03-25
Post 27/82

Re: restoring the battle interface in japanese style?and other questions

Because i can't.i am on a mac which isn't mine,if you tell me there's an online hex editor i will search what i need.

Offline

#21 2013-04-15 21:23:43

comet
Member
Registered: 2012-04-09
Post 211/672

Re: restoring the battle interface in japanese style?and other questions

Battles use BG Map 1 at 0x9C00 to display graphics.

0Ot5bPN.png

The BG Map is only editable during vblank, so we need some kind of buffer as a middleman to place new tiles onto. Then we can update the BG Map with the buffer at our leisure.

Red has a 20x18 buffer at 0xC3A0:

uy3yMSM.png

Notice that the BG Map has an extra twelve 7Fs (spaces) for each twenty in the buffer, since the BG Map is 32x32. The buffer skips over these tiles since they're never used. There's also a backup buffer at 0xC508, but we don't need to worry about it for now.



So what happens when we draw the attack menu?

eRH5kGu.png

We can see the attack list and pp box drawn over the old menu. Let's break it down into a grid:

FydXhpj.png

The pp box is drawn at (0,8). The border isn't included in the dimensions, so only the highlighted area counts. It's 9x3. The attack list is drawn at (4,12). It's 14x4.

The pp box's border overlaps the attack list's border. This means the attack list is drawn first. We should look for it before the pp box.



How do we look for it? Where in the tilemap buffer is the attack list (4,12)?

Each row in the tilemap buffer is 20 tiles long, so each step downward is really 20 steps forward. 12 tiles down is 12*20 (240) tiles into the map. To move 4 tiles to the right, we just add 4. So we're 244 (0xF4) tiles in. Adding to 0xC3A0, we want to look for writes to 0xC494. The pp box at (0,8) is 8*20 -> 160 (0xA0) tiles in, so writes there would be to 0xC440.

n4zjn62.png



Ok, we know where it is. How does that help us?

We can set an access breakpoint on writes to our address in bgb.

rdX2ZCV.png



Select FIGHT. Execution should break at 0x00B6.

5zkwBxR.png

Look over at the stack in the bottom right. The highlighted value is the address that called the subroutine we're in. Press Ctrl+G and goto 3734.

1AXcSBm.png

This isn't doing anything specific to 0xC494. It's not what we're looking for. Click on the screen to keep going until the next break.



C5YQ6xk.png

This is more promising. Tile 0x79 is the top-left corner of the border.

ynuNMzG.png

It's safe to say that 0x1922 is the routine that draws a text box.



2yeMGEP.png

Let's check out the stack. The push hl command in the routine made the highlighted value 0xC494. The caller is the next one up, 0x525E.

zYv7okL.png

hl is our starting point, b is the height of the box and c is the width.



Playing around with the boxes is a good first step, but it doesn't change the position of any of the text (and a couple garbage tiles need to be removed). Those things are done around the same place the boxes are drawn.

QdKBliX.png

After moving text around and fixing the menu selection:

VAfPZxB.png

I recommend checking out the Red disassembly for reference.

Last edited by comet (2013-04-16 00:29:31)

Offline

#22 2013-04-16 09:43:57

95girl
Member
Registered: 2012-03-25
Post 29/82

Re: restoring the battle interface in japanese style?and other questions

It is nice,but i didn't understand if this can be saved or not.you said it's only editable during vblank.also,how do i fix the position for text?

Offline

#23 2013-04-16 15:05:25

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 2,429/3,456

Re: restoring the battle interface in japanese style?and other questions

I might be wrong, but isn't that text for the type going to display improperly with something like Flying type (or anything longer than Water type)?

Offline

#24 2013-04-16 18:30:49

95girl
Member
Registered: 2012-03-25
Post 30/82

Re: restoring the battle interface in japanese style?and other questions

Mateo wrote:

I might be wrong, but isn't that text for the type going to display improperly with something like Flying type (or anything longer than Water type)?

Uh oh...right.

Offline

#25 2013-04-16 21:32:53

comet
Member
Registered: 2012-04-09
Post 212/672

Re: restoring the battle interface in japanese style?and other questions

Mateo wrote:

I might be wrong, but isn't that text for the type going to display improperly with something like Flying type (or anything longer than Water type)?

Yes, you'd make it read from a custom list of shortened type names.

95girl wrote:

It is nice,but i didn't understand if this can be saved or not.you said it's only editable during vblank.

I was talking about the screen display in the game boy hardware, which can be damaged if you try to update it at the wrong time while the game is running. The output itself doesn't exist in the rom. What we're changing is the stuff in the rom that says where things go. It's very much saveable.

Also instead of using bgb (since you are on a mac) you can edit the addresses in a hex editor with the same results.

Last edited by comet (2013-04-16 21:35:24)

Offline

  • Index
  • → Help/Question
  • → restoring the battle interface in japanese style?and other questions

Board footer

Powered by FluxBB