Making an English version of Typing of the Dead Arcade

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • So I guess this is where a roadblock forms and requires outside help.

      The textures cannot be dropped in-between games as the order, size or something changes between them which results in the corrupted textures due to loading invalid data. A glance at them looks as if they're compressed with zlib and then in some format that I haven't seen as some PC textures aren't compressed. Looking at other projects (HotD2 uses the same exact files unsurprisingly) nobody seems to have figured out how to decompress/modify/inject textures into the game. I asked a friend of mine to take a look as he has a lot of experience doing translations but he has never focused on Dreamcast and the format eluded him as well.

      This doesn't address the text box issue however I'm uncertain if it's the binary that sets this up or what, I can't find the original JP pc version to compare with the US as I assume it'll have the same problems.

      So really about all that can be improved on the patch currently is swapping green for red blood unless there's someone capable of figuring out the texture format. I've confirmed that it's the same format used across Naomi, Dreamcast and the original PC version. Subsequent PC releases in Japan (i.e 2004) look to probably use it but have a new custom archiving format which I don't have the patience to deal with and doesn't help with the text box issue anyways.

      Lastly pol are models, cam are the on-rails camera, mot I believe are movies and there are event tables missing from extraction on Naomi which based off the hex appear to reside within ic22.
    • If we could source the Japanese PC version would that help?

      sammargh wrote:

      The textures cannot be dropped in-between games as the order, size or something changes between them which results in the corrupted textures due to loading invalid data.
      Have you been able to identify a texture that is identical between the PC and the NAOMI version (something that doesn't need translation) and compared the files to see what's different?
      "Information wants to be free"
      VOOT | RFM | Kraylix V3 | FiF Jr. | KI2 | UMK3 | E29 | E29| TOTD | DDR
      Follow my projects on Instagram: instagram.com/twistedchu

      Buy my 3D Printed Parts: bit-district.com
    • sammargh wrote:

      Mostly I wanted to see what all differs between the two and it would allow using pc debugging tools to figure out the text box issue.
      I'll see if I can find a copy.


      sammargh wrote:

      textures match from naomi to dc and pc (ranking.bin as an example has the same md5 sum across all releases)
      So the textures that are the same match exactly but when you swap in the ones that are different you end up with a glitchy mess?
      "Information wants to be free"
      VOOT | RFM | Kraylix V3 | FiF Jr. | KI2 | UMK3 | E29 | E29| TOTD | DDR
      Follow my projects on Instagram: instagram.com/twistedchu

      Buy my 3D Printed Parts: bit-district.com
    • twistedsymphony wrote:

      sammargh wrote:

      Mostly I wanted to see what all differs between the two and it would allow using pc debugging tools to figure out the text box issue.
      I'll see if I can find a copy.

      sammargh wrote:

      textures match from naomi to dc and pc (ranking.bin as an example has the same md5 sum across all releases)
      So the textures that are the same match exactly but when you swap in the ones that are different you end up with a glitchy mess?
      Correct, it's likely due to changes in size of the texture from one platform to another resulting in the texture becoming unreadable. I.e if the game is expecting a 128x128 bitmap for a texture and receives a 172x128 image it will end up looking really broken once applied to the object.
    • This appears to be a demo of the Japanese version: vector.co.jp/soft/dl/win95/edu/se183177.html

      apparently the original PC discs for this are hard to come by. I only found them sold by 3rd party on Amazon.jp for $180!!

      There also seems to be another version called Typing of the Dead EX that looks like it's more of a typing tutor.
      "Information wants to be free"
      VOOT | RFM | Kraylix V3 | FiF Jr. | KI2 | UMK3 | E29 | E29| TOTD | DDR
      Follow my projects on Instagram: instagram.com/twistedchu

      Buy my 3D Printed Parts: bit-district.com
    • The demo should suffice. I was actually able to work with a friend who located the decryption routine on the textures but I haven't had time to implement it yet... and then there's the actual texture format to figure out.

      Appears this demo also has the blank text with English dictionaries so it should suffice to debug.
    • They're one in the same. So I started screwing around with the game a bit more and the JP dictionaries are different from the US however I haven't bothered to figure out the full format. In the JP version there's a catalog at top that has the start and stop positions for the phrase in the bubble followed bysome 4 byte ? and repeating. When you get down to the phrases you find they're in Shift-JIS and following is a weird custom alphabet table used internally for the translation to keycodes. I was able to see that there's wide font support and that the trailing set of codes is necessary but rewriting all the dictionaries will be painful, and there's needing to fix the wide font.

      Oops that's not right...
    • At least for posterity sake in the event someone pokes at this game again a little on the dictionary as it turns out the US uses the same format:


      The dictionary is compromised of 2 parts, the TOC and then the phrase. The TOC is split into 4 byte chunks with three parts:
      ## 00 00 00 First number in hex is some time gauge used for the rating. I'm not really sure how it translates to real-world time but it is a hex representation of something. I didn't look much further into this .
      ## 00 00 00 This can actually fill up the entire block but this is where the hex offset in the file the phrase begins. Endian is swapped as well so 104 is 0x04 0x01
      ## 00 00 00 Again this can fill up the entire block and this is the hex offset where the key codes start and endianess is swapped like phrases
      FF FF FF FF EOF

      A phrase is setup as such:
      PHRASE 00 FF KEYMAP 00 FF FF PHRASE 00 FF KEYMAP 00 FF FF etc, etc only the phrase offset is needed and the keymap is read automatically to the 00. The last phrase does not need FF FF appended

      And here is a json array of the 4 formats which should make automating translating the US dictionaries rather painless.

      Source Code

      1. {
      2. "shiftjis": [ "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","¥","。","、","?","!","_","「","」","?","[","%"," ","’","$","#","@",".",",","−" ],
      3. "shiftjishex": [ "824F","8250","8251","8252","8253","8254","8255","8256","8257","8258","8260","8261","8262","8263","8264","8265","8266","8267","8268","8269","826A","826B","826C","826D","826E","826F","8270","8271","8272","8273","8274","8275","8276","8277","8278","8279","8280","8281","8282","8283","8284","8285","8286","8287","8288","8289","828A","828B","828C","828D","828E","828F","8290","8291","8292","8293","8294","8295","8296","8297","8298","8299","829A","818F","8142","8141","8148","8149","8151","8175","8176","815B","8193","8140","8166","8190","8194","8197","8144","8143","817C" ],
      4. "ascii": [ "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","","","","","!","_","","","?","","%"," ","'","$","#","@",".",",","-" ],
      5. "keycodes": [ "A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BB","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0" ]
      6. }

      The post was edited 1 time, last by sammargh ().

    • Well got some bad news. Started playing with the font after work today and this approach isn't going to work. Each glyph is 0xA0 bytes long in font.bin and fairly straight forward in how they're made. Problem is the game expects each glyph to be 0xA0 bytes and does not have any height/width characteristics as 0x90 bytes are used to draw the glyph and it's hard coded.

      This means either way to get english to show on the top of the typing box as well as questions assembly changes are required and I do not have the resources or capability to look into doing that. There may be an event table or something that actually sets up the layout however I don't really have time for that either.

      If someone were to pick it up a friend helped me find the compression used and it looks to be lzss in fashion. The first byte of the file is trimmed and the rest passed to a function as a1 and a2 appears to be a dictionary. Pseudo-code from ida of the function looks like so:

      C Source Code

      1. int __cdecl sub_44FE40(unsigned int *a1, int a2)
      2. {
      3. unsigned int *v2; // esi@1
      4. int v3; // edi@1
      5. __int16 v4; // ax@1
      6. char v5; // dl@2
      7. char v6; // cf@5
      8. int v7; // ecx@11
      9. int v8; // ecx@13
      10. char v9; // bl@13
      11. unsigned int v10; // ebx@13
      12. int v11; // ecx@14
      13. int v12; // ebx@15
      14. char v13; // dl@16
      15. unsigned int v14; // ebx@18
      16. char v15; // cl@19
      17. unsigned int v16; // ecx@20
      18. v2 = a1;
      19. v3 = a2;
      20. v4 = 0;
      21. while ( 1 )
      22. {
      23. while ( 1 )
      24. {
      25. --HIBYTE(v4);
      26. if ( SHIBYTE(v4) < 0 )
      27. {
      28. LOBYTE(v4) = *(_BYTE *)v2;
      29. v2 = (unsigned int *)((char *)v2 + 1);
      30. HIBYTE(v4) = 7;
      31. }
      32. v6 = v4 & 1;
      33. LOBYTE(v4) = (unsigned __int8)v4 >> 1;
      34. if ( !v6 )
      35. break;
      36. v5 = *(_BYTE *)v2;
      37. v2 = (unsigned int *)((char *)v2 + 1);
      38. *(_BYTE *)v3++ = v5;
      39. }
      40. --HIBYTE(v4);
      41. if ( SHIBYTE(v4) < 0 )
      42. {
      43. LOBYTE(v4) = *(_BYTE *)v2;
      44. v2 = (unsigned int *)((char *)v2 + 1);
      45. HIBYTE(v4) = 7;
      46. }
      47. v6 = v4 & 1;
      48. LOBYTE(v4) = (unsigned __int8)v4 >> 1;
      49. if ( !v6 )
      50. {
      51. --HIBYTE(v4);
      52. if ( SHIBYTE(v4) < 0 )
      53. {
      54. LOBYTE(v4) = *(_BYTE *)v2;
      55. v2 = (unsigned int *)((char *)v2 + 1);
      56. HIBYTE(v4) = 7;
      57. }
      58. v6 = v4 & 1;
      59. LOBYTE(v4) = (unsigned __int8)v4 >> 1;
      60. v7 = __RCL__(0, v6);
      61. --HIBYTE(v4);
      62. if ( SHIBYTE(v4) < 0 )
      63. {
      64. LOBYTE(v4) = *(_BYTE *)v2;
      65. v2 = (unsigned int *)((char *)v2 + 1);
      66. HIBYTE(v4) = 7;
      67. }
      68. v6 = v4 & 1;
      69. LOBYTE(v4) = (unsigned __int8)v4 >> 1;
      70. v8 = __RCL__(v7, v6);
      71. v9 = *(_BYTE *)v2;
      72. v2 = (unsigned int *)((char *)v2 + 1);
      73. v10 = *(_DWORD *)&v9 | 0xFFFFFF00;
      74. goto LABEL_14;
      75. }
      76. v14 = *(_WORD *)v2;
      77. v2 = (unsigned int *)((char *)v2 + 2);
      78. if ( !(_WORD)v14 )
      79. return v3 - a2;
      80. v15 = v14;
      81. v10 = (v14 >> 3) | 0xFFFFE000;
      82. v8 = v15 & 7;
      83. if ( !v8 )
      84. {
      85. v16 = *(_BYTE *)v2;
      86. v2 = (unsigned int *)((char *)v2 + 1);
      87. v11 = v16 + 1;
      88. goto LABEL_15;
      89. }
      90. LABEL_14:
      91. v11 = v8 + 2;
      92. LABEL_15:
      93. v12 = v3 + v10;
      94. do
      95. {
      96. v13 = *(_BYTE *)v12++;
      97. *(_BYTE *)v3++ = v13;
      98. --v11;
      99. }
      100. while ( v11 );
      101. }
      102. }
      Display All