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

Author Topic: Jiro Akagawa's "The Sleep of Witches" Situation Report  (Read 19631 times)

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #40 on: June 28, 2012, 07:38:58 pm »
The original logo only says 魔女たちの眠り. I had half a mind to include his name anyway, but it's given in the preceding credits, so it'd be a bit redundant.

The nice thing is that I managed to get the title on screen without obscuring the hanging corpse on the right.
In the event of a firestorm, the salad bar will remain open.

BRPXQZME

  • Hero Member
  • *****
  • Posts: 4572
  • じー
    • View Profile
    • The BRPXQZME Network
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #41 on: June 28, 2012, 07:55:54 pm »
@Ryusui:
From this page, keeping their order (whatever the logic behind it), here’s what I would say (barring furigana in the game, a misguessed gender, or some other authority that would state it to be a less common name with the same kanji, which I was unable to find). Spoiler-tagged because who knows which of these might be spoilers, right?

Spoiler:
The company, chapter 1:
岩田 健二 - IWATA Kenji
飯島 正太 - IIJIMA Shōta
高橋 勝男 - TAKAHASHI Katsuo
宮田 尚美 - MIYATA Naomi
尾形 陽子 - OGATA Yōko
深野 珠江 - FUKANO Tamae
山村 花子 - YAMAMURA Hanako

宮里 直人 - MIYAZATO Naoto - after certain selection in Ch. 1
馬渕 真希 - MABUCHI Maki - after certain selection in Ch. 1
本沢 武司 - HONZAWA Takeshi - in Witch Resurrection Ch. 2
桐山 努 - KIRIYAMA Tsutomu - in Eternal Youth
新聞少女 - News Girl - Eternal Youth, most likely
栗原 多江 - KURIHARA Tae - ch. 1
お種 - o-Tane - ch. 1 (Tane to her close family—this is a outmoded naming convention for women that is a bit beyond the scope of this post, plus I can’t find anything in English that would be good to copy and paste as an explanation—I’m not even too clear on when this convention stopped being normal, but I’ve seen it in a novel published as late as 1929)
河村 文子 - KAWAMURA Fumiko - after a certain selection in Eternal Youth
タマ - Tama - after a certain selection in Witch Resurrection Ch. 2 (Fluffy)
河村巡査 - Officer KAWAMURA - ch. 1
金山医師 - Dr. KANAYAMA - ch. 1
糸川 繁子 - ITOGAWA Shigeko - after a certain selection in Witch Resurrection Ch. 2
西山 直希 - NISHIYAMA Naoki - after a certain selection in Eternal Youth
水谷先生 - MIZUTANI-sensei - ch. 1 (not much to go on)
鈴木 志穂 - SUZUKI Shiho - after a certain selection in Forgotten Valley
山田 祐紀 - YAMADA Yuki - after a certain selection in Forgotten Valley
池内 重仁 - IKEUCHI Shigehito - after a certain selection in Eternal Youth
秦 夏記 - HATA Natsuki - Witch Resurrection Ch. 1
斎藤 良太 - SAITŌ Ryōta - in Gold Ch. 1
角田 平蔵 - TSUNODA Heizō - Ch. 1
角田 栄子 - TSUNODA Eiko - Ch. 1
ポチ - Pochi - after a certain selection in Witch Resurrection Ch. 1 (Fido)
石川 真理子 - ISHIKAWA Mariko - after a certain selection in Gold Ch. 2
高屋敷 弥生 - TAKAYASHIKI Yayoi - Gold Ch. 2
大沢 和子 - ŌSAWA Kazuko - Ch. 1
山崎 千晶 - YAMAZAKI Chiaki - Witch Resurrection Ch. 2
三木 敬二 - MIKI Keiji - after a certain selection in Witch Resurrection Ch. 2
野人 - Rustic / Boor / Hick / Person out of Office / Yěrén - after certain choices in Forgotten Valley Ch. 1; think you’re going to need a little context to translate this one.

Again, this is with no other evidence to go on. Just picking the most likely readings. There are more Yamazakis out there than Yamasakis, if I’m not mistaken, but I’ve only ever run into a Yamasaki, for instance.
we are in a horrible and deadly danger

