Please help with Zelda 1 & 2 ROM hacking

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Mattiac
Posts: 20
Joined: Sun Jun 16, 2019 7:00 am

Please help with Zelda 1 & 2 ROM hacking

Post by Mattiac » Sun Jun 16, 2019 7:08 am

Hi there!

I've translated Zelda 1 & 2 for NES to my native language Swedish,
but I wish to do it again, but now use the PAL versions as a base.
I extracted the PAL versions from the PAL versions of the WAD:s
for Wii. I'm gonna use Mato-san's guide to improve the translation
of Zelda 1.

This is what I humbly wish for help with:


Zelda 1

Add a fifth row row of letters when you register your name
and add Swedish characters (ÅÄÖ). There's a fifth row in
the Japanese version so it should be possible to transfer
to the PAL version.


Zelda 2

Add the three Swedish characters Å, Ä and Ö when you
register your name.

Change the size of the text windows (aka. letterbox?) so
that more text can fit if it's possible?


I wish to make a certain patch with the changes in English
in case some other person wish to translate the PAL version
to her/his native language.

I've taken a beginners course in Ada, but I thought it was
hard to understand and I know that Assembler is even
harder.

I might even try to translate Zelda 1 and 2 for GBA afterwards
if it's not too difficult.

Thank you for reading!

Have a nice day!

Pokun
Posts: 1273
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Please help with Zelda 1 & 2 ROM hacking

Post by Pokun » Sun Jun 16, 2019 12:39 pm

It's an English to Swedish translation? (I'm Swedish too BTW.)

Ada is quite a difficult and large language I heard, used where reliability and maintenance is very important. Assembly isn't really hard to understand, it's actually very simple as it's mostly about copying data or doing arithmetic on it, but it requires understanding how the hardware works before anything useful can be done with it, which is what takes time.

User avatar
koitsu
Posts: 4216
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Please help with Zelda 1 & 2 ROM hacking

Post by koitsu » Sun Jun 16, 2019 3:22 pm


Mattiac
Posts: 20
Joined: Sun Jun 16, 2019 7:00 am

Re: Please help with Zelda 1 & 2 ROM hacking

Post by Mattiac » Sun Jun 16, 2019 3:52 pm

Yes, English to Swedish.

Ada is used in the aviation industry because it's reliable.
I wish I knew assembly.
Pokun wrote:It's an English to Swedish translation? (I'm Swedish too BTW.)

Ada is quite a difficult and large language I heard, used where reliability and maintenance is very important. Assembly isn't really hard to understand, it's actually very simple as it's mostly about copying data or doing arithmetic on it, but it requires understanding how the hardware works before anything useful can be done with it, which is what takes time.

Pokun
Posts: 1273
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Please help with Zelda 1 & 2 ROM hacking

Post by Pokun » Mon Jun 17, 2019 3:53 pm

This whole forum is about using assembly to produce new NES games from scratch. If you really wish to learn this art, there are several options. I learned it in my free time as a hobby, coming from a non-programmer background with only the will to learn.

unregistered
Posts: 1038
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Please help with Zelda 1 & 2 ROM hacking

Post by unregistered » Thu Jun 20, 2019 2:59 pm

Pokun wrote:, but it requires understanding how the hardware works before anything useful can be done with it, which is what takes time.
Mattiac wrote:I wish I knew assembly.
My really quick summary of most of the hardware. Though, DocWaluigean never posted again so maybe it was too much condensed info? I attempted to make these replys be correct. Hope this helps start your assembly journey. :) (attempt to ignore my edits at the bottom)

xamboni
Posts: 34
Joined: Sat Apr 27, 2019 11:56 am

Re: Please help with Zelda 1 & 2 ROM hacking

Post by xamboni » Fri Jun 21, 2019 8:02 pm

I will take a shot at looking into the Japanese version vs the PAL version of Zelda 1. I am no expert when it comes to 6502 assembly but maybe something will stick out.

xamboni
Posts: 34
Joined: Sat Apr 27, 2019 11:56 am

Re: Please help with Zelda 1 & 2 ROM hacking

Post by xamboni » Sun Jun 23, 2019 10:55 pm

I took a quick look at the two games today and you are very right in that this seems doable. As a proof of concept I re-purposed an existing letter, '!', within the European menu to represent the Swedish A you listed.

If you would like to re-create this POC yourself:
  • 1. Create a copy of the European version.
    For sanity the SHA-1 of the European version begins with 0B27FEA...
    2. Open up the copy of the European version in a hex editor.
    For this session I used BeyondCompare and selected "Session->New Session->Hex Compare.
    From there open up your original in the left screen and the copy you will modify in the right.
    3. Change memory location 0x8a1f-0x8a27 from hex "1818181818001800" to hex "44386CC6C6FEC6C6".
    NOTE: If the sha1 is different or you are unsure if we have the same game then search for hex "1818181818001800" because it may not be at 0x8a1f.
    4. Reboot the game in an emulator and see if the exclamation tile changed in the register menu.
