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

Author Topic: Help editing Item Names (and other text) in Dragon Warrior (NES)  (Read 9511 times)

Choppasmith

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Help editing Item Names (and other text) in Dragon Warrior (NES)
« Reply #40 on: October 09, 2018, 11:59:03 am »

0x7544 (remember pointer number so we can use it later):
Code: [Select]
4A        LSR
4A        LSR
4A        LSR
4A        LSR
85 1B     STA $1B
8A        TXA
0A        ASL
0A        ASL
0A        ASL
0A        ASL
65 1B     ADC $1B
18        CLC
69 01     ADC #$01
85 31     STA $31
85 E1     STA $E1


Just to be sure, are you certain this isn't 7546? Because that's where your original code started?

EDIT: Thought I'd just start fresh. Not sure what happened but I got some wildly mixed up dialog (second part of the script, second bank)



Also, this should be one of the lines from the first script in the old bank



EDIT 2: Yep seems to be a pointer mixup. Fixing now.

EDIT 3: A few pointers needed to be corrected, but it seems it's just not loading from the second bank. The king's speech is from text from the first bank. Stuff actually from the first bank is loading fine now.

Here's how my current hex values looks




« Last Edit: October 09, 2018, 01:31:51 pm by Choppasmith »

abw

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Help editing Item Names (and other text) in Dragon Warrior (NES)
« Reply #41 on: October 09, 2018, 07:22:06 pm »
Just to be sure, are you certain this isn't 7546? Because that's where your original code started?
Yup, 0x7544, same as before. Basically I'm just stealing the two bytes from the useless AND #$F0 and using them after the STA $31 (or after the ADC #$01 would have the same effect but make a smaller patch), which meant shifting all the intervening code up by two bytes.

Here's how my current hex values looks [...]


0x1FF66 should be C9 (CMP immediate), not 69 (ADC immediate), which would definitely prevent text from the second bank from loading.

(*feels better about not being the only one who makes typos* :D)

Choppasmith

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Help editing Item Names (and other text) in Dragon Warrior (NES)
« Reply #42 on: October 10, 2018, 06:04:47 pm »
Yeah I find I make some really baffling typos too. When correcting my pointers I had that was supposed to be something E8 and I had EA (because I guess in my brain, 8 and A sound the same??)

I was JUST about to post another troubled screen and found I had just messed up on a pointer in a similar way.

At this point I'm mostly done! Like you said earlier in this thread there might be some dialog that might need/not need a line break. But otherwise things are looking good! Thank you so much for your help!

A couple more things though, if you'll humor me.

The menu needs a couple tweaks. Namely, I'd like to change Defense into Defence (British Spelling) and just for completion's sake change LV into Lv (like the mobile port). But that's easy peasy considering it's just one letter. What might be hard is ADDING the u to Armor on the menu screen. I looked in the Spanish translation and you provided pointers and how each menu item seems to have a special string of code affecting window size and such, but it looks like there's no EXTRA space in that section. I COULD shorten ATTACK POWER AND DEFENSE POWER removing the latter POWER (Which would be accurate to the mobile port anyway) but that would leave up a lot of space and I don't see how each string "ends". What should I do here?

The other thing is just because I'm curious. COULD there be a way we can get the full name of the spell "Holy Protection" on the menu? I just have it as "Protect" right now with the wearing off message referring to the full name. I just wonder if we could either:

-Widen the menu to fit it.
-Keep it abbreviated on the menu but would show up in full when cast ("Hero casts Holy Protection!").
-Have it use two lines on the menu

Now this isn't a big deal, I have absolutely no qualms keeping it as is. I just thought I'd ask because you know your stuff :)

Lastly, I've taken a stab at using YY CHR to try and get my new logo in (well changing QUEST into WARRIOR anyway). I setup a custom pattern to have all the logo tiles arranged together. I have the W setup like this

12
34

