Author Topic: Sim City 64 (64DD) Translation  (Read 20858 times)

0 Members and 1 Guest are viewing this topic.

Offline ozidual

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +32/-0
    • View Profile
Sim City 64 (64DD) Translation
« on: November 02, 2017, 02:10 AM »
Current Patch v0.6.36

You can download the latest patch: here

ED64 users: Even if you have an ED64 v3.0, you need to hit reset when you are done for so your Save Game is written back to the ROM.  This is necessary for all 64DD cart hacks.  One trick to help you remember is to put a sticky note over your power button.  When you reach for it, it'll remind you to hit reset first.

Patches apply to the v1.1 cart hack and the original disk dump.


Sim City 64 Translation


What is Sim City 64?
It is a version of Sim City 2000 that was customized by HAL Laboratories.  HAL created the original Sim City (SNES) by customizing the original Sim City.  So Sim City 64 was meant to be a sequel to Sim City (SNES).  The reason SC64 was never released in the U.S. is that it was created for the unsuccessful 64DD.

It was also the first 3D Sim City and had other features not seen until later Sim City releases.  It includes a few minigames not seen in other Sim Citys and has a distinct Nintendo feel to it.


What is currently being accomplished?
My plan is to do all of the hacking required to translate Sim City 64.

This means all text in texture format will be translated.  The game will have VWFs wherever text is used.  Any other minor translations necessary for the hacks will also be done.  To do this, I am using Sim City 2000 (PC) as a basis, and then turning to Sim City (SNES) for further guidance.  When this hack is complete, a translator should be able to translate all of the existing text, and it will hopefully look and feel like the game was released in the U.S.

I will not be translating the full game.  The majority of the current text translation has been from krom.


Status


Text to translate
Here is a link to the in-game text extracted so far: Here
New Text to Translate plus File List: here
Note: this does not include text in texture format such as menu text.

Tools
RLE Compressor/Decompressor
Texture Descrambler (flipper)
Other

Currently Working On: Nothing though I may help out a little with the translation.

HUD 'City Needs' Text: 100%
Main Menu: 100% - v0.6.20 released
Left Menu: 105%*** - v0.5.11 released
Month/Year/Population Texture: 100% - v0.5.11 released
Texture Converter**: 2 completed, 1 new one created
Variable Width Font: v0.5.11 released
Ascii Font Fix: v0.5.11 released
Mayor/City Name: 100%

** The textures in Sim City 64DD are compressed in 1 or 2 different ways.
*** Completed and unused texture found

Textures

Main Menu: Completed [v0.6.20] (2018-03-18)
Sound Menu: Completed [v0.6.20] (2018-03-21)
Save/Load Window: Completed [v0.6.00] (2017 - 12 - 16) [v0.6.18] (2018 - 02 - 16)
Bonus Buildings Window: Completed [v0.6.00] (2017 - 12 - 16)
Presents Window: Completed [v0.6.00] (2017 - 12 - 16)
Power Plants Window: Completed [v0.6.00] (2017 - 12 - 16)
Arcologies Window: Completed [v0.6.01] (2017 - 12 - 23)
Map Select Window: Completed [v0.6.01] (2017 - 12 - 23)
Import Character Window: [v0.6.01] (2017 - 12 - 23) Completed [v0.6.30] (2018 - 05 - 25)
Scenarios Window: [v0.6.01] (2017 - 12 - 23) Completed [v0.6.28] (2018 - 05 - 22)
Map Window: Completed [v0.6.01] (2017 - 12 - 23)
Population Window: Completed [v0.6.02] (2017 - 12 - 25)
Neighbors Window: Completed [v0.6.02] (2018 - 01 - 13)
Graphs Window: Completed [v0.6.06] (2018 - 01 - 19)
Dr. Wright's Advice Window: Completed [v6.0.06] (2018 - 01 - 19)
Unknown Textures with Smileys and Exclamation Marks: Found/Untranslated
Dr. Wright's Financial Windows: All Completed [v0.6.07] (2018 - 01 - 26)
Bridges Window: Completed [v0.6.09] (2018 - 01 - 27)
City Status/Evaluation Window: Completed [v0.6.09] (2018 - 01 - 30)
Casino: Found - No texture text
Options Window: Completed [v0.6.09] (2018 - 01 - 31)
Disasters Window: Completed [v0.6.09] (2018 - 01 - 31)
Cursor Speed Window: Completed [v0.6.09] (2018 - 02 - 01)
B to Cancel\Quit\Exit\etc.: Completed [v0.6.10] (2018 - 02 - 02)
Name Screen: Completed [v0.6.18] (2018 - 02 - 16)
Query Window: Completed [v0.6.31] (2018 - 05 - 25]