tashi

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #42 on: June 28, 2012, 08:09:16 pm »
Man, I had forgotten about that hanged corpse until you mentioned it. Just a brief glance and it's easy to miss. This game is so creepy/scary!

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #43 on: June 28, 2012, 08:51:02 pm »
Oh, and for those who might have noticed: no, you're not going crazy. The blood drip on the "t" did move to the right a few pixels. That's the wonderful thing about using Dropbox for my file and image hosting needs - I can make Orwellian changes like that. >8D

EDIT: I would've translated ポチ literally as "Spot" myself, but for going to all the trouble of identifying all those names, I'll use "Fido" (and "Fluffy," for that matter) by way of thanks. ;)
« Last Edit: June 28, 2012, 09:00:59 pm by Ryusui »
In the event of a firestorm, the salad bar will remain open.

DSwizzy145

  • Sr. Member
  • ****
  • Posts: 427
  • Super Famicom Fanatic
    • View Profile
    • Super Famicom Game List A-C + SNES Game List
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #44 on: June 28, 2012, 09:27:29 pm »
@Ryusui thats true, i completely forgotten about the starting credits right under the year of the game's release :D my bad

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #45 on: June 28, 2012, 11:12:36 pm »
Okay, so the shift and destination values are "baked" into the ROM. Interesting. I've almost got a handle on how to turn this into an honest-to-goodness VWF.

On a related note, I have a diabolical idea for how to allow an ASCII font to coexist side-by-side with the original. Don't let the table fool you with its fancy BX, CX, and DX prefixes for punctuation, katakana, and kanji - the exact value of the most significant nibble is meaningless as long as it's B or higher. B1DE is the same as C1DE is the same as D1DE is the same as E1DE is the same as F1DE - the game recognizes from the most significant nibble that it's dealing with a two-byte code, snips it off, and then translates the remaining 12 bits of the character code into the tile address. So right now I have a modified table that prefixes all the single-byte codes (hiragana and whatnot) with F0: it inserts without complaint, and runs without a hitch. That's right: I have tricked the game into freeing up all the single-byte codes, meaning I can hijack the single-byte functionality for my own purposes.
« Last Edit: June 28, 2012, 11:29:41 pm by Ryusui »
In the event of a firestorm, the salad bar will remain open.

danke

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 2057
    • View Profile
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #46 on: June 29, 2012, 12:02:30 am »
Out of curiosity, why would you want to retain the Japanese script/font in an English translation?

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #47 on: June 29, 2012, 12:32:21 am »
It helps with testing. We can insert a partial translation and still be able to read the Japanese text in case something screws up. Instead of throwing out a faceful of cavespeak, it'll print the proper text and we can find the relevant strings.

EDIT: Also took a look at the graphics compression. Yes, I've figured it out already. I haven't made the compressor/decompressor yet, mind, but it shouldn't be hard - it's a simple mathematical encoding, RLE plus a rather brilliant (if redundant) XOR-based scheme. Any fully-functioning implementation should be able to produce identical compression to the original.

EDIT #2: Okay, that's done - I actually got the decompressor written in Python, since I didn't feel like starting up another VB project. ^_^; Bit of a headache learning how to make it behave with regards to reading binary data from a file, but this makes my workflow just a little bit sleeker now.

EDIT #3: An idea. I wonder how feasible it would be to tweak the name entry screens so you have control over your characters' first and last names? Tsuda is always identified by his family name while Yoriko is always identified by her given name; there are cases where it might be more natural to identify the protagonist by his given name (e.g. Toshio) or the girl by her family name (e.g. Nakagome). I could always treat the other halves of their names as fixed, but it would be kind of odd if you could select only Toshio's family name or Ms. Nakagome's given name...
« Last Edit: June 30, 2012, 05:09:21 pm by Ryusui »
In the event of a firestorm, the salad bar will remain open.

danke

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 2057
    • View Profile
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #48 on: June 30, 2012, 11:22:05 pm »
Wouldn't it be as "simple" as hijacking the control code routine, and adding two more options? And then hijacking the naming screen, where it defines the control codes, and adding in two more screens?

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #49 on: July 01, 2012, 12:14:42 am »
Pretty much, yeah. Hopefully.

