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

Author Topic: Project RE-Quest: Script Ports For Dragon Warrior 5/25/20 DW2 is Ready; Screens  (Read 30457 times)

Choppasmith

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Seems like the right text displays when you are ambushed --- "The [Enemy] Attacks! [Main Character] was not yet set for battle!"
Playing further I see some of the characters still have glitched text I pointed out in the last page, notably the many characters in Dirkandor. I also noticed that this time the fortune teller in Dirkandor also freezes the game when you say yes to him.

EDIT:
Big game breaking glitch found. At the Fire Shrine where you find the Sun Sigil, if you examine the tile to collect the sun sigil the screen becomes a garble of color and the game freezes.
Tested on multiple Emulators same result.

EDIT again: Found a monster named Saberecat, it should probably be Sabrecat or maybe Sabercat, not sure.

EDIT once again: The same exact glitch for the Sun Sigil exists for the Water Sigil. something about collecting these sigils from floor tiles I would guess.

EDIT: Found a few characters with unbroken walls of text, with a close quote open quote in mid paragraph that could use a break.


EDIT: Same glitch exists for the soul sigil in the cave to Rendarak, that one is in a treasure chest, so the only collectible sigils are the ones given from conversations with characters, the king in Dirkandor gives the moon sigil and the Gremlins give the star sigil, all others are unobtainable.

Hey laserlambert and anyone else interested! I've got another beta patch ready!
https://www.mediafire.com/file/l2p2p0rzo2nujox/DQ2_Request_B3.xdelta/file

Finish line is definitely in sight folks!



The whole thing with the Sigils, Fortune Teller, and Companion Names should be fixed. They were all just pointer errors. Note that with the way names are stored, you'll most likely have to start a new game (Edit: Speaking of which, I've updated the Prologue too, I didn't get any flickering or issues in fceu or Jnes). And of course dialog in Dirkandor is fixed now that the bank swap code was updated.

I didn't see your edits, stuff like that should be the only problems left barring a proper release now.

Thank you so much for your time laserlambert  :thumbsup: 
« Last Edit: May 17, 2020, 11:31:49 pm by Choppasmith »

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Good stuff! I patched a rom to test your prologue text after you mentioned it. For Delocalized, I had serious issues getting the text to appear without graphical problems on Mesen. I'm not sure if you're aware, but I've confirmed that you have the same problem.

Mesen is my preferred emulator, so I personally made the effort to get it to work. FYI, the character cap per line is 24--any more than that and there's issues. I'm curious how real hardware would treat it with line lengths over 24. I have a hunch there might be similar problems. Older emulators seem to often be more permissive than real hardware.

laserlambert

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
Awesome, I'll dig in tomorrow.
Good stuff! I patched a rom to test your prologue text after you mentioned it. For Delocalized, I had serious issues getting the text to appear without graphical problems on Mesen. I'm not sure if you're aware, but I've confirmed that you have the same problem.

Mesen is my preferred emulator, so I personally made the effort to get it to work. FYI, the character cap per line is 24--any more than that and there's issues. I'm curious how real hardware would treat it with line lengths over 24. I have a hunch there might be similar problems. Older emulators seem to often be more permissive than real hardware.
I prefer Mesen as well. and I have noticed it is still slightly glitched.
the random 3 there -- "young 3 maiden" it only shows on mesen and not FCEU. Anyway, I'll dig in plenty more tomorrow.

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
I did a lot of testing on this for my hack. The graphical issues actually change between a few variants every time you run the prologue.

When I loaded up Choppasmith's dq2 beta, I got white dashes that filled the background, popping up part way through the scroll. Weird changes to just a couple characters certainly occur other times. The problems will often extend beyond the scrolling text into the Fall of Moonbrooke sequence.

Shortening the content of those lines and having them all display symmetrically was pretty agonizing.  :laugh:

Pennywise

  • Hero Member
  • *****
  • Posts: 2310
  • I'm curious
    • View Profile
    • Yojimbo's Translations
That's probably something like a RAM buffer issue caused by longer text. You'd have to do some debugging to figure out exactly how the longer text is causing that.

Choppasmith

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Turns out I did have a couple lines in they're that were 25 characters. Yeah that 3 is really odd, but then I fiddled with abw's sample table for that part a bit so I've been getting instances of the number of spaces before the text getting split into values.

It should be: XXLine of Text where XX is the number of spaces on the left to center the text but in insertion instead of say 12 spaces (OC) It'll insert 0903 then the text. I'll download Mesen and give it a try and see if I can fix that.

Also just a heads up LaserLambert I did a quick search through my script file for any back to back close quote open quote and I fixed about a dozen or so lines this way. Not to say there could still be some passages that need a break.

laserlambert

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
The enemy Fat Rat now has a random Japanese character in between Fat and Rat

the line said by two of the game savers in moonahan and beran doesn't have a close quote ---
'Verily, the world in which we live waxeth more wondrous with each passing day!

The text in Dirkandor is all fixed, but the King still closes his dialogue repeating the line
'Now, go forth to such great things as thou art undoubtedly destined!'

and on the subject of repeating: the game saver in Tantegel starts his dialogue with the line 'Well met, scion of Erdrick' and then repeats this line after listing character experience requirements.

In the throne room of Tantegel the guard in there's text is now legible but partway through it the game glitches much like the glitch from the sigils from the last patch.
'Alas, His Majesty is not here. He was, um... called away upon som
and then it freezes the game.

That's what I managed to get to today, I'll likely update with more later.

EDIT: OK I've finished a run-through of the game and I think that this is all there is to fix, this and those back to back quotes that it sounds like you found more than I found. Unless fixing one of these things causes another weird change like the fat rat name, then you are likely finished with this game!
« Last Edit: May 19, 2020, 08:26:15 pm by laserlambert »

Choppasmith

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Okay, it's been submitted to RHDN. I have the scratchpad link here: http://www.romhacking.net/scratchpad/29961/ if you really want to check it out. I've also updated the first post with a bunch of comparisons.

laserlambert

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
Sorry to rain on the release of this, I'm sure you're ready to get to 3, but a game breaking bug has reared its ugly head in this release, and a couple less serious glitches too.

Number one, if you gather all the sigils and go to Rubiss's shrine she starts talking and then suddenly this happens

yeah that's the text from the Tantegel guard, and to make matters worse, after this happens you don't get the eye of Rubiss and can't dispel the illusion that guards the final boss. EDIT: nevermind it does give you the eye it isn't as game breaking as I thought.

Next; back to Dirkandor, when you talk to the horned guy in the walled entrance area, it causes wild graphical glitches and his text doesn't display.
still in Dirkandor, when you talk to the priest he says

I know some of the old language choices have been unusual, but I doubt "thecmouth" is a word.

another glitch, this one might have been in previous versions, in burrowell when you talk to the woman in the white dress by the entrance who welcomes you to the town, for some reason at the end of her text the music will change to the music that plays in the menu where you select new game or continue. it changes back when you leave the town, so it's not that big of a deal.

Then, not a glitch, but I noticed in the other thread you fixed the weird looking 'Tis thing, but there are still some other contractions that stand to have that fixed, 'tis (lowercase) 'twas 'twould 'gainst, even 'twill. it's your discretion of course.  If you need specific characters who need it fixed I'll be happy to look into it.
« Last Edit: May 29, 2020, 10:14:48 pm by laserlambert »

abw

  • Sr. Member
  • ****
  • Posts: 470
    • View Profile
Doing a little bit of pro bono work here:

Number one, if you gather all the sigils and go to Rubiss's shrine she starts talking and then suddenly this happens

yeah that's the text from the Tantegel guard, and to make matters worse, after this happens you don't get the eye of Rubiss and can't dispel the illusion that guards the final boss. EDIT: nevermind it does give you the eye it isn't as game breaking as I thought.
The code for switching to the start of the second script bank activates whenever the game tries to read $BFD7 in any bank, which also occurs at the end of bank C, so this loops you back to the start of bank C in the middle of somebody else's text.

