Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

TrollandToad.com
Reply
 
Thread Tools
  #1    
Old December 9th, 2013 (1:11 PM). Edited December 14th, 2014 by karatekid552.
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
     
    Join Date: Nov 2012
    Location: Do you really want to know? Really?
    Gender: Male
    Nature: Bold
    Posts: 1,766

    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
    Main (and varloader) are considered labels. I honestly don't know what the real term for them is, but that is what I call them, otherwise they would just be "things ending in colons". These have the lowest priority.

    -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
    As you can see, they have the same format as labels. So, I made it simple: if you start it with a period, it will get large number highlighting, and if you don't, it will get label highlighting. Now, I know I could have run a search to see if the next charactors were .word/.hword but I did it this way, so don't yell at me. (If you want it changed, by all means do so, the source code is right there will the download, haha)


    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. 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: http://www.pokecommunity.com/showthread.php?t=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:
    -On close, it will NOT prompt you to save. I really need to add that in, but I haven't gotten to it yet.
    -There is only a "save as" function, no regular just "save". Not a necessity, but it would be nice.
    -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.:D

    Screenshots:


    Spoiler:







    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
    __________________

    Paired with Simba
    Reply With Quote

    Relevant Advertising!

      #2    
    Old December 11th, 2013 (2:39 AM).
    xGal xGal is offline
    Mhm
       
      Join Date: Nov 2011
      Location: A tree
      Gender: Other
      Nature: Relaxed
      Posts: 243
      Nice one, Roger! BTW I think a hex-dec calculator, like there's in XSE would be great. If there is, I probably missed it :p
      __________________
      Reply With Quote
        #3    
      Old December 11th, 2013 (3:48 AM).
      karatekid552's Avatar
      karatekid552 karatekid552 is offline
      What happens if I push it?....
         
        Join Date: Nov 2012
        Location: Do you really want to know? Really?
        Gender: Male
        Nature: Bold
        Posts: 1,766
        Quote:
        Originally Posted by xGal View Post
        Nice one, Roger! BTW I think a hex-dec calculator, like there's in XSE would be great. If there is, I probably missed it :p
        That is a good feature! I will add it.
        __________________

        Paired with Simba
        Reply With Quote
          #4    
        Old December 13th, 2013 (2:33 PM).
        FBI's Avatar
        FBI FBI is offline
        Free supporter
        • Silver Tier
         
        Join Date: Jan 2013
        Location: Unknown Island
        Gender: Male
        Posts: 1,772
        Congratulations on the release of a great tool! Lazy people like myself really appreciate the hard working people like yourself :P

        While realizing the only purpose of this tool is to compile ASM code, I do have some suggestions that may help ease the process for the user.
        The first one is to include a formatter. I'm not sure if you've seen one before, but generally good program tools have a format option that formats your code to be readable (note this doesn't fix bugged code). The second is to highlight errors and give error messages(the messages are a nice bonus, but jsut highlighting is great in and of itself).

        I could help you with the formatter, but the error messages you're gonna have to do yourself :P
        __________________
        ...
        Reply With Quote
          #5    
        Old December 13th, 2013 (3:24 PM).
        karatekid552's Avatar
        karatekid552 karatekid552 is offline
        What happens if I push it?....
           
          Join Date: Nov 2012
          Location: Do you really want to know? Really?
          Gender: Male
          Nature: Bold
          Posts: 1,766
          Quote:
          Originally Posted by FBI agent View Post
          Congratulations on the release of a great tool! Lazy people like myself really appreciate the hard working people like yourself

          While realizing the only purpose of this tool is to compile ASM code, I do have some suggestions that may help ease the process for the user.
          The first one is to include a formatter. I'm not sure if you've seen one before, but generally good program tools have a format option that formats your code to be readable (note this doesn't fix bugged code). The second is to highlight errors and give error messages(the messages are a nice bonus, but jsut highlighting is great in and of itself).

          I could help you with the formatter, but the error messages you're gonna have to do yourself
          Thanks man.

          Personally, the formatter would HAVE to be customize able, since everyone has a different format to their ASM that they like. However, things like auto-indent and such would be easy options and a nice touch.

          The program already returns error messages from a compile, but checking for them as you type would be cool. However, the way I have been doing the syntax highlighting (searching for patterns using the built in search function and regular expressions) won't work, as I am beginning to notice a lag if I add another search area.
          __________________

          Paired with Simba
          Reply With Quote
            #6    
          Old December 13th, 2013 (5:51 PM).
          karatekid552's Avatar
          karatekid552 karatekid552 is offline
          What happens if I push it?....
             
            Join Date: Nov 2012
            Location: Do you really want to know? Really?
            Gender: Male
            Nature: Bold
            Posts: 1,766
            Just updated! xGal, I added your base converter. (May eventually add a full programmers calculator if I feel like it.) I also fixed a couple of saving bugs. (Nothing that would corrupt your save or anything, just annoying things about saving prompts.)
            __________________

            Paired with Simba
            Reply With Quote
              #7    
            Old December 13th, 2013 (6:46 PM).
            MrDollSteak's Avatar
            MrDollSteak MrDollSteak is offline
            Formerly known as 11bayerf1
               
              Join Date: Dec 2008
              Location: Hong Kong
              Age: 22
              Gender: Male
              Posts: 816
              As I've said before, seriously love this tool, it's really good.
              I figured a glowing testimony here wouldn't do any harm :p
              __________________
              Reply With Quote
                #8    
              Old November 28th, 2014 (6:23 PM).
              AkimotoBubble AkimotoBubble is offline
                 
                Join Date: Aug 2014
                Gender: Male
                Posts: 48
                it is so good,and why nobody development to the android' tool...
                __________________
                i am bubble,and sorry my english is not good ......
                Reply With Quote
                  #9    
                Old November 30th, 2014 (11:56 PM).
                Lance32497's Avatar
                Lance32497 Lance32497 is offline
                LanceKoijer of Pokemon_Addicts
                   
                  Join Date: Aug 2014
                  Location: Criscanto town-Ginoa Region xD
                  Gender: Male
                  Nature: Adamant
                  Posts: 793
                  The download link is broken
                  __________________
                  This signature has been disabled.
                  Scrollbar appears
                  Please review and fix the issues by reading the signature rules.

                  You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                  Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                  Reply With Quote
                    #10    
                  Old December 14th, 2014 (6:56 PM).
                  Kakarot1212's Avatar
                  Kakarot1212 Kakarot1212 is offline
                  Resident Programmer
                     
                    Join Date: Oct 2013
                    Location: Phillipines
                    Gender: Male
                    Nature: Adamant
                    Posts: 552
                    Can someone upload the tool on MF or DB? The download link is broken :3
                    __________________
                    Reply With Quote
                      #11    
                    Old December 14th, 2014 (10:23 PM).
                    karatekid552's Avatar
                    karatekid552 karatekid552 is offline
                    What happens if I push it?....
                       
                      Join Date: Nov 2012
                      Location: Do you really want to know? Really?
                      Gender: Male
                      Nature: Bold
                      Posts: 1,766
                      Download should be working again. I must have forgotten to remove the ad links when I was purging them from my other stuff. Sorry for any inconvenience. They now link directly to GitHub. If this is an issue, someone please email [email protected] as I am not very active anymore due to a crazy life.

                      Remember, this was my first program I ever wrote so it can have issues. Back up your roms!
                      __________________

                      Paired with Simba
                      Reply With Quote
                        #12    
                      Old December 15th, 2014 (4:25 PM).
                      Lance32497's Avatar
                      Lance32497 Lance32497 is offline
                      LanceKoijer of Pokemon_Addicts
                         
                        Join Date: Aug 2014
                        Location: Criscanto town-Ginoa Region xD
                        Gender: Male
                        Nature: Adamant
                        Posts: 793
                        Quote:
                        Originally Posted by karatekid552 View Post
                        Download should be working again. I must have forgotten to remove the ad links when I was purging them from my other stuff. Sorry for any inconvenience. They now link directly to GitHub. If this is an issue, someone please email [email protected] as I am not very active anymore due to a crazy life.

                        Remember, this was my first program I ever wrote so it can have issues. Back up your roms!
                        Yayks!
                        Thanks for this tool!
                        __________________
                        This signature has been disabled.
                        Scrollbar appears
                        Please review and fix the issues by reading the signature rules.

                        You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                        Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                        Reply With Quote
                          #13    
                        Old December 16th, 2014 (1:45 AM).
                        Percy's Avatar
                        Percy Percy is offline
                        look at my signature
                           
                          Join Date: Sep 2014
                          Location: Philippines
                          Gender: Male
                          Nature: Lonely
                          Posts: 2,437
                          The tool looks great! Now I can use this instead of Notepad, and HackMew's compiler.
                          __________________
                          [you're so easy to manipulate ]
                          Reply With Quote
                          Reply

                          Quick Reply

                          Join the conversation!

                          Create an account to post a reply in this thread, participate in other discussions, and more!

                          Create a PokéCommunity Account

                          Sponsored Links
                          Thread Tools

                          Posting Rules
                          You may not post new threads
                          You may not post replies
                          You may not post attachments
                          You may not edit your posts

                          BB code is On
                          Smilies are On
                          [IMG] code is On
                          HTML code is Off

                          Forum Jump


                          All times are GMT -8. The time now is 9:46 PM.