Romhacking.net

Romhacking => Personal Projects => Topic started by: werewolfslayr925 on April 09, 2018, 12:38:48 PM

Title: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on April 09, 2018, 12:38:48 PM
Special thanks to Psyklax for providing the tools and holding my hand through this whole project.

I am working on translating Dragon Warrior for the NES from English to Spanish. I realized that it's the only one of the NES DW games that has not been translated into Spanish (which is odd considering the relative easiness of translating it from what I can tell). This is my first official hacking project.

Here's my initial draft (https://docs.google.com/document/d/1e7xtH8ubnuP1dqwXcDA9aAjKw2CXkIKbBmhIZuAdnsU/edit?usp=sharing) (Again, thanks to Psyklax for the English text dump).

Here's a log where, among other things, I go over some of the translation decisions. (https://docs.google.com/document/d/12uc23hLsjDEB_Nabc8DRAcH2aYLWe06H8hvgctec5qM/edit?usp=sharing)

Stuff left to do:
- Have others review my draft for grammar, word choice, etc.
- Translate items, weapons, etc.
- Translate monster names (especially the wyverns and the Dragonlord)
- Run the DTE script (thanks, Psyklax)
- Insert the text into the ROM

Any comments, questions, concerns, criticisms, and suggestions are welcome :3
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on April 09, 2018, 03:20:37 PM
You're too kind. :) I wouldn't say I was holding your hand... :D

So regarding the DTE thing, you don't "run" anything. Basically you need to have a table inside the ROM with the most common two-letter pairs, and when the game is running, it will go to a routine that checks if you're using a dual-tile character, checks the table, and prints the correct characters. Ultimately it's KingMike who needs thanking, because without his excellent tutorial on a DTE routine, I wouldn't have a clue. :D

So the first step is to take your script, remove anything extraneous - so, just the words, nothing more - and use DTEOpt (again, thanks KingMike ;) ) to determine the most common letter combos. Then you put those combos into the table in the ROM, and insert your properly-formatted script using Pointer Tables (a program in the RHDN database), as it will use a table file that includes the letter pairs, and will translate it accordingly.

Come to think of it, maybe I should do it myself. :D Unless you'd like to learn, of course. Truth be told, this was a while back (half a year ago, in fact) so I might have to look again at DW to familiarise myself with my routine and the text format. As I remember, though, DW has a wonderful text routine that makes putting in a new script very easy indeed, so it probably won't be an issue.

If you need help with anything, let me know. Perhaps I can show you how to use DTEOpt and Pointer Tables, if you like.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on April 10, 2018, 10:42:53 AM
You sell yourself short, Psyklax :3 You've helped me more than anyone else, and you continue to help me with your instructions.

QuoteSo the first step is to take your script, remove anything extraneous - so, just the words, nothing more - and use DTEOpt (again, thanks KingMike ;) ) to determine the most common letter combos.

This shouldn't be beyond my ken. I think I can handle this. (And, yes! Thank you KingMike! You rock!)

QuoteThen you put those combos into the table in the ROM

I may need your further help/instruction on this one. How do I put a table of letter combos into a ROM? I thought that each hexadecimal byte was specifically for one letter. (Sorry if I sound stupid...)

Quoteinsert your properly-formatted script using Pointer Tables (a program in the RHDN database), as it will use a table file that includes the letter pairs, and will translate it accordingly.

We'll cross this bridge once we get to it, but I may be able to handle this as well. We'll see though.

As of right now, I'm having at least one person comb over my translation of the script for any errors/wonky word choices. I may ask another person to review it as well. It may take a few days to get a final draft of the translation, so this project may not be complete and ready for publication on the site for another few weeks. (Am I being too formal about this?)

QuoteCome to think of it, maybe I should do it myself. :D Unless you'd like to learn, of course.

I appreciate the enthusiasm, but, yeah, I would like to do as much of this as possible, even if that means you holding my hand through it  :P