One quick way to save some bytes is by eliminating duplicate strings, or in DW2's case blocks of strings. If you make $B774-$B780 and $B79A-$B7A0 all point to the same place, you can eliminate extra copies of those blocks where the strings are all just the same end token; at 16 strings per pointer and 5 bits per string, each block takes up 80 bits = 10 bytes, so eliminating 10 duplicate blocks frees up 10 * 10 = 100 bytes. I notice you also still have about 70 bytes left in your dictionary, so you could use longer or more dictionary entries if you wanted to further compress your script.

Next; back to Dirkandor, when you talk to the horned guy in the walled entrance area, it causes wild graphical glitches and his text doesn't display.
still in Dirkandor, when you talk to the priest he says

I know some of the old language choices have been unusual, but I doubt "thecmouth" is a word.
When NOP-ing out the JSR at $0F:$FE16, the LDA #$2E at $0F:$FE19 was also changed to STA ($2E,X), which causes many kinds of havoc including this crash and magically appearing "c" which isn't part of the script data. I also saw it turn all the sprites invisible, which was kind of fun for a bit.

On the topic of things that aren't words, though, you might want to run a spell check on your script - I happened to notice a missing "s" in "posessions" while scrolling through.

another glitch, this one might have been in previous versions, in burrowell when you talk to the woman in the white dress by the entrance who welcomes you to the town, for some reason at the end of her text the music will change to the music that plays in the menu where you select new game or continue. it changes back when you leave the town, so it's not that big of a deal.
This is the original game's behaviour; the original English line was "‘I bid thee welcome to Wellgarth Town.’[line]‘I shall sing for thee.’" and then the music changes. NOP-ing out the instructions at $06:$81AA/$06:$81AC disables the music change.

As for other functionality changes, if you wanted to change the choreography of the prologue, the code for that starts around $07:$81EA and the game's motion scripts start at $07:$8010; just watch out for motion scripts that are shared between actors!

Choppasmith

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Aww dang you stole my thunder a bit before I could post   :P

Doing a little bit of pro bono work here:
The code for switching to the start of the second script bank activates whenever the game tries to read $BFD7 in any bank, which also occurs at the end of bank C, so this loops you back to the start of bank C in the middle of somebody else's text.

Actually the problem is a lot simpler than that. Turns out those last three strings accidentally got merged together into one big string. Doh  :D

Quote
One quick way to save some bytes is by eliminating duplicate strings, or in DW2's case blocks of strings. If you make $B774-$B780 and $B79A-$B7A0 all point to the same place, you can eliminate extra copies of those blocks where the strings are all just the same end token; at 16 strings per pointer and 5 bits per string, each block takes up 80 bits = 10 bytes, so eliminating 10 duplicate blocks frees up 10 * 10 = 100 bytes. I notice you also still have about 70 bytes left in your dictionary, so you could use longer or more dictionary entries if you wanted to further compress your script.

Ah, you know, I was wondering if there was a way to use all those back to back FC bytes to save space. Thankfully I actually managed to edit my dictionary to go even further and freed up another 50 bytes or so but I might do that too and then I can say I can put everything in.

Quote
When NOP-ing out the JSR at $0F:$FE16, the LDA #$2E at $0F:$FE19 was also changed to STA ($2E,X), which causes many kinds of havoc including this crash and magically appearing "c" which isn't part of the script data. I also saw it turn all the sprites invisible, which was kind of fun for a bit.

Okay, this I have to thank you for. I was going to go through my dictionary figuring I had a slightly off value somewhere. I would've wasted a lot of time for nothing. So would using asar be better or do I just need to change  that first byte ($FE19) into something else?