Extras


Existing Translations

krom did a great beginning translation around the time the cart versions of the 64DD games came out.  His translation hack can be found here. (updated 2017-11-01) (included in current patch)

LuigiBlood provided some additional translated material here. (included in current patch)

There is a main menu translation here: http://s9.zetaboards.com/Nintendo_64_Forever/topic/7438598/1/ (included in current patch)

There is a small walkthrough for importing characters from Mario Artist Paint Studio: here.


Neat Links

http://mayuto64.web.fc2.com/sc64/
Japanese website devoted to Sim City 64 (Run it through Google Translate).  It's focused mostly on the scenarios, but also offers some good tips for gameplay.  There is a helpful City to neighbors spreadsheet in there too.

https://ksnk.jp/ddlab/index.html
Japanese website devoted to storing as much data about the 64DD as possible (again, google translate is your friend).  There's a link to some good tips for Sim City 64, and some of the other games.  There's also some neat info/pictures on what connecting to Randnet (Land Net) would have been like back in the day with its forums and all.

Tips and Tricks/Instruction Manual Stuff

Map Controls:
  - Control Stick => Moves like a mouse
  - DPad => jumps from square to square, sometimes in odd ways if the screen is at a weird angle
  - R + Control Stick, R + DPad => Move the whole screen
  - C-Left, C-Right => Rotate the screen
  - R + C-Left, R + C-Right => Rotate snap to the 4 cardinal directions and 45 degrees off of them (8 total)
  - C-Up, C-Down => Change your view from city streets to side angle view of the buildings to top down view
      - Can be finicky.  Make sure you are not pressing any other buttons when you press these
  - L, Z => Brings up the Left Menu
  - A => Place a building or do whatever command you chose in the Left Menu
  - B => nothing?
  - R + C-Up => Help (still in Japanese)
  - R + C-Down => City Map screen
  - There is a Cursor Speed option under File in the Left Menu

Walking Controls
  - D-Pad, Control Stick => forward, backward, and turn left/right
  - C-Left, C-Right => strafe
  - A => talk to people
  - C-Up => switch view away (will change night back to day)

MiniGames:

Find a Person
  - After you build your house, Dr. Wright will ask if you want to play this game. 
  - If you choose yes, he calls you down to street level and show you a person.
  - A yellow/green bar will appear with a dot on it and a mini-figure on the right side.
     - As you move towards the person, the dot will move towards the mini-figure.
     - A heartbeat sound seems to half-heartedly point you in the right direction too.
  - When you find the person, talk to them.  Sometimes you get money, sometimes you have to find a 2nd person.
  - See walking controls above, and I believe C-Up exits the game (as well as B).

Casino - High/Low Card Game
  - Once you build a Casino, a guy appears on the edge near the sign on the ground
  - At night, talk to the guy and respond that you want to enter (currently untranslated)
  - High/Low is a simple card game.  Bet is $100 and doubles with each win, but reverts with one loss. 
  - One card face up, 4 face down.  Pick a card. 
  - If it is larger than the face up card, you win.  If it is the same, you push.  If it is less, you lose.
  - Controls:
     - A, DPad, Control Stick => Choose a card
     - B => Cancel or Exit the game

SimCopter *
  - It is not the full game, you just fly around your 3D map.
  - On some Airport zone spots, there is a helipad.  It is a single 1x1 structure.
  - Go down to the ground and talk to the guy there.  The top option says that you want to fly.
  - Fly controls:
     - DPad/Control Stick => forward, back, side to side (helicopter will tilt with flight)
     - C-Up, C-Down => fly up or down
     - B => Stop flying

* From Instruction Manual - you can also ride certain cars and trains.  Controls are untested.
« Last Edit: August 15, 2018, 09:56 PM by ozidual »
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64
Flash Carts: EverDrive64 2.5, EverDrive64 3.0, EverDrive N8, SD2SNES

Offline ozidual

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +32/-0
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #1 on: November 02, 2017, 09:16 PM »
Completely unrelated I think - 19 hours ago krom updated his translation to add more text.  You can find the updated patch in the original link in my first post.  Thanks krom!
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64
Flash Carts: EverDrive64 2.5, EverDrive64 3.0, EverDrive N8, SD2SNES

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1310
  • Karma: +107/-3
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #2 on: November 02, 2017, 11:36 PM »
Ozidual, I've just sent you a PM, please have a look if you have the time.

And thanks for the heads-up about Krom's new post.

Offline ozidual

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +32/-0
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #3 on: November 05, 2017, 04:54 AM »
I made a few slight changes to the main post to add what I'm currently working on/planning to work on. 

I figured "what the hell" and started working on a VWF.  I'm in the middle of information gathering right now, but I've already identified a lot of the necessary variables and some of the code.  I'm hoping to have something in the next week or two.

Unrelated: krom updated his disk patch about 24 hours ago so it applies to the "Clean" disk ROM instead.  It used to apply to the original disk rip which had save data on it.  No changes to the translation from a few days ago.  If you're having trouble patching the ROM, post here or PM me.  I have some expanded instructions that make patching krom's xdelta3 patch a little easier, but I'd need some time to put it together.  Thanks Kerr Avon for the help there!
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64
Flash Carts: EverDrive64 2.5, EverDrive64 3.0, EverDrive N8, SD2SNES

Offline krom

  • Newbie
  • *
  • Posts: 16
  • Karma: +3/-0
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #4 on: November 05, 2017, 07:14 AM »
Hi everyone,
I just joined this forum after being pointed to it by Kerr Avon, in the issues section of my Github.

I had no idea anyone else was working on the Sim City 64 translation, so I think it is great that others are interested!

ozidual, your VWF work would be really great, & help the translation become more detailed & accurate in accordance to the original text.
Also any help with the compression used for any gfx would be ace.

I am happy to work more on this translation, & it would be great to bring this gem of a game to the English masses.

Thanks for all the kind comments too =D

Offline ozidual

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +32/-0
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #5 on: November 06, 2017, 05:11 AM »
Hey krom, welcome to the forum!

That would be awesome!  I'd love to work on the Sim City 64 translation with you.  It's up to you if you want to follow this thread here where I plan to update my progress on things.  Otherwise we can keep in touch through email.  My plan is to finish the VWF, then figure out the texture converter(s).  Let me know if there's anything else I can do to help out too.

If you want, I'm over halfway done with a text converter that allows you to turn Sim City 64s English text back into hex.  It's actually just a modified version of what I used for both Zelda games, Doshin 1 and 2, and a few Aleck 64 games.  It starts off as a hex to text converter which is how I ripped the Japanese text.  Then you modify the text, run a script, and it converts back to hex with 0As and 00s for line breaks and ends.  It also adds in 00s if necessary to finish the 4-byte word out so it matches Sim City 64's standard.

I've also considered trying to replace the Sim City 64 ascii font.  It just looks terrible on some screens:



Same window in Japanese:



Progress is continuing with the VWF.  I'll post 50% when I get to the point where I'm writing code, and 75% when VWF testing starts.  I'm still in the discovery phase tracking down variables and code, but I think I have the majority of it.

EDIT 2018 08 14: Added the 2 screenshots and the text describing the Japanese window.
« Last Edit: August 15, 2018, 12:09 AM by ozidual »
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64
Flash Carts: EverDrive64 2.5, EverDrive64 3.0, EverDrive N8, SD2SNES

