What do you get when you teach a toddler how to play sopwith?


JinX Documentation

(1.0) Overview
(2.0) Using JinX
    2.01 - Getting Started
    2.02 - Changing Configuration Settings
    2.03 - Editor
    2.04 - Editing with the Spacebar
    2.05 - File Selection
    2.06 - Find
    2.07 - Goto
    2.08 - Message Boxes
    2.09 - Relative Searching
    2.10 - Markers
    2.11 - Translation Modes
(3.0) Help/Support

1.0 Overview

Jinx is a hex editor with a few bells and whistles designed for rom hacking. It was inspired by the infamous "thingy.exe", but designed to be superior. It is all written by Brandon Beamer (Android 18) in Perl and may be redistributed under the terms of Perl itself.

2.0 Using JinX

2.01 Getting Started

After you have downloaded Jinx, extract the archive anywhere you like. To run the program, you may either double-click "jinx.exe" or you may open a command prompt window first and run it from there. The only downside to the latter is that Jinx cannot change the size of its window. So the size of the command prompt may or may not be the 80 columns by 50 rows that Jinx needs. You may specify a file to edit by typing its filename as the first command line argument but it isn't necessary. If started without such an argument, Jinx will ask you to select one in the program.

2.02 Changing Configuration Settings

All the configuration settings that are changeable for Jinx can be found in "jinx.ini". Here's an overview of each option and what it does.

Option Name

Description

TBL_DIR

Path to the default directory where table files are stored

BACKUP_DIR

Path to the default directory to which backups are saved

ROM_DIR

Path to the default directory where rom files are stored

MOD_DIR

Currently unused.

BACKUP

A true value will make backups of every file you edit when you save.

None of the "_DIR" options are vital to the program running. They only specify default locations. Whenever a time comes where you need to open a rom or change your table file or whatever, you'll always be able to navigate to where you want if it's not in that directory in the program. They are merely for convenience.

2.03 The Editor

(View Image)

This is a general idea of what the editor screen looks like.

1. File currently being edited. An asterisk to its right indicates a state of modified but not saved.

2. Table file currently being used.

3. Hexadecimal representation of the file.

4. Logical translation using the table file.

5. Information about current cursor location (offset) and selection size.

6.  File size (duh).

The editor itself is only used for navigation and selecting what you will edit. Here's a description of what keys do what:

Key

Function

Right Arrow

Move cursor one byte to the right.

Left Arrow

Move cursor one byte to the left.

Up Arrow

Move cursor one line up (16 bytes to the left)

Down Arrow

Move cursor one line down (16 bytes to the right)

Page Up

Move cursor one page up.

Page Down

Move cursor one page down.

Home

Move cursor to beginning of line.

End

Move cursor to end of line.

Ctrl+Home

Move cursor to beginning of file.

Ctrl+End

Move cursor to end of file.

Number Row (0-9)

Move cursor to previously stored favorite.

Ctrl+(0-9)

Store the favorite for that number as the current cursor location.

Ctrl+C

Never use, always use Ctrl+Q instead.

Ctrl+F

Launch the "Find" dialogue.

Ctrl+G

Launch the "Goto" dialogue.

Ctrl+O

Launch the "Open File" dialogue.

Ctrl+Q

Quit Program

Ctrl+R

Launch the "Relative Search" dialogue.

Ctrl+S

Save changes to file.

Ctrl+T

Choose a different table file.

F3

Repeat last find from current position

F4

Repeat last relative search from current position.

2.04 Editing with the Spacebar

In the main editor, you can hit spacebar once to define one end of a selection, and again to define the other (it doesn't necessarily have to be in left to right order). It works just like thingy.exe does, if you're familiar with it. After both ends are defined, the Edit dialogue comes up.

(View Image)

You simply type to what you want to change the selection and a translation mode (discussed in 2.11). And let Jinx do the rest. If your text can, at any time, not entirely be translated to byte code using the table file, both text boxes will appear red instead of green (it's very obvious). If you don't take up all the space you gave yourself, you'll be prompted for a course of action, and if you run over your the space with which you allotted yourself, the reading in the upper right-hand corner will turn red and not even let you insert it if you try. You toggle translation modes with the left/right arrow keys. Enter finishes, escape cancels.

2.05 File Selection

The program makes use of its "File Selection" option very often. From opening roms to choosing table files, this is where it's at. Here's what it looks like.

(View Image)

And here are the key functions:

Key

Function

Right Arrow

Choose selected file/directory

Left Arrow

Go up one level

Up Arrow

Select previous file/directory

Down Arrow

Select next file/directory

Page Up

... duh

Page Down

... duh

Spacebar

After you hit spacebar, you can manually type a path. Non-absolute paths are relative to the directory that was open when the file selection screen first launched.

Enter

Choose selected file/directory

2.06 Find

Ctrl+F in the editor will launch the "Find" dialogue:

(View Image)

When used, Jinx will use the current table file to translate what you type to the raw byte code to search for and will find the next occurrence. If you use the F3 short cut to repeat the last find, the search starts on the byte _after_ where the cursor is, if you use the dialog box, the byte where the cursor is is included in the search. You can toggle between the two translations modes with the left/right arrow keys. Enter finishes, escape cancels. The translation modes are discussed in 2.11.

2.07 Goto

Ctrl+G in the editor will launch the "Goto" dialogue.

(View Image)

Goto supports three number bases: binary, hexadecimal, and decimal. They are represented by three prefixing characters: "." for decimal, "%" for binary, and "$" for hex. You can switch between the two at _any time_ by simply typing the character and you can enter the number at _any time_ also by just writing it out. The left and write arrow keys change from where you want to measure the offset. You can measure from the current cursor location, beginning of the file, or end of the file (count backwards from). Enter finishes, escape cancels.

2.08 Message Boxes

Jinx uses message boxes as its main method of getting ordinary feedback from you.

(View Image)

All message boxes generally look the same and all function the same. They all have a title, some sort of message, and 1 or more buttons to choose from. Left and right toggle through the buttons, enter and spacebar choose them.

2.09 Relative Searching

Ctrl+R in the editor will launch the "Relative Search" dialogue.

(View Image)

Relative searches search for relative bytes values rather than absolute. You use this when you are still figuring out what the table file should be. For example (even though you should know this stuff if you're using Jinx). If you typed in "AB", it will find all two-byte pairs whose second byte's value is 1 larger than the first. If you need further explanation of what relative searching is, find a rom hacking tutorial somewhere. As far as keys go, just type the search text, enter finishes, escape cancels. If you use the F4 short cut to repeat the last relative search, the search starts on the byte _after_ where the cursor is, if you use the dialog box, the byte where the cursor is is included in the search.

2.10 Markers

Using the row of numbers at the top of the keyboard, you can store/recall markers. Markers are just offset values. They are stored via Ctrl+# where number is the number you want to store it on. Likewise, hitting that number again later on (even after you close the program and re-open it) will automatically go to that address. So if you want to remember the location where the pointer table starts and the location where this big chunk of dialogue started in the file, just go to it once, store it. Then you can come back to it at any time.

2.11 Translation Modes

The Find and Editing dialogues both use one of two translation methods to go from the text you type to byte code. They are called "Compress" and "Normal" and are simply opposites of each other. Compress looks for the largest table file entries first, and normal looks for the smallest. Here's an example. Say in your table file, you had these values:

00=\0
30=0
5C=\

Then when the time comes for Jinx to translate from "\0" to byte code, it has a choice of making two bytes (5C30) or one byte (00). Compress would choose the biggest table file entry "\0" over the smaller two "\" and "0". And normal is the opposite, producing two bytes.

3.0 Help/Support

Yea there's probably a few bugs in this program. I'm only human! But I'll be glad to fix them so please let me know about any you find. You can email me at jinzougen@jinzougen.net or find me on IRC on EFnet in #perlhelp.