Romhacking.net

Romhacking => Personal Projects => Topic started by: nejimakipiyo on July 07, 2020, 05:40:38 pm

Title: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on July 07, 2020, 05:40:38 pm
Dragon Warrior Monsters is a game I've loved since childhood, so naturally it would be the one game I would want to use when I take my baby steps at hacking. Over the last few months I've posted some questions on the forum but now that my hack is almost ready for release - pending a playtest or two - I wanted to make a specific project thread to share it with the community.

My main goal for this hack was essentially to fix the awkward English. It started out as a wish to restore the humour of jokes that were translated too literally, and fix a sign in the early half of the game that made no sense. The little wish then evolved into an ambition to decensor the alcohol and 'Puff puff' references that the official localization covered up, as well as fix the many, many instances of poor wording and improper punctuation, and even a few typos!

My approach to editing the script of Dragon Warrior Monsters wasn't as intensive as my work with Chicken Knife on the Dragon Quest Delocalized series... mainly because I'm doing everything byte by byte in WindHex for this one! But I consistently checked the translation of each and every line in the English translation against the original Japanese to verify accuracy, and Chicken Knife helped a lot with rewriting major boss speeches and tweaking other text as well.

Here are just a few examples of things I've changed.

The weird sign - official translation (top) and my translation (bottom)
(https://i.imgur.com/KwhWWv0.png)
(https://i.imgur.com/syJ5K4L.png)

Restoration of one of many puns - official translation (top) and my translation (bottom)
(https://i.imgur.com/OLy22ah.png)
(https://i.imgur.com/9O7oq56.png)

Decensorship - official translation (top) and my translation (bottom)
(https://i.imgur.com/FxCgbVs.png)
(https://i.imgur.com/iIoLAuR.png)

Minor tweak to monster names - official translation (top) and my translation (bottom)
(https://i.imgur.com/HpfQOPL.png)
(https://i.imgur.com/oFyzAsl.png)


And I'll post one of my favourite boss speeches in the game, that Chicken Knife and I worked hard on getting just right.

Official:
"How do you do? I am the guardian here. My name is Durran.
Hmm. You have good eyes. You're with pretty good monsters!
I see you're a somebody! I wonder if you're good enough to fight me.
Let me see how you fight. Come on out! My servants!
Here, fight to your heart's content!

Ha ha ha! You defeated them easily.
Forgive me for having you fight with weaklings.
The next one is a pretty tough one.
It's a swordman who wandered in search of the best sword in the world and..
at last came to me!
Come out!
Let me introduce him to you. He's the one who dedicated his soul to me...
and he's the strongest in all the world, Terry!
Come on! Terry! Fight to your heart's content!
Show him how strong you are!

Ha ha ha! How easily you defeated such a brutal opponent!!
You're not bad! You're my kind of fighter.
To have such a fighter... so near.
...thrilling!! Want a real thrill? Fight me!
Satisfy my blood lust! Taste my steel! Fight!"


Our translation:
"Pleased to meet you. I am Durran, the lord here.
Ah... What a discerning eye. Your monsters are quite impressive!
You are clearly one of great power.
Will you now fight me and show me your power?
First, let's test your skill. Come, my servants!
No need to hold back!

Muahahaha! You defeated them easily.
You must forgive me for making you fight weaklings.
Next up is a tougher foe.
A swordsman who wandered the world in search of the strongest sword...
and came at last to me.
Come, my servant!
Now, be introduced to he who offered up his soul to me.
Here is the world's strongest swordsman, Terry!
Well, Terry, no need to hold back. Show this boy your power!

Muahahaha! Another one defeated!
You bring me such delight!
Oh, how I quiver! I tremble with such a strong foe before me!
My blood boils... my body throbs...
But your blood will now gush forth. Your body will be torn asunder!"



That's all of the previews! I'm really excited about releasing this soon, and I hope this post catches some more interest as well.

I do have a few more goals for the hack that won't be included in its first publication, but will hopefully be present in future updates as I learn more and expand my skills as a hacker. Those goals are:

1) Rewriting the monster, item, and spell list to reflect Delocalized naming convention. This will be an optional patch, for those who want to play with an improved translation but retain familiar monster and spell names for ease of using guides (or for nostalgia). But maybe I'll make it default and create an optional patch to revert. Entirely depends on how satisfied I am with it, as redoing the list comes with a challenge - the monsters, spells, and item names have a character limit of 9. That may force some compromises.

2) A complete overhaul of the script, which will require me to learn and become comfortable with extraction and insertion. I haven't put in serious time to learning that yet, and won't be able to for a while as I have some other non-hacking related projects on my plate, as well as continuing to translate and play test our Delocalized games.

3) I think it would be cool to change the title screen to that of the Japanese version so that the game could be called Dragon Quest Monsters. Chicken Knife attempted this, but unfortunately didn't get anywhere with it due to complications.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Chicken Knife on July 07, 2020, 08:46:38 pm
The Title Screen here is a weird scenario. I'm used to dealing with games with dedicated graphic tiles that only contain data related to specific graphics. In the case of Dragon Warrior Monsters, I've located the graphics that form the DRAGON WARRIOR logo we would want to redraw. But the bizarre part is that they seem to have taken the blank, "invisible" space in the 8x8 tiles used for the logo art and filled that space with... something, be it code or data. The presence of that other data in those tiles makes it essentially impossible to swap out the English tiles for the Japanese ones. If anyone has seen that kind of thing before and has experience dealing with it, please let me know!
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: zarkon on July 08, 2020, 03:02:13 pm
So I could breed a DarkDream rather than a Darkdrium?  Sounds good to me!
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on July 08, 2020, 09:48:12 pm
So I could breed a DarkDream rather than a Darkdrium?  Sounds good to me!

Yup! That is one of the monster name tweaks too! :D
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: FlashPV on July 09, 2020, 02:00:40 pm
The Title Screen here is a weird scenario. I'm used to dealing with games with dedicated graphic tiles that only contain data related to specific graphics. In the case of Dragon Warrior Monsters, I've located the graphics that form the DRAGON WARRIOR logo we would want to redraw. But the bizarre part is that they seem to have taken the blank, "invisible" space in the 8x8 tiles used for the logo art and filled that space with... something, be it code or data. The presence of that other data in those tiles makes it essentially impossible to swap out the English tiles for the Japanese ones. If anyone has seen that kind of thing before and has experience dealing with it, please let me know!
Maybe you could extract the title screen from the german rom (named Dragon Quest Monster) ?
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Chicken Knife on July 09, 2020, 02:57:15 pm
Maybe you could extract the title screen from the german rom (named Dragon Quest Monster) ?
Everything I've done with title screens has either been swapping out/redrawing tiles, or making minor tweaks to the nametable arrangement when there are duplicating letter tiles and things like that. I'm not sure what the process of extracting / importing a title screen would look like if I can't just swap tiles. Would you be able to give me any more detail on that?
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Choppasmith on July 09, 2020, 04:09:30 pm
Looks good nejimakipiyo! Best of luck!

Maybe you could extract the title screen from the german rom (named Dragon Quest Monster) ?

This is blowing my mind right now. Had no idea there was a pre-merger DQ game released in Germany of all places that KEPT the Quest name. If anything else maybe you could insert the English script in the German rom too if it ends up being THAT much different.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Chicken Knife on July 14, 2020, 07:30:54 pm
Looks good nejimakipiyo! Best of luck!

This is blowing my mind right now. Had no idea there was a pre-merger DQ game released in Germany of all places that KEPT the Quest name. If anything else maybe you could insert the English script in the German rom too if it ends up being THAT much different.
Wouldn't be a terrible thought if we could manage to sort out the pointer issues we've continued to be plagued by. Let me explain and maybe someone could help:

Let's take a look at nejimakipiyo's favorite monster in the monster list: RainHawk. The list address for RainHawk is 0x00105E36. Because the pointers here are big endian, no header subtracted, we have the two-byte pointer at 0x001043EA storing 5E36. And as a quick FYI, every monster on the list has its own pointer in the pointer table.

If we adjust the little byte of the pointer from 36 to 3F for instance, the monster name gets swapped with the next one on the list, MadPlant. All is normal there. But things get really weird when you try to swap out the big byte, 5E. Let's say you try to swap it for the monster located at 0x00105F0C, Butterfly. If you overwrite 5E36 with 5F0C, what should populate Butterfly ends up populating "zzardy". What happened is that the change in the big byte got completely ignored, and the code reads from 0x00105E0C instead, which is the end segment of the name Blizzardy.

All very mysterious. Why spend all that data listing bytes for the 1000's and 100's place when the code doesn't use them? And without using that pointer data, how exactly is the code choosing which address in the 1000's and 100's space to populate?

If anyone has seen or worked with this kind of oddball scenario, please send us some tips. nejimakipiyo was able to redo the script by mostly remaining on par with data storage, but in order to redo the monster/item/spell names, it would be infinitely helpful to have more control over the pointers. And having that control would probably allow us to do proper extractions/insertions in future updates.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Reld on July 15, 2020, 12:23:13 am
This might be too obvious, but are you sure the pointers are big endian? If they're little endian what you're describing would make perfect sense because you're changing the wrong "big" byte.

EDIT: I just took a quick look in the ROM and the pointers at $104416, if they're big endian, go 5EF9 5E02 5F0C. I think they're little endian. 5EF9 5F02 and 5F0C seems a lot more likely to me. Otherwise 5E02 is way out of order, although that's not impossible or anything.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Chicken Knife on July 15, 2020, 06:37:42 am
@Reld
You absolutely nailed it. The fact they have a pointer for each entry/string makes it so easy to mix this up and just assume they are big endian. Many many thanks for taking the time to check this out!
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on July 15, 2020, 07:46:20 am
This might be too obvious, but are you sure the pointers are big endian? If they're little endian what you're describing would make perfect sense because you're changing the wrong "big" byte.

Thank you, Reld! We had serious tunnel vision because of this!
Probably because when I asked for help in the Newcomer's Board I was a complete newbie and just went with the info I was given, that the pointers were starting with 5B. It worked well enough for what I was doing, despite all my complaining over the last few months that sometimes I just couldn't change the pointer. Now I know why!  :D

With this info, I'll definitely have a little more freedom to change the monster and skill names as I please. There's still an annoying restriction of 9 characters per name, but that just requires creativity.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Reld on July 15, 2020, 12:01:47 pm
Nice. Glad it was that simple and not some weird ASM nightmare.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Pennywise on July 15, 2020, 12:39:05 pm
Have you guys ripped the scripts from the US and Japanese versions yet? It would probably be fairly simple if the scripts are uncompressed.

Unless there's like major changes made to the US ROM, I'd probably use the Japanese ROM as a base. It doesn't look like much effort was put into redesigning/expanding everything by the localization team.

Anyone I briefly looked at the game and the ROM can be expanded up to 8MB (it's current size is 2MB) and the dialog font is setup in a way that makes adding a VWF pretty easy.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Chicken Knife on July 15, 2020, 01:30:49 pm
@Pennywise,

Thanks for taking a look. Nope, no serious effort was made to rip the scripts yet. This was/is nejimakipiyo's first hacking project, and like my earliest experiences hacking the NES Dragon Quest games, most things were done on a very slow and painfully manual basis so far. They did simultaneous playthroughs of the Japanese and English versions to catch any significant errors in the translation process and corrected them as they went. A lot of text was left alone that was deemed reasonably accurate. They made a short attempt at using abw's extraction / insertion software, but didn't get past the initial setup headaches, plus the pointer issue wouldn't have allowed that until now. I think there is something to be said for the benefit of a new hacker starting off with manual hex editing, but I know they are feeling a little more motivated to take a better approach.

As far as Japanese verses German, when we eventually look at taking a much more comprehensive approach to reworking the script, the German would probably initially be more space accommodative, given how compact kana text tends to be. The idea of expanding the Japanese rom and tweaking the code to address new rom banks for big chunks of text is intriguing. I haven't personally done that per say, so it would be a bit of a challenge. But I am open to looking at it.

 
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on July 15, 2020, 01:51:14 pm
Have you guys ripped the scripts from the US and Japanese versions yet? It would probably be fairly simple if the scripts are uncompressed.

Unless there's like major changes made to the US ROM, I'd probably use the Japanese ROM as a base. It doesn't look like much effort was put into redesigning/expanding everything by the localization team.

Anyone I briefly looked at the game and the ROM can be expanded up to 8MB (it's current size is 2MB) and the dialog font is setup in a way that makes adding a VWF pretty easy.

I haven't done any extraction yet. I was having a hard time trying to set up the tools to do so. All of this technical stuff is a nightmare for me. I did try to look at Japanese text in the ROM, and was having trouble getting that to display as well. Was just getting garbled nonsense instead. Hence why I decided to play it in Japanese to get all of the text I needed.  :D

I definitely need to upgrade my skills!
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Pennywise on July 15, 2020, 01:55:02 pm
Once you get past the learning curve, the tools make life much easier.

Maybe in the future, I can help you guys out on some the technical stuff.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Chicken Knife on July 15, 2020, 02:38:31 pm
Once you get past the learning curve, the tools make life much easier.

Maybe in the future, I can help you guys out on some the technical stuff.
Thank you for the offer! We try not to be too dependent, but sometimes a little help over certain hurdles can be necessary. We will take you up on that offer sometime, I'm sure.  :beer:
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Choppasmith on July 15, 2020, 08:42:41 pm
Have you guys ripped the scripts from the US and Japanese versions yet? It would probably be fairly simple if the scripts are uncompressed.

Unless there's like major changes made to the US ROM, I'd probably use the Japanese ROM as a base. It doesn't look like much effort was put into redesigning/expanding everything by the localization team.

Anyone I briefly looked at the game and the ROM can be expanded up to 8MB (it's current size is 2MB) and the dialog font is setup in a way that makes adding a VWF pretty easy.

Yeah it’s quite disheartening going from the NES games to the pre merger DW games, they’re so low effort in comparison, technically speaking. I did some poking around the Torneko The Last Hope SLUS in the interest of at least updating the names and I’m honestly surprised it has a VWF. But it looks like the pointers are unchanged and kept as is from the Japanese version.

Anyway, glad things were figured out. I’ll be getting to those GBC games myself eventually.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: KingMike on July 18, 2020, 02:24:48 am
Looks good nejimakipiyo! Best of luck!

This is blowing my mind right now. Had no idea there was a pre-merger DQ game released in Germany of all places that KEPT the Quest name. If anything else maybe you could insert the English script in the German rom too if it ends up being THAT much different.
Not that surprising when you think about it.
The US version was still subject to the trademark issues that forced the game to be renamed Dragon Warrior Monsters.
An EU English release would've surely used the US ROM because it was the simplest thing.
I'm guessing Germany wasn't restrained by trademark rights and they'd have to edit the game anyways.

However, that opening post.
I'm assuming that it is a puzzle where you have to take the longest way around the screen.
I'm guessing it was rewritten to not have one message span multiple text boxes, but in the process you have made the hint much less clear IMO. You may want to reconsider that.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on July 20, 2020, 12:32:57 pm
However, that opening post.
I'm assuming that it is a puzzle where you have to take the longest way around the screen.
I'm guessing it was rewritten to not have one message span multiple text boxes, but in the process you have made the hint much less clear IMO. You may want to reconsider that.

If your assumption was true, then I would have to agree.

However, that's not the case. The screenshots show this area after I came back to it in post-game just for screenshots, but when you first arrive here there's kind of a maze/puzzle with monsters that move around when you approach them. If you take the "longest way" - what is visibly the long route to the boss on the screen - you'll be blocked off by monsters and won't reach the boss unless you loop back to the beginning, whereas if you "take a detour" - what looks to be a dead end - a monster will move away and you can get to the boss without triggering any additional encounters.

In Japanese, the sign in question is very straight forward:

(https://i.imgur.com/bK0bLHY.png)

It uses the word とおまわり, meaning "detour". My translation definitely offers a clearer idea of how to proceed straight to the boss. (That said, if you're like me you'll want to fight all those monsters anyway 'cause they give great EXP!  >:D )



Once you get past the learning curve, the tools make life much easier.

Maybe in the future, I can help you guys out on some the technical stuff.

Thank you! Would love to take you up on that in the future. It's almost ready to release now, and I do plan to do a complete re-translation in the future once I'm comfortable with Extraction/Insertion. At that time, I'll most likely want to insert the English text into the German or Japanese ROM to get the title screen as well.

For now, though, I'm pretty satisfied with my accomplishments so far and I see value in touching up the translation in the ways that I already did for my first release. I'm also about to start working on a separate patch to give all of the monsters, spells, and items their more accurate Delocalized names, to (mostly) match the work that Chicken Knife and I are doing with the earlier main-line Dragon Quest games. I intend to publish both patches at the same time, so that people can choose which way they'd like to play. Only the Delocalized version will get the complete writing overhaul in the future, though.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Stories8106 on July 20, 2020, 12:55:28 pm
Good stuff!  Looking forward to the title screen swap once you get that done.

And anxiously awaiting the patch!
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on August 08, 2020, 08:02:17 am
Hello everyone! I've been making some headway with this lately. The conservative version of the patch is completed, ready to go. I finally figured out how to set up extraction and insertion, thanks to generous help from Chicken Knife and abw, so now I'm working very hard on a complete rewrite of the script for the Delocalized version of the patch. I intend to publish both patches at the same time, likely later this month.

Unfortunately I'm still a long way off from being able to include the Japanese/German "Dragon Quest" title screen. My intention was to extract English text and insert it, after revision, into the German ROM. However, the text isn't all in the same place in that ROM, so that idea quickly went out the window!  :banghead:

It seems likely that the first version of the Delocalized patch will still be using the "Dragon Warrior" screen and the English version ROM -- at least until I level up my hacking skills beyond simple extraction and insertion!
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Stories8106 on August 09, 2020, 12:14:36 am
Any chance you can post a small tutorial video on that when you do figure it out?  It something I've been interested in doing myself.  I'd love to know what tools you used.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on September 08, 2020, 07:52:58 pm
Here's another update! The script insertion was completed, and I'm now doing a playtest to check for bugs and errors. I found this... and may need some help or advice...

(https://i.imgur.com/JhKHFB7.png)

'VILLAGER' and 'TALISMAN' are the names of two Travelers' Gates in the original localization that I changed in my translation to 'Waiting' and 'Defending' due to mistranslations. In all other areas of the game, those names have been changed. For some reason, this particular list doesn't want to take the new names. There is an area in the ROM that I thought was the right thing to change, because the names of all of the gates appear in a list.

(https://i.imgur.com/qOYqoF1.png)

However, you can see here that after 'BEGINNING' I already have the names 'WAITING' and 'DEFENDING'.

I couldn't find any other place where 'VILLAGER' and 'TALISMAN' appear in capital letters like that, and I couldn't find them in the tile editor either.

Any suggestions?


Any chance you can post a small tutorial video on that when you do figure it out?  It something I've been interested in doing myself.  I'd love to know what tools you used.

I don't really do videos, sorry! But I used abw's abcde software, which you can find on this website. I also used a lot of blood, sweat, and tears, help from my pal Chicken Knife, and help from abw when silly mistakes went over our heads.   :crazy:
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Reld on September 08, 2020, 08:51:35 pm
I don't know jack about this game or how it works, but from your screenshot it looks like that text doesn't align to the tile grid. Based on all of the other screenshots (and the text on the right side of this most recent one) I'm guessing it's not using a variable width font. I'm guessing the text on the left is stored as a tile map, or possibly several strips of mini tile maps. I'm not sure what you meant by "I couldn't find them in the tile editor either", so maybe you already thought of that and I'm way off base.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Chicken Knife on September 08, 2020, 10:17:51 pm
(https://i.imgur.com/D3EpL8v.png)

Here's the only spot I see in the ROM where letters don't seem to align to their horizontal 8x8 tile boxes. But we have this weird situation here with how they are encoded. When I look over the DWM graphics, most of them fit in the traditional way in their own 8x8 boxes, but some of the graphics do not, and it's not something that can be solved by the hitting plus and minus keys. It seems like garbage data is mixed in with the legitimate graphics data, but I suspect it has to do with some kind of alternate encoding system. The title screen graphics suffer from the same scenario, and it's the only reason we can't swap out the title logo.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Reld on September 08, 2020, 10:29:27 pm
Looks like compression to me, with the "junk" data probably being instructions to copy or repeat certain bytes.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: Chicken Knife on September 09, 2020, 01:22:30 pm
I was thinking the same thing. It would be nice to get underneath that scheme and be able to redraw what is needed, but I don't know if that's realistic for us right now. I'm dealing with my own quagmire of DQ3 background drawing issues at this moment, so this compression routine is something I'd need to return to down the road with a higher skill level. At least it's a pre-existing issue and not something introduced by the patch. If anyone has experience handling this kind of thing and could suggest a workable approach or felt like pitching in, it would not be unwelcome.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: blipform on September 11, 2020, 07:10:55 pm
How do I access that portal screen? I'd like to try debugging it.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on September 12, 2020, 10:24:16 am
How do I access that portal screen? I'd like to try debugging it.

This screen is a list provided to you by talking to this NPC in the Chamber of Travelers' Gates.

(https://i.imgur.com/1az2C7q.png)

This guy can probably be accessed within the first 20-30 mins of gameplay time, depending on your luck and speed getting through the Gate of Beginning. Otherwise, you can use the save file I'm going to PM you.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: blipform on September 12, 2020, 11:11:26 am
Thanks for the save assist! Started some work and it's doing some type of vram copy routine @ ROM0:1590. Source comes from R056:6CAB [$15acab]. Some type of hand-painted vwf tiles.

15acab = 8 raw - [code 01] [02 05]

Some decompression routine kicks in here. I'll update as I understand more.

September 12, 2020, 11:46:56 am - (Auto Merged - Double Posts are not allowed before 7 days.)
It's a LZ* copier routine, 12-bit window + 4-bit length (with extension to 8-bit). The buffer wrap code I don't get but I'll see if I can cook some tool to help along.

September 12, 2020, 03:02:49 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Here's the unpacked bitmaps.
https://github.com/blipform/Dragon_Warrior_Monsters_1/raw/decrunch/portal_list.7z

With the source code here.
https://github.com/blipform/Dragon_Warrior_Monsters_1/tree/decrunch


Still have to figure out the packer.

September 12, 2020, 10:49:18 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
So the good news is my packer works, and produces slightly tinier sizes (often 2-3 byte savings).
https://github.com/blipform/Dragon_Warrior_Monsters_1/tree/crunch


There's a 16-bit ptr table @ 15801f-15803e for the bitmaps. I'm not sure if your edits will fit in-place but you could either: recompress all graphics for some savings or just shove the large ones at end of bank $56.


I expect some problems using the tools but I'll hang around for this part.


As a side-note, this LZ was decent. Instead of using bitflags, it reserves an unused byte code as the escape. Which saves some shift math time and space. And you can use the pre-buffer space for zero'es compression.

September 12, 2020, 10:59:31 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I am now somewhat interested in trying to port the German title logo over to USA also. As much as I think it should be simple, I've been surprised many times over before though. Let's find out!

September 12, 2020, 11:11:10 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Uploaded new cruncher exe tools; forgot to static link the gcc dependency libs so no one has to hunt them down.

September 13, 2020, 12:03:11 am - (Auto Merged - Double Posts are not allowed before 7 days.)
And title logo patch for USA rom.
https://github.com/blipform/Dragon_Warrior_Monsters_1/raw/title_logo/german_title_logo.ips


Short answer is:
1. Found German logo (16f455, 16faf7)
2. Recrunched it to save some bytes
3. Replaced original English logo (16f455, 16fa8d)
4. Remapped ptrs (16c041, 16c043)

5. Found German nametable (17e56a)
6. Replaced USA nametable (17e583)

https://github.com/blipform/Dragon_Warrior_Monsters_1/tree/title_logo
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on September 14, 2020, 01:10:14 pm
And title logo patch for USA rom.
https://github.com/blipform/Dragon_Warrior_Monsters_1/tree/title_logo

Holy crap! Thank you SO MUCH for doing this!  :beer:
That's one major goal for my hack down. And if I can accomplish the fix for the list of Travelers' Gates, it's pretty much done (pending a complete play test).

I'm going to be up front and say that I understand very little of what you wrote in that post, but I'm going to take my time and read through everything slowly to try to learn from it. I'm glad to know it seems do-able, at least!

Thanks again! :cookie: :cookie:

Edit:
This happens during the title screen sequence, after company logos and before the "Dragon Quest Monsters" screen.  :'(
(https://i.imgur.com/OjIifnp.png)

Edit 2:
the dwm_decrunch.exe file doesn't seem to want to work for me. I ran the batch file, which appears to have extracted the same 16 .bin files that are in the portal list zip. I believe I will only need to edit the 2nd and 3rd files (not sure how to edit .bin files?), since those are the only names I intend to change. However, I'm not sure why the .exe is not working for me. Do you have any ideas?

Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: blipform on September 14, 2020, 03:11:21 pm
Oh no! Didn't think of checking the intro sequence. I'll locate and update the logo patch.


You can open the bin files using a tile editor like YY-CHR.
http://www.romhacking.net/utilities/958/

Just drag-drop file into editor. Switch format to 2BPP GB. Then draw away! Although you could draw mixed-case for the whole list to get fancy.


Exe file is command-line driven.
dwm1_crunch.exe   
dwm1_crunch.exe 

But otherwise I have no idea why it would fail.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on September 14, 2020, 04:07:41 pm
Oh no! Didn't think of checking the intro sequence. I'll locate and update the logo patch.


You can open the bin files using a tile editor like YY-CHR.
http://www.romhacking.net/utilities/958/

Just drag-drop file into editor. Switch format to 2BPP GB. Then draw away! Although you could draw mixed-case for the whole list to get fancy.


Exe file is command-line driven.
dwm1_crunch.exe   
dwm1_crunch.exe 

But otherwise I have no idea why it would fail.

Thank you again! YYCHR opened in 2BPP MX but I switched to GB and can edit now. This will take some time, but thankfully nothing too difficult compared to the garbled nonsense I was looking at before!  :laugh:

I had been trying to open the .exe from Explorer, not command prompt, so I can do that too. I don't foresee future problems (we hope). :-X
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: blipform on September 14, 2020, 06:21:16 pm
Tilemap locations:
german rom 17e4f3  [$77 bytes]
usa rom 17e4f1  [$92 bytes]

Which gives us this patch
https://github.com/blipform/Dragon_Warrior_Monsters_1/raw/title_logo/german_title_logo.ips


I'll add some user prompt support to the exe and note an update here when it happens.

__________________________________________________


Summary of previous posts:

1. LZ just means dictionary compression, based on previous data. So
abcdeabcdabc ==>
abcde[abcd][abc] ==>
abcde[lz1][lz2]

We can copy from the previous "abcde" string to recreate the next strings. Save space.


2. The teleporter names have a ptr table @ $15801f, 2 bytes each entry or 16-bits. If the new packed data doesn't fit, you'll know to look here when shuffling everything around.


3. German logo uses same packing math as the gate names. I chose to make it smaller since it doesn't fit in the USA rom so easily.

Tilemaps are basically stored "raw" and copied over. So using the bgb vram viewer -- bg map window, I was able to find the rom locations. Turns out German uses smaller maps than USA so I didn't need to move anything around.

A tilemap is a bunch of painting codes that draws the screen: [tile 00][tile 01]..[tile 50].


Hope that simplifies everything.



EDIT1
Exe tools are updated and now ask for input if run directly
https://github.com/blipform/Dragon_Warrior_Monsters_1/tree/crunch
https://github.com/blipform/Dragon_Warrior_Monsters_1/tree/decrunch
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on September 15, 2020, 01:53:58 pm
Thanks again, blipform -- this title patch works perfectly!  ;D
And great update with the tools!


Now I've got some questions about using the crunch/decrunch tools. Yesterday I drew the letters for how I want to rename the 2 gates.
(https://i.imgur.com/ikGw3GL.png)

(https://i.imgur.com/dsFQX5a.png)

But when I tried to save them, I get this notification.

(https://i.imgur.com/ea2uJoY.png)

I saved it both ways just in case, but either way when I crunch the files again it doesn't seem to work with the ROM. I suspect I'm missing a very important step and suspect it may have to do with redirecting the pointers, because I haven't messed with that yet. My main source of hesitation here is that when I crunch the files again, it outputs new filenames and I'm not really sure what's happening or which files I should be using. Is it correct to assume that the new filenames (for example portal_name2.p.bin) are in new locations in the ROM and I should be finding those addresses, or do I have to move them elsewhere in the ROM myself?
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: blipform on September 15, 2020, 03:41:38 pm
Oh, right. That step. I choose 'no' to keep file size the same; otherwise it adds lots more junk bytes which usually you do not want.


portal_name2.p.bin is the new product you want to manually re-insert back into the ROM. But! You'll have to check the old compressed size to make sure it fits first. I use storall's asar mod to do the insertion for me and checking / ptr remapping; it's like xkas but extended for other systems, but more than a bit buggy.
https://github.com/storall/asar/tree/_storall_
https://github.com/storall/asar/raw/_storall_/bin/asar.exe


If you are absolutely sure it fits, you can do a command-line insert
dwm1_crunch portal_name2.bin rom.gbc 0x15ad0f
dwm1_crunch portal_name3.bin rom.gbc 0x15ad7d

Code: [Select]
portal_name1.bin  -- in: $67 bytes, out: $90 bytes, $15aca8 - $15ad0e
portal_name2.bin  -- in: $6e bytes, out: $90 bytes, $15ad0f - $15ad7c
portal_name3.bin  -- in: $61 bytes, out: $90 bytes, $15ad7d - $15addd
portal_name4.bin  -- in: $52 bytes, out: $90 bytes, $15adde - $15ae2f
portal_name5.bin  -- in: $66 bytes, out: $90 bytes, $15ae30 - $15ae95
portal_name6.bin  -- in: $40 bytes, out: $90 bytes, $15ae96 - $15aed5
portal_name7.bin  -- in: $4f bytes, out: $90 bytes, $15aed6 - $15af24
portal_name8.bin  -- in: $65 bytes, out: $90 bytes, $15af25 - $15af89
portal_name9.bin  -- in: $50 bytes, out: $90 bytes, $15af8a - $15afd9
portal_name10.bin -- in: $32 bytes, out: $90 bytes, $15afda - $15b00b
portal_name11.bin -- in: $52 bytes, out: $90 bytes, $15b00c - $15b05d
portal_name12.bin -- in: $63 bytes, out: $90 bytes, $15b05e - $15b0c0
portal_name13.bin -- in: $76 bytes, out: $90 bytes, $15b0c1 - $15b136
portal_name14.bin -- in: $79 bytes, out: $90 bytes, $15b137 - $15b1af
portal_name15.bin -- in: $68 bytes, out: $90 bytes, $15b1b0 - $15b217
portal_name16.bin -- in: $79 bytes, out: $90 bytes, $15b218 - $15b290


If it doesn't fit, you'll have to manually move your portal_name2.bin somewhere else in ROM (like $15b2xx-15bfff area) and remap the pointer table. Or recompress all 16 and remap the ptr table to fit in-place. There's lots of empty space though.


September 15, 2020, 04:34:02 pm
Fixed command-line. $ hex support doesn't exist yet, only 0x. I'm going to modify the crunchers to accept $ and prompt for insertion support.


September 15, 2020, 06:09:13 pm
Both crunchers are updated.
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: nejimakipiyo on September 17, 2020, 12:03:00 pm
I use storall's asar mod to do the insertion for me and checking / ptr remapping; it's like xkas but extended for other systems, but more than a bit buggy.
https://github.com/storall/asar/tree/_storall_
https://github.com/storall/asar/raw/_storall_/bin/asar.exe


I downloaded this, and my first confusion was when it asks me for a patch name. I considered that might mean the new file for the 2nd portal name, even though that's a .bin file. I don't have an .ips for this yet.
So I progressed under my (probably false) assumption, and now it is telling me that the ROM title looks like garbage.
All I did was shorten the ROM title to DWM to make it easier to type into command prompts.
Any ideas what I'm missing here? I feel like if I could get to the point where I generate the kind of list you posted above, the rest of the steps would flow very easily to me.

(https://i.imgur.com/KwaZXs4.png)
Title: Re: Dragon Warrior Monsters (GBC) Decensored & Improved
Post by: blipform on September 17, 2020, 12:41:02 pm
I'm not great at explaining but I'll keep poking at it! Let me think ..

____________________________________________________


You could directly insert back into ROM if you're feeling lucky about it.

Code: [Select]
dwm1_crunch
-- in_file name: portal_name2.bin
-- out_file name: dwm.gbc
-- out_file offset: $15ad0f

In my case, I'm okay because it's smaller than original.

old = $15ad0f - $15ad7c
new = $15ad0f - $15ad7a (+2 bytes)

____________________________________________________


The alternate way

Code: [Select]
dwm1_crunch
-- in_file name: portal_name2.bin
-- out_file name: portal_name2.p.bin
-- out_file offset: -1

This creates a new file named "portal_name2.p.bin". Let me get back on the asar follow-up ..


September 17, 2020, 01:33:14 pm

I chose to re-crunch all 16 names. And created this asar script.
https://raw.githubusercontent.com/blipform/Dragon_Warrior_Monsters_1/crunch/gate_names.txt


Which we run this way with command-line:
asar --no-title-check gate_names.txt dwm.gbc

or

Code: [Select]
asar.exe
-- Enter patch name: gate_names.txt
-- Enter ROM name: dwm.gbc
-- Warning .. title .. lala: yes


note: storall's asar version currently has some dumb bug with incbin. So you'll need to edit "arch gb.cpu" --> "arch nes.cpu" to get the inserter working. I already reported it and hoping for an updated version.


If you only want to re-insert names 2+3, it should be "simple" enough to modify the script. But experience has shown me otherwise many times.