For some weird reason, it won't let me edit tile number 4 in this case. It just reverts back instantly after clicking. Any idea what I'm doing wrong? 

abw

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Help editing Item Names (and other text) in Dragon Warrior (NES)
« Reply #43 on: October 10, 2018, 11:58:21 pm »
At this point I'm mostly done! Like you said earlier in this thread there might be some dialog that might need/not need a line break. But otherwise things are looking good! Thank you so much for your help!
Hurray! It's more fun when there are more people working on related projects for the same game, right?

What might be hard is ADDING the u to Armor on the menu screen. I looked in the Spanish translation and you provided pointers and how each menu item seems to have a special string of code affecting window size and such, but it looks like there's no EXTRA space in that section. I COULD shorten ATTACK POWER AND DEFENSE POWER removing the latter POWER (Which would be accurate to the mobile port anyway) but that would leave up a lot of space and I don't see how each string "ends". What should I do here?
I put a couple of notes about this on the wiki for reference. Basically, each of the menu strings ends once the menu has read enough data to fill the available space, where the amount of available space is determined by the first 3 bytes of the menu string. Try messing around with a menu for a bit and you should get the hang of it pretty quickly.

The existing menu data is indeed pretty tight on free space, and it's sandwiched between the menu pointer table and some ASM. If you wanted to remove the POWERs, that would definitely give you more than enough space to add one letter. Otherwise, probably the next best place to steal space from is the message speed menu; if you switch it from single-spaced to double-spaced, you can free up 6 newline bytes and the only visible difference is the text shifting down one line:

Code: [Select]
#W16($6F94)
<$81><$07><$12><$74><$00><$86>
[border newline]
 Which Message[newline]
 Speed Do You[newline]
 Want To Use?[newline]
      FAST[newline]
      NORMAL[newline]
      SLOW[newline]

The other thing is just because I'm curious. COULD there be a way we can get the full name of the spell "Holy Protection" on the menu? I just have it as "Protect" right now with the wearing off message referring to the full name. I just wonder if we could either:

-Widen the menu to fit it.
-Keep it abbreviated on the menu but would show up in full when cast ("Hero casts Holy Protection!").
-Have it use two lines on the menu
The item and spell menus are a bit special in that their contents are dynamically generated, so there'd be some further changes required in order to get everything working properly. I haven't really looked at that part of the code before, so I'm not sure how hard the changes would be, but probably any of these options is achievable.


Edit:
Whichever option you decide to go with, you're going to want to display the full spell name when casting it. As it turns out, the upper limit on the number of bytes to display for spell names is set at 0x77E9, so if you change that from #$09 (length of "STOPSPELL") to #$0F (length of "Holy Protection"), that's one step down. Showing "Holy Prot" in the menu and "Holy Protection" in the dialogue isn't such a horrible effect and is pretty good value for a 1-byte hack.

If you want to expand the spell menu to fit all of "Holy Protection" on one line, setting the menu width to $12 and changing its position to $26 makes it big enough to hold 15-tile spell names, and then changing 0x648B from #$09 to #$0F fixes up the text alignment issues that would otherwise result. Unfortunately, monster sprites show up in front of the spell menu, so it looks kind of bad in battle. I have a feeling it would take a lot of work to fix that without affecting the final boss fight, but maybe I'm wrong.

I like the idea of displaying the spell names on two lines like the item names; you'd only need to widen the spell menu by 2 tiles, which shouldn't interfere with regular battles. You'd lose visibility of some letters during the final battle, but I don't know whether that's a good thing or a bad thing. You can probably leverage a lot of the code for displaying the item list, but if you replicate the structure of the item list, there's going to be enough things shifting places that I think you'll want to switch to working with a fully labelled disassembly rather than making small patches like we have been.


For some weird reason, [YY-CHR] won't let me edit tile number 4 in this case. It just reverts back instantly after clicking. Any idea what I'm doing wrong?
That's just plain weird and I have no help to offer here :P.
« Last Edit: October 11, 2018, 07:46:58 pm by abw »

