# FCE Ultra XD SP CE

## Table of Contents

###

- What is all this?
- Features

- Text Hooker

- What is it?
- How do I use it?

- Requirements
- Getting Started
- User Interface
- Basic Usage

- Reference

- Text Hooker Table file reference
- Release History

- Links
- Contact

## What is all this?

### FCE Ultra XD SP CE (Championship Edition) is my personal addition to the great FCE Ultra XD SP emulator. I would like to one day code my own NES emulator, but I want to have some practice first. That's what this project is all about.
I get ideas all the time about what I'd like to see in an emulator. Like, it'd be cool if FCEU could do this or do that. After thinking things over, I set out to code this or that. I don't know how many features I'll end up adding, but hopefully it'll be enough to give me a strong understanding of the NES hardware (or at least an understanding of all the tech documents out there).
And hey, why keep all these features to myself? It is opensource, afterall.

## Features

## Features > Text Hooker

## Features > Text Hooker > What is it?

### Here's a premise for you. Suppose you've pirated a bunch of Japanese NES roms and you load one of them up at random. Cool music. Cool title screen. You go to start a game, put in ああああ at the name entry screen, and get to the actual game. Well, big surprise here, it's an RPG. You soon realize that you have no idea what people are saying, what shops are selling, or what your battle options are. It can be fun to trial-and-error for a while, but you're ultimately stuck in the first town. Time to load up a new rom.
Well, being the aspiring Japanophile that I am, I have all kinds of translation tools and websites at my disposal. It's not impossible for me to figure out the kana for an item name, put it into a website somewhere, and figure out what it is. It's a slow process, but I can figure out short, simple strings of Japanese text. Sometimes, this is all I need to know to get by.
This is why I made the Text Hooker. What it allows you to do is highlight text boxes in the game and copy the kana right to the clipboard. I no longer have to look up stuff, I can just copy from the emulator, paste into the website, and go from there. While developing it, I took it a bit further by adding a (shoddy) translator right into the app, and added features such as word substitutions (so you only have to look up the word once and then the app will know what it is as soon as you copy it). What you end up with is kind of like a translator's notebook. It keeps commonly used words in a dictionary and helps you get through a Japanese game without having too much knowledge of the Japanese language.

## Features > Text Hooker > How do I use it?

## Features > Text Hooker > How do I use it? > Requirements

### Some knowledge of the Japanese language
I really can't say how much you need to know, but I suppose the more you know the better. I could be wrong, but I think you need to know at least something about the language before you can start copy/pasting translations.
Know how to make a Japanese table file
I'm not going to explain how to do this since there are adequate tutorials already out there. You'll need to be able to do this per game in order for the Text Hooker to work.
Japanese font support
Okay, I have tested this thing on a Win98 installation with no Japense font. It still works. However, I didn't test it for very long and I'm not sure how well translation websites are going to work without it. So, it might work without Japanese font support, but I'm not officially saying it does.
A Japanese rom
Duh, you'll need a game to play. Find it yourself.

## Features > Text Hooker > How do I use it? > Getting Started

### First of all, you need to make your table file. The text hooker doesn't use Thingy tables, but uses a modified Thingy table instead. So, make your standard Thingy table file, but save it with a .tht extension (instead of .tbl). What you need to add to the table are the dakuten and handakuten marks (tenten and maru). The byte for the dakuten mark needs to be set to tenten and the byte for the handakuten mark needs to be set to tenten. Like:

    DC=tenten
    DD=maru

If you don't do this, the Text Hooker will fail miserabley when copying the text over from the game.
Once you have your table file ready, open up your rom in FCEUXDSP CE and open the text hooker window (Tools -> Text Hooker). Click on the "Load Table" button and open up your .tht file. Now you can really get ready to work.

## Features > Text Hooker > How do I use it? > User Interface

###
This will close the Text Hooker.
Check this if the (han)dakuten marks
appear to the right of the kana.
Check this if the (han)dakuten marks
appear above the kana.
This toggles word substitution on or off.
This toggles whether the selection window
will update or not. Turning it off
will speed up the emulator.
This will add the Japenese/English
word substitution to the dictionary.
Type the English definition of the
Japanese word here.
Type the Japenese word you want to
define here.
This will load the chosen selection
into the Selection Window.
Use this to choose a previously saved
selection to load.
Click this to save the current selection.
Type in the name of the current selection
that you want to save. Duplicate
names are allowed.
This number determines how often the
selection window will update. The lower
the number, the slower the emulator gets.
This number determines which scan line
the selection window will update on. If
you're seeing graphics or junk tiles
instead of the text tiles, change
this to a much larger number.
This button will copy the selected
text into the Hooked Text window.
This button pauses or unpauses the
emulator. It can come in handy sometimes.
Press this button to save your
table file. It will not be saved
automatically!
Press this button to clear the
current selection.
Press this button to load your table.
If you use the Excite.co.jp button,
the roughly translated text will
appear here.
Use this button to trim the
hooked text of excessive whitespace.
Use this button to pull a
very rough translation of the hooked
text from the Internet.
Use this button to clear out the
hooked text window.
This window contains the text that was
copied from the selection window.
This window is used to select text from the game.
Click and drag to select or deselect text.
Hover over stuff in the UI image to get a brief description.

## Features > Text Hooker > How do I use it? > Basic Usage

