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

[Image: Iz9s6vi.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. For those who have 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] https://github.com/DavidSM64/SimpleArmipsGui/releases/tag/1.0.3

Changelog:
Spoiler: :
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 and go back to step 2
  5. If the import succeeds, then go test your ROM file and profit!
Settings:

[Image: 2Ly0Vdl.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. You can also include some custom Armips code that will interpreted before your source file by clicking the "Pre-Lib ASM" & "Post-Lib ASM" buttons. Here you can also select which libraries will be included into your assembly code and which order they'll be included in. 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.

SM64 Macro Library (v0.1):

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
.ascii "Hello World"
.byte 0x00 ; add null terminator
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: 04-08-2017, 11:23 PM by David.)

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

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.)

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


  EN ・日本語