Anyway, I've managed to hijack the code so that it can calculate the shift values programmatically, though I still have some housekeeping to do (it doesn't reset the shift value to 0 at the end of a line yet). After that, the destination values.

EDIT: I have cored out the VWF's brain and have it dancing like my own personal cyborg puppet. >8D

The "baked-in" destination values for the VWF work in my favor - they represent all the possible tile write combinations, so I've simply hijacked the function that ultimately selects which one to use. Of course, there's still some work to do with actually rigging it so that it will select the right one. Next step will be the English font and width table, I think - then I'll be able to start testing my diabolical hacks.

EDIT #2: Okay, scratch that. There are "blind spots" in the destination values - they're written with the existing 16x16 font in mind. Probably gonna need another programmatic solution, but again, I'm good at those.
« Last Edit: July 01, 2012, 01:28:56 pm by Ryusui »
In the event of a firestorm, the salad bar will remain open.

DSwizzy145

  • Sr. Member
  • ****
  • Posts: 427
  • Super Famicom Fanatic
    • View Profile
    • Super Famicom Game List A-C + SNES Game List
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #50 on: July 01, 2012, 09:44:53 pm »
Came to drop by to cheer for ya :D nice man!  So now you gotta hack the text fonts for it to fit in the lines accordingly?

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #51 on: July 01, 2012, 09:57:15 pm »
Yeah, pretty much. It's a little harder going than I thought - I'm trying to keep the original print routine more or less intact so it can still display Japanese text, while at the same time tweaking it so it can recognize when I'm trying to print ASCII characters and display those in a proportional font. Again, the guts are fundamentally VWF-friendly, but there's a problem where the destination values for where the tile data (shifted and otherwise) gets written to are precalculated and stored in the ROM: at first I thought I could simply hijack the existing values, but it's looking like I'll have to set things up so that the game crunches the numbers at runtime.

EDIT: For the uninitiated: a Variable-Width Font (or VWF; "proportional font" in publishing jargon) works by shifting and combining character graphics so that different-width characters take up different amounts of space on screen. Since game hardware is tile-based, older games (especially ones of Japanese origin) tend to use Fixed-Width Fonts (FWF, a.k.a. "monospace fonts") instead. Technically, Majotachi no Nemuri uses an FWF, but there's a twist: it uses VWF-style shifting and combining in order to fit 16 Japanese characters, each 14 pixels wide, into 14 16-pixel-wide characters' worth of space. So the guts of a proper proportional font are already in the game; they just need to be fed the right values, which are normally loaded directly from the ROM and thus fixed. I've gotten it to the point where I can calculate everything but the destination addresses at runtime - and once that's solved, the VWF should be more or less complete.

EDIT #2: Good news - I've replaced the baked-in destination values with ones generated at runtime. Bad news - something I've done somewhere along the way has murdered the name entry screen. Dammit.

EDIT #3: Guess what? It's my runtime-generated destination values that are causing the problem. >_<# Well, I had to work on the name entry screen sometime...

EDIT #4: Aaaaand now it seems I've broken the scrollback, too. Damn. All this stuff is gonna need to get fixed...

EDIT #5:


On the upside, I've discovered that the scrollback actually goes back further than I thought - you activate it by pressing Y, and R scrolls backwards through the text. Yeah, Japanese reading order. I'll probably swap the shoulder triggers before I'm done.

EDIT #6: Pointer finger fixed, for the most part. Next will be scrollback.
« Last Edit: July 04, 2012, 08:55:57 pm by Ryusui »
In the event of a firestorm, the salad bar will remain open.

tashi

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #52 on: July 07, 2012, 02:10:44 am »
You are a hacking machine, mate! It's such a beautiful thing to see a VWF hack! Good luck with scrollback (and name screen?). I look forward to seeing your progress.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #53 on: July 07, 2012, 02:35:40 am »
Thanks. :3