Oh! And, I think I mentioned this on another post (http://www.romhacking.net/forum/index.php?topic=26108.20) in this section of the forums: lastdual is working on a version of DW 1-3 that redraws all of the sprites (and possibly a remix of the OSTs). Would it be possible to incorporate my spanish translation into his project as well, or would that require more room than the ROM allows as it is? (As far as permission goes, he says it's fine.)
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on April 12, 2018, 10:07:17 PM
Before you go too far down the DTE path, it might be worth checking to see whether your script is small enough to fit into the existing space uncompressed. If it does, great. If not, then it's time to use DTEOpt to figure out your best choices for DTE entries, add them to your table file (or I can recommend ScriptCrunch (http://www.romhacking.net/utilities/405/), which will also generate the resulting table file for you and tell you how much space the DTE will save you), add them to some free space in the ROM, hack the text engine to use them, and then insert your script.

Quote from: werewolfslayr925 on April 10, 2018, 10:42:53 AM
I may need your further help/instruction on this one. How do I put a table of letter combos into a ROM? I thought that each hexadecimal byte was specifically for one letter. (Sorry if I sound stupid...)
With 1 byte = 1 letter encodings, generally the game's code just reads one byte and writes it directly to the PPU's tilemap, so your 00=0 table file entry means that the game reads a $00 byte and writes $00 to the PPU; tile ID $00 just happens to be the graphic for the number 0. DTE is a 1 byte = 2 letter encoding; that means the game's code reads one byte and writes two bytes to the PPU's tilemap, so e.g. a table file entry like 80=ng means that the game reads a $80 byte and writes both $17 and $10 to the PPU. In order for that to happen, the game needs to have a little lookup table and some extra code that knows when and how to read that lookup table.

Quote from: werewolfslayr925 on April 10, 2018, 10:42:53 AM
As of right now, I'm having at least one person comb over my translation of the script for any errors/wonky word choices. I may ask another person to review it as well. It may take a few days to get a final draft of the translation, so this project may not be complete and ready for publication on the site for another few weeks. (Am I being too formal about this?)
Even without having the final polished script ready, performing a practice run of your insertion procedure is not a bad idea. You're going to have to do it at some point anyway, after all - might as well start working the kinks out early!

Quote from: werewolfslayr925 on April 10, 2018, 10:42:53 AM
Oh! And, I think I mentioned this on another post (http://www.romhacking.net/forum/index.php?topic=26108.20) in this section of the forums: lastdual is working on a version of DW 1-3 that redraws all of the sprites (and possibly a remix of the OSTs). Would it be possible to incorporate my spanish translation into his project as well, or would that require more room than the ROM allows as it is? (As far as permission goes, he says it's fine.)
I'm just guessing here, but probably a patch that redraws sprites and/or remixes OSTs wouldn't need to use any of the extra space you'll use for implementing DTE, so they shouldn't have any conflicts and ought to be able to be used together safely.

Edit: forgot the quote tags :p
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on April 13, 2018, 06:05:14 AM
Quote from: abw on April 12, 2018, 10:07:17 PM
Before you go too far down the DTE path, it might be worth checking to see whether your script is small enough to fit into the existing space uncompressed.

I already had a working DTE system before werewolfslayr925 started working on this, so don't worry, it makes sense to use it. ;) I imagine Spanish can be even lengthier than English, so using DTE ensures he needn't worry about space concerns.

When I get a chance, I'll look again at my modified ROM to refresh my memory. Regarding your question about the letter combos, abw answered it pretty well, but basically you have a table with all the common combinations in a row. So if "la" is a common pairing, you have the two bytes for "la" written there. Then when the game sees a byte in a particular range, it uses that table to see where to get the two letters.

I'm simplifying of course, but if you're really curious you can read the same doc by KingMike that taught me how to do it.

I have an idea: paste the text for the King's introduction in Spanish, along with which letters I'll need to replace with Spanish diacritics, and I'll put it in the game and show you how I did it. Then you can try with the rest of the game. :)
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on April 13, 2018, 07:35:58 AM
Quote from: Psyklax on April 13, 2018, 06:05:14 AM
I already had a working DTE system before werewolfslayr925 started working on this, so don't worry, it makes sense to use it. ;) I imagine Spanish can be even lengthier than English, so using DTE ensures he needn't worry about space concerns.
Yup! :thumbsup: I'm just not sure whether werewolfslayr925 has actually added your DTE yet. Once you're able to insert text at all, finding out whether you need to compress your text or not should only take a minute, so if you don't need to, why bother?
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on April 16, 2018, 10:29:58 AM
Quote from: abw on April 12, 2018, 10:07:17 PM
Before you go too far down the DTE path, it might be worth checking to see whether your script is small enough to fit into the existing space uncompressed.

As the translation is right now, it's about 121 characters shorter than the English version. I'm still waiting to hear back from my editor, though, so we'll see how that goes.

Quote from: abw on April 12, 2018, 10:07:17 PM
With 1 byte = 1 letter encodings, generally the game's code just reads one byte and writes it directly to the PPU's tilemap, so your 00=0 table file entry means that the game reads a $00 byte and writes $00 to the PPU; tile ID $00 just happens to be the graphic for the number 0. DTE is a 1 byte = 2 letter encoding; that means the game's code reads one byte and writes two bytes to the PPU's tilemap, so e.g. a table file entry like 80=ng means that the game reads a $80 byte and writes both $17 and $10 to the PPU. In order for that to happen, the game needs to have a little lookup table and some extra code that knows when and how to read that lookup table.

This is really cool, and your explanation clarifies how it works. That said,

Quote from: Psyklax on April 13, 2018, 06:05:14 AM
I'm simplifying of course, but if you're really curious you can read the same doc by KingMike that taught me how to do it.

Where can I find this? I'd like to know more about inserting the table.


Quote from: Psyklax on April 13, 2018, 06:05:14 AM
I have an idea: paste the text for the King's introduction in Spanish, along with which letters I'll need to replace with Spanish diacritics, and I'll put it in the game and show you how I did it. Then you can try with the rest of the game. :)

Does this work?
%{Descendiente de Loto, escuchame.}@&{Se dice que en épocas pasadas, Loto combatió a los demonios con un Orbe de Luz.}@&{Un día, el Rey Dragón vino y él robó el orbe precioso y lo escondió en las sombras.}@&{Ahora, [ME], necesitas recoger el Orbe de Luz y reimponer la paz en esto mundo.}@&{El Rey Dragón debe ser derrotado.}@&{Coge lo que sea que encuentres en estos cofres del tesoro para ayudarte en tu viaje.}@&{Despues, habla con los guardias de me castillo, por que tienen conocimiento que puede ayudarte.}@&{Que la luz brille sobre ti, [ME].}%@

And this should be my table for which letters to change: https://drive.google.com/open?id=1D8oEThIonAhkGCDHmcl9kqyKXVc7NZSw

Swap out the following:
k for á
w for é
W for í
X for ó
Z for ú

I think you'll only need é, í, and ó, though.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on April 16, 2018, 05:04:59 PM
(http://s346165667.websitehome.co.uk/psyktrans/dwSP.png)

Well, that's easy. :) I'll quickly explain what I did.

You may remember the text dump file I gave you, so all I did was remove everything except this line and paste your text in place of what was there. I had to replace the other bits of dialogue at $8032 with (.) because the letters missing from your table file meant it wouldn't work. Then I used Pointer Tables to insert it into the ROM: just selected the text file, the table and the ROM, and clicked Go.

In case you don't have Pointer Tables:
https://www.romhacking.net/utilities/502/ (https://www.romhacking.net/utilities/502/)
People use other utilities but I like this. It supports DTE, and it's very flexible so it'll work with any game, pretty much. Only downside is you have to edit your own pointers.

So I finally had to edit the font in the ROM to replace those five letters with á é í ó u, but you'll see that it's not very good: there's just one pixel above the text, so I just added a few pixels on that row, and the effect isn't great. I don't know what people usually do to put accents on an 8x8 font.

So if we wanted to use DTE (if it's necessary), it's easy. We do as I said before: finished script through DTEOpt, stick what comes out into the ROM's DTE table, put them in the table file, insert with Pointer Tables. Easy peasy.

If you need any help, let me know. ;)

FYI: King Mike's DTE doc:
https://www.romhacking.net/documents/384/ (https://www.romhacking.net/documents/384/)
I think I spotted a few little errors which can make it difficult to understand, but eventually you'll get the idea.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on April 16, 2018, 05:28:39 PM
Quote from: Psyklax on April 16, 2018, 05:04:59 PM

Well, that's easy. :) I'll quickly explain what I did.

You may remember the text dump file I gave you, so all I did was remove everything except this line and paste your text in place of what was there. I had to replace the other bits of dialogue at $8032 with (.) because the letters missing from your table file meant it wouldn't work. Then I used Pointer Tables to insert it into the ROM: just selected the text file, the table and the ROM, and clicked Go.

In case you don't have Pointer Tables:
https://www.romhacking.net/utilities/502/ (https://www.romhacking.net/utilities/502/)
People use other utilities but I like this. It supports DTE, and it's very flexible so it'll work with any game, pretty much. Only downside is you have to edit your own pointers.

This sounds fantastic and easy to do! Thank you, Psyklax! I'll test it out when I hear back from my editor.

Quote from: Psyklax on April 16, 2018, 05:04:59 PM
So I finally had to edit the font in the ROM to replace those five letters with á é í ó u, but you'll see that it's not very good: there's just one pixel above the text, so I just added a few pixels on that row, and the effect isn't great. I don't know what people usually do to put accents on an 8x8 font.

This isn't a problem at all. I already edited the letters in the ROM file using YY-CHR around the time I began the project. I believe I still have a version of the ROM with my editions, so that's already done :3

Quote from: Psyklax on April 16, 2018, 05:04:59 PM
So if we wanted to use DTE (if it's necessary)

Question about this: if the number of characters in my Spanish translation are fewer than the number of characters in the English translation, is the DTE/compression necessary? Should I do it anyway just in case someone wants to do something with the ROM that requires conserving space (e.g. a collaboration that involves remixing the game in any way)?

Quote from: Psyklax on April 16, 2018, 05:04:59 PM
If you need any help, let me know. ;)

You'll be the first to know! Thank you so much for all of your help, Psyklax  ;D
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on April 17, 2018, 06:44:28 PM
Quote from: werewolfslayr925 on April 16, 2018, 05:28:39 PM
Quote from: Psyklax on April 16, 2018, 05:04:59 PM
So if we wanted to use DTE (if it's necessary)
Question about this: if the number of characters in my Spanish translation are fewer than the number of characters in the English translation, is the DTE/compression necessary? Should I do it anyway just in case someone wants to do something with the ROM that requires conserving space (e.g. a collaboration that involves remixing the game in any way)?
If your new text is already shorter than the old text, then adding compression is not strictly necessary.

As for whether you should do it anyway... let's make a pro/con list!

Pro:
Con:

Unless somebody else can come up with anything else to add, this list seems fairly balanced to me. In my opinion, for a patch you're going to distribute to other people, Con #2 seems like the most relevant point, so my advice would be to try getting the DTE to work for your own benefit (it's kind of cool, right?), but leave it out of the final patch. Really, though, either way is okay and the final decision is totally up to you. :beer:


* Edit: I actually tried my hand at optimizing that DTE code, and was able to bring it from 73 bytes down to 48 bytes, leaving enough free space for a total of 132 DTE entries, which is enough to compress Dragon Warrior's main script by just over 40%!
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on April 18, 2018, 02:56:34 AM
Quote from: abw on April 17, 2018, 06:44:28 PM
The extra DTE code and lookup table take up extra space; wherever you end up placing them, they run the risk of generating incompatibilities with other patches that use that same space.

You're right: this is the most important point. There's a section in DW that's empty and perfectly placed for a DTE table, but if another hacker decided to use that space, you're screwed. In this case, you could just keep your text shorter than the English one and not use DTE. It's funny because I'm not used to translating from English, obviously. :D Going from Japanese usually means DTE is either useful or even essential, but if you're going from an English base, it's probably not necessary. I just assumed Spanish would be more wordy than English, but I may be wrong about that - and besides, more concise translations would solve the problem.

That said, learning how to make DTE work in a ROM is a good learning experience, but one which is more useful for Japanese games. Translating from English to Spanish is WAY easier. :)

Also, regarding your point: I was making patches to double experience and gold in several RPGs. I did a patch for Phantasy Star on Master System and found a nice dozen bytes or so that were unused, but there's an awesome retranslation patch that uses that exact space for whatever, so I couldn't do it. :(
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 04, 2018, 06:05:47 PM
Okay, so I tried using Pointer Tables, but it gave me an error when I tried to combine everything to insert the script:

Error
User Custom PT must be filled in!


I didn't touch anything at the top of the text dump file (that I know of...). Here's what I've got at the top of that file:

Table Start:    8012
Table End:    8037
Text Start:    8038
Text End:    BCBF
XOffset:    10

Table Type:    0
Text Type:    0
Custom PT:    T0 T1

PT Line Command:       
-----------------


And in case anyone needs to see it, here's the .tbl:

00=0
01=1
02=2
03=3
04=4
05=5
06=6
07=7
08=8
09=9
0A=a
0B=b
0C=c
0D=d
0E=e
0F=f
10=g
11=h
12=i
13=j
14=á
15=l
16=m
17=n
18=o
19=p
1A=q
1B=r
1C=s
1D=t
1E=u
1F=v
20=é
21=x
22=y
23=z
24=A
25=B
26=C
27=D
28=E
29=F
2A=G
2B=H
2C=I
2D=J
2E=K
2F=L
30=M
31=N
32=O
33=P
34=Q
35=R
36=S
37=T
38=U
39=V
3A=í
3B=ó
3C=Y
3D=ú
3E="
3F=""
40=}
41=*
44=:
45=_
47=.
48=,
49=-
4B=?
4C=!
4D=;
4E=)
4F=ñ
50={
52=.}
53='
54=`
57=[57]
5F=
60=[60]
F0=[PNT]
F1= [NME]
F3=[XP]
F4=[NME]
F5=[NUM]
F6=[SPL]
F7=[INV]
F8=[ME]
FB=@
FC=%
FD=&
FF=[ITM]


What am I doing wrong? Does it have to do with what Psyklax said:

QuoteOnly downside is you have to edit your own pointers.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on May 04, 2018, 06:50:53 PM
Regarding your issues with Pointer Tables, I don't know what could be causing that "User Custom PT" problem. If you successfully dumped the text with the program, then just replacing the text with your own, without messing with the bit above the line, should be okay.

Make sure you're editing the file in a plain text editor like Notepad or TextPad, in case the tabbing above the line gets screwed up somehow. Other than that, it's a mystery to me.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 04, 2018, 09:08:12 PM
Quote from: Psyklax on May 04, 2018, 06:50:53 PM
Regarding your issues with Pointer Tables, I don't know what could be causing that "User Custom PT" problem. If you successfully dumped the text with the program, then just replacing the text with your own, without messing with the bit above the line, should be okay.

Make sure you're editing the file in a plain text editor like Notepad or TextPad, in case the tabbing above the line gets screwed up somehow. Other than that, it's a mystery to me.

Okay, I went over the translation .txt file again and made sure all the formatting was fine. However, I'm getting a different error now:

Text Starts at x8038 and ends at xBCBF (15496 bytes)


Error
Failed to convert the text using the table!
Starting at '�.%[60]&Estas muerto.%{Eres fuerte!&�Por que no puedes derrotar el Rey Drag�n?}@%{Si quieres descansar, habla con el Rey Rar�s.}%[ME] presenta la Gota del Arcoiris al cielo.&[60]@%Pero un arcoiris no apareci�.%{Buenos d�as.&�Dormiste bien?}@%{Hasta luego.}%{Buenos d�as.&�Dormiste bien?}@%{Buenas noches.}&%{Bueno.&Adi�s, viajero.}%{Bienvenidos a mi posada.&Un cuarto es [NUM] OROS por noche.&Quieres descansar?}&%{Bendiciones.}%{No hay escaleras aqu�.}%{No puedes entrar aqu�.}%{Pero hay nadie.}%'!


Does Pointer Tables not recognize foreign/accented letters?

Edit: OKAY! I figured out that the encoding had to be the same across both the tbl file and the script. I got the script inserted again, but now, I've got a different problem: when King Lorik's opening speech begins, he starts with the text of Erdrick's tablet. Did the script get scrambled because of its length?
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on May 05, 2018, 01:53:57 AM
Quote from: werewolfslayr925 on May 04, 2018, 09:08:12 PM
Did the script get scrambled because of its length?

So you're saying he says the wrong line? It's probably a pointer problem since Pointer Tables, ironically enough, doesn't edit pointer tables. :D Fortunately DW has a great system with very few pointers: they point to the start of a block, then count the correct number of end characters until it finds the desired line.

In the dump file you have the locations of both pointer table and text, so go to the table and check that the pointers there line up with what you have now. So look at what each block starts with in English, then see where the equivalent Spanish block is.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on May 05, 2018, 11:25:34 AM
Quote from: Psyklax on May 05, 2018, 01:53:57 AM
It's probably a pointer problem since Pointer Tables, ironically enough, doesn't edit pointer tables. :D
... wow, that is ironic :P

As an alternative to updating every single pointer by hand every single time you re-insert the script (which is less annoying with DW1's small number of pointers compared to many other games, but is still pretty annoying and error-prone), you may wish to consider using an insertion utility that can actually update the pointer values for you.

With Atlas (https://www.romhacking.net/utilities/224/), for instance, all you need to do is take your Pointer Tables script, replace the Pointer Tables setup stuff with Atlas setup stuff, and then replace the Pointer Tables pointer labels with Atlas pointer write commands (either convert them by hand or get your text editor to do a search-and-replace for you):

// Lines starting with // are comments, lines starting with # are Atlas commands, everything else is script to insert.
// Define, load, and activate a table (replace "dw_es.tbl" with the name of your table file).
#VAR(dw_es, TABLE)
#ADDTBL("dw_es.tbl", dw_es)
#ACTIVETBL(dw_es)

// NES ROMs have a $10 byte header.
#HDR($10)

// Jump to the start of the script, set an upper bound on the available space so that you don't accidentally start overwriting other code/data if your script is too long.
#JMP($8038, $BCBF)

// Write a 16-bit pointer to the current address (which is $8038 because that's where we just jumped to).
#W16($8012)
[NME] despertó.%[60]&Estas muerto.% etc.

// Write a 16-bit pointer to the current address (which is the byte after wherever the previous string ended).
#W16($8014)
{Gracias.&¿Desea comprar una botella mas?}&% etc.

// Write a 16-bit pointer to the current address (which is the byte after wherever the previous string ended).
#W16($8016)
etc.
etc.


Once that's done, you can run the result through Atlas:

$> Atlas.exe "Dragon Warrior [ES].nes" Atlas.txt
Atlas 1.11 by Klarth

Parsing summary: 0 msecs
Parsing - 0 error(s), 0 warning(s)

Insertion summary: 31 msecs
Insertion - 0 error(s), 0 warning(s)

+------------------------------------------------------------------------------
| Total
|   Start: Line 10  File Position $8038  Bound $BCBF
|   End: Line 69  File Position $BC43
+------------------------------------------------------------------------------
| Script size 15371
| Bytes Inserted 15371
| Space Remaining 124
|
| Command Execution Listing
|   W16: 19
|
| Pointer Listing
|   General Pointers Written: 19
+------------------------------------------------------------------------------

Execution time: 62 msecs


... and then test the changes out in your emulator of choice.

One thing I did notice, however, is that the table file you provided is missing entries for "¿" and "¡", so you'll need to add those before you can successfully insert your script (but I'm guessing you've already done that if you were able to get Pointer Tables to insert anything).
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 05, 2018, 07:18:57 PM
Quote from: abw on May 05, 2018, 11:25:34 AM
As an alternative to updating every single pointer by hand every single time you re-insert the script (which is less annoying with DW1's small number of pointers compared to many other games, but is still pretty annoying and error-prone), you may wish to consider using an insertion utility that can actually update the pointer values for you.

With Atlas (https://www.romhacking.net/utilities/224/), for instance, all you need to do is take your Pointer Tables script, replace the Pointer Tables setup stuff with Atlas setup stuff, and then replace the Pointer Tables pointer labels with Atlas pointer write commands (either convert them by hand or get your text editor to do a search-and-replace for you)
...

and then test the changes out in your emulator of choice.

One thing I did notice, however, is that the table file you provided is missing entries for "¿" and "¡", so you'll need to add those before you can successfully insert your script (but I'm guessing you've already done that if you were able to get Pointer Tables to insert anything).

Yeah, I fixed the ¿ and ¡ problem in the .tbl. And thank you abw (and Psyklax) for your patience with me.

I tried what you said, but Atlas just spat back an error message:

Unable to open script file 'dwspFinalAtlas.txt'
Insertion failed


The more I attempt to do things with video games on the coding level, the more I realize that coding is not something for which I have an affinity. If I understand you correctly, the .txt file that contains the translated script is the file into which I'm to put all that code that you posted. Here's what I have:

// Lines starting with // are comments, lines starting with # are Atlas commands, everything else is script to insert.
// Define, load, and activate a table (replace "dw_es.tbl" with the name of your table file).
#VAR(dwSP, TABLE)
#ADDTBL("dwSP.tbl", dw_es)
#ACTIVETBL(dwSP)

// NES ROMs have a $10 byte header.
#HDR($10)

// Jump to the start of the script, set an upper bound on the available space so that you don't accidentally start overwriting other code/data if your script is too long.
#JMP($8038, $BCBF)

// Write a 16-bit pointer to the current address (which is $8038 because that's where we just jumped to).
#W16($8012)
[NME] despertó.%[60]&Estas muerto.% etc.
#W16($8014)
{Gracias.&¿Desea comprar una botella mas?}etc.
etc.
etc.
etc.


Am I doing something wrong in the script's code?
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on May 05, 2018, 11:14:53 PM
No worries - there's always a bit of a learning curve whenever you try something new. As long as you're willing to put in some effort on your own, people around here are generally willing to try to help you out. Sometimes they even succeed :P. Don't get discouraged!

Unable to open script file 'dwspFinalAtlas.txt'
Insertion failed

The most likely cause of a message like that is that Atlas couldn't find the dwspFinalAtlas.txt file in order to try opening it. I guess I should have asked earlier, but how familiar are you with running programs from the command line? Atlas uses your current working directory to resolve relative paths in any files it needs to open, so it's often easiest to just stick Atlas.exe, the ROM file, dwspFinalAtlas.txt, and dwSP.tbl all in the same directory and run Atlas from there.

As for the script file itself, you'll want to change "#ADDTBL("dwSP.tbl", dw_es)" to "#ADDTBL("dwSP.tbl", dwSP)" in order to match with the variable name from "#VAR" and "#ACTIVETBL", keep everything else down to and including the "#JMP", paste in your full translated script instead of the couple of lines I posted, and then make sure that you have a "#W16(<pointer address>)" preceding each string (i.e. "#W16($8012)" for the first string, "#W16($8014)" for the second string, and so on down to "#W16($8036)" for the last string).
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 06, 2018, 09:43:26 AM
Quote from: abw on May 05, 2018, 11:14:53 PM
No worries - there's always a bit of a learning curve whenever you try something new. As long as you're willing to put in some effort on your own, people around here are generally willing to try to help you out. Sometimes they even succeed :P. Don't get discouraged!

Glad to hear it. I've tried a few things pertaining to programming (GameMaker, PICO-8), but the learning curve is exceptionally steep, the activity itself is too unfun for my tastes, and people don't really give instructions in any way I can understand.

Quote from: abw on May 05, 2018, 11:14:53 PM
Unable to open script file 'dwspFinalAtlas.txt'
Insertion failed

The most likely cause of a message like that is that Atlas couldn't find the dwspFinalAtlas.txt file in order to try opening it. I guess I should have asked earlier, but how familiar are you with running programs from the command line? Atlas uses your current working directory to resolve relative paths in any files it needs to open, so it's often easiest to just stick Atlas.exe, the ROM file, dwspFinalAtlas.txt, and dwSP.tbl all in the same directory and run Atlas from there.

*facepalm* I should have known to do this. I am familiar with running programs from the command line. I use a Kazzo ROM dumper built by infiniteNESlives to dump my NES/FC games. I should have known to put the docs in the same folder  :P

Quote from: abw on May 05, 2018, 11:14:53 PM
As for the script file itself, you'll want to change "#ADDTBL("dwSP.tbl", dw_es)" to "#ADDTBL("dwSP.tbl", dwSP)" in order to match with the variable name from "#VAR" and "#ACTIVETBL", keep everything else down to and including the "#JMP", paste in your full translated script instead of the couple of lines I posted, and then make sure that you have a "#W16(<pointer address>)" preceding each string (i.e. "#W16($8012)" for the first string, "#W16($8014)" for the second string, and so on down to "#W16($8036)" for the last string).

I figured that needed to be done. I'll give it another run soon and report back here with the results.

May 07, 2018, 08:57:14 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

Omigosh! It lives! Thank you so much abw and Psyklax! Now I need to edit the enemy and item names and get some testers on this. Should I post an ad for testers when it's ready? Or should I just test it myself?

Also, how do I post pictures on this forum? The image button just gives me "[img*closingbracket*openingbracket*/img]", and I don't really know what to do with it.

Edit: Apologies to the mods for the double-post. I got excited. I know I'm on house arrest. I'll be good.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Tobas on May 09, 2018, 12:55:18 PM
can't wait to play the final version!
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 09, 2018, 02:59:41 PM
Question for my wonderful teachers:

Going through the enemy name list, there are several names that are going to require more space in Spanish than they would in English. I haven't looked at the item list yet, but the case for that may be the same. Is there a way to dump the item and enemy lists, translate them, and reinsert them into the ROM like we did with the dialogue/script?
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on May 09, 2018, 06:23:40 PM
Quote from: werewolfslayr925 on May 09, 2018, 02:59:41 PM
Going through the enemy name list, there are several names that are going to require more space in Spanish than they would in English. I haven't looked at the item list yet, but the case for that may be the same. Is there a way to dump the item and enemy lists, translate them, and reinsert them into the ROM like we did with the dialogue/script?

Hmm, it depends which is longest: the English or your Spanish. If the former, great. If the latter, you might need to get creative, finding some empty space somewhere (I'm not looking at the ROM now so I can't see what's there).
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on May 09, 2018, 10:05:49 PM
Quote from: werewolfslayr925 on May 06, 2018, 09:43:26 AM
Omigosh! It lives! Thank you so much abw and Psyklax!
Hurray! Don't you just love it when a plan comes together?  ;D

Quote from: werewolfslayr925 on May 06, 2018, 09:43:26 AM
Should I post an ad for testers when it's ready? Or should I just test it myself?
This is completely up to you. Dragon Warrior is a pretty small game (with movement and battle systems that are easily abused by save states - if you haven't already, check out http://tasvideos.org/ (http://tasvideos.org/) for some examples of moving around the entire world without encountering a single unwanted enemy and 100% crit/evasion rates), so testing it all by yourself isn't too much work, but on the other hand it's usually nice to get a second set of eyes on a hack before you release it if you can. Whichever way you decide to go will be fine.

Quote from: werewolfslayr925 on May 06, 2018, 09:43:26 AM
Also, how do I post pictures on this forum? The image button just gives me "[img*closingbracket*openingbracket*/img]", and I don't really know what to do with it.
Try sticking an image URL in between the [­​img] and the [​/img].

Quote from: werewolfslayr925 on May 09, 2018, 02:59:41 PM
Question for my wonderful teachers:

Going through the enemy name list, there are several names that are going to require more space in Spanish than they would in English. I haven't looked at the item list yet, but the case for that may be the same. Is there a way to dump the item and enemy lists, translate them, and reinsert them into the ROM like we did with the dialogue/script?
Indeed there is! I can't be 100% certain without doing a lot more analysis than I care to at the moment, but based on the giant chunk of $FFs following the item/enemy/price/spells list, it looks like you've probably got all of 0x7AC7 - 0x7FE7 available for use (the English only uses up to 0x7EAE, so there's a good 300+ bytes of free space, which ought to be more than enough). As with the main dialogue, Dragon Warrior doesn't use a full pointer table with pointers to each string for these lists, but instead reads through the entire list starting from a condensed pointer table (at 0x6842-0x6851), counting end tokens until it finds the string it wants.

For dumping the text, you can try using Pointer Tables again, or since there are only 8 pointers to worry about, a raw dump straight from your favourite table-file-aware hex editor would work too. [spoiler]If you really want to be a guinea pig, you could also use abcde (http://www.romhacking.net/utilities/1392/), but that probably has the worst learning curve of any of the available sane options, plus I need to push out some optimizations and bug fixes at some point.[/spoiler] Once you've got the list text translated, inserting it back into the ROM with Atlas should be just as easy as inserting the dialogue text was; you'll just need to make sure all the #W16() commands are in the right places.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 10, 2018, 02:59:12 PM
Quote from: abw on May 09, 2018, 10:05:49 PM
Hurray! Don't you just love it when a plan comes together?  ;D

I do!

Quote from: abw on May 09, 2018, 10:05:49 PM
Try sticking an image URL in between the [­​img] and the [​/img].

What if I don't have a URL? I wanna post some screenshots straight from my lappy. Do I need to upload something online then post a URL of the page?

Quote from: abw on May 09, 2018, 10:05:49 PM
Indeed there is! etc.

This sounds like good news. Would I be able to just press the insert button and type away in a hex editor, then, so long as I stay within the limit of those FFs? Or do I need to dump the item/spell/enemy text?

Quote from: abw on May 09, 2018, 10:05:49 PM
For dumping the text, etc.

I tried this and dumped the item/enemy/spell text successfully. However, the dump also includes a significant chunk of the script:


Table Start: 8012
Table End: 8037
Text Start: 7AC6
Text End: 7EAE
XOffset: FFFFFA9E

Table Type: 0
Text Type: 0
Custom PT: T0 T1

PT Line Command:
-----------------
8012
[60]Bamboo[ITM]Club[ITM]Copper[ITM]Hand[ITM]Broad[ITM]Flame[ITM]Erdrick}s[ITM]Clothes[ITM]Leather[ITM]Chain[ITM]Half[ITM]Full[ITM]Magic[ITM]Erdrick}s[ITM]Small[ITM]Large[ITM]Silver[ITM]Herb[ITM]Torch[ITM]Dragon}s[ITM]Wings[ITM]Magic[ITM]Fairy[ITM]Ball of[ITM]Tablet[ITM]Fairy[ITM]Silver[ITM]Staff of[ITM]Stones of[ITM]Gwaelin}s[ITM]Rainbow[ITM]Cursed[ITM]Death[ITM]Fighter}s[ITM]Erdrick}s[ITM]Secret[ITM]Pole[ITM][ITM]Sword[ITM]Axe[ITM]Sword[ITM]Sword[ITM]Sword[ITM][ITM]Armor[ITM]Mail[ITM]Plate[ITM]Plate[ITM]Armor[ITM]Armor[ITM]Shield[ITM]Shield[ITM]Shield[ITM][ITM][ITM]Scale[ITM][ITM]Key[ITM]Water[ITM]Light[ITM][ITM]Flute[ITM]Harp[ITM]Rain[ITM]Sunlight[ITM]Love[ITM]Drop[ITM]Belt[ITM]Necklace[ITM]Ring[ITM]Token[ITM]Passage[ITM]Slime[ITM]Red[ITM]Drakee[ITM]Ghost[ITM]Magician[ITM]Magidrakee[ITM]Scorpion[ITM]Druin[ITM]Poltergeist[ITM]Droll[ITM]Drakeema[ITM]Skeleton[ITM]Warlock[ITM]Metal[ITM]Wolf[ITM]Wraith[ITM]Metal[ITM]Specter[ITM]Wolflord[ITM]Druinlord[ITM]Drollmagi[ITM]W
8014
yvern[ITM]Rogue[ITM]Wraith[ITM]Golem[ITM]Goldman[ITM]Knight[ITM]Magiwyvern[ITM]Demon[ITM]Werewolf[ITM]Green[ITM]Starwyvern[ITM]Wizard[ITM]Axe[ITM]Blue[ITM]Stoneman[ITM]Armored[ITM]Red[ITM]Dragonlord[ITM]Dragonlord[ITM][ITM]Slime[ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM]Scorpion[ITM][ITM][ITM]Slime[ITM][ITM][ITM][ITM][ITM][ITM]Scorpion[ITM]Knight[ITM][ITM][ITM][ITM][ITM]Knight[ITM][ITM]Dragon[ITM][ITM][ITM]Knight[ITM]Dragon[ITM][ITM]Knight[ITM]Dragon[ITM][ITM][ITM]g<BE>a0Y0<B4>0M2<DC>5,C20k0<46>0I1<E8>3<B8>bku20<5A>0w3<D0>Vo080k0<46>0R0C00000000000000000<68>1[60]9u000HEAL[ITM]HURT[ITM]SLEEP[ITM]RADIANT[ITM]STOPSPELL[ITM]OUTSIDE[ITM]RETURN[ITM]REPEL[ITM]HEALMORE[ITM]HURTMORE[ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM]
8016
[ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM][ITM]<78><EE><DF><BF>!<8E>[ITM]<80>:.}*.()w[57]*.}.}-(.}ww<56><DE>M<70>141f70<D8><BF><D8><BF><D8><BF><B0><BC>E<80><86><82>p<85>j<87>!<89>i<8D><6E><90><42><94>u<98><88><9C>""<9F><8A><A2><DC><A6>K<AA><61><AC>E<AE><EE><AF><8B><B6><65><BA>[NME] hath woken up.%[60]&Thou art dead.%{Thou art strong enough!&Why can thou not defeat the Dragonlord?}@%{If thou art planning to take a rest, first see King Lorik.}%[ME] held the Rainbow Drop toward the sky.&[60]@%But no rainbow appeared here.%{Good morning.&Thou hast had a good night's sleep I hope.}@%{I shall see thee again.}%{Good morning.&Thou seems to have spent a good night.}@%{Goo
8018
d night.}&%{Okay.&Good-bye, traveler.}%{Welcome to the traveler's Inn.&Room and board is [NUM] GOLD per night.&Dost thou want a room?}&%{All the best to thee.}%{There are no stairs here.}%{Thou cannot enter here.}%{There is no one there.}%{I thank thee.&Won't thou buy one more bottle?}&%{Will thou buy some Fairy Water for 38 GOLD to keep the Dragonlord's minions away?}&%{I will see thee later.}%{Thou hast not enough money.}@%{I am sorry, but I cannot sell thee anymore.}%{Here,take this key.&Dost thou wish to purchase more?}&%{Magic keys!&They will unlock any door.&Dost thou w
etc.
up to:
8034
ded in battle, [ME].}@&{Sleep heals all.}%{Descendant of Erdrick, listen now to my words.}@&{It is told that in ages past Erdrick fought demons with a Ball of Light.}@&{Then came the Dragonlord who stole the precious globe and hid it in the darkness.}@&{Now, [ME], thou must help us recover the Ball of Light and restore peace to our land.}@&{The Dragonlord must be defeated.}@&{Take now whatever thou may find in these Treasure Chests to aid thee in thy quest.}@&{Then speak with the guards, for they have much knowledge that may aid thee.}@&{May the light shine upon thee, [ME].}%@The tablet reads as follows:@&[60]& {I am Erdrick and thou art my descendant.}@& {Three items were needed to reach the Isle of Dragons, which is south of Brecconary.}@& {I gathered these items, reached the island, and there defeated a creature of great evil.}@& {Now I have entrusted the three items to three worthy keepers.}@& {Their descendants will protect the items until thy quest leads thee to seek them out.}@& {When a new
8036


Error
Start is greater than end (start==B503 in ROM @ 8036)


I can tell I did something egregiously wrong, but what exactly was it? Did i give it the wrong Table Start/Table End numbers?
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on May 11, 2018, 08:18:27 AM
Quote from: werewolfslayr925 on May 10, 2018, 02:59:12 PM
What if I don't have a URL? I wanna post some screenshots straight from my lappy. Do I need to upload something online then post a URL of the page?
Yeah, file hosting on RHDN is generally limited to submissions, with a few exceptions for things like personal forum avatars. Otherwise you've got to find your own file hosting elsewhere. There are plenty of options around, many of them free; if you don't know where to start looking for one, you can search the forum to find a few threads where people recommend their favourite hosting services.

Quote from: werewolfslayr925 on May 10, 2018, 02:59:12 PM
Would I be able to just press the insert button and type away in a hex editor, then, so long as I stay within the limit of those FFs? Or do I need to dump the item/spell/enemy text?
Dumping these lists isn't strictly necessary - typing away in a hex editor will work as long as you stay within the limits of those FFs and update the pointer table to keep each pointer in the table pointing to the start of its respective section. If you e.g. start editing the item names and your new text goes past 0x7C7F but you don't update the enemy name pointer that points to 0x7C80, then you're going to end up with enemies who have names based on your new item names.

That said, typing away in a hex editor is usually not regarded as a good habit to get into for ROM hacking. You can definitely get away with it for small changes (probably most of us have done it that way at least once, especially for our first projects), but the bigger your project is, the more you're going to want to follow some Project Management ideas, such as having a build process that takes a clean copy of the base ROM and applies all of your changes from other files (which can then be tracked in your favourite VCS, which these days is likely to be git), preferably just by pressing a button (the ability to run a bunch of programs from a single script is one reason why people still love the command line even though GUI programs are prettier). It really sucks when you lose hours/days/weeks/months of work because you made a typo somewhere in your manually-hex-edited masterpiece that causes the game to crash, you can't track the typo down because it's just one more changed byte hiding amongst the million other bytes you've changed, and you don't have any working backups or you don't even know what's in them anymore >:(.

Quote from: werewolfslayr925 on May 10, 2018, 02:59:12 PM
Did i give it the wrong Table Start/Table End numbers?
Yup, it looks like you're telling Pointer Tables to still use the pointer table from the main dialogue (8012-8037) rather than the pointer table for these lists - I imagine it will work better if you set Table Start to 6842 and Table End to 6851. You might want to dump the item prices (pointer at 0x684C to text at 0x7E1E - 0x7E65) separately as raw hex (i.e. with no table file translation), since those are stored as 16-bit little endian unsigned integers rather than text and it's easier to e.g. figure out that an item costs 9800 G when you see "<48><26>" than when you see ",C" ;).
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 12, 2018, 11:31:36 AM
Quote from: abw on May 11, 2018, 08:18:27 AM
Dumping these lists isn't strictly necessary - typing away in a hex editor will work as long as you stay within the limits of those FFs and update the pointer table to keep each pointer in the table pointing to the start of its respective section. If you e.g. start editing the item names and your new text goes past 0x7C7F but you don't update the enemy name pointer that points to 0x7C80, then you're going to end up with enemies who have names based on your new item names.

That said, typing away in a hex editor is usually not regarded as a good habit to get into for ROM hacking. You can definitely get away with it for small changes (probably most of us have done it that way at least once, especially for our first projects), but the bigger your project is, the more you're going to want to follow some Project Management ideas

Good to know. Iirc, Psyklax spoke against using game-specific editors, too, and that a hex editor was better and/or all you needed. Perhaps he meant more than he said, but his guidance left me under the impression that anything and everything could be/should be done in a hex editor :P

Quote from: abw on May 11, 2018, 08:18:27 AM
such as having a build process that takes a clean copy of the base ROM and applies all of your changes from other files (which can then be tracked in your favourite VCS, which these days is likely to be git), preferably just by pressing a button (the ability to run a bunch of programs from a single script is one reason why people still love the command line even though GUI programs are prettier).

When you say VCS, I think of an Atari 2600 :P Do you mean something like github?

Quote from: abw on May 11, 2018, 08:18:27 AM
It really sucks when you lose hours/days/weeks/months of work because you made a typo somewhere in your manually-hex-edited masterpiece that causes the game to crash, you can't track the typo down because it's just one more changed byte hiding amongst the million other bytes you've changed, and you don't have any working backups or you don't even know what's in them anymore >:(.

Yes! This is why I just make a copy of the ROM I dumped when I do something new.

Quote from: abw on May 11, 2018, 08:18:27 AM
Yup, it looks like you're telling Pointer Tables to still use the pointer table from the main dialogue (8012-8037) rather than the pointer table for these lists - I imagine it will work better if you set Table Start to 6842 and Table End to 6851. You might want to dump the item prices (pointer at 0x684C to text at 0x7E1E - 0x7E65) separately as raw hex (i.e. with no table file translation), since those are stored as 16-bit little endian unsigned integers rather than text and it's easier to e.g. figure out that an item costs 9800 G when you see "<48><26>" than when you see ",C" ;).

Okay, cool! Gonna try this. Now, question: how do you know where the pointer table for each section of text is? I assume there are certain hex values that tell you that, but how do you figure out what's what? Also, are there pointer tables for things other than text (e.g. calculations for damage points in an RPG)?

[Edited for a typo]
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on May 12, 2018, 01:18:13 PM
Quote from: werewolfslayr925 on May 12, 2018, 11:31:36 AM
Good to know. Iirc, Psyklax spoke against using game-specific editors, too, and that a hex editor was better and/or all you needed. Perhaps he meant more than he said, but his guidance left me under the impression that anything and everything could be/should be done in a hex editor :P

But you can use a non-game-specific tool without typing your whole script in a hex editor. :) That's what abw meant. Like using something like Pointer Tables to do your script, rather than directly typing into Windhex 32 EX.

And yes, anything CAN be done in a hex editor, but not necessarily SHOULD be done. ;)

Quote from: werewolfslayr925 on May 12, 2018, 11:31:36 AM
Okay, cool! Gonna try this. Now, question: how do you know where the pointer table for each section of text is? I assume there are certain hex values that tell you that, but how do you figure out what's what? Also, are there pointer tables for things other than text (e.g. calculations for damage points in an RPG)?

It ain't the hex values, it's learning how to use the debugger in an emulator, and understanding assembly. Basically, a pointer is just a value that tells the game where to find something. So when there's a pointer table, it's a list of locations in the ROM, and the game will look there when it needs something, such as a line of dialogue. The alternative is to do what's called 'hardcoded pointers', meaning you have to write the location into the code ("load from this place, write it to RAM"). That's fine for simple things like a Game Over message or something, but dozens of lines of dialogue would be very impractical. With a table, there's a command that loads from a location, plus whatever is in a register. So if the game needs dialogue number 5, it will load 5 into a register and say "load from this address, plus 5".

So to find these pointers, you just work backwards with a debugger: you set a breakpoint for the line of dialogue, see where it got that address from. If you're lucky, you'll immediately find the pointer; otherwise you just keep following the trail.

If you need any help finding stuff in DW, let me know. :)
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on May 12, 2018, 05:51:49 PM
Quote from: werewolfslayr925 on May 12, 2018, 11:31:36 AM
When you say VCS, I think of an Atari 2600 :P Do you mean something like github?
Ah, sorry - VCS = Version Control System. git is currently the most popular VCS, and github is the most popular place for hosting/sharing git repositories.

Quote from: Psyklax on May 12, 2018, 01:18:13 PM
But you can use a non-game-specific tool without typing your whole script in a hex editor. :) That's what abw meant. Like using something like Pointer Tables to do your script, rather than directly typing into Windhex 32 EX.

And yes, anything CAN be done in a hex editor, but not necessarily SHOULD be done. ;)
Yup. It's not like game-specific editors are evil or anything (some of them are pretty awesome), but if you always rely on them exclusively and never understand what's going on behind the scenes, that leaves you in a bad position for working on any game where somebody else hasn't already written a game-specific editor that does exactly what you want to do.

Quote from: Psyklax on May 12, 2018, 01:18:13 PM
So to find these pointers, you just work backwards with a debugger: you set a breakpoint for the line of dialogue, see where it got that address from. If you're lucky, you'll immediately find the pointer; otherwise you just keep following the trail.
Here's how I found those pointers using FCEUX, in excruciating step-by-step detail. There are other ways of accomplishing the same goal, but despite the wall of text below, this process got me the answers I was after in only a couple of minutes, so it worked out pretty well.

1) Start with what you know: sometimes the game prints item names to the screen; for this example I'll use the ITEM command to trigger displaying item names.
2) Get to some place where item names are displayed; the ITEM command is available pretty much everywhere, so this part is easy.
3) Display the item name on screen; I have a Torch as the only item in my inventory, so that's what shows up.
4) Open the Name Table Viewer (from the Debug menu).
5) Put your mouse over the "T" in "Torch". The Properties section tells you the Tile ID (37 - in Dragon Warrior's case, this matches up with 37=T in your table file), the X/Y co-ordinates (34 / 27), and the PPU Address (2762) of that "T". We're interested in the PPU Address, so make a note of that.
6) Back in the game, get ready to display the item name again - close the ITEM menu, re-open the COMMAND menu, and position your cursor over the ITEM command, but don't press A yet.
7) Pause the emulator (use the Pause key on your keyboard or the NES -> Emulation Speed -> Pause menu item).
8​) Open the Debugger (also from the Debug menu).
9) Create a new breakpoint using the "Add" button. We want to break when PPU Address 2762 is written to, so enter 2762 in the first "Address" box, check the "Write" checkbox, and select the "PPU Mem" Memory radio button, then press "OK". You should get a breakpoint labelled "$2762:EP-W--". Breakpoints are enabled by default (the "E" in the label) and you can toggle them on/off by double-clicking them. Make sure the breakpoint is enabled.
10) Open the Trace Logger (also from the Debug menu).
11) Select the "Log to File" option and "Browse" for a file to save the trace log under; I made a new "torch.log" file.
12) Press the "Start Logging" button to start logging CPU instructions.
13) Back in the game, unpause the emulator and activate the ITEM command. You'll want to be quick about this - the NES is slow by modern standards, but it still runs at over 1 million cycles per second, so letting a full trace log run for very long is going to generate a large file. I managed to keep mine down to about 4 MB containing nearly 40,000 lines of code. The emulator will stop executing code when it reaches the breakpoint we set up earlier.
14) In the Trace Logger, press the "Stop Logging" button.
15) Open the trace log file from disk in your favourite text editor.
16) At the very bottom of the file, you should see a line like

                       $FE48:E8        INX                                          A:37 X:14 Y:0A S:E8 P:nvUbdIzc

. This is the instruction that was logged immediately before the emulator reached our breakpoint. You can see that A contains 37, which is the Tile ID for "T". Our job is to find out where in the ROM that 37 came from, and then find out where the code that loaded that 37 is, so we'll start working backwards.
17) Where did A get its value of 37 from? The previous line in the trace log is

                       $FE45:BD 00 03  LDA $0300,X @ $0314 = #$37                   A:5F X:14 Y:0A S:E8 P:nvUbdIzc

which shows that the value of A came from $0314. $0314 corresponds to system RAM, not ROM, so we'll backtrack to find out where $0314 got its value from.
18) Searching backwards in the trace file for "$0314" takes us to

                      $ACA1:B9 36 64  LDA $6436,Y @ $6444 = #$37                   A:5F X:14 Y:0E S:E9 P:nvUbdIzc
                      $ACA4:9D 00 03  STA $0300,X @ $0314 = #$5F                   A:37 X:14 Y:0E S:E9 P:nvUbdIzc

which shows us that $0314 got its 37 from $6444. $6444 corresponds to cartridge RAM, not ROM, so we'll backtrack to find out where $6444 got its value from.
19) Searching backwards in the trace log for "$6444" takes us to

                   $A562:BD 35 64  LDA $6435,X @ $6444 = #$37                   A:18 X:0F Y:05 S:EC P:NVUbdIzc

which we don't care about since LDA is a read command, not a write command. Going further backwards takes us to

                   $A555:AD DD 64  LDA $64DD = #$37                             A:0E X:0E Y:05 S:EC P:nvUbdIzc
                   $A558:9D 36 64  STA $6436,X @ $6444 = #$5F                   A:37 X:0E Y:05 S:EC P:nvUbdIzc

which shows us that $6444 got its 37 from $64DD. $64DD corresponds to cartridge RAM, not ROM, so we'll backtrack to find out where $64DD got its value from.
20) Searching backwards in the trace log for "$64DD" takes us to

                 $A62E:BD C9 64  LDA $64C9,X @ $64D2 = #$37                   A:FF X:09 Y:05 S:EE P:nvUbdIzC
                 $A631:8D DD 64  STA $64DD = #$5F                             A:37 X:09 Y:05 S:EE P:nvUbdIzC

which shows us that $64DD got its 37 from $64D2. $64D2 still corresponds to cartridge RAM, not ROM, so we'll keep backtracking to find out where $64D2 got its value from.
21) Searching backwards in the trace log for "$64D2" takes us to

                   $A85E:65 A1     ADC $00A1 = #$B7                             A:76 X:00 Y:76 S:EC P:nVUbdIzc
                   $A860:85 A1     STA $00A1 = #$B7                             A:2D X:00 Y:76 S:EC P:nvUbdIzC
                   $A862:90 02     BCC $A866                                    A:2D X:00 Y:76 S:EC P:nvUbdIzC
                   $A864:E6 A2     INC $00A2 = #$BA                             A:2D X:00 Y:76 S:EC P:nvUbdIzC
                   $A866:A0 00     LDY #$00                                     A:2D X:00 Y:76 S:EC P:NvUbdIzC
                   $A868:AE E2 64  LDX $64E2 = #$09                             A:2D X:00 Y:00 S:EC P:nvUbdIZC
                   $A86B:B1 A1     LDA ($A1),Y @ $BB2D = #$37                   A:2D X:09 Y:00 S:EC P:nvUbdIzC
                   $A86D:C9 FF     CMP #$FF                                     A:37 X:09 Y:00 S:EC P:nvUbdIzC
                   $A86F:F0 07     BEQ $A878                                    A:37 X:09 Y:00 S:EC P:nvUbdIzc
                   $A871:9D C9 64  STA $64C9,X @ $64D2 = #$5F                   A:37 X:09 Y:00 S:EC P:nvUbdIzc

which shows us that $64D2 got its 37 from $BB2D. $BB2D corresponds to ROM, so we've found the start of "Torch". Hurray! Alas, FCEUX's trace log doesn't indicate which ROM banks were visible in RAM at that point, but with a little extra digging (left as an exercise for the reader) we can figure out that RAM $BB2D is ROM 0x7B3D.
So, we're halfway there. Now, how about that ($A1)? We can see that the old value of $A1-$A2 was $BAB7 (which happens to be 0x7AC7, i.e. the start of both "Bamboo" and the entire item list), but how did $A1-$A2 get to be $BAB7? Let's backtrack some more.
22) Searching backwards in the trace log for "$00A1" takes us to

                      $A823:0A        ASL                                          A:02 X:04 Y:02 S:E9 P:nVUbdIzc
                      $A824:AA        TAX                                          A:04 X:04 Y:02 S:E9 P:nVUbdIzc
                      $A825:BD 30 A8  LDA $A830,X @ $A834 = #$B7                   A:04 X:04 Y:02 S:E9 P:nVUbdIzc
                      $A828:85 A1     STA $00A1 = #$FF                             A:B7 X:04 Y:02 S:E9 P:NVUbdIzc
                      $A82A:BD 31 A8  LDA $A831,X @ $A835 = #$BA                   A:B7 X:04 Y:02 S:E9 P:NVUbdIzc
                      $A82D:85 A2     STA $00A2 = #$A3                             A:BA X:04 Y:02 S:E9 P:NVUbdIzc

which makes it look like $A1-$A2 is the third pointer (pointers are 2 bytes long, so the first pointer is X=00, the second is X=02, and we're the third at X=04) in a pointer table starting at $A830 (0x6840). A little further investigation (another exercise for the reader) shows that the $A830-$A831 pointer goes to other places (a pointer table for menu stuff), but $A832 - $A841 are pointers into our lists at $BAB7 - $BE9E (0x7AC7 - 0x7EAE).

And there you have it!
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on May 13, 2018, 03:28:58 AM
Quote from: abw on May 12, 2018, 05:51:49 PM
And there you have it!

Yeah, what he said. :D That's more or less what I would do, I was just too lazy to go in detail, so thank you abw for doing so. :)

One point I'd make, though:

Quote from: abw on May 12, 2018, 05:51:49 PM
13) Back in the game, unpause the emulator and activate the ITEM command. You'll want to be quick about this

I'd recommend getting to the point where you press your button, and use the frame advance hotkey instead of just unpausing and pausing again: just hold the correct button while paused (turn on input display to make sure you're pressing it) and frame advance until the breakpoint is hit. This way your log won't be too big (most of it is usually full of a vblank waiting loop anyway). I don't always jump straight to trace logging, since often when you set a breakpoint for text, the address will be directly before it in the disassembly, but DW is a good example of when to use a trace log. Why does the game keep loading and reloading within the cartridge RAM?! Very odd.

Anyway, keep trying this out with different games and you'll soon see there's nothing mysterious about it, you just need practice. ;)
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: ArkthePieKing on May 13, 2018, 05:09:11 AM
Oh this is awesome! I didn't realize this game didn't already have a Spanish translation. I'll never get tired of seeing games from my childhood translated into other languages for new people to experience. You're doing awesome! So quick question, are you keeping all of the 'ye olde' speech in? Is there a Spanish equivalent for that? I would assume so, but I don't speak Spanish so that's just a guess. Either way, keep up the great work! :D
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 14, 2018, 05:51:24 PM
Quote from: ArkthePieKing on May 13, 2018, 05:09:11 AM
Oh this is awesome! I didn't realize this game didn't already have a Spanish translation. I'll never get tired of seeing games from my childhood translated into other languages for new people to experience. You're doing awesome! So quick question, are you keeping all of the 'ye olde' speech in? Is there a Spanish equivalent for that? I would assume so, but I don't speak Spanish so that's just a guess. Either way, keep up the great work! :D

Quick response to this (I'll edit with a longer response to Psyklax and abw later):

Thanks for the encouragement! I was surprised as well to see that this was the only DQ NES game that had yet to be translated. Unfortunately, I'm not well-versed enough in Renaissance-era Spanish to know the differences between today's Spanish and the Spanish of, say, Luis de Góngora. This translation uses current-day Spanish (and some creative liberties for the purposes of saving space). These will be detailed in the ReadMe and/or the translation log to be released with the patch. Thanks again!

Quick Reponse, Segundo Parte:

abw: I was able to follow that for the most part. Much of it seems to require knowledge of (correct me if I'm wrong) ASM? Like, I wouldn't know that LDA indicates a read command or much else about the lines of code (I'm guessing A, X, Y, and S are coordinates?). Where can I learn to read this?

Psyklax: Thanks for the encouragement and tips!

Update:

I've got translation scripts of the item, weapon, armor, enemy, and spell lists. I'm gonna send them to my editor for a quick glance, then insert the final product.

Next up: Menus! ;D
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on May 15, 2018, 07:06:05 PM
Quote from: Psyklax on May 13, 2018, 03:28:58 AM
I'd recommend getting to the point where you press your button, and use the frame advance hotkey instead of just unpausing and pausing again: just hold the correct button while paused (turn on input display to make sure you're pressing it) and frame advance until the breakpoint is hit.
Yeah, Input Display + Frame Advance is definitely a better way of doing that step. Clearly I need to pay more attention to the wealth of options FCEUX provides :p.

Assuming you already know where the text you want is stored in RAM, setting a read breakpoint for the text's RAM address is also an Excellent move! (see what I did there? :P), and depending on what the game you're looking at does, you can often get results this way faster than using a trace log.

Quote from: werewolfslayr925 on May 14, 2018, 05:51:24 PM
abw: I was able to follow that for the most part. Much of it seems to require knowledge of (correct me if I'm wrong) ASM? Like, I wouldn't know that LDA indicates a read command or much else about the lines of code (I'm guessing A, X, Y, and S are coordinates?). Where can I learn to read this?
That's right - FCEUX's trace log displays the ASM instructions executed by the (emulated) 6502 CPU. If you check the Assembly category in the Documents section (http://www.romhacking.net/?page=documents&category=11&platform=1&game=&author=&perpage=20&level=&title=&desc=&docsearch=Go), you can find a bunch of 6502 resources. The SNES uses a 65816 CPU, which is basically a backwards-compatible upgraded version of the 6502, so you can also try reading the 65816 documents, and in fact I use Programming the 65816 (http://www.romhacking.net/documents/423/) as my primary reference for both 6502 and 65816.

In the 6502, A, X, Y, and S are all 8-bit memory registers. The accumulator, A is the main register; almost everything that happens in the CPU goes through A. X and Y are index registers; the main difference between X/Y and A are what 6502 instructions are available for each register - X/Y can be used in some instructions that A can't, and vice-versa. S is the stack pointer, which keeps track of where the top of the NES's tiny stack currently is.

There is a lot of ROM hacking you can do without knowing anything much about ASM (especially in areas like translation where you're mostly dealing with data, not code), but knowing enough ASM to be able to make use of a debugger to help figure out what's going on can be very helpful sometimes.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 17, 2018, 01:50:43 AM
Okay, so, abw and Psyklax:

I've followed your advice on using FCEUX to look at all of the code. Psyklax, you've made this significantly less of a headache with your advice to use the frame advance hotkey :3 abw, I have a question about the exercises left for the reader (me): how do I figure out that (e.g.)

QuoteRAM $BB2D is ROM 0x7B3D

Is there a mathematical formula for this? (Seriously, is it math?) Or does this also require knowledge of ASM?

I noticed that fortune smiles upon me: you were kind enough to drop me a hint as to how to find the pointers to the menus. I'll see if I can work with that :3

Update:

After a bit of trial and error, I successfully dumped the menus and stats! Gonna translate 'em later today. Thanks again for your help, guys!
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on May 17, 2018, 03:57:07 AM
Quote from: werewolfslayr925 on May 17, 2018, 01:50:43 AM
Is there a mathematical formula for this? (Seriously, is it math?) Or does this also require knowledge of ASM?

I'll put you out of your misery on this one. :)

It's actually very simple. In the CPU's address space (people say RAM but technically it's not RAM) the ROM is accessed between $8000 and $BFFF, and $C000 and $FFFF (two banks). Any part of the ROM has to be swapped in and out of that address space. So as far as the game code is concerned, anything in that range is ROM. In the actual ROM file, on the other hand, it goes from address zero to wherever the ROM finishes. So if the first $4000 bytes of the ROM get put in the first bank, $0000 would be $8000. If it goes in the second bank, it'd be $C000.

But wait! What about that $10 difference? Well, that's the iNES header in the ROM file. Check NESdev to find out more about that. All you need to know for now is that the header takes up $10 in the file, but this never existed on a real cartridge, so it's ignored when putting it in the address space.

Thus, in your example, we take ROM address $7B3D, add $4000 (cause it's the first bank) and remove $10 because of the header - $BB2D. If it went in the second bank, it'd be $FB2D. To go from address space to ROM, just go in reverse.

Got it? ;)
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on May 17, 2018, 08:50:49 AM
Note, however, that the general form of this problem can get a little bit complicated in cases where the game makes heavier use of bankswapping, goes around changing the bank size all the time, or has a copy of the same data in multiple banks. Fortunately, none of that happens here!

Dragon Warrior uses mapper #1, a.k.a. MMC1 (FCEUX will tell you this if you look under the Help -> Message Log menu item), with 64k of PRG ROM and configures the mapper to use 2 16k banks with the first bank being swappable and the second bank ($C000-$FFFF) connected to the final 16k PRG ROM bank (0xC010 - 0x1000F). So, we know that $C000-$FFFF RAM addresses get mapped to ROM 0xC010-0x1000F, but $8000-$BFFF RAM addresses get mapped to whichever ROM bank the mapper is currently making visible; they could be mapped to 0x0010-0x400F, 0x4010-0x800F, 0x8010-0xC00F, or even 0xC010-0x1000F (though I don't think DW ever actually does that). In order to figure out which of the banks corresponds to $BB2D = $37, there are a few different approaches.

Since there are only 4 PRG banks, you could simply check offset 3B2D (= $BB2D - $8000) within each bank (i.e. 0x3B3D, 0x7B3D, 0xBB3D, and 0xFB3D after adding the $10 iNES header) and see which of them has a value of 37 at that address. You can also use the debugger to set a read breakpoint at $BB2D or an execute breakpoint at $A86B; FCEUX displays the bank number to the left of the RAM address (e.g. 01:A86B) and in the Hex Editor you can right-click on $BB2D and use the "Go Here In ROM File" option to get to 0x7B3D.

Quote from: werewolfslayr925 on May 17, 2018, 01:50:43 AM
I noticed that fortune smiles upon me
:D

Quote from: werewolfslayr925 on May 17, 2018, 01:50:43 AM
After a bit of trial and error, I successfully dumped the menus and stats! Gonna translate 'em later today. Thanks again for your help, guys!
Nice! Unless I've missed something, it sounds like you're getting pretty close - once the menus are translated, I think you've only got the title screen and end credits left to do (and then some play-testing, of course).
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 17, 2018, 02:09:54 PM
Quote from: Psyklax on May 17, 2018, 03:57:07 AM
I'll put you out of your misery on this one. :)

It's actually very simple. In the CPU's address space (people say RAM but technically it's not RAM) the ROM is accessed between $8000 and $BFFF, and $C000 and $FFFF (two banks). Any part of the ROM has to be swapped in and out of that address space. So as far as the game code is concerned, anything in that range is ROM. In the actual ROM file, on the other hand, it goes from address zero to wherever the ROM finishes. So if the first $4000 bytes of the ROM get put in the first bank, $0000 would be $8000. If it goes in the second bank, it'd be $C000.

But wait! What about that $10 difference? Well, that's the iNES header in the ROM file. Check NESdev to find out more about that. All you need to know for now is that the header takes up $10 in the file, but this never existed on a real cartridge, so it's ignored when putting it in the address space.

Thus, in your example, we take ROM address $7B3D, add $4000 (cause it's the first bank) and remove $10 because of the header - $BB2D. If it went in the second bank, it'd be $FB2D. To go from address space to ROM, just go in reverse.

Got it? ;)

I do! This is all really cool. abw's further explanation does make things more complicated, though:

Quote from: abw on May 17, 2018, 08:50:49 AM
Note, however, that the general form of this problem can get a little bit complicated in cases where the game makes heavier use of bankswapping, goes around changing the bank size all the time, or has a copy of the same data in multiple banks.

Is that the kind of thing that Metroid does?

Quote from: abw on May 17, 2018, 08:50:49 AM
Fortunately, none of that happens here!

Amen.

Quote from: abw on May 17, 2018, 08:50:49 AM
Dragon Warrior uses mapper #1, a.k.a. MMC1

This I found out from bootgod's database when I dumped the game :3

Quote from: abw on May 17, 2018, 08:50:49 AM
with 64k of PRG ROM and configures the mapper to use 2 16k banks with the first bank being swappable and the second bank ($C000-$FFFF) connected to the final 16k PRG ROM bank (0xC010 - 0x1000F).

This is where I get lost. If there are two banks of 16k, and 64k of PRG ROM, where's the other 32k?

Quote from: abw on May 17, 2018, 08:50:49 AM
Nice! Unless I've missed something, it sounds like you're getting pretty close - once the menus are translated, I think you've only got the title screen and end credits left to do (and then some play-testing, of course).

I finished the menus and stats today, actually  ;D Gonna go hunting for the credits location. As for the title screen, I recall reading that it's difficult to hack. Is there a way to dump and edit the text there? Should I just edit it by hand in the hex editor?

EDIT: Incidentally, and I'm not sure whether or not this is common, but the text for the Spanish menus and stats is significantly smaller than that of the English by 122 characters! So far, I've managed to keep everything well within limits :D
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on May 17, 2018, 10:16:30 PM
Quote from: werewolfslayr925 on May 17, 2018, 02:09:54 PM
Is that the kind of thing that Metroid does?
I've never gone poking around inside Metroid before, so I can't really say what it's doing internally. One project at a time! :P

Quote from: werewolfslayr925 on May 17, 2018, 02:09:54 PM
This is where I get lost. If there are two banks of 16k, and 64k of PRG ROM, where's the other 32k?
Ah, that's the crux of the matter right there. The NES CPU only has a 16-bit (a.k.a. 64k, a.k.a. $0000-$FFFF) RAM address space, and only 32k of that ($8000-$FFFF) gets mapped to cartridge PRG ROM (the PPU has a separate address space that can be mapped to cartridge CHR ROM/RAM, but I'm ignoring CHR for the purposes of this discussion), but most games (including Dragon Warrior) are larger than 32k. This is where memory mappers (http://wiki.nesdev.com/w/index.php/Mapper) come in to play.

Normally when you try to write to an address that is mapped to ROM, nothing happens because that memory is, well, read-only. In the case of any game larger than 32k, there's some extra hardware on the cartridge that is affected by writes to $8000-$FFFF (the details vary by mapper) and can change which sections of cartridge ROM are visible in RAM and where (e.g. RAM $BB2D could be ROM 0x3B3D, 0x7B3D, 0xBB3D, or 0xFB3D, ROM 0x3B3D could be RAM $BB2D or $FB2D, etc.).

So to answer your question: the other 32k isn't anywhere you can see it, and it stays that way until the game swaps it in!

Quote from: werewolfslayr925 on May 17, 2018, 02:09:54 PM
I finished the menus and stats today, actually  ;D Gonna go hunting for the credits location. As for the title screen, I recall reading that it's difficult to hack. Is there a way to dump and edit the text there? Should I just edit it by hand in the hex editor?
There's always a way, it's just a question of how much work is involved :P. If you can find where the game starts loading the text from (good practice for your debugging skills!), you can use that knowledge to get a high-quality dump. If that's too much work, you can also just dump an entire byte range, edit that, and then re-insert it. Just remember to avoid overwriting any data you don't know is safe to overwrite and to update any pointers into the data you're editing and it will probably work out okay.

P.S.: I'm going to have no/limited internet access for the next couple of weeks, so I'll leave you in Psyklax's capable hands for a while ;)
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on May 18, 2018, 04:32:29 AM
Quote from: abw on May 17, 2018, 10:16:30 PM
I'll leave you in Psyklax's capable hands for a while ;)

Muhahaha... :D

Quote from: werewolfslayr925 on May 17, 2018, 02:09:54 PM
If there are two banks of 16k, and 64k of PRG ROM, where's the other 32k?

I'll add to what abw said here. The 6502 CPU has a 16-bit address space, meaning to load and store addresses, it can't go beyond 16-bits, ie 64kb, or $FFFF. In my "early Famicom games" project, I played every game from the first few years and translated a bunch, and they all have either a 16kb or 32kb PRG ROM. Open up Donkey Kong for example, and you'll see the game is 40kb: 32kb PRG, 8kb CHR.

The first game I found that changed that was City Connection (the Japanese one, not the US one), which had a 16kb CHR ROM. I've also translated (or helped to translate) some other MMC1 games, and it's quite simple.

There's usually a routine in the game that loads the number of the bank, then stores it, usually to $C000 or thereabouts, because as abw says, that part is ROM so it can't be written to, but it's a signal to the MMC to switch banks. This happens instantly, and changes the bank between $8000 and $BFFF. The $C000 bank is fixed to the last 16kb of the ROM. In other games I worked on, I was able to double the size of the game simply by inserting 128kb of zeroes before the last bank, then changing the iNES header to reflect the new size.

So bank switching happens instantly, as it's handled by the MMC, and the CPU does nothing but store a number at an address. Therefore, many later games use this to extremes, changing banks multiple times a FRAME in order to maximise their available memory, and even to make cool effects like parallax scrolling.

Hope it's clearer now. ;)
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 23, 2018, 04:57:12 PM
Quote from: Psyklax on May 18, 2018, 04:32:29 AM
Muhahaha... :D

I'll add to what abw said here. The 6502 CPU has a 16-bit address space, meaning to load and store addresses, it can't go beyond 16-bits, ie 64kb, or $FFFF. In my "early Famicom games" project, I played every game from the first few years and translated a bunch, and they all have either a 16kb or 32kb PRG ROM. Open up Donkey Kong for example, and you'll see the game is 40kb: 32kb PRG, 8kb CHR.

The first game I found that changed that was City Connection (the Japanese one, not the US one), which had a 16kb CHR ROM. I've also translated (or helped to translate) some other MMC1 games, and it's quite simple.

There's usually a routine in the game that loads the number of the bank, then stores it, usually to $C000 or thereabouts, because as abw says, that part is ROM so it can't be written to, but it's a signal to the MMC to switch banks. This happens instantly, and changes the bank between $8000 and $BFFF. The $C000 bank is fixed to the last 16kb of the ROM. In other games I worked on, I was able to double the size of the game simply by inserting 128kb of zeroes before the last bank, then changing the iNES header to reflect the new size.

So bank switching happens instantly, as it's handled by the MMC, and the CPU does nothing but store a number at an address. Therefore, many later games use this to extremes, changing banks multiple times a FRAME in order to maximise their available memory, and even to make cool effects like parallax scrolling.

Hope it's clearer now. ;)

'Tis! Question: what's the difference between different MMC chips I imagine the later models (3, 4, and 5) are more efficient somehow (especially considering the games associated with 4 (Fire Emblem 1, Fire Emblem Gaiden) and 5 (Metal Slader Glory, Just Breed)?

Back to the hacking:

It turns out that, for the sake of consistency/proper vocabulary and by the recommendation of my editor, I'll need to encroach upon the blank space in the ROM starting at 0x7EB0 (hope I wrote that correctly) in order to accommodate for some monster names that need a bit more space. In addition to that small setback, there's a small vocabulary change that needs to be made throughout the ROM's text. I've translated everything else. After all that is done, I'll insert the script and start testing. I should have the ROM ready for testing by the end of the weekend at the latest :D
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: Psyklax on May 23, 2018, 05:38:25 PM
Quote from: werewolfslayr925 on May 23, 2018, 04:57:12 PM
what's the difference between different MMC chips

The pages on nesdev give you way more info on this than I ever could:
https://wiki.nesdev.com/w/index.php/Mapper (https://wiki.nesdev.com/w/index.php/Mapper)

Suffice to say that the more advanced the chip, the more options available to the developer. MMC1 (in Dragon Warrior), for example, allows for PRG-RAM accessible between $6000 and $7FFF (what many refer to as "SRAM", though that's something of a misnomer), and two 16KB PRG-ROM banks which are either fixed or switchable. It allows the PRG-ROM to be up to 512KB, which when compared to the original 32KB is pretty substantial (incidentally, I was wrong about Donkey Kong: that used 16KB PRG, but it doesn't matter, plenty of other games used the full 32KB). It also allows for 128KB of CHR for graphics, switchable of course.

Compare to MMC5, the last official Nintendo chip, and it's even more useful. It has lots of different bank modes, with increasing granularity. The 32KB PRG bank can be swapped in and out in 8KB chunks (and can even use on-cartridge RAM instead of ROM if need be), and the 8KB CHR bank can be swapped in 1KB chunks. Both PRG and CHR have a 1MB capacity, and it even includes two pulse channels and a PCM channel to complement the existing ones in the NES, giving richer sound. The MMC5 really shows what could be done on such limited hardware when given a bit of help. Of course, as that link above shows, there are MANY other chips out there.

Hope that gives you some insight! I must say that once you get the hang of assembly, these chips are a godsend, because expansion can sometimes be as simple as I suggested earlier.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on May 23, 2018, 09:59:04 PM
Quote from: Psyklax on May 23, 2018, 05:38:25 PM
The pages on nesdev give you way more info on this than I ever could:
https://wiki.nesdev.com/w/index.php/Mapper (https://wiki.nesdev.com/w/index.php/Mapper)

...

Hope that gives you some insight! I must say that once you get the hang of assembly, these chips are a godsend, because expansion can sometimes be as simple as I suggested earlier.

It all does. I didn't think of going to NESdev for that kind of thing, but that totally makes sense. I've been there quite a few times for other biznass.

Regarding the state of the project:

I'm trying to insert the menus and stats into a copy of the ROM to test things out, but Atlas keeps giving me a weird error:

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


Since you're my support team, I decided to ask you :P

Here's the code I've got in a file marked "dspmensta.txt"


// Define, load, and activate a table (replace "dw_es.tbl" with the name of your table file).
#VAR(dwSP, TABLE)
#ADDTBL("dwSP.tbl", dwSP)
#ACTIVETBL(dwSP)

// NES ROMs have a $10 byte header.
#HDR($10)

// Jump to the start of the script, set an upper bound on the available space so that you don't accidentally start overwriting other code/data if your script is too long.
#JMP($6FDD, $BCBF)

// Write a 16-bit pointer to the current address (which is $8038 because that's where we just jumped to)
#W16($6840)
Nom:<B1><80><86>Fuerza:<D8><80><87>Agilidad:<D9><80><84>VP<81>Máximo:<DC><80><84>MP<81>Máximo:<DD><80><82>Ataque<81>:<DA><80><81>Defensa<81>:<DB><80><82>Arma:<B8><87><83><B8><83>Armadura:<B9><87><83><B9><82>Escudo:<BA><87><83><BA>15o<92><88><80><80><80><80><80>5gm8x<8B>COMANDO<88><81>Hablar<84>Hechizos<81>Estado<82>Artículos<80><81>Escalera<82>Puerta<80><81>Buscar<82>Llevar<80><80>3gm8x<8B>COMANDO<88><81>LUCHAR<83>HECHIZO<81>CORRER<85>ARTICULO<80><80>bcF0x<8B>HECHIZO<88><D6><81><C0><E8><E9><A0>bcV0h<88><D4><81><BB><82><BB><E8><E9><A0>8iB0h<88><D5><81><BC><81><C8><82><BC><80><E8><E9><80>38B0x<88><81>YES<80><81>NO<80><80>38B0x<88><81>BUY<80><81>SELL<80>17o.}<88><81>A<81>B<81>C<81>D<81>E<81>F<81>G<81>H<81>I<81>J<81>K<81>L<81>M<81>N<81>O<81>P<81>Q<81>R<81>S<81>T<81>U<81>V<81>W<81>X<81>Y<81>Z<81>-<81>}<81>!<81>?<81>(<81>)<80><81>a<81>b<81>c<81>d<81>e<81>f<81>g<81>h<81>i<81>j<81>k<81>l<81>m<81>n<81>o<81>p<81>q<81>r<81>s<81>t<81>u<81>v<81>w<81>x<81>y<81>z<81>,<81>.<81>BACK<82>END<A1>7i<74>0<86><88><81>¿Qué<81>velocidad<80><80><81>de<81>mensaje<81>quieres<80><80><81>usar<81>?<81><80><80><80><86>Rápido<80><80><86>Normáal<80><80><86>Despacio<80>12k<73><88><81>Ingrese<81>tu<81>nombre!<80>13cR<8B>Nom.<88><81>********<80><81>4o<42>0x<88><81>Continuar<81>A<81>viaje<80><81>Velocidad<81>de<81>mensaje<80><81>Borrar<81>un<81>viaje<80><81>6o<42>0x<88><81>Continuar<81>un<81>viaje<80><81>Velocidad<81>de<81>mensaje<80><81>Empezar<81>un<81>viaje<81>nuevo<80><81>Copiar<81>un<81>viaje<80><81>Borrar<81>un<81>viaje<80><81>2o<42>0x<88><81>Empezar<81>un<81>viaje<81>nuevo<80><81>2k<95>0x<88><81>Viaje<81><81>1<80><81>2k<95>0x<88><81>Viaje<81><81>2<80><81>3k<95>0x<88><81>Viaje<81><81>1<80><81>Viaje<81><81>2<80><81>2k<95>0x<88><81>Viaje<81><81>3<80><81>3k<95>0x<88><81>Viaje<81><81>1<80><81>Viaje<81><81>3<80><81>3k<95>0x<88><81>Viaje<81><81>2<80><81>Viaje<81><81>3<80><81>4k<95>0x<88><81>Viaje<81><81>1<80><81>Viaje<81><81>2<80><81>Viaje<81><81>3<80><81>2o<63>0x<88><81>Viaje<81><81>1:<B5><80><81>2o<63>0x<88><81>Viaje<81><81>2:<B6><80><81>3o<63>0x<88><81>Viaje<81><81>1:<B5><80><81>Viaje<81><81>2:<B6><80><81>2o<63>0x<88><81>Viaje<81><81>3:<B7><80><81>3o<63>0x<88><81>Viaje<81><81>1:<B5><80><81>Viaje<81><81>3:<B7><80><81>3o<63>0x<88><81>Viaje<81><81>2:<B6><80><81>Viaje<81><81>3:<B7><80><81>4o<63>0x<88><81>Viaje<81><81>1:<B5><80><81>Viaje<81><81>2:<B6><80><81>Viaje<81><81>3:<B7><80>16k<73><88><81><B4><80><81>Nivel<82><A1><80><81>¿Quieres<81>borrar<81>este<81>personaje<80><81>.<81>.<80><81>.?<80><80>38W0x<88><81>Sí<80><81>No


EDIT:

This is probably a n00bish thing to notice—and I apologize if someone already explained this in some way or other—but I just discovered something about the way the items are listed: The length of the text for one item may result in another item being in the wrong place. In other words, unless I make the translated words the exact same length as the English words, and unless there's a way to edit how the pointers work, I'm going to end up with scrambled item and monster names.

I've discovered this after deciding to change gears and work on item/monster/spell lists instead of the menus for a bit. Why was the text so easy to edit while the items so difficult? Am I missing something?

EDIT 2:

After nearly a week of wrestling with hex code, Pointer Tables, and Atlas, I managed to properly insert item names that consist of two lines (e.g. "Copper Sword"/"Espada de Cobre"). Apparently the text for the items needs to begin at a particular point in the ROM in order for the pointers to read it correctly. To put it another way: the pointers for item names and enemy names (and spells? Menus? Credits?) each point to a particular byte in the ROM that begins a text string of a certain length; pushing the text of one string into the text of another results in the scrambled names.

I anticipate problems with certain items (e.g. Laura's Love) and certain enemy names (e.g. Dragonlord, Red Dragon) where they breach the end of the text string for one pointer and go into the territory of a different pointer. Is there a way to edit the location to which the pointers point to eliminate this problem and to conserve space in the ROM?
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on June 02, 2018, 08:41:07 PM
Quote from: werewolfslayr925 on May 23, 2018, 09:59:04 PM
I'm trying to insert the menus and stats into a copy of the ROM to test things out, but Atlas keeps giving me a weird error:

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Hmm, I get the same thing too. It looks like Atlas crashes when it tries to report an error on a script line that's too long (some light experimentation suggests that 466 characters is the limit). Try splitting that really long line into a bunch of shorter lines and see what happens. You'll at least need to change the format of the byte tokens - Atlas uses e.g. <$B1> instead of just <B1>.

Quote from: werewolfslayr925 on May 23, 2018, 09:59:04 PM
The length of the text for one item may result in another item being in the wrong place. In other words, unless I make the translated words the exact same length as the English words, and unless there's a way to edit how the pointers work, I'm going to end up with scrambled item and monster names.
[...]
Apparently the text for the items needs to begin at a particular point in the ROM in order for the pointers to read it correctly. To put it another way: the pointers for item names and enemy names (and spells? Menus? Credits?) each point to a particular byte in the ROM that begins a text string of a certain length; pushing the text of one string into the text of another results in the scrambled names.
Yeah, pointers are important :P. For the item/monster/price/spell lists, you'll need to update the pointers at 0x6842-0x6851 so that they each point to the same thing in your new text as they did in the original; 0x6842-0x6843 needs to point to the start of your new spell list, 0x6844-0x6845 needs to point to the start of your new item list, etc. For the menus, you'll need to do the same thing with all the pointers at 0x6F7C-0x6FBF; 0x6F7C-0x6F7D needs to point to the start of your new LV/HP/MP/etc. menu, 0x6F7E-0x6F7F needs to point to the start of your new NAME:/STRENGTH:/AGILITY:/etc. menu, and so on for the rest of the pointers.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on June 03, 2018, 05:28:54 PM
Quote from: abw on June 02, 2018, 08:41:07 PM
Hmm, I get the same thing too. It looks like Atlas crashes when it tries to report an error on a script line that's too long (some light experimentation suggests that 466 characters is the limit). Try splitting that really long line into a bunch of shorter lines and see what happens. You'll at least need to change the format of the byte tokens - Atlas uses e.g. <$B1> instead of just <B1>.

Shortening each of the lengths was actually one of the solutions that gave me a (somewhat) working item list. I recently started testing things out and found a few problems with the script (pictures below). Which brings me to...

Quote from: abw on June 02, 2018, 08:41:07 PM
Yeah, pointers are important :P. For the item/monster/price/spell lists, you'll need to update the pointers at 0x6842-0x6851 so that they each point to the same thing in your new text as they did in the original; 0x6842-0x6843 needs to point to the start of your new spell list, 0x6844-0x6845 needs to point to the start of your new item list, etc.

Great! This is exactly what I wanted to hear!

...

How do I do that? I've read through this (http://www.romhacking.net/documents/47/), and it was very informative (and fun to read). However, iIrc, it only explained how to find pointers (which...I tried the main method and—maybe I did something wrong—it didn't seem to direct me to the pointers you mentioned for this particular game) and how to redirect a pointer from one text string to another. It doesn't give too much info in "Fixed Length" strings, which is what I think the lists are in DW. Is there a way to make the pointers point to any byte in the ROM and, therefore, take full advantage of the pointers to maximize use of space?

Quote from: abw on June 02, 2018, 08:41:07 PM
For the menus, you'll need to do the same thing with all the pointers at 0x6F7C-0x6FBF; 0x6F7C-0x6F7D needs to point to the start of your new LV/HP/MP/etc. menu, 0x6F7E-0x6F7F needs to point to the start of your new NAME:/STRENGTH:/AGILITY:/etc. menu, and so on for the rest of the pointers.

Thanks for the tip on the menus ;) Also, welcome back to the internet. I take it you've returned from your adventures?

Also also, here are the pics I mentioned above. (https://imgur.com/gallery/BlZhrfA) Not much, but it isn't quite done yet :P
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on June 04, 2018, 09:15:56 AM
Quote from: werewolfslayr925 on June 03, 2018, 05:28:54 PM
It doesn't give too much info in "Fixed Length" strings, which is what I think the lists are in DW.
DW's item lists use variable length strings terminated by a $FF byte. Fixed length strings are when you have a bunch of strings one after the other that each have the same length, like this:


$8000:Fire  Ice   Bolt  PoisonDrain Fire 2Ice 2 Bolt 2Bio   Fire 3Ice 3 Bolt 3


With fixed length strings, a game usually just keeps a pointer to the very first list item and then does some math to find any other item in the list. E.g., if we wanted the spell name at index 3 in this list of 6-byte long spell names, we could take the desired index (3), multiply it by the fixed length (6), and then add that to the address of the first spell name ($8000) and get $8000 + 3 * 6 = $8012, a.k.a. the start of Poison.

Quote from: werewolfslayr925 on June 03, 2018, 05:28:54 PM
How do I do that?
In this case, we've already located some pointers to the item lists at 0x6842-0x6851. In general, it's entirely possible that there might be other pointers to the same data elsewhere in the ROM (I've seen games where a string address is hardcoded into the ASM in dozens of different places; tracking all of those down is a pain), but for now let's pretend that Dragon Warrior is going to keep being nice to us and only uses the one pointer table we know about.

If you look in the original ROM, you'll see

$6840:.. .. 56 BE B7 BA B7 BB 8F BB 4F BC 0E BE 70 BC
$6850:A2 BD

Those are your pointers. The NES hardware expects pointers to be stored in 2 byte little endian format, so that's almost always what games do. The first pointer in the list, 56 BE, corresponds to RAM address $BE56, which since we're in ROM bank 1 that will be loaded into RAM bank 0, is ROM address 0x7E66, i.e. the start of the original spell name list. If your new spell name list starts at ROM 0x7E87 instead, you'll need to take your ROM address 0x7E87, convert it to RAM address $BE87, and then change the pointer at 0x6842 to say 87 BE instead of 56 BE. Then you need to do the same for every other pointer in the list. Then you need to do the same for all the menu pointers.

The individual steps aren't difficult, but doing all those calculations and typing into a hex editor by hand is time consuming and error prone. Do it manually a couple of times until you understand what's going on, but then get your insertion utility to do all this tedious stuff for you - stick a "#W16($6842)" just before the start of your spell list, a "#W16($684C)" just before the start of your price list, etc.

Oh, there's one other thing you'll need to change in your insert script - the main dialogue was in ROM bank 2 loaded into RAM bank 0, so the difference between ROM and RAM addresses was only $10 (for the iNES header); the item lists, on the other hand, are in ROM bank 1 loaded into RAM bank 0, so the difference between ROM and RAM addresses is $-3FF0 ($-4000 for being in ROM bank 1 + $10 for the iNES header). I think the "correct" way of doing that in Atlas is to use custom pointers, but I always cheat and just use the #HDR command to change the address calculation instead. For all of the work you do in ROM bank 1 (i.e. 0x4010-0x800F), set #HDR($-3FF0); use #HDR($10) for the work you do in ROM bank 2 (i.e. 0x8010-0xC00F).
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on June 04, 2018, 01:01:33 PM
Quote from: abw on June 04, 2018, 09:15:56 AM
DW's item lists use variable length strings terminated by a $FF byte. Fixed length strings are when you have a bunch of strings one after the other that each have the same length, like this:


$8000:Fire  Ice   Bolt  PoisonDrain Fire 2Ice 2 Bolt 2Bio   Fire 3Ice 3 Bolt 3


With fixed length strings, a game usually just keeps a pointer to the very first list item and then does some math to find any other item in the list. E.g., if we wanted the spell name at index 3 in this list of 6-byte long spell names, we could take the desired index (3), multiply it by the fixed length (6), and then add that to the address of the first spell name ($8000) and get $8000 + 3 * 6 = $8012, a.k.a. the start of Poison.

Gotcha. I didn't realize that a fixed length is always so short. The reason I thought that DW had a fixed length string is because the item/enemy lists are split into multiple sections (usually in a long-short-long-short pattern). I didn't count the bytes, but I thought that the length of each section of the text dump was one long string

Quote from: abw on June 04, 2018, 09:15:56 AM
In this case, we've already located some pointers to the item lists at 0x6842-0x6851. In general, it's entirely possible that there might be other pointers to the same data elsewhere in the ROM (I've seen games where a string address is hardcoded into the ASM in dozens of different places; tracking all of those down is a pain), but for now let's pretend that Dragon Warrior is going to keep being nice to us and only uses the one pointer table we know about.

If you look in the original ROM, you'll see

$6840:.. .. 56 BE B7 BA B7 BB 8F BB 4F BC 0E BE 70 BC
$6850:A2 BD

Those are your pointers. The NES hardware expects pointers to be stored in 2 byte little endian format, so that's almost always what games do. The first pointer in the list, 56 BE, corresponds to RAM address $BE56, which since we're in ROM bank 1 that will be loaded into RAM bank 0, is ROM address 0x7E66, i.e. the start of the original spell name list. If your new spell name list starts at ROM 0x7E87 instead, you'll need to take your ROM address 0x7E87, convert it to RAM address $BE87, and then change the pointer at 0x6842 to say 87 BE instead of 56 BE. Then you need to do the same for every other pointer in the list. Then you need to do the same for all the menu pointers.

The individual steps aren't difficult, but doing all those calculations and typing into a hex editor by hand is time consuming and error prone. Do it manually a couple of times until you understand what's going on, but then get your insertion utility to do all this tedious stuff for you - stick a "#W16($6842)" just before the start of your spell list, a "#W16($684C)" just before the start of your price list, etc.

OOOOKAY!! I think I understand this now. For some reason, I was under the impression that the values in the parentheses in the #W16 commands were the starting points for the text (instead of pointers for the text). (This was before I read The Mad Hacker's document.) I think I understand better now how to use Atlas.

There is one potential problem, though: will I still have problems with the items that, in the original ROM, go beyond the territory of one pointer and into the territory of another? Or can I just lump those items/enemies in on one side or the other once I start making pointers follow my every whim and command (mwahaha).

Quote from: abw on June 04, 2018, 09:15:56 AM
Oh, there's one other thing you'll need to change in your insert script - the main dialogue was in ROM bank 2 loaded into RAM bank 0, so the difference between ROM and RAM addresses was only $10 (for the iNES header); the item lists, on the other hand, are in ROM bank 1 loaded into RAM bank 0, so the difference between ROM and RAM addresses is $-3FF0 ($-4000 for being in ROM bank 1 + $10 for the iNES header). I think the "correct" way of doing that in Atlas is to use custom pointers, but I always cheat and just use the #HDR command to change the address calculation instead. For all of the work you do in ROM bank 1 (i.e. 0x4010-0x800F), set #HDR($-3FF0); use #HDR($10) for the work you do in ROM bank 2 (i.e. 0x8010-0xC00F).

This intrigues me. So, I can glean from this that bank 0 is the RAM and goes from 0x0000 to 0x3FFF, bank 1 is ROM and goes from 0x4000 to 0x7fff, and bank 2 is also ROM and goes from 0x8000 to the end of the ROM (0x14000)? Or is it one bank per 0x4000 bytes with the first 0x4000 bytes being RAM and everything beyond that being ROM? Also, I'm a bit unclear on the relationship between the header, the RAM, and the ROM. Does that only affect emulators, or does it also make a difference if running the game on original hardware?
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on June 04, 2018, 09:19:25 PM
Quote from: werewolfslayr925 on June 04, 2018, 01:01:33 PM
I didn't realize that a fixed length is always so short.
Fixed length strings can be any length, really; that example just happened to use strings with a length of 6. Elsewhere in the same game you can find fixed length strings with lengths anywhere between 6 and 14 bytes, and if you look at other games you can find other examples both longer and shorter.

Quote from: werewolfslayr925 on June 04, 2018, 01:01:33 PM
There is one potential problem, though: will I still have problems with the items that, in the original ROM, go beyond the territory of one pointer and into the territory of another?
Not if you do it right :P. As long as all the pointers are pointing to the right strings (or groups of strings in DW's case), you can move the strings pretty much anywhere you want to in RAM. Of course, if you try to move them to somewhere already occupied by other code/data, it'll be more work because you'll have to find a new home for that code/data and update any references to it, but DW has a fair bit of free space for you to make use of if you need it.

Quote from: werewolfslayr925 on June 04, 2018, 01:01:33 PM
This intrigues me. So, I can glean from this that bank 0 is the RAM and goes from 0x0000 to 0x3FFF, bank 1 is ROM and goes from 0x4000 to 0x7fff, and bank 2 is also ROM and goes from 0x8000 to the end of the ROM (0x14000)? Or is it one bank per 0x4000 bytes with the first 0x4000 bytes being RAM and everything beyond that being ROM?
Not quite - this goes back to mappers. Remember that DW has a total of 64k of PRG ROM, 32k of the NES's 64k address space gets mapped to PRG ROM, and DW configures its MMC1 mapper to use two 16k RAM banks. So, you can think of the NES's 32k RAM as being split into banks 0 ($8000-$BFFF) and 1 ($C000-$FFFF), and DW's 64k of PRG ROM as being split into banks 0 (0x0010-0x400F), 1 (0x4010-0x800F), 2 (0x8010-0xC00F), and 3 (0xC010-0x1000F). In DW's case, the last RAM bank (1) is fixed to the last ROM bank (3), and it swaps whichever of the other ROM banks it wants to read from into RAM bank 0 as needed; put another way, ROM banks 0, 1, and 2 all get mapped to RAM bank 0, and ROM bank 3 always gets mapped to RAM bank 1.

Quote from: werewolfslayr925 on June 04, 2018, 01:01:33 PM
Also, I'm a bit unclear on the relationship between the header, the RAM, and the ROM. Does that only affect emulators, or does it also make a difference if running the game on original hardware?
As for the iNES header... the actual ROM on physical hardware only contains the ROM, so for the NES, there's a $10 byte header that contains extra information about the rest of the hardware, things like whether there's any PRG RAM, whether it's battery-backed, what mapper it uses, etc. The header isn't part of the physical ROM, but is included as part of the ROM file so that emulators know what additional hardware they need to emulate besides the NES itself.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on June 08, 2018, 04:30:28 PM
Quote from: abw on June 04, 2018, 09:19:25 PM
Not if you do it right

Okay, and how would that be? This is really starting to frustrate me, and it's getting to the point where I really don't want to finish this. No matter what I do it never reads the script how it should. When I set a pointer to a string of text, do I start with the word itself or with the [ITM] code? Should I handle text that's cut off like this:


#VAR(dwSP4, TABLE)
#ADDTBL("dwSP4.tbl", dwSP4)
#ACTIVETBL(dwSP4)

#HDR($10)

#JMP($7AC6)

#W16($7AC6)
[60]Palo[ITM]Porra[ITM]Espada[ITM]Hacha[ITM]Sable[ITM]Espada[ITM]Espada[ITM]Ropas[ITM]Armadura[ITM]Cota[ITM]Corasa[ITM]Petral[ITM]Armadura[ITM]Armadura[ITM]Rodela[ITM]Escudo[ITM]Escudo[ITM]Hierba[ITM]Hachón[ITM]Escama[ITM]Alas[ITM]Llave[ITM]Agua[ITM]Orbe de[ITM]Tableta[ITM]Flauta[ITM]Lira[ITM]Caña[ITM]Piedra del[ITM]Amor de[ITM]G


or like this:


#VAR(dwSP4, TABLE)
#ADDTBL("dwSP4.tbl", dwSP4)
#ACTIVETBL(dwSP4)

#HDR($10)

#JMP($7AC6)

#W16($7AC6)
[60]Palo[ITM]Porra[ITM]Espada[ITM]Hacha[ITM]Sable[ITM]Espada[ITM]Espada[ITM]Ropas[ITM]Armadura[ITM]Cota[ITM]Corasa[ITM]Petral[ITM]Armadura[ITM]Armadura[ITM]Rodela[ITM]Escudo[ITM]Escudo[ITM]Hierba[ITM]Hachón[ITM]Escama[ITM]Alas[ITM]Llave[ITM]Agua[ITM]Orbe de[ITM]Tableta[ITM]Flauta[ITM]Lira[ITM]Caña[ITM]Piedra del[ITM]Amor de[ITM]Gota del


EDIT:

Nevermind. I just ended up inserting and then editing the pointers by hand.

Now I've got a different problem. After inserting everything and making sure that all my pointers are in order, I keep having a problem with two enemies in particular. Screenshots can be found here: https://imgur.com/a/anAsLtw

I've been having this problem for weeks and I can't find out where that "n" is coming from. I tried deleting the entire second tier in the enemy name list and it still appears. The script is also well within its borders. Any ideas?

EDIT2:

I discovered that, for some reason, using "E" after an "[ITM]" command (FF) in the monster list results in the E being preceded by "n " (i.e. "n" and a space). This can be resolved by placing a space (" ") in between the "[ITM]" command in the script. Weird.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: abw on June 09, 2018, 12:30:57 AM
Quote from: werewolfslayr925 on June 08, 2018, 04:30:28 PM
Okay, and how would that be?
An insert script for the original text (using Psyklax's table file) looks like this:

#VAR(Table, TABLE)
#ADDTBL("dw.tbl", Table)
#ACTIVETBL(Table)

#JMP($7AC7, $7EAF)
#HDR($-3FF0)

#W16($6844)
Bamboo[ITM]Club[ITM]Copper[ITM]Hand[ITM]Broad[ITM]Flame[ITM]Erdrick}s[ITM]Clothes[ITM]Leather[ITM]Chain[ITM]Half[ITM]Full[ITM]Magic[ITM]Erdrick}s[ITM]Small[ITM]Large[ITM]Silver[ITM]Herb[ITM]Torch[ITM]Dragon}s[ITM]Wings[ITM]Magic[ITM]Fairy[ITM]Ball of[ITM]Tablet[ITM]Fairy[ITM]Silver[ITM]Staff of[ITM]Stones of[ITM]Gwaelin}s[ITM]Rainbow[ITM]

#W16($6848)
Cursed[ITM]Death[ITM]Fighter}s[ITM]Erdrick}s[ITM]Secret[ITM]

#W16($6846)
Pole[ITM][ITM]Sword[ITM]Axe[ITM]Sword[ITM]Sword[ITM]Sword[ITM][ITM]Armor[ITM]Mail[ITM]Plate[ITM]Plate[ITM]Armor[ITM]Armor[ITM]Shield[ITM]Shield[ITM]Shield[ITM][ITM][ITM]Scale[ITM][ITM]Key[ITM]Water[ITM]Light[ITM][ITM]Flute[ITM]Harp[ITM]Rain[ITM]Sunlight[ITM]Love[ITM]Drop[ITM]

#W16($684A)
Belt[ITM]Necklace[ITM]Ring[ITM]Token[ITM]Passage[ITM]

// etc.


Some points to note:
Quote from: werewolfslayr925 on June 08, 2018, 04:30:28 PM
I discovered that, for some reason, using "E" after an "[ITM]" command (FF) in the monster list results in the E being preceded by "n " (i.e. "n" and a space). This can be resolved by placing a space (" ") in between the "[ITM]" command in the script. Weird.
This is coming from some ASM code. In English, normal battles start with the message "A <monster name> draws near!", except that isn't proper English when <monster name> starts with a vowel (i.e. A, E, I, O, U, and sometimes Y), so in those cases* the game adds an extra "n " and uses "An <monster name> draws near!" instead. Does Spanish have any similar behaviour?

*: Actually only for A, E, I, and U - the game doesn't check for Y at all and the check for O is broken; in the original game it doesn't really matter since the only monster names that start with a vowel all start with A, so this isn't a bug that would show up without hacking the game.
Title: Re: Dragon Warrior 1 Spanish Translation
Post by: werewolfslayr925 on June 09, 2018, 05:54:37 PM
Quote from: abw on June 09, 2018, 12:30:57 AM
An insert script for the original text (using Psyklax's table file) looks like this:

#VAR(Table, TABLE)
#ADDTBL("dw.tbl", Table)
#ACTIVETBL(Table)

#JMP($7AC7, $7EAF)
#HDR($-3FF0)

#W16($6844)
Bamboo[ITM]Club[ITM]Copper[ITM]Hand[ITM]Broad[ITM]Flame[ITM]Erdrick}s[ITM]Clothes[ITM]Leather[ITM]Chain[ITM]Half[ITM]Full[ITM]Magic[ITM]Erdrick}s[ITM]Small[ITM]Large[ITM]Silver[ITM]Herb[ITM]Torch[ITM]Dragon}s[ITM]Wings[ITM]Magic[ITM]Fairy[ITM]Ball of[ITM]Tablet[ITM]Fairy[ITM]Silver[ITM]Staff of[ITM]Stones of[ITM]Gwaelin}s[ITM]Rainbow[ITM]

#W16($6848)
Cursed[ITM]Death[ITM]Fighter}s[ITM]Erdrick}s[ITM]Secret[ITM]

#W16($6846)
Pole[ITM][ITM]Sword[ITM]Axe[ITM]Sword[ITM]Sword[ITM]Sword[ITM][ITM]Armor[ITM]Mail[ITM]Plate[ITM]Plate[ITM]Armor[ITM]Armor[ITM]Shield[ITM]Shield[ITM]Shield[ITM][ITM][ITM]Scale[ITM][ITM]Key[ITM]Water[ITM]Light[ITM][ITM]Flute[ITM]Harp[ITM]Rain[ITM]Sunlight[ITM]Love[ITM]Drop[ITM]

#W16($684A)
Belt[ITM]Necklace[ITM]Ring[ITM]Token[ITM]Passage[ITM]

// etc.
    That's good to know, but the dump didn't come out this way when I used Pointer Tables. For example, "Rainbow" was cut off right after the R and it bled over next to "Cursed[ITM]". Oh well.

    Quote
    • there is apparently a "Secret Passage" item in the game; who knew?

    Yeah, that's what I said. I think maybe Erdrick's Tablet was meant to be an item at some point? I'll take a look at tcrf to see if they have any info on that.

    Quote
    This is coming from some ASM code. In English, normal battles start with the message "A <monster name> draws near!", except that isn't proper English when <monster name> starts with a vowel (i.e. A, E, I, O, U, and sometimes Y), so in those cases* the game adds an extra "n " and uses "An <monster name> draws near!" instead. Does Spanish have any similar behaviour?

    *: Actually only for A, E, I, and U - the game doesn't check for Y at all and the check for O is broken; in the original game it doesn't really matter since the only monster names that start with a vowel all start with A, so this isn't a bug that would show up without hacking the game.

    See, I didn't know this. I wish I had known this. Thanks for clearing that up and for the points about the Atlas code. I'll post here again when I have trouble with and/or have completed the menus. (That said, what's the rule here on double-posting?)
    Title: Re: Dragon Warrior 1 Spanish Translation
    Post by: abw on June 20, 2018, 05:51:05 PM
    Quote from: werewolfslayr925 on June 09, 2018, 05:54:37 PM
    That's good to know, but the dump didn't come out this way when I used Pointer Tables.
    Yeah, that's kind of what I figured from the errors you were getting, which is why I kept going on about pointers :P. As long as you've got it working somehow, though, it's all good!

    Quote from: werewolfslayr925 on June 09, 2018, 05:54:37 PM
    Yeah, that's what I said. I think maybe Erdrick's Tablet was meant to be an item at some point? I'll take a look at tcrf to see if they have any info on that.
    So, it turns out the "Secret Passage" item is actually the secret passage in Charlock castle and shows up as "[INV]" in "[ME] discovers the [INV]".

    Quote from: werewolfslayr925 on June 09, 2018, 05:54:37 PM
    See, I didn't know this. I wish I had known this.
    Yeah, I had forgotten how much English-specific stuff was in this game. Here's another example that comes from ASM code: it turns out that "[PNT]" and "[XP]" both print out " Point", but they also add "s" if the relevant number is greater than 1 (e.g. "1 Point" vs. "2 Points"). As an aside, I think the "[PNT]" code is over-used; you get text like "Thy Hit Point decreased by 1." and "Thy Hit Points decreased by 2." when really it should just be "Hit Points" all the time. Oh well.

    Anyway, for those control codes, you'll be interested in 0x7761-0x7766 (the "tnioP " - the ASM code reads the string in reverse) and 0x7756 (the "s"); once you figure out how you want to handle those control codes, I might be able to provide some suggestions. I've also jumped ahead and taken a look at the menu, title screen, and end credits, so I should be able to help with those too.

    Quote from: werewolfslayr925 on June 09, 2018, 05:54:37 PM
    (That said, what's the rule here on double-posting?)
    At one point in the past, following your own post with a separate post within a week of the first post was considered an offense (you were supposed to edit your previous post instead of making a new one), but later on the auto-merge feature was added, so now when you attempt to make a second post, automatically you end up editing your previous post instead; the net effect is that double-posting isn't really an issue anymore, though sometimes edits don't show up as new on the main board. Post away all you want (within reason, of course :P)!
    Title: Re: Dragon Warrior 1 Spanish Translation
    Post by: werewolfslayr925 on June 22, 2018, 02:59:37 PM
    Quote from: abw on June 20, 2018, 05:51:05 PM
    So, it turns out the "Secret Passage" item is actually the secret passage in Charlock castle and shows up as "[INV]" in "[ME] discovers the [INV]".

    Ah! That's interesting, especially since it's categorized under the items. Clever that they did that.

    Quote from: abw on June 20, 2018, 05:51:05 PM
    Yeah, I had forgotten how much English-specific stuff was in this game. Here's another example that comes from ASM code: it turns out that "[PNT]" and "[XP]" both print out " Point", but they also add "s" if the relevant number is greater than 1 (e.g. "1 Point" vs. "2 Points"). As an aside, I think the "[PNT]" code is over-used; you get text like "Thy Hit Point decreased by 1." and "Thy Hit Points decreased by 2." when really it should just be "Hit Points" all the time. Oh well.

    I tested this out in the translation, and it shouldn't be a problem since I didn't get any extra "s" characters in the text. My HP depletion text still reads "puntos". Perhaps the control code just looks for the word "Points"?

    Quote from: abw on June 20, 2018, 05:51:05 PM
    I've also jumped ahead and taken a look at the menu, title screen, and end credits, so I should be able to help with those too.

    I'm working on this with the trace logger right now. Using your guide on the previous page of this thread, I'm trying to find out where the "T" in "TALK" comes from. (I tried it first with the "L" in "LV" but was having problems, so I switched over...). My only qualm so far is with the formatting. The logger gives me commands the formatting of which are the reverse of how you format your log for "TORCH"—i.e. they look like this:


    A:5F X:05 Y:08 S:E8 P:nvUbdIzc                        $FE4D:D0 F6     BNE $FE45
    A:5F X:05 Y:08 S:E8 P:nvUbdIzc                        $FE45:BD 00 03  LDA $0300,X @ $0305 = #$37
    A:37 X:05 Y:08 S:E8 P:nvUbdIzc                        $FE48:E8        INX


    instead of the way it looks in your comment. (For some reason, when I copy and paste it here, the formatting gets wonky).

    A small nitpick, but it makes it slightly more difficult for me to follow along. Is there a remedy for that?

    Quote from: abw on June 20, 2018, 05:51:05 PM
    At one point in the past, following your own post with a separate post within a week of the first post was considered an offense (you were supposed to edit your previous post instead of making a new one), but later on the auto-merge feature was added, so now when you attempt to make a second post, automatically you end up editing your previous post instead; the net effect is that double-posting isn't really an issue anymore, though sometimes edits don't show up as new on the main board. Post away all you want (within reason, of course :P)!

    Good to know :3 Glad they implemented the auto-merge feature.


    EDIT: Looking through the trace log file, I (think I) followed the trail to this:



    A:01 X:03 Y:10 S:F0 P:nVUbdIzc                $A2ED:B1 9F     LDA ($9F),Y @ $B064 = #$37
    A:37 X:03 Y:10 S:F0 P:nVUbdIzc                $A2EF:10 10     BPL $A301
    A:37 X:03 Y:10 S:F0 P:nVUbdIzc                $A301:8D DD 64  STA $64DD = #$5F


    A quick Google search yields that BPL means "Branch on Result Plus" (whatever the heck that means). However, looking at the code at $6311 doesn't give me a hex pair that looks like a pointer. Looking instead at 7054 (which corresponds to $B064) shows me the "L" in "SHIELD". How far back should I go? For what kind of command am I looking? I'm really lost...
    Title: Re: Dragon Warrior 1 Spanish Translation
    Post by: abw on June 22, 2018, 10:40:39 PM
    Quote from: werewolfslayr925 on June 22, 2018, 02:59:37 PM
    Ah! That's interesting, especially since it's categorized under the items. Clever that they did that.
    Yeah, it looks like the items you find by searching use the "[ME] discovers the [INV]." text, and the items you get from chests use the "Fortune smiles upon thee, [ME].&Thou hast found the [INV].%" text. The items you get from talking to people don't use any text at all :P. There's some more cleverness in store for you if/when you start editing the title screen/end credits graphics >:D.

    Quote from: werewolfslayr925 on June 22, 2018, 02:59:37 PM
    I tested this out in the translation, and it shouldn't be a problem since I didn't get any extra "s" characters in the text. My HP depletion text still reads "puntos". Perhaps the control code just looks for the word "Points"?
    No, both "[PNT]" and "[XP]" print out extra text that doesn't show up there in the text dump. As long as you're not using "[PNT]" in your text, that part should be fine, but if you're using "[XP]", you'll still see "Before reaching thy next level of experience thou must gain 1 Point" / "2 Points" when talking to the King. The easiest way around that is to use "[NUM]", but if you do want different text for 1 vs. more than 1, the game is already set up to do that for those 2 control codes, so it shouldn't be too much more work to just change that text a bit.

    Quote from: werewolfslayr925 on June 22, 2018, 02:59:37 PM
    My only qualm so far is with the formatting.
    Ah, an easy problem, the best kind to have :D. In the Trace Logger window, under Log Options, there's a "To the left from disassembly" checkbox (beside the "Log Processor status flags" checkbox it refers to) that controls that. Which one is best depends on the situation and your personal preference - try them both and choose!

    Quote from: werewolfslayr925 on June 22, 2018, 02:59:37 PM
    EDIT: Looking through the trace log file, I (think I) followed the trail to this:
    Congratulations, that is indeed the "T" in "TALK"! If you keep following the log further back, you'll eventually reach the code that starts reading that string (in this particular case, that's when Y=#$00, though the same can't be said in general):

    $A1E6:B1 9F     LDA ($9F),Y @ $B054 = #$80                   A:B0 X:00 Y:00 S:F0 P:nvUBdIZc

    And that's where things start to get interesting. Dragon Warrior's menu strings start with between 4 and 7 bytes that specify some of the menu window's properties, such as how many lines to print and how many characters wide the window is, and then continue until that many lines of text have been read. So, finding the end of each string is a little bit complicated. Fortunately, Dragon Warrior doesn't seem to waste any bytes in between strings and the final string is immediately followed by code (if you keep the Code/Data Logger open while you play through the game, it will eventually become pretty good at telling you what bytes are code and what bytes are data), so one way you can tackle the problem is to just dump the entire block from 0x6FC0-0x752C and match that up with the pointer table at 0x6F7C-0x6FBF, which I hear Pointer Tables is pretty good at. The corresponding Atlas insert script looks like this (I've kept the window setup bytes as raw hex to make it clear that they are not text and should not be treated as such during insertion):

    #JMP($6FC0, $752C)

    #W16($6F7C)
    <$01><$06><$08><$21><$89><$B0><$88>LV<$82><$A0>HP<$81><$90>MP<$81><$94>G<$98>E<$A8>

    #W16($6F7E)
    <$21><$0B><$14><$35><$88><$85>NAME:<$B1><$80><$86>STRENGTH:<$D8><$80><$87>AGILITY:<$D9><$80><$84>MAXIMUM<$81>HP:<$DC><$80><$84>MAXIMUM<$81>MP:<$DD><$80><$82>ATTACK<$81>POWER:<$DA><$80><$81>DEFENSE<$81>POWER:<$DB><$80><$82>WEAPON:<$B8><$87><$83><$B8><$83>ARMOR:<$B9><$87><$83><$B9><$82>SHIELD:<$BA><$87><$83><$BA>

    #W16($6F80)
    <$01><$05><$18><$92><$88><$80><$80><$80><$80>

    #W16($6F82)
    <$80><$05><$10><$16><$08><$21><$8B>COMMAND<$88><$81>TALK<$84>SPELL<$81>STATUS<$82>ITEM<$80><$81>STAIRS<$82>DOOR<$80><$81>SEARCH<$82>TAKE<$80>

    #W16($6F84)
    <$80><$03><$10><$16><$08><$21><$8B>COMMAND<$88><$81>FIGHT<$83>SPELL<$81>RUN<$85>ITEM<$80>

    #W16($6F86)
    #W16($6F88)
    <$80><$0B><$0C><$29><$00><$21><$8B>SPELL<$88><$D6><$81><$C0><$E8><$E9>

    #W16($6F8A)
    <$A0><$0B><$0C><$39><$00><$11><$88><$D4><$81><$BB><$82><$BB><$E8><$E9>

    #W16($6F8C)
    <$A0><$08><$12><$25><$00><$11><$88><$D5><$81><$BC><$81><$C8><$82><$BC><$80><$E8><$E9>

    #W16($6F8E)
    <$80><$03><$08><$25><$00><$21><$88><$81>YES<$80><$81>NO<$80>

    #W16($6F90)
    <$80><$03><$08><$25><$00><$21><$88><$81>BUY<$80><$81>SELL<$80>

    #W16($6F92)
    <$01><$07><$18><$52><$88><$81>A<$81>B<$81>C<$81>D<$81>E<$81>F<$81>G<$81>H<$81>I<$81>J<$81>K<$81>L<$81>M<$81>N<$81>O<$81>P<$81>Q<$81>R<$81>S<$81>T<$81>U<$81>V<$81>W<$81>X<$81>Y<$81>Z<$81>-<$81>}<$81>!<$81>?<$81>(<$81>)<$80><$81>a<$81>b<$81>c<$81>d<$81>e<$81>f<$81>g<$81>h<$81>i<$81>j<$81>k<$81>l<$81>m<$81>n<$81>o<$81>p<$81>q<$81>r<$81>s<$81>t<$81>u<$81>v<$81>w<$81>x<$81>y<$81>z<$81>,<$81>.<$81>BACK<$82>END

    #W16($6F94)
    <$A1><$07><$12><$74><$00><$86><$88><$81>Which<$81>Message<$80><$80><$81>Speed<$81>Do<$81>You<$80><$80><$81>Want<$81>To<$81>Use?<$80><$80><$80><$86>FAST<$80><$80><$86>NORMAL<$80><$80><$86>SLOW<$80>

    #W16($6F96)
    <$01><$02><$14><$73><$88><$81>INPUT<$81>YOUR<$81>NAME!<$80>

    #W16($6F98)
    <$01><$03><$0C><$35><$8B>NAME<$88><$81>********<$80>

    #W16($6F9A)
    <$81><$04><$18><$42><$00><$21><$88><$81>CONTINUE<$81>A<$81>QUEST<$80><$81>CHANGE<$81>MESSAGE<$81>SPEED<$80><$81>ERASE<$81>A<$81>QUEST<$80>

    #W16($6F9C)
    <$81><$06><$18><$42><$00><$21><$88><$81>CONTINUE<$81>A<$81>QUEST<$80><$81>CHANGE<$81>MESSAGE<$81>SPEED<$80><$81>BEGIN<$81>A<$81>NEW<$81>QUEST<$80><$81>COPY<$81>A<$81>QUEST<$80><$81>ERASE<$81>A<$81>QUEST<$80>

    #W16($6F9E)
    <$81><$02><$18><$42><$00><$21><$88><$81>BEGIN<$81>A<$81>NEW<$81>QUEST<$80>

    #W16($6FA0)
    <$81><$02><$14><$95><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>1<$80>

    #W16($6FA2)
    <$81><$02><$14><$95><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>2<$80>

    #W16($6FA4)
    <$81><$03><$14><$95><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>1<$80><$81>ADVENTURE<$81>LOG<$81>2<$80>

    #W16($6FA6)
    <$81><$02><$14><$95><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>3<$80>

    #W16($6FA8)
    <$81><$03><$14><$95><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>1<$80><$81>ADVENTURE<$81>LOG<$81>3<$80>

    #W16($6FAA)
    <$81><$03><$14><$95><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>2<$80><$81>ADVENTURE<$81>LOG<$81>3<$80>

    #W16($6FAC)
    <$81><$04><$14><$95><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>1<$80><$81>ADVENTURE<$81>LOG<$81>2<$80><$81>ADVENTURE<$81>LOG<$81>3<$80>

    #W16($6FAE)
    <$81><$02><$18><$63><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>1:<$B5><$80>

    #W16($6FB0)
    <$81><$02><$18><$63><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>2:<$B6><$80>

    #W16($6FB2)
    <$81><$03><$18><$63><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>1:<$B5><$80><$81>ADVENTURE<$81>LOG<$81>2:<$B6><$80>

    #W16($6FB4)
    <$81><$02><$18><$63><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>3:<$B7><$80>

    #W16($6FB6)
    <$81><$03><$18><$63><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>1:<$B5><$80><$81>ADVENTURE<$81>LOG<$81>3:<$B7><$80>

    #W16($6FB8)
    <$81><$03><$18><$63><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>2:<$B6><$80><$81>ADVENTURE<$81>LOG<$81>3:<$B7><$80>

    #W16($6FBA)
    <$81><$04><$18><$63><$00><$21><$88><$81>ADVENTURE<$81>LOG<$81>1:<$B5><$80><$81>ADVENTURE<$81>LOG<$81>2:<$B6><$80><$81>ADVENTURE<$81>LOG<$81>3:<$B7><$80>

    #W16($6FBC)
    <$01><$06><$14><$73><$88><$81><$B4><$80><$81>LEVEL<$82><$A1><$80><$81>Do<$81>You<$81>Want<$81>To<$80><$81>Erase<$81>This<$80><$81>Character?<$80>

    #W16($6FBE)
    <$80><$03><$08><$3A><$00><$21><$88><$81>YES<$80><$81>NO<$80>


    Quote from: werewolfslayr925 on June 22, 2018, 02:59:37 PM
    A quick Google search yields that BPL means "Branch on Result Plus" (whatever the heck that means).
    When you think of a byte as being a 2's complement (https://en.wikipedia.org/wiki/Two%27s_complement) integer, it's positive (Plus) when the high bit is 0 and negative (Minus) otherwise, so BPL means "go to this address if the negative processor flag is not set"; LDA updates the negative and zero flags based on the value it loads, so this boils down to "go to $A301 if the byte we just loaded is positive". The "negative" bytes with values >= #$80 get chopped up into a 4-bit index into a function jump table and a 3-bit parameter to the function that gets called; you'll be interested in at least #$80 (new line) and #$81 - #$87 (print 1 to 7 spaces).
    Title: Re: Dragon Warrior 1 Spanish Translation
    Post by: werewolfslayr925 on June 22, 2018, 10:53:46 PM
    At this point I really don't care about learning anything about this anymore. I've come to hate this project and to hate programming even more than I did before starting it. If you don't mind, would you be willing to just give me any further pointer locations/info I need to know for inserting the credits and editing the title screen? I'm really sick of this and want it to be over with.
    Title: Re: Dragon Warrior 1 Spanish Translation
    Post by: abw on June 23, 2018, 05:40:28 PM
    Well, that's depressing :(. When a hobby starts to be more like work than fun (and ROM hacking can definitely be a very large amount of work), maybe it's time to take a break for a little while and come back feeling refreshed. I know that's helped me on more than one occasion! As for the title screen and credits, try this on for size:


    #JMP($3DDC, $3FD9)
    // Title Screen data starts being written to PPU $2000.
    // Control code F7 takes 2 bytes (A, B) as parameters and means "write byte B A times" so e.g. F7 04 5F results in 5F 5F 5F 5F being written to the PPU; it's a simple RLE compression.
    // Control code FC does nothing useful until we reach PPU $2400, at which point it signals the end of the title screen data; as such, only the final FC actually matters.
    // There are also some other inefficiencies in the original data that you can take advantage of if you need more space for text.

    // 4 rows of spaces
    <$F7><$80><$5F><$FC>
    // 1 row of spaces
    <$F7><$20><$5F><$FC>
    // top border
    <$F7><$20><$AD><$FC>
    // speckled background
    <$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$FC>
    <$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$FC>
    <$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$FC>
    <$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$FC>

    // speckled background with DRAGON WARRIOR graphics
    <$A9><$AA><$A9><$74><$75><$76><$77><$78><$79><$7A><$7B><$7C><$7D><$7E><$7F><$80><$81><$82><$83><$84><$85><$86><$85><$86><$87><$88><$89><$8A><$8B><$8C><$A9><$AA><$FC>
    <$AB><$AC><$AB><$8D><$8E><$8F><$90><$91><$92><$93><$94><$95><$96><$97><$98><$99><$9A><$9B><$9C><$9D><$9E><$9F><$9E><$9F><$A0><$A1><$A2><$A3><$AB><$AC><$AB><$AC><$FC>
    <$A9><$AA><$A9><$AA><$A9><$AA><$A4><$A5><$A9><$A6><$A7><$AA><$A9><$AA><$A9><$AA><$A9><$A8><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$FC>

    // speckled background
    <$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$FC>
    <$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$A9><$AA><$FC>
    <$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$AB><$AC><$FC>
    // bottom border
    <$F7><$20><$AE><$FC>
    // 1 row of spaces
    <$F7><$20><$5F><$FC>
    // 1 row of spaces
    <$F7><$20><$5F><$FC>

    // 63=-
    <$F7><$0A><$5F><$63>PUSH START<$63><$F7><$0A><$5F><$FC>
    // 1 row of spaces
    <$F7><$20><$5F><$FC>
    // 62=<copyright symbol>
    <$F7><$0B><$5F><$62>1986 ENIX<$F7><$0B><$5F><$FC>
    // 1 row of spaces
    <$F7><$20><$5F><$FC>
    <$F7><$0B><$5F><$62>1989 ENIX<$F7><$0B><$5F><$FC>
    // 1 row of spaces
    <$F7><$20><$5F><$FC>
    <$F7><$06><$5F>LICENSED TO NINTENDO<$F7><$06><$5F><$FC>
    // 1 row of spaces
    <$F7><$20><$5F><$FC>
    <$F7><$04><$5F>TM TRADEMARK OF NINTENDO<$F7><$04><$5F><$FC>
    // 1 row of spaces
    <$F7><$20><$5F><$FC>
    // 1 row of spaces
    <$F7><$20><$5F><$FC>

    // At this point we've reached PPU $23C0, so this is palette data instead of tilemap data
    <$F7><$08><$FF>
    <$F7><$08><$05>
    <$F7><$10><$00><$FC>
    <$F7><$08><$A5>
    <$F7><$08><$FF><$FC>
    <$F7><$10><$FF><$FC>


    #JMP($549D, $595E)
    // End Credits
    // As with the title screen data, control code F7 takes 2 bytes (A, B) as parameters and means "write byte B A times" so e.g. F7 04 5F results in 5F 5F 5F 5F being written to the PPU; it's a simple RLE compression.
    // Strings start with a 2 byte PPU address followed by the bytes to be written starting at that address.
    // Control code FC means end of string.
    // Control code FD means end of screen.
    // As with the title screen data, there are some inefficiencies in the original data that you can take advantage of if you need more space for text.

    // Screen #1
    // 60=!
    // 61=.
    <$E8><$20>CONGRATULATIONS<$60><$FC>
    <$47><$21>THOU HAST RESTORED<$FC>
    <$86><$21>PEACE UNTO THE WORLD<$60><$FC>
    <$E4><$21>BUT THERE ARE MANY ROADS<$FC>
    <$29><$22>YET TO TRAVEL<$61><$FC>
    <$89><$22>MAY THE LIGHT<$FC>
    <$C8><$22>SHINE UPON THEE<$61><$FD>

    // Screen #2
    <$88><$21>DRAGON WARRIOR<$FC>
    <$ED><$21>STAFF<$FC>
    // palette data
    <$C0><$23><$F7><$20><$FF><$FD>

    // Screen #3
    <$86><$21>SCENARIO WRITTEN BY<$FC>
    <$EB><$21>YUJI HORII<$FC>
    // palette data
    <$C0><$23><$F7><$20><$05><$FD>

    // Screen #4
    <$85><$21>CHARACTER DESIGNED BY<$FC>
    <$E9><$21>AKIRA TORIYAMA<$FC>
    // palette data
    <$C0><$23><$F7><$20><$0A><$FD>

    // Screen #5
    <$87><$21>MUSIC COMPOSED BY<$FC>
    <$E8><$21>KOICHI SUGIYAMA<$FC>
    // palette data
    <$C0><$23><$F7><$20><$0F><$FD>

    // Screen #6
    <$2A><$21>PROGRAMED BY<$FC>
    <$A8><$21>KOICHI NAKAMURA<$FC>
    <$0A><$22>KOJI YOSHIDA<$FC>
    <$67><$22>TAKENORI YAMAMORI<$FC>
    // palette data
    <$D0><$23><$F7><$08><$05><$F7><$10><$00><$FD>

    // Screen #7
    <$89><$21>CG DESIGNED BY<$FC>
    <$E9><$21>TAKASHI YASUNO<$FC>
    // palette data
    <$D8><$23><$F7><$08><$0A><$FD>

    // Screen #8
    <$86><$21>SCENARIO ASSISTED BY<$FC>
    <$E8><$21>HIROSHI MIYAOKA<$FC>
    // palette data
    <$C0><$23><$F7><$20><$0F><$FD>

    // Screen #9
    <$4A><$21>ASSISTED BY<$FC>
    <$CA><$21>RIKA SUZUKI<$FC>
    <$28><$22>TADASHI FUKUZAWA<$FC>
    // palette data
    <$D0><$23><$F7><$08><$50><$F7><$10><$00><$FD>

    // Screen #10
    <$87><$21>SPECIAL THANKS TO<$FC>
    <$E7><$21>KAZUHIKO TORISHIMA<$FC>
    // palette data
    <$C0><$23><$F7><$20><$05><$FD>

    // Screen #11
    <$8A><$21>TRANSLATION<$FC>
    <$ED><$21>STAFF<$FC>
    // palette data
    <$C0><$23><$F7><$20><$FF><$FD>

    // Screen #12
    <$C6><$20>TRANSLATED BY<$FC>
    <$08><$21>TOSHIKO WATSON<$FC>
    <$86><$21>REVISED TEXT BY<$FC>
    <$C8><$21>SCOTT PELLAND<$FC>
    <$46><$22>TECHNICAL SUPPORT BY<$FC>
    <$88><$22>DOUG BAKER<$FC>
    // palette data
    <$C0><$23><$F7><$10><$FF><$F7><$08><$00><$F7><$08><$0F><$F7><$10><$F0><$FD>

    // Screen #13
    <$48><$21>PROGRAMED BY<$FC>
    <$CA><$21>KENICHI MASUTA<$FC>
    <$2A><$22>MANABU YAMANA<$FC>
    // palette data
    <$D0><$23><$F7><$08><$50><$F7><$10><$00><$FD>

    // Screen #14
    <$25><$21>CG DESIGNED BY<$FC>
    <$8A><$21>SATOSHI FUDABA<$FC>
    <$05><$22>SPECIAL THANKS TO<$FC>
    <$6A><$22>HOWARD PHILLIPS<$FC>
    // palette data
    <$D0><$23><$F7><$08><$0A><$F7><$08><$00><$F7><$08><$0F><$FD>

    // Screen #15
    <$8A><$21>DIRECTED BY<$FC>
    <$E8><$21>KOICHI NAKAMURA<$FC>
    // palette data
    <$C0><$23><$F7><$20><$0A><$FD>

    // Screen #16
    <$8A><$21>PRODUCED BY<$FC>
    <$E9><$21>YUKINOBU CHIDA<$FC>
    // palette data
    <$C0><$23><$F7><$20><$0F><$FD>

    // Screen #17
    <$85><$20>BASED ON DRAGON QUEST<$FC>
    <$0B><$21>COPYRIGHT<$FC>
    <$63><$21>ARMOR PROJECT<$FC>
    <$74><$21>1986 1989<$FC>
    <$C3><$21>BIRD STUDIO<$FC>
    <$D4><$21>1986 1989<$FC>
    <$23><$22>KOICHI SUGIYAMA<$FC>
    <$34><$22>1986 1989<$FC>
    <$83><$22><$0C><$0D><$0E><$0F> SOFT<$FC>
    <$94><$22>1986 1989<$FC>
    <$09><$23>ENIX<$FC>
    <$10><$23>1986 1989<$FC>
    // palette data
    <$C8><$23><$F7><$03><$FF><$07><$F7><$06><$05><$F7><$03><$0F><$F7><$03><$AA><$F7><$05><$00><$F7><$05><$AA><$FC>
    <$E0><$23><$F7><$05><$00><$F7><$03><$AA><$04><$F7><$04><$00><$F7><$03><$AA><$F7><$04><$00><$F7><$03><$AA><$FD>

    // Screen #18
    // Enix logo
    <$8F><$21><$10><$11><$12><$FC>
    <$AE><$21><$13><$14><$15><$16><$FC>
    <$CE><$21><$17><$18><$19><$1A><$FC>
    <$EE><$21><$1B><$1C><$1D><$1E><$FC>
    <$0E><$22><$1F><$20><$21><$22><$FC>
    // palette data
    <$D8><$23><$F7><$10><$FF><$FD>

    // Screen #19
    // Gothic "The End"
    <$AA><$21><$3E><$3F><$40><$41><$42><$43><$44><$45><$46><$47><$48><$49><$FC>
    <$CA><$21><$4A><$4B><$4C><$4D><$4E><$4F><$50><$51><$52><$53><$54><$55><$FC>
    // palette data
    <$D0><$23><$F7><$20><$00><$FD>
    Title: Re: Dragon Warrior 1 Spanish Translation
    Post by: werewolfslayr925 on July 01, 2018, 08:29:13 PM
    This is extremely helpful and makes my life much easier. I'll PM you if I have any problems. I think there may be some letters that I may have to work around. Either way, thank you so much for this and for the other script.
    Title: Re: Dragon Warrior 1 Spanish Translation
    Post by: abw on July 04, 2018, 09:41:12 PM
    Glad to hear it!

    Ah, yes, that's an excellent point - the title screen and end credits use a different set of graphics than the rest of the game, so if you need any Spanish tiles, you'll have to steal from the existing tiles. Most of the number tiles appear to be unused, and the staff names do not include "Q" or "V", so those are options; if you're going to redraw the "DRAGON WARRIOR" text, you might be able to free up some of those tiles, especially from the third row (the bottom of the "A"s and "G").
    Title: Re: Dragon Warrior 1 Spanish Translation
    Post by: werewolfslayr925 on September 21, 2018, 12:46:17 PM
    Okay, so after translating the text block you gave me for the menus, I tired inserting it. The game started to freak out when the king's text box came up. I compared character counts and everything to make sure the Spanish was within the appropriate limitations and tried tinkering with the insertion script a bit, but to no avail.

    Here's what I've got:

    // Define, load, and activate a table (replace "dw_es.tbl" with the name of your table file).
    #VAR(dwSP2, TABLE)
    #ADDTBL("dwSP2.tbl", dwSP2)
    #ACTIVETBL(dwSP2)

    // NES ROMs have a $10 byte header.
    #HDR($10)

    // Jump to the start of the script, set an upper bound on the available space so that you don't accidentally start overwriting other code/data if your script is too long.
    #JMP($6FC0, $752C)

    #W16($6F7C)
    <$01><$06><$08><$21><$89><$B0><$88>LV<$82><$A0>HP<$81><$90>MP<$81><$94>G<$98>E<$A8>

    #W16($6F7E)
    <$21><$0B><$14><$35><$88><$85>NOM:<$B1><$80><$86>Fuerza:<$D8><$80><$87>Agilidad:<$D9><$80><$84>HP<$81>Máximo:<$DC><$80><$84>MP<$81>Máximo:<$DD><$80><$82>Ataque<$81>:<$DA><$80><$81>Defensa<$81>:<$DB><$80><$82>Arma:<$B8><$87><$83><$B8><$83>Armadura:<$B9><$87><$83><$B9><$82>Escudo:<$BA><$87><$83><$BA>

    #W16($6F80)
    <$01><$05><$18><$92><$88><$80><$80><$80><$80>

    #W16($6F82)
    <$80><$05><$10><$16><$08><$21><$8B>COMANDO<$88><$81>Hablar<$84>Hech.<$81>Estado<$82>Cosas<$80><$81>Escal.<$82>Puerta<$80><$81>Buscar<$82>Coger<$80>

    #W16($6F84)
    <$80><$03><$10><$16><$08><$21><$8B>COMANDO<$88><$81>Luchar<$83>Hech.<$81>Corre<$85>Cosas<$80>

    #W16($6F86)
    #W16($6F88)
    <$80><$0B><$0C><$29><$00><$21><$8B>Hech.<$88><$D6><$81><$C0><$E8><$E9>

    #W16($6F8A)
    <$A0><$0B><$0C><$39><$00><$11><$88><$D4><$81><$BB><$82><$BB><$E8><$E9>

    #W16($6F8C)
    <$A0><$08><$12><$25><$00><$11><$88><$D5><$81><$BC><$81><$C8><$82><$BC><$80><$E8><$E9>

    #W16($6F8E)
    <$80><$03><$08><$25><$00><$21><$88><$81>Sí<$80><$81>No<$80>

    #W16($6F90)
    <$80><$03><$08><$25><$00><$21><$88><$81>Com.<$80><$81>Ven.<$80>

    #W16($6F92)
    <$01><$07><$18><$52><$88><$81>A<$81>B<$81>C<$81>D<$81>E<$81>F<$81>G<$81>H<$81>I<$81>J<$81>K<$81>L<$81>M<$81>N<$81>O<$81>P<$81>Q<$81>R<$81>S<$81>T<$81>U<$81>V<$81>í<$81>ó<$81>Y<$81>ú<$81>-<$81>ñ<$81>!<$81>?<$81><$81><$80><$81>a<$81>b<$81>c<$81>d<$81>e<$81>f<$81>g<$81>h<$81>i<$81>j<$81>á<$81>l<$81>m<$81>n<$81>o<$81>p<$81>q<$81>r<$81>s<$81>t<$81>u<$81>v<$81>é<$81>x<$81>y<$81>z<$81>,<$81>.<$81>Bor.<$82>Fin

    #W16($6F94)
    <$A1><$07><$12><$74><$00><$86><$88><$81>Elige<$81>la<$80><$80><$81>velocidad<$81>del<$81>texto<$80><$80><$81><$81><$81><$80><$80><$80><$86>Rapido<$80><$80><$86>Normal<$80><$80><$86>Lento<$80>

    #W16($6F96)
    <$01><$02><$14><$73><$88><$81>Ingrese<$81>tu<$81>nombre<$80>

    #W16($6F98)
    <$01><$03><$0C><$35><$8B>Nom.<$88><$81>********<$80>

    #W16($6F9A)
    <$81><$04><$18><$42><$00><$21><$88><$81>Continuar<$81>una<$81>aventura<$80><$81>Velocidad<$81>del<$81>texto<$80><$81>Borrar<$81>aventura<$81><$80>

    #W16($6F9C)
    <$81><$06><$18><$42><$00><$21><$88><$81>Continuar<$81>una<$81>aventura<$80><$81>Velocidad<$81>del<$81>texto<$80><$81>Empezar<$81>una<$81>aventura<$81><$80><$81>Copiar<$81>una<$81>aventura<$80><$81>Borrar<$81>una<$81>aventura<$80>

    #W16($6F9E)
    <$81><$02><$18><$42><$00><$21><$88><$81>Empezar<$81>una<$81>aventura<$81><$80>

    #W16($6FA0)
    <$81><$02><$14><$95><$00><$21><$88><$81>Aventura<$81><$81>1<$80>

    #W16($6FA2)
    <$81><$02><$14><$95><$00><$21><$88><$81>Aventura<$81><$81>2<$80>

    #W16($6FA4)
    <$81><$03><$14><$95><$00><$21><$88><$81>Aventura<$81><$81>1<$80><$81>Aventura<$81><$81>2<$80>

    #W16($6FA6)
    <$81><$02><$14><$95><$00><$21><$88><$81>Aventura<$81><$81>3<$80>

    #W16($6FA8)
    <$81><$03><$14><$95><$00><$21><$88><$81>Aventura<$81><$81>1<$80><$81>Aventura<$81><$81>3<$80>

    #W16($6FAA)
    <$81><$03><$14><$95><$00><$21><$88><$81>Aventura<$81><$81>2<$80><$81>Aventura<$81><$81>3<$80>

    #W16($6FAC)
    <$81><$04><$14><$95><$00><$21><$88><$81>Aventura<$81>LOG<$81>1<$80><$81>Aventura<$81><$81>2<$80><$81>Aventura<$81><$81>3<$80>

    #W16($6FAE)
    <$81><$02><$18><$63><$00><$21><$88><$81>Aventura<$81><$81>1:<$B5><$80>

    #W16($6FB0)
    <$81><$02><$18><$63><$00><$21><$88><$81>Aventura<$81><$81>2:<$B6><$80>

    #W16($6FB2)
    <$81><$03><$18><$63><$00><$21><$88><$81>Aventura<$81><$81>1:<$B5><$80><$81>Aventura<$81><$81>2:<$B6><$80>

    #W16($6FB4)
    <$81><$02><$18><$63><$00><$21><$88><$81>Aventura<$81><$81>3:<$B7><$80>

    #W16($6FB6)
    <$81><$03><$18><$63><$00><$21><$88><$81>Aventura<$81><$81>1:<$B5><$80><$81>Aventura<$81><$81>3:<$B7><$80>

    #W16($6FB8)
    <$81><$03><$18><$63><$00><$21><$88><$81>Aventura<$81><$81>2:<$B6><$80><$81>Aventura<$81><$81>3:<$B7><$80>

    #W16($6FBA)
    <$81><$04><$18><$63><$00><$21><$88><$81>Aventura<$81><$81>1:<$B5><$80><$81>Aventura<$81><$81>2:<$B6><$80><$81>Aventura<$81><$81>3:<$B7><$80>

    #W16($6FBC)
    <$01><$06><$14><$73><$88><$81><$B4><$80><$81>Nivel<$82><$A1><$80><$81>¿Quieres<$81>borrar<$81>esto<$81>registro<$80><$81>de<$81>aventura?<$80><$81><$80>

    #W16($6FBE)
    <$80><$03><$08><$3A><$00><$21><$88><$81>Sí<$80><$81>No<$80>


    Apologies to the mods for the necromancy...


    Edit: After a bit more testing, the pointers in the #W16 commands seem to be incorrect. I'm probably wrong about that, but even reducing the script down to just an edition of the status window (the one that appears if you stand still for a bit) results in very buggy behavior.
    Title: Re: Dragon Warrior 1 Spanish Translation
    Post by: abw on September 21, 2018, 05:24:21 PM
    Huh, yeah, I would also describe that as freaking out :D. You were close, though - change the #HDR to #HDR($-3FF0) and try it again! Once you see it in action, you can start adjusting the line lengths and box widths until everything fits to your satisfaction.

    E.g. for the
    Quote
    <$81><$04><$18><$42><$00><$21><$88><$81>Continuar<$81>una<$81>aventura<$80><$81>Velocidad<$81>del<$81>texto<$80><$81>Borrar<$81>aventura<$81><$80>
    menu, you can increase the box width to
    Quote
    <$81><$04><$1A><$42><$00><$21><$88><$81>Continuar<$81>una<$81>aventura<$80><$81>Velocidad<$81>del<$81>texto<$80><$81>Borrar<$81>aventura<$81><$80>
    to make your text fit, or for the
    Quote
    <$80><$05><$10><$16><$08><$21><$8B>COMANDO<$88><$81>Hablar<$84>Hech.<$81>Estado<$82>Cosas<$80><$81>Escal.<$82>Puerta<$80><$81>Buscar<$82>Coger<$80>
    menu you can reduce the spacing between Hablar and Hech. to
    Quote
    <$80><$05><$10><$16><$08><$21><$8B>COMANDO<$88><$81>Hablar<$82>Hech.<$81>Estado<$82>Cosas<$80><$81>Escal.<$82>Puerta<$80><$81>Buscar<$82>Coger<$80>
    keep them both on the same line, etc., etc.
    Title: Re: Dragon Warrior 1 Spanish Translation
    Post by: werewolfslayr925 on September 21, 2018, 06:46:12 PM
    Yeah, I think I've had enough of this. If I PM a patch to you, would you be willing/able to insert the credits and menu stuff? I really don't want to do this anymore. It isn't fun, it isn't rewarding, and it isn't worth my time.