News
Welcome to NeoRHDN! This place is still a work-in-progress, so pardon the construction...

Chat on Discord
Views: 757,419
Sections: Documents | Utilities | ROM Hacks | Games | Translations | Homebrew | Fonts | Community
Site: Main | Rules/FAQ | Discord | Memberlist | Latest posts | Stats | Ranks | Online users
11-22-24 06:47 PM
Guest: Register | Login

NeoRHDN - Utilities - Utility Information

CajeASM
Assembly Tools
Description
Staff Note: The author recommends that, "Due to the fact that CajeASM hasn't been updated for many years, still has some odd bugs regarding instruction counter and due to the fact that (nowadays) better alternatives exist now," you should use other software such as bass.

----

CajeASM is a fast MIPS R4300i Assembler specially made for N64 ROMs. Basically, this is the tool you'll use when creating ASM Hacks for your N64 ROMs. CajeASM replaces the older LemASM, which only allowed line-for-line assembling while you assemble a text file with MIPS ASM code into a N64 ROM with CajeASM, which is way faster than writing line for line in LemASM. Plus, CajeASM offers a lot of small additions like Labels, Defines and directives for a better control and overview over your ASM code.

Features:
[list][li] Labels[/li]
[li] Defines[/li]
[li] CajeASM-Manual on how to use CajeASM and learn about the features it offers.[/li]
[li] Directives(.org, .include, .ascii/.asciiz, .float, .byte, .halfword, .word, .incbin (to include binary files), hex { hex values }) [/li]
[li] 32-bit Defines properly load into upper half and lower half instructions. [/li]
[li]Has a frontend (GUI), and is very user-friendly. [/li]
[li] A syntax highlighter ready to be imported into Notepad++. [/li]
[li] Very fast assembling tool. [/li]
[li] Is able to assemble RSP ASM (COP2) code. [/li]
[/list]

Defines

Defines are short names, shortenings for an immediate value. The purpose of defines can be either for structuring and organization purposes, to prevent writing the same immediate value over and over again or (in case you made a typo) have to search all for your immediate value. Defines can be definitely helpful for end-users as well. For example, instead of letting users search for the "coin" amount, they just could change the amount in the define and done.

As an example:
http://i.gyazo.com/0407c6f56da6cecd67d09bb9530064ae.png

As you see, defines can also take (and so can any normal immediate instruction) decimal and binary values. (decimal has prefix '#' and binary has prefix '%')

Our little test code would load the current amount of coins into T1 and then we add T1 + @Coins (= 0xA (10 decimal) ) and store the value of T1 to current coins.

And as you can see, CajeASM will also handle upper and lower halfs. In our case, the LUI would load 0x8034 (upper half) of define Address and LH would load 0xB218 (lower half) of define Address. That's really useful.

Labels

A label is also a name, a shortening. The difference is just that a label is mainly for branching and jumping. Imagine you have to branch to a specific location once you checked if two values are equal. You either could calculate the address yourself by adding 4 to the current address and count all your instructions or you make use of labels and let CajeASM do all the work.

Example:
http://i.gyazo.com/ea7f8200fd84bf20ca28ea9fd833bb15.png

CajeASM would now translate label IfTrue to 0x861D8 and label Exit to 0x861DC.

Note: CajeASM.exe - .NET Framework Initialization Error

To run this application, you first must install one of the following versions of the .NET Framework: v4.0.30319
TitleCajeASM
AuthorTarek701
CategoryAssembly Tools
PlatformN64
GameSuper Mario 64
OSWindows
LicenseN/A
Source CodeNo
LevelIntermediate
Version7.24
Release Date2015-05-11
Downloads2348
Last Modified2022-08-13 07:53:26


Affiliates:


Acmlmboard v2.5.6+neo (2024-08-13)
© 2005-2024 Acmlm, Emuz, NinCollin, et al.

Page rendered in 0.030 seconds. (656KB of memory used)
MySQL - queries: 24, rows: 323/331, time: 0.024 seconds.