I'll admit the pointer finger is a little hacky - I've deliberately set it up so it automatically pads eight pixels after the last character on the page. The Japanese font doesn't need the padding since the 。 and 、 characters have it built in; with the English text, there's only a pixel or so of space between the last character and the pointer, and it looks a bit odd. A side effect of this is that text must be formatted/edited so that the last character on a page is far enough from the edge of the screen that the pointer doesn't get cut off. >_>
In the event of a firestorm, the salad bar will remain open.

DSwizzy145

  • Sr. Member
  • ****
  • Posts: 427
  • Super Famicom Fanatic
    • View Profile
    • Super Famicom Game List A-C + SNES Game List
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #54 on: July 14, 2012, 11:16:05 am »
sup man, btw hows the progress going so far? how many chapters translated? its cool to give this a try soon instead of the orginal language japanese available :) thank you!

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #55 on: July 14, 2012, 02:15:12 pm »
Sorry, stuff's been going on. I haven't finished the hacking yet. Just give me some time.
In the event of a firestorm, the salad bar will remain open.

DSwizzy145

  • Sr. Member
  • ****
  • Posts: 427
  • Super Famicom Fanatic
    • View Profile
    • Super Famicom Game List A-C + SNES Game List
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #56 on: July 16, 2012, 11:37:53 pm »
My apologies man :) sorry

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Jiro Akagawa\'s \"The Sleep of Witches\" Situation Report
« Reply #57 on: July 31, 2012, 07:04:13 am »
So I did a little more work on this today!

Meet PyxelEdit. I was playing around with this little sucker today when I realized something:

It's actually a pretty useful tool for a romhacker.

Check it out. You can import an image and PyxelEdit can automatically 1. break it down into tiles and 2. generate a corresponding tilemap. And you can export both. Once the applications of this finally clicked, I wasted no time whipping together a Python script for converting the exported XML tilemap into a SNES-compatible binary file, and then I finally got off my ass and put together a compressor. It's not perfect - there's still something I don't quite understand about how and when it chooses to use the XOR function - but it's good enough to actually get my logo into the game. And all the while, I've saved a hell of a lot of tedium with the help of PyxelEdit! 8D

August 06, 2012, 07:08:48 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
UPDATE!

1. Scrollback is - should be - working 100% now. The only wrinkle is that Japanese text in scrollback shows up as cavespeak now, but that won't matter in the finished product.

2. As an added bonus, I swapped the controls around for the scrollback. Originally, though the text is still read left-to-right, top-to-bottom like in English, the R button scrolled backwards through the text while the L button scrolled forwards. Amazingly, switching this so that L scrolls back and R scrolls forward involved changing 2 LDA directives - that's 6 bytes total, for those keeping score at home.

The scrollback code is now an ungodly rat's nest of tweaks and modifications, but it works without breaking the game or displaying garbage now. Good times!

Just three things left now, to my knowledge:

1. Fixing the name entry screen (and, hopefully, expanding it so you can enter first and last names)

2. Translating the ending credits.

3. Translating a screen I didn't realize was even in there originally - the "Cast of Characters" list, which fills out as you meet everyone. The same one, in fact, listed here. (Thanks, BRPXQZME!)

I also plan to get a dedicated editor of some kind up and running. This script is even more of a cat's-cradle than I thought at first. >_>
« Last Edit: August 06, 2012, 07:08:48 pm by Ryusui »
In the event of a firestorm, the salad bar will remain open.

DSwizzy145

  • Sr. Member
  • ****
  • Posts: 427
  • Super Famicom Fanatic
    • View Profile
    • Super Famicom Game List A-C + SNES Game List
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #58 on: August 07, 2012, 01:02:17 am »
Awesome progress man! :)  if thats the case than this will turn out to be a great birthday gift for me to enjoy ;) in the upcoming day (Thrusday) :D

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Jiro Akagawa's "The Sleep of Witches" Situation Report
« Reply #59 on: August 07, 2012, 03:06:00 am »
Heh. Don't get too excited just yet - this just means we're close to a point where we can focus exclusively on the translation end of things.

And I'm gonna need a lot of help with that. I'll see if I can get some tools set up to aid in the translation process, but this is still a huge freakin' script we're looking at here.
In the event of a firestorm, the salad bar will remain open.