Hi guys. I've been working on this assembly editor for n64. My aim with this one was to have an easy interface. As in easy, I mean as to eliminate the small repetitive tasks (such as navigating the assembly, calculating addresses or moving/NOPing a section of assembly).
I don't think it's finished yet as I am slowly finding small updates to add, but it is currently usable. Any feedback for bugs or features it should have is welcome!
It's current features are:
- Game offset mode: Jumps/branches/addresses and navigation will be treated with the appropriate memory region offset
- Memory region calculation: Main and Boot regions automatically calculated and supports additional memory regions
- Hex/Binary mode
- Assembly search engine: Search particular phrases to locate some code
- Highlighting for jumps/branches and selected register
- Text boxes containing original assembly, hacked assembly and comments/notes which are constantly aligned
- Easy address translation from memory editor to emulator
- Checksum calculation (should work for most games)
- CRC bypass (works for some games)
- Jump/branch mapping which allows highlighting of "branch/jump targets" and "jumps to function" lookup
- Changeable colour scheme
- Hacking notes are always output to a negotiable text document in order of address they are aligned with
- Generate a script from a script template to apply to a batch of addresses for use in other programs
- Float/Double <--> Hex translation
It's currently functional spaghetti source code. If you would like to give it a whirl and you're on linux or mac, you will need a Python 3.5 or 3.6 interpreter, also need to install Python's tkinter module. If you're on Windows, there is a download link to a snapshot of my Python environment and also the disassembler and a batch file to run it.
If you haven't dabbled in python before, you likely won't have the interpreter on your machine. I'd suggest Anaconda (a Python virtual environment manager) as when you make an environment, you can specify "Anaconda" at the end of the command when creating a virtual environment in the command prompt, and it will create the python installation with a whole heap of commonly used modules, including tkinter. Anaconda might chew up to 1gb of data to install, as a forewarning.
Anaconda for OSX:
https://conda.io/docs/user-guide/install/macos.html
Anaconda for Linux:
https://conda.io/docs/user-guide/install/linux.html
**Don't choose miniconda, from what I understand, you can get stuck in "dependency hell" while trying to obtain tkinter, which is not a place you want to be in
Source on Git: https://github.com/mitchasdf/N64-Rom-Disassembler
Download for Windows** (includes python and tkinter): https://drive.google.com/open?id=1lqW6q5WkfurMnpScZ-QOvbcM4oap0gpS
**You may need to disable any ad or popup blockers or add the page to the blocker's exclusion list. If you don't, you will get "failed to start action" and http errors when attempting to download. The download button is located at the top-right of the page.
Usage
In the main window, there are 4 tall text boxes. Respectively, they represent: Addresses, base file, hack file, hacking notes/comments.
When you open a rom initially, you can choose "start new" in the file menu to select the base file and then the name and location for the hack file. If you already have a hack file you wish to open, you can "open existing" and then associate it with the base file in the 2nd file navigation window.
They might feel like normal text boxes, but they have heavily modified behaviour so as to keep the code and comments aligned. You can copy/paste or backspace multiple lines of code or comments and it will be safe.
The text boxes are bound with a few hotkeys which make life a bit easier. I'll list them all here:
- Return: Move to end of next line
- Shift+Return: Move to end of previous line
- Shift+Backspace or Shift+Delete: Remove line of code
- Ctrl+B: Insert branch template (BEQ R0, R0, $)
- Ctrl+R: Restore line of code, or selection of lines of code
- Ctrl+F: Follow jump or branch
- Ctrl+G: Find all J or JAL which target any address inside the current function
- Ctrl+Comma (< key): Undo
- Ctrl+Fullstop (> key): Redo
The rest of the hotkeys which don't affect the text boxes can be found scattered in the Menu.
Extra text box behaviours:
- NOP will be automatically removed when typing on that line
- Blank lines will be replaced with and treated as NOP
- Multi-line selections will be extended to the bounds of the start and end lines you select when you attempt to action the selection
- Hack text box will always input as upper case letters
For address translation from memory editor RAM to emulator RAM, you may use an option to set the memory editor offset for the current game, and from there you can either type in addresses manually, or, if you leave the input text box blank and just click the translate button, it will try to convert your clipboard contents instead.
The comments navigator has a "filter" option to search for comments with particular phrases. It will filter out any comment that doesn't contain each word you type in, separated by spaces. You can see an example of that in the comments navigator image below.
If you group your addresses by adding hashtags (#group name) to the end of their comments, you can then add those groups to the batch with the click of a button in the script generator window.
To use additional memory region offsets, its as simple as setting the parameters using the option in the options menu, then all jumps to that region will appear with the offset applied. All additional jumps made to that region will be encoded accordingly. Setting memory regions has no affect on the layout or placement of the code, only how it appears. The addresses list on the left side of the main window (and addresses in all other windows) will also have the offset applied during game offset mode.
Every navigation task which shifts your view will only have the region offset applied to your input during game offset mode.
Screenshots
Main window
Comments navigator
Jumps navigator
Script generator
Assembly search
All newer versions will be compatible with old config files
*** I have moved a few menu items around so that Tools isn't so crowded any more. Some buttons which cause time-consuming work to begin were too easy to accidentally click, so they have been moved and encased in separators
Latest update: 12/02/2018