Choppasmith

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Help editing Item Names (and other text) in Dragon Warrior (NES)
« Reply #44 on: October 19, 2018, 11:04:26 pm »
Hurray! It's more fun when there are more people working on related projects for the same game, right?

Absolutely! It's great everything just happened to come together when it did. This is shaping up to be better than I hoped for!

Also. Title screen! My first one ever, so I'm happy with it! Ended up using Tile Molester instead. Worked much better for me.



Edit:
Whichever option you decide to go with, you're going to want to display the full spell name when casting it. As it turns out, the upper limit on the number of bytes to display for spell names is set at 0x77E9, so if you change that from #$09 (length of "STOPSPELL") to #$0F (length of "Holy Protection"), that's one step down. Showing "Holy Prot" in the menu and "Holy Protection" in the dialogue isn't such a horrible effect and is pretty good value for a 1-byte hack.

If you want to expand the spell menu to fit all of "Holy Protection" on one line, setting the menu width to $12 and changing its position to $26 makes it big enough to hold 15-tile spell names, and then changing 0x648B from #$09 to #$0F fixes up the text alignment issues that would otherwise result. Unfortunately, monster sprites show up in front of the spell menu, so it looks kind of bad in battle. I have a feeling it would take a lot of work to fix that without affecting the final boss fight, but maybe I'm wrong.

I like the idea of displaying the spell names on two lines like the item names; you'd only need to widen the spell menu by 2 tiles, which shouldn't interfere with regular battles. You'd lose visibility of some letters during the final battle, but I don't know whether that's a good thing or a bad thing. You can probably leverage a lot of the code for displaying the item list, but if you replicate the structure of the item list, there's going to be enough things shifting places that I think you'll want to switch to working with a fully labelled disassembly rather than making small patches like we have been.

Since I'm hoping this thread can serve as a resource for future DW hacks, would you mind giving me a quick rundown as to how you find these values? Namely stuff like Spell and Monster Name length? When I get to DW2 and 3, I'd love to be able to find simple values like that myself as to save a little time and trouble from the more adept romhackers such as yourself.

Okay almost there! SO CLOSE!

