News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Author Topic: Dragon Warrior 1 Spanish Translation  (Read 3546 times)

werewolfslayr925

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Dragon Warrior 1 Spanish Translation
« Reply #40 on: May 23, 2018, 09:59:04 pm »
The pages on nesdev give you way more info on this than I ever could:
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:

Code: [Select]
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"

Code: [Select]
// 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?
« Last Edit: May 29, 2018, 04:25:57 pm by werewolfslayr925 »
As the harbor is welcome to the sailor, so is the last line to the scribe.

- complaint in the margin of a medieval manuscript

abw

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Re: Dragon Warrior 1 Spanish Translation
« Reply #41 on: June 02, 2018, 08:41:07 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:

Code: [Select]
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>.

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.

werewolfslayr925

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Dragon Warrior 1 Spanish Translation
« Reply #42 on: June 03, 2018, 05:28:54 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...

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, 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?

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. Not much, but it isn't quite done yet :P
As the harbor is welcome to the sailor, so is the last line to the scribe.

- complaint in the margin of a medieval manuscript

abw

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Re: Dragon Warrior 1 Spanish Translation
« Reply #43 on: June 04, 2018, 09:15:56 am »
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:

Code: [Select]
$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.

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
Code: [Select]
$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).

werewolfslayr925

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Dragon Warrior 1 Spanish Translation
« Reply #44 on: June 04, 2018, 01:01:33 pm »
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:

Code: [Select]
$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

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
Code: [Select]
$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).

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?
As the harbor is welcome to the sailor, so is the last line to the scribe.

- complaint in the margin of a medieval manuscript

abw

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Re: Dragon Warrior 1 Spanish Translation
« Reply #45 on: June 04, 2018, 09:19:25 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.

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.

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.

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.

werewolfslayr925

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Dragon Warrior 1 Spanish Translation
« Reply #46 on: June 08, 2018, 04:30:28 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:

Code: [Select]
#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:

Code: [Select]
#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.
« Last Edit: June 08, 2018, 07:35:57 pm by werewolfslayr925 »
As the harbor is welcome to the sailor, so is the last line to the scribe.

- complaint in the margin of a medieval manuscript

abw

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Re: Dragon Warrior 1 Spanish Translation
« Reply #47 on: June 09, 2018, 12:30:57 am »
Okay, and how would that be?
An insert script for the original text (using Psyklax's table file) looks like this:
Code: [Select]
#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:
  • 0x7AC6 is actually ASM code ($60 is the opcode for RTS); as long as you're still writing $60 there, it'll work out in the end, but unless you know exactly what you're doing, it's generally better to leave code alone while you're editing data, so using #JMP($7AC7) and getting rid of the [60] is better, especially since...
  • #W16($7AC6) calculates the value of a pointer to the current address (which also happens to be 0x7AC6 since no text has been written since the previous #JMP) and then writes that value to 0x7AC6-0x7AC7, overwriting the RTS and breaking that part of the game's code
  • the original pointer at 0x6844 doesn't get changed, so it still points to ROM 0x7AC7 (RAM $BAB7), which is now the high byte of the pointer to 0x7AC6
  • with #HDR($10), a pointer to 0x7AC6 has the value $7AB6 (= $7AC6 - $10), which points to cartridge RAM, not ROM; you need the pointer to be $BAB7, so the #HDR value has to be $-3FF0 (= $7AC7 - $BAB7)
  • there is apparently a "Secret Passage" item in the game; who knew?

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.

werewolfslayr925

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Dragon Warrior 1 Spanish Translation
« Reply #48 on: June 09, 2018, 05:54:37 pm »
An insert script for the original text (using Psyklax's table file) looks like this:
Code: [Select]
#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?)
    As the harbor is welcome to the sailor, so is the last line to the scribe.

    - complaint in the margin of a medieval manuscript

    abw

    • Full Member
    • ***
    • Posts: 115
      • View Profile
    Re: Dragon Warrior 1 Spanish Translation
    « Reply #49 on: June 20, 2018, 05:51:05 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!

    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]".

    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.

    (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)!