Offline krom

  • Newbie
  • *
  • Posts: 16
  • Karma: +3/-0
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #6 on: November 07, 2017, 03:18 AM »
Hi ozidual,

I got your email address, thanks for that. Also thanks for all the info =D

Your plan sounds cool, I'll keep checking back here to see your progress.

Your text converter sounds great, & would make things much easier =D
I agree about the font, it does look pretty ugly in places lol.
Good luck with hunting down the rest of the variable code for the VWF stuff.

Offline ozidual

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +32/-0
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #7 on: November 07, 2017, 05:30 AM »
Thanks krom!  I got your email too.  I'll go ahead and finish up the text converter at some point as well.  It is the least I can do since the translation, in my opinion, is always a lot harder than the actual hacking :)

OK, I have to write this down because it is so simple it's awesome.  The Japanese character textures are stored in ~24 bytes each, but expand out to 144 bytes.  They do this because each byte is expanded out to binary.  Here's an example expanding a single byte out to 8 bytes:

0x7E (which is 0111 1110 in binary) becomes: 00010101 01010100 

This texture then shows up as a dash since 00 is blank and 01 is a line.  It's slightly more complex than that, but not by much.  I've only really torn apart ~10 games, but I've never seen this before.  I'm just awestruck by its simplicity. 

It goes a long way to explaining why I've never made much headway on Sim City 64.  You can't just do a search for textures you see on the screen.  Every single little texture is individually compressed.

Now to find the Ascii letters.  Then throw together a quick script to expand out all of the letters so I can figure out where the blank space is in the Ascii font.  It's all part of the VWF.
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64
Flash Carts: EverDrive64 2.5, EverDrive64 3.0, EverDrive N8, SD2SNES

Offline nuu

  • Hero Member
  • *****
  • Posts: 951
  • Karma: +45/-2
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #8 on: November 07, 2017, 12:12 PM »
Cute compression (although I see only two bytes in your example).

Good luck to both of you!

Offline ozidual

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +32/-0
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #9 on: November 07, 2017, 09:22 PM »
OK, and now I found out why the Ascii font looks so horrible.  It is stored pretty much uncompressed as a full 8 bits per pixel texture with shading and everything.  It would look pretty decent if displayed like this, but it is not.  It is then converted to a 1 bits per pixel texture.

Now shading helps give text a rounded edge and make it look better.  This function takes every piece of shading whether it's faint or mostly filled in, and turns it into a fully filled pixel.  This makes it look blocky and clunky. 

For example, the letter 'm' has rounded tops.  This is usually accomplished with shading.  When it is run through this function in Sim City 64, those rounded tops are replaced with a single, blocky line along the top.  That's why it looks so horrible.

The game supports displaying the font in nearly its full 8 bits per pixel texture.  I'll need to make some slight modifications, but it looks pretty good.  Can't wait to show it off :)
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64
Flash Carts: EverDrive64 2.5, EverDrive64 3.0, EverDrive N8, SD2SNES

Offline nuu

  • Hero Member
  • *****
  • Posts: 951
  • Karma: +45/-2
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #10 on: November 08, 2017, 12:27 AM »
A mistake? Or maybe it's used or was intended to be used in its full 8 bpp format as well at some point. Where in the game is it used? I haven't seen any ascii in any youtube clip of the game.

Offline ozidual

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +32/-0
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #11 on: November 08, 2017, 01:42 AM »
I haven't seen a full play through of the game anywhere, so it's very possible that it's used elsewhere.  I tried to find any alternate text scheme that might have used the text the proper way, but haven't found it yet.  I think you're right that it was meant to be full 8 bpp.

My thought is that it was used in debugging.  The debugging text that's left in the code is mostly in English.  I'm thinking that they changed a color palette pretty close to the game's release that added a red shadow to the Ascii text.  Their quick fix was to force the ascii text textures to be 00s and 01s which avoids the red shadows.  The code they used to convert it could have easily been used to adapt the character textures to remove the red shadows, but they didn't have time to devote to that before release.  That's my guess, but there are probably other explanations.
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64
Flash Carts: EverDrive64 2.5, EverDrive64 3.0, EverDrive N8, SD2SNES

