GithubHelp home page GithubHelp logo

hikago's Introduction

"Hikaru no Go" GBA Translation

Homepage

Usage

  1. Install JDK.
  2. Prepare your own ROM of the game, name it "hikago.gba", and place it in the same directory as Script.java.
  3. javac *.java
  4. java Script hikago.xml insert

Understanding hikago.xml

Text

Each <text> element in hikago.xml corresponds to one translated string. They may be organized under parent elements of arbitrary names, but the script only recursively looks for <text> elements and ignores everything else.

Pointers exist in the ROM. The pointer attribute of a <text> element gives the address of a pointer to the in-game string. For example, for this element:

<text pointer="2d52a0">1.Go is?</text>

The script will go to 0x002d52a0 of the ROM:

002d52a0  1C 54 2D 08 29 54 2D 08  3D 54 2D 08 36 54 2D 08

Read 4 bytes in little endian (0x082d541c), subtract 0x08000000 from it, and get pointer 0x002d541c. This is where the string actually starts.

Strings in ROM are terminated by one byte of 0x0. In cases where the translated string is longer than the original string, the script will write the translated string to the end of ROM (bytes 0x7fade0 ~ 0x7fffff are unused), and then overwrite the pointer.

Image

TODO

Code structure

  • class TextBlock: one TextBlock object corresponds to one <text> element in hikago.xml, and contains an array of TextLine objects.
  • class TextLine: one TextLine object corresponds to one line of in-game text, and contains an array of java strings.
  • class Script: the main class, it reads data from files, processes them, applies the translation to hikago.gba, and writes the result to _hikago.gba.
  • class ControlString: one ControlString object corresponds to one special control string in hikago.xml, such as "@NAME@".

hikago's People

Contributors

macmillan333 avatar ricbit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

macmillan333

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.