Quote
On the topic of things that aren't words, though, you might want to run a spell check on your script - I happened to notice a missing "s" in "posessions" while scrolling through.
I might have caught that, but not a bad idea (I just know I'm going to get a lot of false positives)

Quote
This is the original game's behaviour; the original English line was "%u2018I bid thee welcome to Wellgarth Town.%u2019[line]%u2018I shall sing for thee.%u2019" and then the music changes. NOP-ing out the instructions at $06:$81AA/$06:$81AC disables the music change.

I did discover this last night  but I wasn't quite sure where to NOP at that wouldn't cause a glitch. Thanks.

Quote
As for other functionality changes, if you wanted to change the choreography of the prologue, the code for that starts around $07:$81EA and the game's motion scripts start at $07:$8010; just watch out for motion scripts that are shared between actors!

I think the mix of the original and the remake works fine. I'm definitely using the extra room to add that unique line for the gold /copper sword bundle at the beginning now.

On a related note, I actually found a video that shows how the Tombola instructions work on Switch. In the mobile version, the line is like "With a tap of thy screen to stop the wheel." I just changed screen to controller. On Switch, it's "a tap of thine A Button"

abw

  • Sr. Member
  • ****
  • Posts: 470
    • View Profile
Aww dang you stole my thunder a bit before I could post   :P
Ha ha, sorry about that!

Actually the problem is a lot simpler than that. Turns out those last three strings accidentally got merged together into one big string. Doh  :D
You might want to double check this - I definitely see the string read address being reset to $0C:$8000 partway through Rubiss' speech.

So would using asar be better or do I just need to change  that first byte ($FE19) into something else?
Whatever you're already doing should be fine, just make sure it only changes the 3 bytes starting at $0F:$FE16, not anything else.

It also looks like you're not copying 0x30010 to 0x17FE7; it works out okay at the moment since your script alignment means only the high bit of 0x17FE7 gets used and that happens to match the high bit of 0x30010, but any changes to the script could easily cause that to not be the case.

I did discover this last night  but I wasn't quite sure where to NOP at that wouldn't cause a glitch. Thanks.
The vast majority of anything relating to dialogue can be found by searching the disassembly, so you would have found it fairly quickly.

On a related note, I actually found a video that shows how the Tombola instructions work on Switch. In the mobile version, the line is like "With a tap of thy screen to stop the wheel." I just changed screen to controller. On Switch, it's "a tap of thine A Button"
"a tap of thine A Button" is more accurate in this case - I'm pretty sure none of the 7 other buttons on the NES controller actually stop the wheels :P.

Choppasmith

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Whatever you're already doing should be fine, just make sure it only changes the 3 bytes starting at $0F:$FE16, not anything else.

Huh, I'm not sure why atlas/abcde is changing it I mean my script just says...

I just figured it out

Code: [Select]
#JMP($3FE26)
// Remove problematic script subroutine
<$EA><$EA><$EA>

There's a space after the last $EA in my script so it just loaded from the current table what a space was, in this case $81.

Quote
It also looks like you're not copying 0x30010 to 0x17FE7; it works out okay at the moment since your script alignment means only the high bit of 0x17FE7 gets used and that happens to match the high bit of 0x30010, but any changes to the script could easily cause that to not be the case.

Weird, I checked, and yeah, you're right, it's different. It worked for me the first couple of times when I checked. I added the routine you suggested in the other thread

Code: [Select]
@copy /Y "Dragon Warrior II (U) asm fixed.nes" dragonw2.nes > nul
@if errorlevel 1 (
echo ROM file \"Dragon Warrior II (U) [!].nes\" not found; creating an empty file instead.
@echo > nul 2> Atlas.nes
)

perl ..\..\..\abcde.pl -m text2bin -t dw2.tbl -t dw2_script_NEW.tbl -t credits.tbl -t credits_spacer.tbl -t menu.tbl -t menu_links.tbl -t spacer.tbl -t heights.tbl -t widths.tbl -t pos.tbl -t pos2.tbl -t cursor.tbl -cm abcde::Atlas dragonw2.nes Atlas.txt

pause

perl -e "open(my $ROM, '+<', 'dragonw2.nes'); seek($ROM, 0x30010, 0); read($ROM, my $byte, 1); seek($ROM, 0x017FE7, 0); print $ROM $byte;"

pause

Unless I'm adding a space or something uneeded there too. But I don't know why it'd work and then not work. I'll double check when I'm ready to release a new patch regardless.

EDIT: I think I'm closing the window prematurely after the first pause. I ran the bat, saw the values not change, then ran it again, making sure the second part ran and the values were properly adjusted. My bad

Quote
The vast majority of anything relating to dialogue can be found by searching the disassembly, so you would have found it fairly quickly.
Yeah it kinda dawned on me how useful that is when you were talking about the Gold obtained messages in the other thread. It's great.

Quote
"a tap of thine A Button" is more accurate in this case - I'm pretty sure none of the 7 other buttons on the NES controller actually stop the wheels :P.

Well in my defence, while I was going for an easy one word change, I figured that the whole screen is essentially the controller and it doesn't say something specific like "tap the box, or tap anywhere on the screen" that the writer was going for something "indirect" hence why I thought the change worked. That's what I reasoned with myself anyway.


May 31, 2020, 11:49:37 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Hey laserlambert it might be a while before I have a formal 1.1 release ready, but try this update and see if the problem with Rubiss is fixed.

http://www.mediafire.com/file/js7bpllvv8d5x9l/DW2_RE-Quest_v1.1b.xdelta/file
« Last Edit: May 31, 2020, 11:49:37 pm by Choppasmith »

laserlambert

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
Yep the problem is fixed.
Not sure if you need a report on other problems but real quick, now when you get an item drop from an enemy it says "the effect of the holy water wears off".
You fixed a lot of the apostrophes except I noticed this one.

also this changed the possessive apostrophes also like this

While it probably looks better the old way, it's still fine this way, however the Jailor's Key isn't changed to match. nor is the Man o' War

so either way is fine, whichever fix works for you. if you do fix the possessives back to the old way, there is at least one Rubiss' that should change back as well.

Choppasmith

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Yep the problem is fixed.

Thank you, a lot of my test saves are still behind and not that far.

Quote
Not sure if you need a report on other problems but real quick, now when you get an item drop from an enemy it says "the effect of the holy water wears off".

Yeah, I'm trying to fix the item drops so that the game doesn't point to the treasure chest of gold line when a monster drops an item, I just didn't catch in time that it's adding A0 to the string value.

Quote
You fixed a lot of the apostrophes except I noticed this one.

also this changed the possessive apostrophes also like this

While it probably looks better the old way, it's still fine this way, however the Jailor's Key isn't changed to match. nor is the Man o' War

so either way is fine, whichever fix works for you. if you do fix the possessives back to the old way, there is at least one Rubiss' that should change back as well.


Yeah it's tricky because it looks a little off either way. The right side apostrophes definitely look better for those contractions like 'tis but I think I'll use the left side apostrophes for everything else.

June 07, 2020, 11:41:05 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Okay, Laserlambert this should fix everything but JUST IN CASE I'll leave this here for a couple days before uploading it to RHDN
http://www.mediafire.com/file/j30owgmj83srgbl/DW2_RE-Quest_v1.1.7z/file


From the readme

1.1 (6-7-20)
-Forgot to apply Chicken Knife's palette fix for coffins when in Rendarak
-Fixed a game breaking bug that prevented you from getting the Eye of Rubiss
-Thanks to abw who... SOMEHOW found a way to stretch the Dictionary even further giving me over 1000 bytes of space. A few lines I had to cut short are fully expanded now.
-Fixed the BGM change when in Burrowell from talking to a certain NPC. This was originally a cameo by an idol of the time named Anna Makino who sung a vocal version of the Menu theme. Look up "only lonely boy anna makino" and you should find it. Since this isn't in the remake and the new dialog doesn't fit, it's been removed.
-Changed various Menu/Battle/Shop dialog that was either wrong or still using the original dialog.
-Fixed the way obtaining gold is displayed in battle. Normally you get "Obtained [number] gold coins" at the end of battle but if an enemy drops an item the game switches over to the dialog used when opening a chest. This looks really odd with the new dialog on top of it being incorrect.
-Fixed the way apostrophes/single closing quotes display text. Mainly with a lot of the contractions that start with an apostrophe like 'Twas.
« Last Edit: June 07, 2020, 11:41:05 pm by Choppasmith »

laserlambert

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
Weird thing I noticed, if you get a single digit amount of gold, it just says ADVENT in place of whatever number should be there. No real effect on gameplay it seems.

Get as in have, not recieve, like if you start the game and buy 3 medicinal herbs you'll have ADVENT gold left
« Last Edit: June 08, 2020, 09:00:28 am by laserlambert »

abw

  • Sr. Member
  • ****
  • Posts: 470
    • View Profile
Weird thing I noticed, if you get a single digit amount of gold, it just says ADVENT in place of whatever number should be there. No real effect on gameplay it seems.

Get as in have, not recieve, like if you start the game and buy 3 medicinal herbs you'll have ADVENT gold left
This one was my fault - there's an error in the menu upgrades patch that's triggered when your gold amount is only one digit. I've submitted a fix to the patch.

Thanks for catching it!

Choppasmith

  • Full Member
  • ***
  • Posts: 177
    • View Profile
This one was my fault - there's an error in the menu upgrades patch that's triggered when your gold amount is only one digit. I've submitted a fix to the patch.

Thanks for catching it!

Oh cool, I just got home from work and was going to see if I could replicate with your Latin/standalone patch.

laserlambert

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
OK, I saw the update has gone up. I hadn't played much of the last patch before the new one went up on the site, so I did a decent run through of the new one up on RHDN and everything is playable and all, but I discovered some minor glitches.

one is there is something up with the end credits where the enix logo glitches, and appears twice, once with a cropped look.

next is the use of double quotes, something caused them to flip around the opposite way since the last patch.
Here is how they used to look in 1.0:

But with the update they changed.

I think these are the only 3 times an NPC uses these double quotes, so neither glitch is too big a deal, like the remaining quote misplacement in Dragon Warrior 1, you could probably put a pin in these if you'd like and come back to it later.

Choppasmith

  • Full Member
  • ***
  • Posts: 177
    • View Profile
OK, I saw the update has gone up. I hadn't played much of the last patch before the new one went up on the site, so I did a decent run through of the new one up on RHDN and everything is playable and all, but I discovered some minor glitches.

one is there is something up with the end credits where the enix logo glitches, and appears twice, once with a cropped look.

next is the use of double quotes, something caused them to flip around the opposite way since the last patch.
Here is how they used to look in 1.0:

But with the update they changed.

I think these are the only 3 times an NPC uses these double quotes, so neither glitch is too big a deal, like the remaining quote misplacement in Dragon Warrior 1, you could probably put a pin in these if you'd like and come back to it later.
Ah those should be easy fixes. I think when I was restructuring the dictionary I swapped those two around thinking they were wrong. That's an easy fix. I tweaked the credits a bit and it ended up being slightly shorter than the original so you're seeing the leftover data there.

Try this:
https://www.mediafire.com/file/95rlu2537rns8o7/DW2_RE-Quest_v1.12.xdelta/file

I just checked the intro and the quotes are definitely fixed but I don't have any save or savestate near the end if you can please check if this fixes the credits. Thank you so much! :thumbsup:

I'm dipped my toes in DW3 yesterday primarily tackling Gadabout/Goof-Off dialog which is ENORMOUSLY different between versions, but I'm still trying to track down an obscure bit of dialog in DW2 mobile so I can add it to the NES version. But I also plan on adding an update for DW1 soon, something I've been wanting to try out...