### A warning
All information is saved in the table file. You have to save your table manually using the Save Table button. If you close the Text Hooker window or load a different table, your changes since the last save will be lost. You will not be prompted to save changes. Please remember to save!
Making Selections
The Selection Window is where you select the text in the game. It is basically the same view as the actual emulator window, but it updates less often and does not show sprites (text is not drawn with sprites, so they are not needed). To make a selection, click on a deselected tile and drag your mouse. To remove a selection, click on a selected tile and drag your mouse. It works a lot like a pen tool and an eraser tool in standard paint programs.
Once you have made a selection, you can save it for later use. This comes in handy since most RPGs will display their text boxes and battle menus in the same place throughout the entire game. To save a selection, type a name for the selection into the New Selection Name field and press the Save Selection button. Note that this selection will not be saved to your table file until you press the Save Table button.
You can also use the Clear Selection button to deselect all of the tiles in the selection window.
Please note that when you select text, you should not select the mostly blank rows that contains the dakuten and handakuten marks. You're essentially selecting every other row. Please see the UI image above for an example.
Translating Text
Once you've made a selection, press the big Snap button to copy the text into the Hooked Text window. Only the tiles that are defined in your table file will be copied over. All other tiles will be ignored. Once you have some Japanese text in your Hooked Text window, you have a few options. You can press the Excite.co.jp button to receive a really bad translation (better than Babelfish, but still bad) in the Translated Text window, or you can select all or part of the text in the Hooked Text window and copy/paste it into another translation tool or website. If you're translating a block of text (as opposed to item names or menus), you should probably use the Trim button to clean up the excess whitespace.
Please bear in mind that, due to the limitations of the NES, Japenese games use very little kanji. This means you'll have to look up the kana representation of what would normally be a kanji. Most translation tools will give you a hard time about this.
The word substitution feature can be used to process the selected text before it is sent to the Hooked Text window. By entering in Japanese-to-English definitions, you build up your word subs dictionary. If word subs are enabled and you press the snap button, the selected text is checked against your dictionary and any words that it finds are replaced by their definition.
This is useful for a few reason. One, many words written in katakana don't translate too well. You can use this to stop the translators from mangling them. Two, character names are often the same thing as words. For example, if your character's name is さくら (Sakura), the translator will likely translate it to “cherry blossom”. If you define さくら as Sakura, then you won't have to worry about that. Three, you only really need to translate menus and items once. Once you have them figured out, add them to your dictionary. This way, you can just select your menu (perhaps from a saved selection?) and press Snap -- instant menu translation! Four, I'm not positive about this, but if you know that a string of kana is going to always mean a particular kanji, you could put the kana in the Japanese side and the kanji in the English side. This would aid translators since it wouldn't have to try and figure it out itself. Note that I haven't tested that last one since I don't know enough kanji to put it to the test.
Again, please remember that your dictionary will not be saved unless you use the Save Table button.
Tweaking
Here are some other helpful features.
Pause Button: this is used to pause and unpause the emulator.
Scanline: this is used to determine on what scanline the Selection Window will be updated. Some games will switch their font tiles in and out of the PPU. If this happens, you may need to change the scanline to a bigger number in order to see the tiles you're looking for. For example, this happens a lot in the game Metal Slader Glory.
Update every x frames: this is used to determine how often the Selection Window is updated. The smaller the number, the slower the emulator will go.
Selection Window checkbox: this is used to determine whether or not the selection window should be updated. If you're not going to be needing the Text Hooker for a while, you should probably uncheck this box while you play.
Word Substitution checkbox: this is used to determine whether or not word substitution will be used.
(han)dakuten mark position checkbox: this is used to tell the text hooker where the dakuten and handakuten marks are located in relation to the kana. Most games will use Above, but some games that try to squeeze in as much text into a small area as possible will use Right.

## Features > Text Hooker > Reference

## Features > Text Hooker > Reference > Text Hooker Table file reference

### I suppose this is the kind of thing that should be documented, so here it is. When I started to make this thing, I was just using Thingy tables. When I started to add other features, I knew I needed to save them somewhere. It seemed kinda dumb to me to store this information in seperate files, so I decided I would append the other sections to the end of the table files. In the far off chance that there becomes some kind of archive for Text Hooker table files, I decided to use a different extension.
A .tht file is comprised of three parts (and possibly more in the future). The first part resembles a Thingy table, since it's more or less that same thing. You have a hex byte value, and equals sign, and the corresponding character after the equals sign. The biggest difference from Thingy tables is that the tenten and maru marks must be defined using the words tenten and maru.
The next section is the Selections storage. This section begins with a

    [selections]

declaration. What follows are hashes for saved selections (name of selection, equals sign, hash). The hashes should be safe for viewing and saving in any text editor that is capable of viewing and saving Japanese text. These hashes are, admittedly, under tested. If anyone can find a situation in which the selection hashes are corrupted but the rest of the table file is not, please let me know.
Up next is the Word Substitution Dictionary. This section begins with a

    [words]

declaration. These lines are formatted in a Japenese=English manner. You should be able to have Japenese or English on either or both sides. It's nothing more than a list of values used during a search and replace function.

## Features > Text Hooker > Reference > Release History

### Version 1.0 (4/15/2006)
Initial Release.

## Links

### Here's some links to some helpful translator tools.
Jim Breen's WWWJDIC
Romaji Translitorator
A亜アあ
Google Translate
Babelfish Translate
Excite.co.jp Translate *used in the Text Hooker

## Contact

### You can contact me at uglyjoe@gmail.com.
You can visit my rom hacking site at http://ximwix.net/xb/.
You can visit my other sites at http://ximwix.net/.