Simple Armips GUI (v1.2) & SM64 Macro Library
Users browsing this thread: 1 Guest(s)

[Image: 79XOJ0E.png]

This is a simple front-end GUI for Kingcom's Armips program. This is useful for people who don't want to include the ".Open / .Close / .n64" in all of their Armips source files. This also includes the n64crc program, which will automatically update the ROM's checksum when you import a source file. If you have ever used Tarek's CajeASM GUI, then this should be very familiar to you.

This program also includes 7 basic ASM examples for SM64 in the /data/examples folder. There are 2 different versions of the examples, one that is just assembly code and the other which uses the SM64 Macro Library (sm64mlib). See the bottom part of this post for more information.

​[Download & Source] https://github.com/DavidSM64/SimpleArmipsGui/releases/tag/1.2

If you want to know more about how to use armips itself, then I highly suggest looking at the readme page on Kingcom's Github.

Changelog:
Spoiler: :

​Version 1.2
​* You can now convert your assembly code to a SM64 Editor tweak in the new XML patch window.
* You can now manage the executable programs that get run when the "Assemble!" button is pressed. You can even run programs before Armips does.
* Moved the "Armips Readme" button to the main window.
* Added a checkbox in the settings window to enable/disable the "File assembled successfully to ROM." message after a successful assemble.
* Updated to latest armips build (v0.9-96-ge2610fe)

​Version 1.1
​* Added armips.exe updater, which was created by shygoo
* Added a button to take you to armips' readme file
* Slightly changed layout of settings menu

​Version 1.0.4
​* Updated to latest armips build (v0.9-85-g0cf6fdc)
* Updated sm64mlib to version 0.2
- Added new macros: .f3d_vertex, .f3d_dw, .f3d_loadTLUT, .CI4_palette
- Fixed up a lot of macros from levelscripts.asm, geoscripts.asm, and fast3dscripts.asm that were broken.

Version 1.0.3

* Updated armips.exe to latest build (v0.9-75-gc39eb76)
* Removed .asciiz macro in sm64mlib, because .asciiz is now natively in armips.

​Version 1.0.2
* Added 2 new ASM examples.
* Updated sm64mlib to v0.1 (Minor changes to sm64functions.asm file)
* More armips psuedo instructions in examples and sm64mlib functions.

​Version 1.0.1
* Added a new checkbox in the settings menu, which makes it so that the file-path of the ASM file is the root directory. This is enabled by default
* Fixed a bug where file-paths with spaces causes imports to fail
* Switch over to using n64crc.exe instead of chksum64.exe, due to chksum64 creating invalid checksums with some N64 games.

How to use the program:

  1. ​Load up the ROM file
  2. ​Load up the Assembly source file
  3. ​Press the Assemble button.
  4. ​If the import fails, then fix the source code according to what the error console says and go back to step 2
  5. ​If the import succeeds, then go test your ROM file and profit!

Settings:

[Image: 2NwlWGi.png]

Pressing the red gear icon in the top-left corner of the main window will open the settings menu. This menu will allow you to change some options like the RAM address that will be used when opening the file. This is where you can also enable/disable libraries to use with your assembly code. Right now only the SM64 Macro Library (aka: sm64mlib) will be included. If anyone else has some useful libraries, then let me know so I can include them in future releases. You can find the libraries under the /data/libs folder.

  • ​[Pre-Lib ASM] - Edit armips code that will be processed BEFORE libraries have been loaded
  • ​[Post-Lib ASM] - Edit armips code that will be processed AFTER libraries have been loaded
  • ​[Update armips.exe] - Looks up the latest build of the armips.exe program and gives you the option to download if available.
  • ​[Manage executables] - Manage all of the programs that will be run in order when you click the "Assemble!" button.

Managing Executables:
Spoiler: :

[Image: ODxNkiv.png]

In this window you can manage which programs will be run after you click the "Assemble!" button.

  • ​ Disable or enable a process by using the checkbox on the right side
  • ​You can change the order by using the up/down arrows on the right side
  • ​Add a new reference using the "Add Executable" button on the top left.
  • ​Pressing the "Edit" button will allow you to change the program or delete the reference.
  • ​There are 5 special labels that you can use in the arguments line:

    • ${ROM_FILE_PATH} is the path to the ROM file.
    • ${ROM_FILE_SIZE} will output the size (in bytes) of the ROM file as a plain integer.
    • ${ASM_FILE_PATH} is the path to the ASM file.
    • ${FILE_RAM_ADDRESS} is the file RAM address specified in the settings window outputted as a hex integer.
    • ${ARMIPS_ADDITIONAL_ARGUMENTS} is the line of text the user enters in the "Additional Arguments" window.


Creating SM64 Editor Tweaks:
Spoiler: :

[Image: 4a8Dshi.png]

To convert your assembly code into a SM64 Editor Tweak, you only need to do the following:

  1. ​Load a ROM file and the ASM file you wish to make into a tweak.
  2. ​Click the "XML" button at the top-left corner of the window.
  3. ​In the XML Patch window, select the "SM64 Editor Tweak" profile on the right side.
  4. ​Type your description of the tweak inside the textbox.
  5. ​Press the "Make XML patch" button on the top left of the window.
  6. ​Navigate to the Tweaks folder for the SM64 Editor (/SM64 Editor/Data/Tweaks/)
  7. ​Save the file, and it should now appear within the Tweak manager in the SM64 Editor.


