Skip to content

j-ac/EmuText

Repository files navigation

Emu LiveText

A system of programs which allow in-game dialogue to be displayed instantly in a web browser.

A demonstration of Emu LiveText in Pokemon Crystal. Definition box powered by Yomichan

Designed as a tool for studying Japanese, it works great with browser plugins such as Yomichan, allowing for painless dictionary lookups, or vocabulary mining by using Yomichan's Anki integration.

Getting started using Emu LiveText

Emu LiveText consists of

  • The Python server server.py or server.exe
  • A Lua Script for the BizHawk emulator
  • The local web page EmuText.html

Using Emu LiveText

The easiest way to begin with Emu LiveText is by downloading its latest release found on the right hand side of the github page. That way you do not need Python installed to use the Emu LiveText, and you do not have to launch the program from the command-line. More experienced users may prefer to clone the repository, if they do not care about the previous two conveniences. There is currently no Github Release for Linux, so Linux users must clone.

Option 1: Using the Github Release (Windows Only)

  1. Download the Github Release (right hand side of the Github Page), and extract the contents.
  2. Download the BizHawk emulator.
  3. Recommended: To launch all components simultaneously with a script, follow the short instructions in Release-Windows-One-Click-Run-Example.bat and skip steps 4 - 6.
  4. Open your desired rom in Bizhawk, and run BizHawk_text_dump.lua found in game_resources\GAME_TITLE by drag-and-dropping it into the Bizhawk window.
  5. Launch EmuLiveText.exe and enter the directory to your game's resource folder eg game_resources\Pokemon_Blue_JP
  6. Open EmuText.html
  7. Send text to Emu LiveText with the dump key (Default: G). You may need to refresh the web page once.

Option 2: Cloning (Windows or Linux)

Install Python on your local machine if you do not have it already.

  1. Clone this repository, and download the BizHawk Emulator.
  2. Launch server.py using a games' resource folder as a positional argument. For example: ./server.py game_resources/Pokemon_Blue_JP. You will see the following prompt: Waiting for connection to web client.
  3. To establish a connection, open EmuText.html with a web browser. You should receive the following prompt on the Python server: Connection established with web client.
  4. To begin seeing text from game, open BizHawk and load the game you wish to play.
  5. Drag and drop the lua script found in your games' directory within game_resources into BizHawk's window. Each time you press the dump key (Default: G), text will appear in your web browser.

Optional Launch Script

For Windows users, the repo is bundled with a batch file named Windows-One-Click-Run-Example.bat, which allows you to launch each part of Emu LiveText simultaneously. note: Another File exists called Release-Windows-One-Click-Run.bat, which is only for Github Release users.

Follow the instructions within Windows-One-Click-Run-Example.bat. Now launching this script will directly launch the sever, web client, and BizHawk with the appropriate ROM and Lua script simultaneously.

Getting the most out of Emu LiveText

To make use of instant definition lookups, install Yomichan. To instantly create Anki flashcards from Yomichan definitions, follow these steps from Yomichan's official site.

To change the dump key, open the lua file for the desired console in /lib/. Modify the line DUMP_KEY = "G" to your desired key. Special characters are case sensitive and must be written beginning with a capital letter eg: "Alt", "Shift", "Ctrl" or "Space" Be aware that BizHawk uses hotkeys. For instance F will pause the game if used as a dump key. Most keys are unused but can be checked from Config > Hotkeys in BizHawk.

Learning More

  • RESOURCES.md is located in /game_resources/, and covers the purpose of each resource file needed to add support for new games

Currently Supported Games

Gameboy

  • Pokemon Blue (ポケットモンスター 青)
  • Pokemon Crystal (ポケットモンスター クリスタルバージョン)
  • Pokemon Trading Card Game 2: (ポケモンカードGB2) (Uses kanji!)

Famicom

  • Legend of Zelda (ゼルダの伝説) (cartridge version)
  • Mother (Earthbound Beginnings)

More coming soon! Open a GitHub issue to request new titles!

Gallery

demonstration of Emu LiveText in Pokemon TCG2, showing a Surfing Pikachu, and  a demonstration in Legend of Zelda where link receives his sword and Yomichan shows an inline definition for "Alone" A player getting into a battle in Pokemon Red, a player fighting a hippie in Earthbound Zero