I wanted to do a quick little Title Screen text change. Add a 2018 Square Enix credit (it IS their translation technically speaking and it gives it a nice "Official" feel which is what I'm going for with this hack). But also change the Nintendo license line to Hack by Choppasmith and drop the trademark line for space. I saw in the translation thread there's basically no room before the palette data. I was really careful to make sure I dumped and edited the text before 3FC5. But I can't seem to avoid glitches



It might be Pointer Tables doing, but I can't see anything "wrong" here:



Unaltered on the left, altered on the right.

abw

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Help editing Item Names (and other text) in Dragon Warrior (NES)
« Reply #45 on: October 20, 2018, 03:38:15 pm »
Also. Title screen! My first one ever, so I'm happy with it! Ended up using Tile Molester instead. Worked much better for me.


Looking good! :beer:

Since I'm hoping this thread can serve as a resource for future DW hacks, would you mind giving me a quick rundown as to how you find these values? Namely stuff like Spell and Monster Name length? When I get to DW2 and 3, I'd love to be able to find simple values like that myself as to save a little time and trouble from the more adept romhackers such as yourself.
FCEUX's Debugger and/or Trace Logger tells all :P. I wrote up a description of tracking down the item list and its pointer in the Dragon Warrior 1 Spanish Translation thread; the same principles apply here, but since we already know where the spell list is located, we can start with a read breakpoint there and skip the whole "trace from the PPU back to the ROM" process. For the spell list length, setting a read breakpoint on e.g. $B5E6 for HEAL and then casting that spell shows
Code: [Select]
01:A866:A0 00     LDY #$00
 01:A868:AE E2 64  LDX $64E2 = #$09
>01:A86B:B1 A1     LDA ($A1),Y @ $BE56 = #$2B
 01:A86D:C9 FF     CMP #$FF
 01:A86F:F0 07     BEQ $A878
 01:A871:9D C9 64  STA $64C9,X @ $64D2 = #$5F
 01:A874:C8        INY
 01:A875:CA        DEX
 01:A876:D0 F3     BNE $A86B
 01:A878:60        RTS -----------------------------------------
so the game stops reading from ($A1),Y once it reads #$FF (end of list item) or when X reaches #$00; X comes from $64E2, so setting a write breakpoint there and casting the spell again eventually leads us to
Code: [Select]
01:B7D8:A9 09     LDA #$09
>01:B7DA:8D E2 64  STA $64E2 = #$01
as the last time the game writes to $64E2 before reading the spell name. The game actually uses $64E2 for a lot of other things before it gets to reading the spell name, so you can either throw in some "Forbid" breakpoints to weed out false positives or generate a trace log and start searching backwards. You can follow the same process when tracking down pretty much anything, although it gets harder to do when the way in which the game's code uses the data is complicated.

I wanted to do a quick little Title Screen text change. Add a 2018 Square Enix credit (it IS their translation technically speaking and it gives it a nice "Official" feel which is what I'm going for with this hack). But also change the Nintendo license line to Hack by Choppasmith and drop the trademark line for space. I saw in the translation thread there's basically no room before the palette data. I was really careful to make sure I dumped and edited the text before 3FC5. But I can't seem to avoid glitches
It looks like there is a bit of free space immediately following the end of the title screen data at 0x3DFA, so you could use that if you wanted to, but the original data is also kind of inefficient, so you could free up an extra $44 bytes by combining adjacent RLEs of the same byte (e.g. the original has <$F7><$20><$5F><$FC> immediately followed by <$F7><$20><$5F><$FC>, but <$F7><$40><$5F><$FC> does the exact same thing [i.e. print two rows of spaces] in 4 fewer bytes) and taking out all of the useless <$FC> control codes (the last <$FC> is the only one that matters). 68 bytes is more than enough space for a couple of text changes on this screen even without dropping the "TM TRADEMARK TO NINTENDO".

The title screen display code basically works by reading a continuous stream of bytes starting from RAM $BDCB (ROM 0x3DDB), expanding RLE sequences (control code <$F7>) as necessary, and writing them to the PPU starting from $2000 (Name Table #0; tilemap data) until it reaches PPU $2400 (Name Table #1); along the way, it'll also fill up Attribute Table #0 (palette data) starting at PPU $23C0. Control code <$FC> is a "maybe end" token - it checks to see whether the next PPU address to write to is $24?? and exits the title screen display code when it is, otherwise it does nothing. So there's nothing special about 0x3FC5, that's just the point where the PPU writing process happens to reach PPU $23C0.

Each screen line is 32 tiles wide, but on the "HACK BY CHOPPASMITH" line, you're writing 6 spaces + 19 letters + 11 spaces = 36 tiles, which is 4 tiles too many, so try reducing 0x3F9D from $0B to $07. Where things really start going sideways, though, is 0x3FAE. At that point you write the final (off-screen, but you can see it in FCEUX's Name Table Viewer) row of tilemap data using $FF (one of the Dragonlord's tiles) instead of $5F (space) and then start writing a bunch of $FFs to the palette data. You should have a mostly pink screen at that point, but your screenshot shows a bunch of splotches, so something else is going on somewhere. I'd recommend grabbing my title screen insert script from the Dragon Warrior 1 Spanish Translation thread and either adapting that to Pointer Tables or switch to Atlas for inserting; if you use Atlas, you'll need to tell it what table file to use with e.g.
Code: [Select]
#VAR(Table, TABLE)
#ADDTBL("dw.tbl", Table)
#ACTIVETBL(Table)

Choppasmith

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Help editing Item Names (and other text) in Dragon Warrior (NES)
« Reply #46 on: October 20, 2018, 11:30:43 pm »
Looking good! :beer:
FCEUX's Debugger and/or Trace Logger tells all :P. I wrote up a description of tracking down the item list and its pointer in the Dragon Warrior 1 Spanish Translation thread; the same principles apply here, but since we already know where the spell list is located, we can start with a read breakpoint there and skip the whole "trace from the PPU back to the ROM" process. For the spell list length, setting a read breakpoint on e.g. $B5E6 for HEAL and then casting that spell shows
Code: [Select]
01:A866:A0 00     LDY #$00
 01:A868:AE E2 64  LDX $64E2 = #$09
>01:A86B:B1 A1     LDA ($A1),Y @ $BE56 = #$2B
 01:A86D:C9 FF     CMP #$FF
 01:A86F:F0 07     BEQ $A878
 01:A871:9D C9 64  STA $64C9,X @ $64D2 = #$5F
 01:A874:C8        INY
 01:A875:CA        DEX
 01:A876:D0 F3     BNE $A86B
 01:A878:60        RTS -----------------------------------------
so the game stops reading from ($A1),Y once it reads #$FF (end of list item) or when X reaches #$00; X comes from $64E2, so setting a write breakpoint there and casting the spell again eventually leads us to
Code: [Select]
01:B7D8:A9 09     LDA #$09
>01:B7DA:8D E2 64  STA $64E2 = #$01
as the last time the game writes to $64E2 before reading the spell name. The game actually uses $64E2 for a lot of other things before it gets to reading the spell name, so you can either throw in some "Forbid" breakpoints to weed out false positives or generate a trace log and start searching backwards. You can follow the same process when tracking down pretty much anything, although it gets harder to do when the way in which the game's code uses the data is complicated.
It looks like there is a bit of free space immediately following the end of the title screen data at 0x3DFA, so you could use that if you wanted to, but the original data is also kind of inefficient, so you could free up an extra $44 bytes by combining adjacent RLEs of the same byte (e.g. the original has <$F7><$20><$5F><$FC> immediately followed by <$F7><$20><$5F><$FC>, but <$F7><$40><$5F><$FC> does the exact same thing [i.e. print two rows of spaces] in 4 fewer bytes) and taking out all of the useless <$FC> control codes (the last <$FC> is the only one that matters). 68 bytes is more than enough space for a couple of text changes on this screen even without dropping the "TM TRADEMARK TO NINTENDO".

The title screen display code basically works by reading a continuous stream of bytes starting from RAM $BDCB (ROM 0x3DDB), expanding RLE sequences (control code <$F7>) as necessary, and writing them to the PPU starting from $2000 (Name Table #0; tilemap data) until it reaches PPU $2400 (Name Table #1); along the way, it'll also fill up Attribute Table #0 (palette data) starting at PPU $23C0. Control code <$FC> is a "maybe end" token - it checks to see whether the next PPU address to write to is $24?? and exits the title screen display code when it is, otherwise it does nothing. So there's nothing special about 0x3FC5, that's just the point where the PPU writing process happens to reach PPU $23C0.

Each screen line is 32 tiles wide, but on the "HACK BY CHOPPASMITH" line, you're writing 6 spaces + 19 letters + 11 spaces = 36 tiles, which is 4 tiles too many, so try reducing 0x3F9D from $0B to $07. Where things really start going sideways, though, is 0x3FAE. At that point you write the final (off-screen, but you can see it in FCEUX's Name Table Viewer) row of tilemap data using $FF (one of the Dragonlord's tiles) instead of $5F (space) and then start writing a bunch of $FFs to the palette data. You should have a mostly pink screen at that point, but your screenshot shows a bunch of splotches, so something else is going on somewhere. I'd recommend grabbing my title screen insert script from the Dragon Warrior 1 Spanish Translation thread and either adapting that to Pointer Tables or switch to Atlas for inserting; if you use Atlas, you'll need to tell it what table file to use with e.g.
Code: [Select]
#VAR(Table, TABLE)
#ADDTBL("dw.tbl", Table)
#ACTIVETBL(Table)

Thank you so much for the explanation  :beer:. A quick question about menu windows. So I see that there are a few bytes before the text for each window and these affect the sizing and such. For example with the main field menu you have these bytes appearing before COMMAND

05 10 16 08 21 8B

I know the 10 here is window width, 16 is the X position of the window, and 21 is cursor position. I wanted to try to to make the window one more space wider to try and add an S to SPELL (SPELLS). But when I try and do that the little corner graphic gets moved to the next line and messes up the whole window. Any idea what I'm doing wrong here?

Also I ended up using your script with Atlas, I got it to where it's 4 bytes under the limit, but, I'm still getting a little glitch.



That's certainly closer than I was before.

I thought I'd try making everything from 3FB0 to 4010 match up with the original. Thinking maybe it really is picky on size or something, but that seemed to just make it worse.



It may not look all that different but FCEU started stuttering once this loaded, but when I switched to a different ROM it was fine again.

For reference, here's how I used your Atlas Script

Code: [Select]
#VAR(Table, TABLE)
#ADDTBL("dw.tbl", Table)
#ACTIVETBL(Table)





#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>
// 2 rows of spaces
<$F7><$40><$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>2018 SQUARE ENIX<$F7><$05><$5F><$FC>
// 1 row of spaces
<$F7><$20><$5F><$FC>
<$F7><$06><$5F>HACK BY CHOPPASMITH<$F7><$07><$5F><$FC>
// 1 row of spaces
<$F7><$20><$5F><$FC>
<$F7><$04><$5F>TRADEMARK OF NINTENDO<$F7><$07><$5F><$FC>
// 2 rowS of spaces
<$F7><$40><$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>

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6584
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Help editing Item Names (and other text) in Dragon Warrior (NES)
« Reply #47 on: October 21, 2018, 02:41:07 am »
I think you have messed up your tile count somewhere, as that looks like AT data is written at the wrong spot, possibly one of your tile counts was off by 1, seeing as the AT corruption seems to be one byte (covering a 32x32 pixel region) off.

Not sure if you're remembering that the blank left side of the screen still needs one tile printed underneath the blanking counted for.
"My watch says 30 chickens" Google, 2018

abw

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Help editing Item Names (and other text) in Dragon Warrior (NES)
« Reply #48 on: October 21, 2018, 11:43:12 am »
A quick question about menu windows.
I put a couple of notes about this on the wiki for reference. The data for the main COMMAND menu actually starts one byte earlier:
Code: [Select]
#W16($6F82)
// menu setup parameters:
// 80 = has a cursor, double spaced
// 05 = 5 (double-spaced) lines tall
// 10 = 16 tiles wide
// 16 = top-left corner at (12, 2)
// 08 = second column cursor offset is left edge of menu + 8
// 21 = cursor starts at top-left corner of menu + (1, 2)
<$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>
As you've observed, the game really doesn't like odd-width menus, so you'll have to expand its width by 2 and then fix up the spacing of its contents to match the new width.

Also I ended up using your script with Atlas, I got it to where it's 4 bytes under the limit, but, I'm still getting a little glitch.
I think you have messed up your tile count somewhere, as that looks like AT data is written at the wrong spot, possibly one of your tile counts was off by 1, seeing as the AT corruption seems to be one byte (covering a 32x32 pixel region) off.
Yup, KingMike called it - the "©2018 SQUARE ENIX" line prints 33 tiles instead of 32, so all the palette data gets shifted by 1 byte. Try <$F7><$0B><$5F><$62>2018 SQUARE ENIX<$F7><$04><$5F><$FC> instead, and then probably adjust the centering of the "TRADEMARK OF NINTENDO" line.