Memory-wise there are plenty of blank tiles following the standard alphabet where you are free to insert your Swedish letters. One thing to keep in mind is the standard letters are already almost maxing out the height of a tile. While adding new tiles is simple we might need to change some game code to get it to use two tiles to represent a letter.

Pokun
Posts: 1273
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Please help with Zelda 1 & 2 ROM hacking

Post by Pokun » Mon Jun 24, 2019 2:14 am

While the extra Swedish letters are considered separate letters, they are technically no different from letters with diacritics. To avoid needing an extra tile row, you have to squish an "A" and an "O" a bit to get room for the dots on "Ä" and "Ö". For the ring on the "Å" you can get away with a slightly larger dot, Swedish people will understand it as an "Å" in text anyway.

Image
Example 8x8 font

Mattiac
Posts: 20
Joined: Sun Jun 16, 2019 7:00 am

Re: Please help with Zelda 1 & 2 ROM hacking

Post by Mattiac » Mon Jun 24, 2019 3:08 am

To edit the graphics is the very easy part except in Zelda 2 because there's no free tiles in the Zelda 2 CHR.
I need the extra row so it would look like an official translation.
Pokun wrote:While the extra Swedish letters are considered separate letters, they are technically no different from letters with diacritics. To avoid needing an extra tile row, you have to squish an "A" and an "O" a bit to get room for the dots on "Ä" and "Ö". For the ring on the "Å" you can get away with a slightly larger dot, Swedish people will understand it as an "Å" in text anyway.

Image
Example 8x8 font

xamboni
Posts: 34
Joined: Sat Apr 27, 2019 11:56 am

Re: Please help with Zelda 1 & 2 ROM hacking

Post by xamboni » Mon Jun 24, 2019 8:22 am

To edit the graphics is the very easy part except in Zelda 2 because there's no free tiles in the Zelda 2 CHR.
I need the extra row so it would look like an official translation.
Ah I didn't realized this was already identified as an easier part. I will look for the cursor logic next. Just putting them side by side it seems like the cursor has a wrap around max that we need to modify somewhere.

Mattiac
Posts: 20
Joined: Sun Jun 16, 2019 7:00 am

Re: Please help with Zelda 1 & 2 ROM hacking

Post by Mattiac » Mon Jun 24, 2019 9:08 am

It's easy in Zelda 1, but very hard in Zelda 2. I also found the
table in Zelda 2, but I couldn't add another letter. It was a
few characters after 0. I got lots of letters and numbers
on the screen when I tried to overwrite them. I guess
I have to replace three English characters or find a
place for the graphics first and then try to create a
new table somewhere else and point to it instead.
xamboni wrote:
To edit the graphics is the very easy part except in Zelda 2 because there's no free tiles in the Zelda 2 CHR.
I need the extra row so it would look like an official translation.
Ah I didn't realized this was already identified as an easier part. I will look for the cursor logic next. Just putting them side by side it seems like the cursor has a wrap around max that we need to modify somewhere.

xamboni
Posts: 34
Joined: Sat Apr 27, 2019 11:56 am

Re: Please help with Zelda 1 & 2 ROM hacking

Post by xamboni » Thu Jun 27, 2019 11:30 pm

Alright so I found the horizontal cursor reset comparison. If you think moving everything one tile over and then having an extra column will suit your needs in Zelda 1 let me know. I will keep hunting for the vertical reset. For some reason it is not as apparent.

I dont have my notes in front of me but if looking for the horizontal reset in the European game search for CMP $E0.

Mattiac
Posts: 20
Joined: Sun Jun 16, 2019 7:00 am

Re: Please help with Zelda 1 & 2 ROM hacking

Post by Mattiac » Fri Jun 28, 2019 3:28 am

Oh, thank you! It sounds like progress. I do want a fifth row
after 0-9 and that's where I wish to put the Swedish
characters.
xamboni wrote:Alright so I found the horizontal cursor reset comparison. If you think moving everything one tile over and then having an extra column will suit your needs in Zelda 1 let me know. I will keep hunting for the vertical reset. For some reason it is not as apparent.

I dont have my notes in front of me but if looking for the horizontal reset in the European game search for CMP $E0.

xamboni
Posts: 34
Joined: Sat Apr 27, 2019 11:56 am

Re: Please help with Zelda 1 & 2 ROM hacking

Post by xamboni » Fri Jun 28, 2019 4:48 pm

Oh, thank you! It sounds like progress. I do want a fifth row
after 0-9 and that's where I wish to put the Swedish
characters.
Right I get you on that I will give it another go. Worst case though we change the box to be wider left and right by one column. Then we can move the A letter left and shift the rest of the letters back one space like a snake. You would then have 5 extra spaces for new letters to be used.

I plan on finding the vertical wrap though so probably a moot point. I should probably test the horizontal addition and see if it correctly takes what is in the new row and puts it in for the name.

Post Reply