News:

11 March 2016 - Forum Rules

Main Menu

Zelda II - Adventure of Link (Italian)

Started by MattDragon, March 28, 2012, 11:19:08 AM

Previous topic - Next topic

MattDragon

Hello everybody  :D,

after your help for the translation of Zelda I, I'm here to ask again for guidance  ;)
The project is to translate the ROM in Italian but here's a problem: at 0x17CED and 0x17D81 I need to put the word "FINE" in place of "END" but, unfortunately, the number of "spaces" is limited by the ROM itself.

What's the simplest way to solve this issue?
Thanks a lot in advance!! :D


burn_654

#1
You'll have to investigate the pointers for this game - there's some great documents here for that.

Basically you will need to figure out the pointer format so you can either

a.) Increase the length of the string it reads (is there any room after 'END' ? or does it run right into other strings?) by modifying the pointer

or

b.) Use the pointer to point to some empty (usually filled with FF) space with your 'FINE' string.

or even
c.) Switch around pointers with a string that you don't need the full space of - ie, if there's a 4 character string that you -personally- replaced with a 3 character one, you could instead switch the pointers around. For example let's say BOMB and END are right beside each other. If you wanted BOMB to become BOM, you could write it in place of 'END'. And now we have enough letters from where 'BOMB' is to now say 'FINE'.

So now the strings are 'FINE' and 'BOM' - you just flip the pointers around to literally 'point' to the correct one :)

snarfblam

If I recall correctly you ran into exactly the same kind of issue with Zelda 1. The advice you were given back then should apply equally to this project.

MattDragon

Thx a lot. I know i have to do one of the thing you told me @burn_654, but i'm experiencing some issues finding the pointer table for that point... Can someone please tell me where is it? Thanks again for all, you are great!

Carnivol

Alternatively, if you have some available space in the font tileset and just want to give up on the pointer table ... you could resort to squish-tiles in your font (which might end up making things stand out a bit - in a not so good way - depending on what else is displayed on the screen at the same time, but it'd at least solve your problem)

The concept of squish-tiles, if you're in need of some explaining, is that you basically just take a few empty/unused letters in your font (3 in this case) and basically make them spell out your needed word ("FINE"), so that when they're put next to one another they'll spell that one word you dedicated them to.

MattDragon

#5
Mmm I think it'll be too complicated. If I could modify the pointer, it would be much better! Thx anyway!

March 29, 2012, 12:24:48 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

I tried really hard, but i can't find the pointer table for the menu...  :banghead: can someone please give me a hand? thx!!! :)

snarfblam

This is extraordinarily similar to what I helped you with before. See this particular post to refresh your memory.

What we have is a series of "PPU strings". In the case of the word "END", look at 0x17CEA. You'll see 21 ED 03 DE E7 DD. The format is AA BB LL (BYTES), where AABB is the PPU address data is written to, and LL is the length (number of bytes) to write to the PPU, with the actual data following. In this case, the address is 21ED, the length is 3, and the data is DE E7 DD (which are the tiles for "E", "N", and "D" respectively). The address basically says where on the screen the text or graphics will appear. If there's any part of that you don't understand, I'll be glad to go into more detail.

Now, the thing is there is a whole bunch of these "PPU strings" stuck together. The game has a pointer to the first PPU string in the group. When the game draws to the screen, it does a whole group each frame, stepping through the PPU strings one at a time until in reaches the end (it looks like the end is marked with an FF in this game). What this means is that the game doesn't have a pointer to every piece of text, which means you can't re-point just a single piece of text. You have to re-point a whole group.

Start by working your way back from the "END" PPU string, until you reach the beginning of the group. For example, just scanning through in a hex editor, I can pick out the previous PPU string: 20 66 14 F4 EB DE E0 E2 EC ED DE EB F4 F2 E8 EE EB F4 E7 DA E6 DE F4 (at 0x17CD3). Eventually you should work your way back to the beginning, where you will probably find a preceding FF that terminates the previous group.

Then work your way forward. You know where the "END" PPU string ends, so you can find the next one. And it tells you what its length is, so you know where to find the next one. Keep working through until you find the FF that terminates the group.

Now you know where the group begins and ends. Figure out what the address is of the beginning of the group, and find it in the ROM. Then, find a nice patch of FFs (there's one nearby). Copy the whole group, and update the pointer to the group. Now you can expand any text within the group without worrying about pointers anymore.

MattDragon

As always @snarfblam, you are the best. I have to thank you if i learned almost all of what i know of rom hacking. Finally yesterday trying and trying, I found out what you write above. Rewriting all the string, i'm able to write "Fine" in place of "End". But i found another problem... -_-! In that string, there are 9 "0", that are the places where the attack, magic and life level are displayed. Modifying the string, i'm going to move that bytes, but how can i modify the game (i think it's again a matter of pointers, but i tried to find them and i failed!) telling him that the value of attack of the firs slot is not in 0x17C63 but is in 0x17C65? Thx again, you're great guys!

burn_654

What snarfblam noted was that the game uses one big pointer to a block of text as opposed to a bunch of individual pointers.
The good news is that if it's just reading in the next string in sequence, theoretically it shouldn't care about how long they are.

You can't write a longer string in the current spot without screwing up the byte code of the game - it expects everything to be in a certain spot.
What you'll need to do is find enough empty space in the rom and copy the entire text block there (incorporating your changes) and point to that new block.

Just make sure that for the '21 ED 03' the 03 becomes 04 to accommodate an extra letter.

MattDragon

#9
Thx @burn_654! I solved the problem, now i'mable to write "FINE". I encountered another issue... How can i change the byte where the nimber of attack, magic and life is shown? In this case, i moved that byte (one of the zeros) from 0x17C63 to 0x17C65 because i modified the word "-LEVEL-" with "-LIVELLO-". I tried to find a pointer, but i didn't find it! 

April 06, 2012, 04:11:22 AM - (Auto Merged - Double Posts are not allowed before 7 days.)

Hi guys! It's me again! Sorry, but i really need your help. I solved the problem above, but i found another one. I opened the ROM with tlp, and i saw something strange: there are some images repeated a lot of times (like the alphabet, etc...). Why? I'm asking because i need to add the " ' ", and if i replace the "/" of the first block of repetitions, it seems all ok. Is it correct? The second problem is that if in the story text (the one in the start menu) i write "9C", i write the ",". Why it doesn't happen when i write in the spoken text? Thx a lot guys for your time and your patient!

Trax

The reason is simple: the title screen and the village settings don't use the same CHR banks. Some tiles are the same from bank to bank to keep a consistency within the game. So if you want to have new tiles in the intro, you will have to find out what CHR bank is loaded at this point, edit the tiles with the characters you want, and use the corresponding bytes in the text you want to modify...