Sega Master System / Mark III / Game Gear|
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew
|Goto page 1, 2 Next|
Translating: Game de Check! Koutsuu AnzenPosted: Wed Feb 05, 2020 11:20 am
Last edited by Bock on Tue Feb 25, 2020 9:43 am; edited 2 times in total
Thread to discuss hacking of Game De Check Koutsuu Anzen prior to its release.
(see https://www.smspower.org/forums/6691 )
- Music write trigger seems to be a $DE03 if you write $81 $82 $83 etc in that memory location you can play music and sound effects. Maxim will work on making a VGM pack (both PSG and FM). One challenge will be to name the track. Will provide more info later to help us toward that.
- One idea would be to see if we could work on a translation patch.
If we can get the programming work to extract and reinject script we could find translators.
- We got the manuals scanned (about 32 pages total), will work on color adjustment cropping etc. They have been scanned with reference palettes.
||Posted: Wed Feb 05, 2020 12:45 pm|
|The music engine seems to mix SFX and music more than most games, but this may simply be along the lines of the game sections. There are several fanfare sounds which may not be musical enough to include, and then only a few music tracks after that. Notably two are arrangements of Alex Kidd themes, does that tie into the game? Thus others may also be arrangements I didn't recognise.|
||Posted: Thu Feb 06, 2020 6:30 pm|
VGM pack is on hold due to forgetting my headphones :)
The game uses "Phantasy Star" compression on the graphics. Here's what I found:
Lots of "burnt in" text.
The font drawing uses a table at $1CE78, which points to 1bpp data at $1C000 for each (16x16) character. It draws it into VRAM as it goes. The text renderer seems to start at $6204 and takes a pointer to the text in hl.
||Posted: Fri Feb 07, 2020 11:38 am|
|There’s also a lot of ROM holding uncompressed graphics. I’m working on dumping the font mapping now - it’s a bit of a pain because it doesn’t seem to have a sensible ordering and the tile mapping is inconsistent. I probably ought to write some code to do it.|
Some transcriptionPosted: Fri Feb 07, 2020 4:43 pm
In case it may be useful to locate some text in ROM
Game de Check!
[Game wo erande kudasai]
1. Driving sense test
2. Kimi ha best driver
3. Pyonkichi Adventure
3 wo oshite kudasai.
||Posted: Sat Feb 08, 2020 7:49 am|
Burnt into 1bpp tiles at $198ef, use e.g. Tile Layer Pro to view them.
Data at $1ddf6:
5A 98 86 45 03 3F 46 21 07 1E 0F 01 48 FD FF
99 99 6F 8E 4E 7B 95 59 5F 95 5E 69 5E 6A FD
99 99 06 38 28 7D 5E 6A 6F 8E 4E 7A 98 FD
99 99 80 97 95 06 1A 4D 6F 7D 95 67 8D 98 FE
$FD and $FF are control codes, I guess FD = CRLF and FF = LF. $99 is space. The engine seems to not draw duplicate into VRAM, it uses a buffer to remember what characters already have tiles. $FE is the string terminator. The colourful number tiles are drawn in afterwards as they're not part of the font.
Data at $1d398:
6F 8E 4E 7B 95 59 4D 4E FE
Data at $1d522:
02 0E 01 1C 01 41 3B 27 45 38 44 08 41 10 FD
40 4C 07 1D 47 29 43 02 10 3C 11 01 05 22 FD
02 05 45 38 41 19 3A 27 69 5E 6A 21 11 48 FD
99 37 22 27 13 1D 45 3E 09 0B 41 3B 27 0A FD
23 24 05 45 00 1C 1C 07 1E 0F 01 48 FE
It looks like all the tile-allocating-font-rendered strings are next to each other in the ROM, which is nice.
I think we need to try to figure out how to render this stuff. A 16x16 tile per English letter will run out of space. Hacking down to 8x16 might be possible. Drawing in variable-width would be nice but would effectively preclude tile re-use.
||Posted: Sat Feb 08, 2020 9:18 pm|
Here's the font dump and what i think is a correct transcription, let me know if I'm wrong.
I believe this is somewhat in "normal" hiragana and katakana order but with some characters missing.
||Posted: Sat Feb 08, 2020 9:53 pm|
Here's a "tbl" file, as is often used for this sort of thing. It's Shift-JIS because the tools don't seem to support UTF-8.
Using "Translhextion" I was able to dump this:
I'm sure there are many more strings than these... but it's very hard to make sense of it as a non-reader. Some of the above may also be nonsense.
||Posted: Sun Feb 09, 2020 3:14 pm|
It's valid Japanese (edit: apart from few mistakes, see below)
(Hint: if you install browser extension Yomichan you can translate them with mouse hover. It's made harder by lack of kanjis and manual carriage return in the middle of words will also confuse it).
I believe we've seen this font somewhere, we could maybe find the corresponding latin glyphs..
||Posted: Sun Feb 09, 2020 3:28 pm|
> Here's the font dump and what i think is a correct transcription, let me know if I'm wrong.
$31, ぽ (PO) should be ぼ (BO)
$4B ゆ (YU) should be ゅ (YU, small)
$4F ゥ (U small) should be ウ (U)
$68 ッ (TSU small) should be ツ (TSU)
$6C デ (DE) should be ヂ (ZI)
$6D ブ (BU) should be ヅ
$8B ョ (YO small) should be ヨ (YO)
> I think we need to try to figure out how to render this stuff. A 16x16 tile per English letter will run out of space. Hacking down to 8x16 might be possible. Drawing in variable-width would be nice but would effectively preclude tile re-use.
In one of the first screen the font buffer goes up to tile 204 (51 glyphs including space) and it seems like there rooms up to maybe tile 255 (64 glyphs including space). So I'm assuming most English text with not overflow the buffer? Even with lowercase we are 26+26 and it's unlikely all uppercase letters would be used in a screen, then room for 4-5 punctuations elements. Do you see a problem?
||Posted: Sun Feb 09, 2020 6:23 pm|
Yes, that should make it easier - no need to track the tiles already used. But still, no VWF.
I’ve started the beginnings of a translation. Do you want to make a private repo for it? I don’t seem to be able to make them in the smspower “organisation”.
||Posted: Sun Feb 09, 2020 11:01 pm|
Attached updated Thingy table, Shift-JIS again due to crappy old tools.
Indeed there are strings all over the place. It'll be a pain to find them all.
The text renderer loads tiles into VRAM as needed based on an address pointer given by the code, so in a few places the available space is shifted a bit. This means loading a full font at a known address isn't going to work. I think it's going to be better in the end to adapt to an 8x16 font and hack on the existing tile loader, as it also makes it closer to the original - rather than try to completely replace the whole lot. Well, I'll see what I can do, anyway...
It looks like the rabbit Pyonkichi in the third game is an anime character, from the TV adaptation of Anpanman:
||Posted: Mon Feb 10, 2020 12:16 am|
When you save the tbl file as UTF-8 you can dump the text using CTRL+SHIFT+C in Emulicious's Memory Editor.
That way you can avoid saving the tbl file with wrong encoding.
For convenience name the table file same as the ROM so it gets loaded automatically.
I have attached your tbl file converted to UTF-8.
Also the disassembler seems to work very well on this ROM, finding several tables and pointers.
What are the next steps? What can be done to help?
||Posted: Mon Feb 10, 2020 8:10 am|
I’m using an Emulicious disassembly for reversing. Next is to locate all the script entries to dump them, and at the same time start coding the replacement. I have the shell of the latter but need to spend time on the former, I suspect there’s more than one entry point to the text renderer.
I had to jump through hoops to get the table file working with the hex editors I could find with table support - I didn’t consider Emulicious there :) so I had to figure out how to convert from UTF-8 to S-JIS already...
Next steps should really be to coordinate the work via source control.
||Posted: Mon Feb 10, 2020 12:26 pm|
The entry point of the text renderer is at $6204?
Did you check Emulicious's Reference Hierarchy for $6204?
It shows 8 references:
$2511 loads a pointer from one of two tables. The first one starting from $1de31 (or $1de33), the second one starting from $1da44 (or $1da46). It looks like the disassembly might be off by 1 entry for these two tables.
$2d25 loads a pointer from a table starting at $2d28 where each entry is 8 bytes long. The last 2 bytes of these entries is the pointer.
$57ff loads 5 pointers from $5864. Every 2nd word is a pointer. So first pointer at $5866, second pointer at $586a, ...
$5b06 reached from $5af5 loads B pointers from HL. Here also every 2nd word is treated as a pointer. This is called from $59da where it loads 2 (B=2) pointers from an address pointed to by a table starting at $1dfab. And is called from $5a0a where it loads B from an address pointed to by the entries of a pointer table starting from $1dfd1. HL points directly after the address pointer to by the table when $5af5 is called.
$5b26 reached from $5b14 indexes the table passed in HL with A as index. The pointer read from the table points to a 2 word entry as the ones above (so again 2nd word is a text pointer). First call of $5b14 passes a table starting from $1e02a, second call of $5b14 passes the same table but 1 entry earlier (so starting from $1e028).
$5e5a passes $1d668 as pointer.
$5ea6 passes $1d671 as pointer.
$5fa7 passes $5fdf as pointer.
When there are 2 words, the first one is read into a variable at $c802.
Regarding source control, bitbucket provides unlimitted private repositories for teams of up to 5 members. Maybe that's an option?
||Posted: Mon Feb 10, 2020 5:22 pm|
Indeed I want to map all that out and dump the entirety of the script. I also want to check for any alternative entry points - so far there don’t seem to be any - and map out the related code, so I know what I can replace as I’d like to target not expanding the ROM.
We have an SMS Power! GitHub organisation which would be a nice place to put this. Bitbucket and GitLab are fine but I'm not on a hurry to split things across services if I can avoid it.
||Posted: Mon Feb 10, 2020 9:10 pm|
Ah sorry, I did not know that github now also includes private repositories for free of charge accounts.
What's the problem with the repository then? Only Bock can create it?
I just noticed a recurring pattern. Starting from bank 8 all the banks end on the same sequence of bytes.
I just compared the ends of banks 11 and 15 and they end on the same 868 bytes. Bank 8 only has 107 bytes in common at the end.
||Posted: Tue Feb 11, 2020 1:01 am|
Indeed, in the graphics searching I found a lot of duplicated data. This may be an artifact of the build process not clearing RAM before inserting data, making it a little harder to identify unused space.
There is some restriction on shared private repos but that is kind of sorted now - we can make it public when done. PM/chat to get access if you want :) I've pushed my comments to the disassembly and started to pull out script line locations as a foundation for the translation hack; once all the script lines are accounted for we can start to insert placeholder translations and work on the modified renderer.
We also need to redraw a bunch of text burned into tiles. That's actually kind of tricky.
||Posted: Tue Feb 11, 2020 10:00 pm|
I've switched tack to making a script to dump the script and also to generate the source for the reinsertion. I traced all the script elements from the analysis above but it seems to be missing a lot of what I see in the ROM - so I guess there's something more to track down. More tomorrow...
On the graphics front, I found a nice approach is to use the Modern 216 font for the main title - it seems to capture the style better than others I tried and is of course very Sega :) For the main font I need something more fixed width, but I have a candidate. For the game titles I am going to try to redraw in a similar style, but an actual artist might help.
||Posted: Tue Feb 11, 2020 10:13 pm|
|Can you give examples of what is missed? I'll try to find out why it is missed and that will hopefully help to find the rest.|
||Posted: Wed Feb 12, 2020 7:28 am|
|I'll confirm once I finish my tool to capture the lines referenced so far. It should be fairly easy to chase the pointers back.|
||Posted: Wed Feb 12, 2020 10:03 am|
Quick dump of the text found by the pointers so far, filtering out duplicates (some are pointed to more than once):
offset: $2d2e, bank: 7, stride: 8, count: 5
$2ca4: "えらんでください。[LF][LF][LF+] じどうしゃ[LF][LF][LF] オートバイ[EOS]"
$1ddf6: "ゲームをえらんでください。[LF+][LF] ドライビングセンステスト[LF+] きみはべストドライバー[LF+] ピョンきちアドべンチャー[EOS]"
offset: $1de31, bank: 7, stride: 2, count: 5
$1de3b: "あなたは、とてもゆうしゆうな[LF+]ドライバーです。[LF+] このちょうしであんぜんうん[LF+]てんをこころがけましょう。[EOS]"
offset: $1da44, bank: 7, stride: 2, count: 13
$1dbed: " あなたは、あせりやすいけい[LF+]こうがあるので、くるまのかげ[LF+]からのこどものとびだしなどに[LF+]ちゆういし、しんちょうなうん[LF+]てんにこころがけましょう。[EOS]"
$1dba8: " こうそくどうろやよるのドラ[LF+]イブは、しりょくがていかしや[LF+]すいので、とくにちゆういし、[LF+]つかれているときのドライブは[LF+]ひかえましょう。[EOS]"
$1dd09: " あなたはちょっとしたことで[LF+]きぶんがどうようしやすいので[LF+]、つねにこころをおちつけて、[LF+]うんてんにしゆうちゆうするよ[LF+]うにこころがけましょう。[EOS]"
offset: $5866, bank: 7, stride: 4, count: 5
offset: $1dfb5, bank: 7, stride: 4, count: 8
$1d522: "うごいているものをみわけるし[LF+]りょくと、ひろうしやすいかど[LF+]うかをみるためのテストです。[LF+] まどのそとをよこぎるものが[LF+]なにかをあててください。[EOS]"
$1d56b: "ただしいスピードかんかくを[LF+]もっているか、あせりやすい[LF+]けいこうがないかをみるため[LF+]のテストです。[LF+] はしってくるどうぶつを、[LF+]つかまえてください。[EOS]"
offset: $1dfe0, bank: 7, stride: 4, count: 4
$1d3bf: "そうさほうほうがわかったら[LF] をおしてください。[EOS]"
offset: $1dff1, bank: 7, stride: 4, count: 3
offset: $1dffe, bank: 7, stride: 4, count: 3
offset: $1e00b, bank: 7, stride: 4, count: 4
$1d404: "オゥムが をだしたらおす。[EOS]"
offset: $1e01c, bank: 7, stride: 4, count: 4
offset: $1e03e, bank: 7, stride: 4, count: 9
$1d491: "あなたのもちてんは１００てん[LF+]です。こうつうじこやこうつう[LF+]いはんをおこすと、げんてんさ[LF+]れ、もちてんがなくなるとゲー[LF+]ムオーバーです。[LF+] こうつうきそくをまもって、[LF+]ゴールしてください。[EOS]"
$1d4f0: "あなたは、 をしました。[EOS]"
$1d4fe: "あなたは、 をおこしまし[LF+]た。[EOS]"
offset: $5e55, bank: 7, stride: 1, count: 1
offset: $5ea1, bank: 7, stride: 1, count: 1
offset: $5fa2, bank: 7, stride: 1, count: 1
Next I want to generate the code to "unbackground" them all and then inspect the result for remaining strings in the areas where there a lot of them.
||Posted: Wed Feb 12, 2020 1:11 pm|
That's now done and it actually looks not so bad. It's hard to tell what is real text but the lines all have to end with [EOS] and the text before that needs to contain a reasonable variety of characters - so when I see
...I need to notice that the structure is improbable (too-short lines) and all the あ (binary 0) means it's not really text. With lines like
...it's a little harder for me to reason - but I think having あ at the end of the sentence is unlikely, so I reject it.
Next I'll try to make the dumper a bit more flexible to dump the script and then also take a translated version back in and generate the WLA DX source for inserting it.
Assuming the script dump above is complete - can we start working on the translation? Regarding formatting, the [LF] and [LF+] are manual wrapping of the Japanese. Assuming in each case the text is fitting in a rectangle, then you can take the maximum length and assume we can have double the character count in English. Actually implementing that in the renderer remains to be done, but I can use placeholders for now.
||Posted: Wed Feb 12, 2020 1:56 pm|
|Actually - I didn't find スタート in the above so I think that means there's some more to be found. Some more tracing is needed.|
||Posted: Thu Feb 13, 2020 12:25 am|
So スタート is drawn using an independent set of characters at $10178. Not sure how to attack that, because it depends on how it's used - but reusing the other font loader may be an answer.
There's also another function loading the main font tiles, this time using a controllable index for the foreground colour, at $5d62. However, it seems to only be used for a string at $5c0c:
げんてん てん もちてん てん
This seems to be for the police screen in game 2; it loads this to RAM, then edits in numbers before drawing it to tiles, with no attempt at tile re-use. It sometimes draws the second half again in yellow.
Game 2 is really hard because I don't know what the driving rules are in Japan :( but I did get to an awesome first person perspective part.
||Posted: Fri Feb 14, 2020 11:11 am|
We get signal!
(This is just the "script engine". Much of the in-game text is not covered. Obviously the translations are terrible and occasionally funny. Graphical text parts like logos will come next.)
||Posted: Fri Feb 14, 2020 3:16 pm|
Wow, you are a hero.
Looking for a JP>EN translator now.
||Posted: Fri Feb 14, 2020 7:18 pm|
Starting on the title screens... also, isn't this new font awesome!
||Posted: Sat Feb 22, 2020 7:40 am|
A bit slowed down now by some of the in-game assets... here's some parts that pop up in the Driving Sense Test, my transcription/translation is:
; スタート SuTa-To Start
; せいせき <n>てん SeISeKi <n>TeN Score <n> points
; O せいかい SeIKaI Right
; X まちがい MaTiGaI Wrong
Also two attached screenshots I didn't get to yet.
||Posted: Sat Feb 22, 2020 7:51 am|
Now, is this a game bug or an emulation bug? In the "risk control" test (part 4 of the Driving Sense Test) it seems to do an unusual thing: it has a raster split and hides the left column on only half the screen. Meka doesn't show this quite as you might expect (old bug with showing black instead of border colour). The real bug is that sometimes the game just shows a blue screen. The attached screenshot is when it does work - but it has cropped the left 8px.
I see the same thing in Emulicious. Savestate attached. You can just press buttons to get through the earlier parts with bad scores.
||Posted: Wed Feb 26, 2020 12:31 am|
Hi all! I've been asked to help out with the translation. I've played through the game a bit and it's all very simple (clearly aimed at young children), so a full translation shouldn't take long at all.
I just submitted a couple corrections for the text table to the github repo.
||Posted: Wed Feb 26, 2020 8:24 am|
|The script in the repo can be redumped using the Python script-tool.py, script.txt is the route back in and holds placeholder translations which I’ve been messing with as I work through the game. There's also quite a lot of text in graphics which is effectively undumpable as text, which is somewhat mapped out in analysis/ROM layout.txt. I'm working on code to make these driven by strings instead where possible, but the speech bubbles may be the most challenging (I didn't get to those yet).|
||Posted: Thu Feb 27, 2020 10:02 am|
What is the pig saying?
||Posted: Thu Feb 27, 2020 10:56 am|
In that context I would say:
はやい hayai ~ too early
おそい osoi ~ too late
||Posted: Thu Feb 27, 2020 2:01 pm|
|Great - I’ll see about hacking the data.|
||Posted: Sat Feb 29, 2020 3:03 pm|
@RyogaMasaki - there's been some discussion on the Discord channel about the game titles...
Game de Check - Kuoutsuu Anzen
Seems to literally be "Let's check with a game - Traffic Safety".
You're the Best Driver
Would make more sense as "Be the Best Driver"?
Since we need to bake graphics for these, it'd be good to settle on names soon.
||Posted: Sat Feb 29, 2020 3:58 pm|
Speech bubbles done. New title screen from the marklincadet on Discord channel.
||Posted: Sat Feb 29, 2020 4:09 pm|
Title screen options... I'm manually applying excessive keming to get that Sega look, although in reality games go even further.
||Posted: Mon Mar 02, 2020 9:13 pm|
The bug I noted above seems to be a race between turning the screen on and the VBlank interrupt. In several places in the code it does this:
The routine at $18 turns the screen on which is a VDP register write, but an interrupt can happen in between writing the data and the subsequent register control byte, which leaves the screen off. It should always instead do:
rst $18 ; it's at an interrupt vector on purpose
I guess emulator timings may make it more or less likely to happen; if an interrupt is waiting then it'll be taken immediately after the jp which is safe, the issue is if it's a few cycles later.
There may be similar issues with the screen-off routine at $10. Certainly I find the game is doing VRAM work with the screen on rather a lot.
Edit: a simple patch to force the interrupt state off before either action, and to force it on after turning the screen on, seems to work well. I'll see about making some patches to reproduce the issue on hardware and also to fix the original game.
||Posted: Tue Mar 03, 2020 1:47 am|
Your literal translation is accurate enough, so however you want to word it to fit within the constraints of the title screen is fine. The only thing that comes to mind that incorporates both phrases and sounds natural is "Traffic Safety Test Game" or something like that. But again - your literal understanding is basically correct, so however you want to manipulate it.
Yeah, I went back and forth on how to put that, and just put the "obvious" as a placeholder (You're the Best Driver). Be the Best Driver was one of the phrases I considered, along with you How to Be The Best Driver, or Your Best Driving. I'll use yours, since why not.
So I noticed there that "Please Choose a Game" fits much better than "Select Game." I was just looking at the strings for the translation, without any context, so in such cases, the one that looks better is best.
I ended up pretty busy over the weekend looking at houses to move into over in Osaka, but I'd like to finish up with this project this week. All of the strings are quite simple, but I'm trying to find the best/most natural way to word the longer sentences. In any case, I'll make another push to the repo within the next couple days.
||Posted: Tue Mar 03, 2020 7:27 am|
|I’ve tweaked a few while playing through and added a few comments, make sure you pull latest.|
||Posted: Tue Mar 03, 2020 2:35 pm|
|I think "You're The Best Driver" seems best to capture the strict meaning with a little informality. Weird, but then so is the whole game.|
||Posted: Wed Mar 04, 2020 12:59 am|
|Well, "kimi wa" is an informal way to say "you" so it would make sense.|
||Posted: Wed Mar 04, 2020 12:56 pm|
I've made a PR to the repo with the translation of the strings. There are only so many variations of "keep calm and drive carefully." Bleh.
The spacing markers I put in are arbitrary and I'm sure will need to be adjusted. If the strings are too long, they can certainly be reworded a bit as necessary.
||Posted: Wed Mar 04, 2020 3:02 pm|
I noticed that Page 8 of the second manual shows a screenshot where the controller looks like a Mark III controller. (Compare with screenshot)
I wonder if that data is somehow still in the ROM.
(good luck with us ever finding a prototype of that game!)
||Posted: Wed Mar 04, 2020 11:38 pm|
I’ve merged the script updates and made a bunch of formatting tweaks.
There’s some more to translate for Pyonkichi’s Adventure which are very much stored as bitmaps and will require more work to extract, transcribe, translate and reinsert. The good news is that they seem to be entirely deterministic so no need to reverse engineer everything to get them out - but it may be best to have someone who can read Japanese do the transcription.
I'm going to do You're The Best Driver next, which should be fairly simple. I'm planning on hacking the road signs a little bit to get "slow" and "stop" readable; frustratingly, the text is identical to Driving Sense Test but implemented in an incompatible way which makes it hard to reuse what I've done so far, but I have some ideas on how to overcome that.
If someone else has the text for Pyonkichi's Adventure extracted while I'm doing that then I might get this thing done in time for the 27th...
||Posted: Thu Mar 05, 2020 11:02 pm|
I uploaded cleaned PDF to the shared drive.
Joseph cleaned them. Note that even though I have the "original" book the inside pages looks like copies.
Both manuals at the bottom of the back cover page have a line saying:
E08-2500(2) `87.6. ??? (部）
Not sure what is the missing kanji
||Posted: Fri Mar 06, 2020 1:07 am|
|It could be the name of the group or the person that was in charge of it but without seeing the document it is hard to say.|
||Posted: Fri Mar 06, 2020 3:04 am|
If you can post the images, I can certainly transcribe/translate them.
||Posted: Fri Mar 06, 2020 7:36 am|
|Goto page 1, 2 Next|