Offline krom

  • Newbie
  • *
  • Posts: 16
  • Karma: +3/-0
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #12 on: November 08, 2017, 04:55 AM »
Hi ozidual,

Wow sounds like you are making amazing progress!

Very interesting stuff about the bit packed font compression, thanks so much for this info =D

Also what you found out about the 8BPP uncompressed font is very interesting too, I did wonder why it looked so blocky...
The N64 RDP itself, has 4BPP TLUT textures as it's lowest depth native texture format, so it is very strange it goes down to 1BPP!
I reckon you are right about why they chose this approach due to time constraints before release.

I can't wait to see you show off the better quality font output, keep up the great work =D

Offline ozidual

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +32/-0
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #13 on: November 08, 2017, 05:51 AM »
I'll admit, I'm not the greatest at understanding textures :) I simplified what I was talking about a bit too.  I have a working knowledge of hacking which is basically what I see while digging in code combined with the bits and pieces I pick up here and there.

When I say 1bpp, the game is providing what is basically a 1bpp texture to a display that's reading at least 8bpp.  The Japanese text textures use bytes that are either 0x00 or 0x01. 

It can read at least 0x00 through 0x0F (I haven't played with more than that).  0x00 through 0x0D are read as white through black, 0x0E and 0x0F are shades of red.  The Ascii text is stored as 0x00 through 0x0F.  I modified the Ascii text textures so they are instead 0x00 through 0x0D by changing 0x0E and 0x0F to 0x0D.  I then got rid of the function that replaces everything 0x01 through 0x0F with 0x01 so most of the texture displays now white, black, and all the shades between.  I could have modified the function to instead leave everything alone, and replace 0x0E and 0x0F with 0x0D, but I'm not sure what else might use that function.

Here's a patch that shows off the textures.  It's my font fix combined with your latest English text:

http://www.mediafire.com/file/nilxmk1tcc37a54/Sim_City_64_%28T%2BEng2017-11-01%29%28FontFix%29.zip

It's in bps format, and can be applied to either the cart or "clean" disk ROM from LuigiBlood's site using FloatingIPS.  The one with "clean" in the file name is for the disk, the other is for the cart.  I'll label that better next time.  It's also very lightly tested, so feel free to break it and let me know what doesn't work :)

I'm testing some VWF code right now.  I have the table and code injected into a ROM.  My current roadblock is a variable that stores the "write" location for the next texture in a line of text.  My code revolves around this variable, but I just found out it gets replaced from time to time with a hard coded variable multiplied by the number of text characters in the line.  I'd just skip over that, but it seems to be integral to setting and re-setting (after 0x0A's) the start location of the text.  Plus my code needs a little more tweaking.  Still, I'm hopeful to have it done this week (or weekend).

EDIT: I think I have it.  It's now just a matter of adding another check to the code, and tweaking lots of letters.  I won't know for certain until we can test it with other text boxes like the Help text box or the Pedestrian text box.  I may have to tweak the ascii font a little more too - I'm curious what others think.  I also wanted to add another thanks to krom!  Without him, none of this would be possible :)

EDIT EDIT: VWF Snapshot


EDIT 2018 08 14: Replaced the link to a picture with the actual picture.
« Last Edit: August 15, 2018, 12:09 AM by ozidual »
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64
Flash Carts: EverDrive64 2.5, EverDrive64 3.0, EverDrive N8, SD2SNES

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1310
  • Karma: +107/-3
    • View Profile
Re: Sim City 64 (64DD) Translation
« Reply #14 on: November 08, 2017, 02:38 PM »
This is all fascinating, and the screenshot you uploaded (VWF Snapshot) looks so much better. It's surprising (I think) how having proportional fonts makes something much more pleasant to read than fixed width fonts.