SM64 Macro Library (v0.2):

sm64mlib was made to be a replacement for the defined SM64 functions file I made for CajeASM. The SM64 Macro Library adds a lot of custom macros to make programming much simpler. Compare the two source files below. They both do the exact same thing, but the sm64mlib version uses fewer lines of code. Please look through the .asm files in the /data/libs/sm64mlib folder to see how the macros work.

Spoiler: Hello World ASM example (Armips 0.9+)

// [ARMIPS 0.9+] "Hello World" Example by Davideesk

​.defineLabel func_printXY, 0x802D66C0

​.orga 0x861C0 ; Set ROM address
​.area 0x90 ; Set data import limit to 0x90 bytes
​addiu sp, sp, -0x18
​sw ra, 0x14 (sp)

​la a2, 0x802CB250 ; Pointer to "Hello World" text
​li a0, 0x60 ; x position
​jal func_printXY ; call printXY function
​li a1, 0x20 ; y position

​lw ra, 0x14 (sp)
​jr ra
​addiu sp, sp, 0x18
​.endarea

​.orga 0x86250 ; 0x802CB250
​.asciiz "Hello World"

Spoiler: Hello World ASM example (Armips 0.9+ w/ SM64 Macro Library)

// [ARMIPS 0.9 w/ SM64 Macro Library] "Hello World" Example by Davideesk

​.orga 0x861C0 ; Set ROM address
​.area 0x90 ; Set data import limit to 0x90 bytes
​addiu sp, sp, -0x18
​sw ra, 0x14 (sp)

​// Prints "Hello World" at the screen pos (0x60, 0x20)
​.f_printXY 0x60, 0x20, 0x802CB250

​lw ra, 0x14 (sp)
​jr ra
​addiu sp, sp, 0x18
​.endarea

​.orga 0x86250 ; 0x802CB250
​.asciiz "Hello World"

(This post was last modified: 17-01-2018, 02:27 AM by David. Edit Reason: Added underlines for the important url links )

Thank you very much for it. This is very useful!

Lovely frontend, I have a little nitpick though. Would it be possible to make the working directory default to the one containing the ASM file? I can't seem to use relative include/incbin paths without manually supplying a -root parameter in "Additional Arguments".

Also this isn't a major issue at all but having the frontend in a directory with spaces in the name causes the build to fail. For example I had it in a folder named "armips frontend" and got this in the error console:
Code:

File C:\Users\Admin\Desktop\armips not found
My threads are now being maintained here

Updated to version 1.0.1

Fixed the bugs that shygoo mentioned above. I also switched over to using n64crc.exe instead of chksum64.exe, because shygoo reported that chksum64 was creating some invalid checksums with PM64.

Edit (6/29/2017):
​Updated to version 1.0.2

Added 2 new ASM examples. The first new example will let the player change Mario's colors, 5 color presets total, with the L button. The second new example will let the player bring up a simple GUI shop with the L button, select different items with the D-Pad left and right buttons, and purchase with the D-Pad Down button.

I've also adjusted the ASM examples and sm64functions.asm file in sm64mlib to have more pseudo-instructions, so now they should be more consistent and readable.
(This post was last modified: 29-06-2017, 05:13 AM by David.)

2 new version updates happened today. It was originally going to just be v1.0.4, which was just an update to sm64mlib, but I found out that shygoo created an updater for the armips executable. It was easy to add into my main branch, so I went ahead and added it in along with a new button that will open the readme file to armips on Kingcom's github page on your default browser. I also moved around some of the buttons in the settings screen, so the buttons for Pre-Lib & Post-Lib are now on the left side of the window.

You can download the new version from here: https://github.com/DavidSM64/SimpleArmipsGui/releases/tag/1.1

[Image: RQ4tSIj.png]





Changelog: 

Version 1.1
* Added armips.exe updater, which was created by shygoo
​* Added a button to take you to armips' readme file on github
​* Slightly changed layout of settings menu

Version 1.0.4
* Updated to latest armips build (v0.9-85-g0cf6fdc)
​* Updated sm64mlib to version 0.2
​- Added new macros: .f3d_vertex, .f3d_dw, .f3d_loadTLUT, .CI4_palette
​- Fixed up a lot of macros from levelscripts.asm, geoscripts.asm, and fast3dscripts.asm that were broken.


(This post was last modified: 11-11-2017, 03:38 PM by David.)

Updated to version 1.2

Added two new major features to the GUI. You can now make SM64 Editor tweaks using your ASM code in only a few mouse clicks, and you can also now manage the executable files that run when you press the "Assemble!" button. You can use this to automatically run an emulator after the ROM has been assembled. You can find more details in the original post.

Screenshots:
Spoiler: :

[Image: 4a8Dshi.png]

[Image: ODxNkiv.png]

Changelog:

* You can now convert your assembly code into a SM64 Editor tweak in the new XML patch window.
* You can now manage the executable programs that get run when the "Assemble!" button is pressed. You can even run programs before Armips does.
* Moved the "Armips Readme" button to the main window.
* Added a checkbox in the settings window to enable/disable the "File assembled successfully to ROM." message after a successful assemble.
* Updated to latest armips build (v0.9-96-ge2610fe)
(This post was last modified: 14-01-2018, 08:07 AM by David.)

Simple Armips GUI (v1.2) & SM64 Macro Library
Users browsing this thread: 1 Guest(s)


  EN ・日本語