karatekid552
What happens if I push it?....
- 1,771
- Posts
- 12
- Years
- Do you really want to know? Really?
- Seen Jan 12, 2015
THUMB Editor & Assembler
So, I have always wanted to have a front end for HackMew's compiler since writing it up in notepad, opening up the command prompt, compiling the binary, and then dumping the contents into a rom honestly was just a little annoying, especially since I screw my code up so much and have to recompile far too many times. haha Either way, I finally got around to it. What this program is, is it is a very basic IDE for THUMB code that supports direct compiling to the rom, as well as a few other features:
~Simple syntax highlighting
~Test Compile
~Output to Binary
~Customize all editor colors
~.org dependent rom compiling
~Quick comment insertion
Syntax highlighting:
So, with this part, I really just wanted to improve the readability of code with a little bit of color. So, I added three types of highlighting: comments, large numbers, and labels.
-Comments are anything between "/*" and "*/" and get highest prioity over the other highlighting, meaning if you comment out code, it won't get the other highlighting (like a normal text editor).
-Labels are the heading for each section of your code, so in this piece:
Code:
Main: ldr r5, .new_bg_table
push {r5}
push {r1}
bl varloader
-Large Numbers are like labels, but they serve to define static numbers that are larger than one byte. Most of the time, they look like this:
Code:
.new_bg_table: .word 0x08F10000
Test Compile:
This option will basically compile your ASM into a binary and either return the errors or an "Assembled Successfully" message. Good for a quick test to make sure your code compiles. All temp files *should* get deleted once it is done.
Output to Binary:
This option works just like HackMew's batch file, the only difference being a "save as" dialog vs command line.
Customize all editor colors:
I really hope this doesn't need an explanation.......
.org dependent rom compiling:
This was a fun feature to implement. If your ASM has a .org, use this option, as it will jump ahead in your output file to that offset and start working from there. Without this, if you were to compile to the rom, you would get at ton of 00's inserted instead of your code.:P Currently, it doesn't search for the .org, you provide it, but I would like to automate that in the future.
Quick Comment Insertion:
Typing "/* */" can be cumbersome if you are moving quickly, so I just added a new feature: hit "ctrl+q" to quickly add a new comment. PLEASE comment your code. It helps so much.
---
I have been working on this for a while, and I released it on PHO on Nov. 16, but it wasn't the program I wanted it to be then. It had a lot of issues like: no normal saving, compiling required a console window open, the "open file" window didn't save where you were, etc. However, all of the big usage issues have been fixed and it is much more user friendly. So, now I'm finally releasing here on PC.
This program is in no way a response to ~Andrea's compiler. We took separate routes on this one and I urge anyone to try both and see which one you like best. Here is a link to that thread: https://www.pokecommunity.com/threads/314358
This program is written in Python and therefore doesn't need the .net framework which allows it to run very well under wine if you are on Linux. (Main reason I use Python, haha.) The only reason it requires wine is because it runs the as.exe and objcopy.exe that HackMew's batch file used (hence, it being a "front-end gui") which only run under a Windows environment.
The future:
What I need to do:-Automated .org finding.
-Force pop-ups to stay in the foreground.
-Undo/Redo suck. No other way to put it. The Tkinter undo module is awful and I need to find a better way to do it.
What I might do:
-Customizable syntax highlighting so you can define your own highlights.
-More options like word wrap, disable syntax highlighting (you could just change all of the colors to match the foreground, but yeah...), and font changes.
Bugs:
None yet.:DScreenshots:
Disclaimer:
Please, always back up your roms. This program has been tested, but not extensively and something could go wrong. I am not responsible for a destroyed hack.Download:
*Please note that this is my first ever GUI program, so the code is very messy and a little inefficient.~karatekid552
Last edited: