Views: 693,399,839
3 users online: Eminus, NGB, Zanoss - Guests: 48 - Bots: 129Users: 36,314 (1,507 active)
Latest: TheAngryBrine
Tip: Unique level names aren't necessary, but they're a plus.Not logged in.
Details for Asar v1.50
Tools - Asar v1.50
File Name: Asar v1.50
Version History: View
Authors: Alcaro, RPG Hacker, Raidenthequick, p4plus2
Operating System: Windows, Mac OS X, Linux
Platforms: SNES
Games: General
Source Included: Yes
Featured: Essential
Website: Link
Description: Asar is a Super Nintendo assembler, intended to replace xkas v0.06 as the preferred assembler around here.
It's got a freespace finder (no more staring at slogger and wondering if the freespace is large enough (if the patch is configured to use this feature)), it will ask for filenames if double clicked (no more copying cmd.exe everywhere and making batch files), it can use parentheses and proper priority in math (or it can act like xkas and count left to right), it can assemble SPC-700 and SuperFX codes, and a lot of other improvements, while still offering a familiar environment for coders used to xkas6.

Note that xkas patches will require ";@xkas" at the top if you're using Asar on them, or they'll act weirdly.

See changelog.txt for latest changes.
Tags: assembler, patcher
Rating: 4.8 (Votes: 24)
Download: Download - 866.59 KiB
Which patch are you applying? What error are you getting? You're probably better off making a thread on the forums for your issue.
Posted by: randomdude999 -
Why you dont upload the 1.60 asar version @Looney Balloon i compiled it on my windows 10 with visual studio and it works fine its the 1.60 version and the 1.50 version works to your get are strange error right you need to click on allowed left button
Posted by: obersteiner86 -
Works great with Windows 10, not sure the other person's problem. I originally found a link to a download of Asar from a forum post, but I found the version was too old to patch for me. I luckily found this easily, unlike a lot on SMWCentral. Worked fast, just wish I had known not to put file extension in the first time.
Posted by: EnderofGames -
To get the notepad++ XML (syntax-highlighting.xml) to run, copy that file and paste it in Notepad++\plugins\APIs. Then run notepad++, and on the menubar, Language -> Define Your Language..., click on "Import", and navigate to where you placed the file, and select the file, and you're done.
Posted by: GreenHammerBro -
Looney Balloon
can someone make a windows 10 version? It doesn't work for me. :/
Posted by: Looney Balloon -
It's necessary if you wanna make a patch.
Posted by: MagicalKoopa -
Best tool for patches. Thanks for including the freespace finder, saves a lot of trouble.
Posted by: Erikas0012 -
It would've been nice if the freespace finder worked with the xkas thing because I added ;@xkas to the patch and then Mario stopped existing and it was Bad ROM which was a problem. It seems a magic MarioFanGamer or someone else shows up and replies to problems though, please someone suggest something
Posted by: TheN64man -
How do I add the ;@xkas header?
I have tried 4 times and I just can`t get it to work. It says it can`t open the file.

EDIT: I`m just stupid, I forgot to type a bit of the patch name.
Posted by: zRoch -
Why doesn't this work with Wine?
Posted by: Vexcrate -
There is a bug with the readfile and canreadfile functions where asar crashes if these functions are used to read from 17 or more different files. I know that these functions are able to cache up to 16 files simultaneously, but I would have expected asar to close the oldest opened file when attempting to open more than 16 files.

This bug has been complicating some of the stuff I've worked on recently, and it'd be nice if it was fixed.
Posted by: yoshifanatic -
Be careful that this version still have a bug with the labels that crosses over a %callMacro(). If inside the macro has the same label as outside of it (or that the macro have a perent label when a sublabel jumps over it), causes glitches, as the exe treats contents inside the macro as if its located in the same location as the call itself, so be aware of that. Here is Alcaro's example

Originally posted by alcaro
JSR .baz
%macro() containing ?bar:

should attach .baz to foo:, not ?bar:.

This also happens on +/- symbols too, as tested on GPS.

Possibly the most annoying bug I've experienced when using GPS and PIXI. Thank god uberasm tool's library does not use that, instead it uses filename_label:
Posted by: GreenHammerBro -
This program doesn't patch BPS. It's for patching code to the ROM. If you want to patch BPS files, you should use Floating IPS from
Posted by: Logg -
Ehhh I don't think so...
Posted by: DarkPika_404 -
It just does.

Probably, I'm not sure.

Actually, judging by test.cpp being made for Windows and Linux simultaneously (backslashes, but also including sys/stat.h), someone dropping a in the source directory, and the empty help.sfc, there's a fair chance it doesn't.
Posted by: Alcaro -
WHAT? How does this wierd thing work?
Posted by: DarkPika_404 -
RPG Hacker
Care to either give more details on what exactly isn't working for you or stop leaving pointless comments?
Posted by: o RPG Hacker -
care to explain why this doesn't work at all
Posted by: Epic_Manky -
RPG Hacker
Thanks, Raiden, definitely glad to read that!
So at least it seems like I didn't break anything that was previously working.
Posted by: o RPG Hacker -
Good news, I just ran this latest asar on my entire Yoshi disassembly, which has tons of 65816, super fx, and SPC code and various features, basically a good "testing ground", and it worked the same as before. So, I APPROVE OF this latest version!!
Posted by: Raidenthequick -
RPG Hacker
Updated to version 1.50. Changelog:

New features:
  • Added support for structs. Credits go to p4plus2: GitHub repository.
  • Added API to Asar lib for getting information on all blocks of data written by Asar.
  • Added API to Asar lib for getting the mapper currently used by Asar.
  • Added support for ExLoROM and ExHiROM mappers.
    NOTE: Based entirely on conversion tables I got from Ladida; don't know if these conversions are actually correct. Some features may not work as intended when using those mappers (such as freedata, for example), but I can't verify this.
  • Added pushtable and pulltable commands, which let you back-up or restore the current character table to the/from the stack.
  • Added "ext\notepad-plus-plus\syntax-highlighting.xml". This file can be imported into Notepad++ as a user-defined language to add syntax highlighting for Asar patches, featuring all commands currently supported by Asar. By default, this syntax highlighting is enabled on all files with an extension of .asm or .asr, but this can be customized via Notepad++.

Bug fixes:
  • Lines starting with @ or ;@ that don't map to a recognized special command now only throw warnings at best and no errors.
  • Rewrote code of tests a little to make them easier to execute and make them clean up their own mess.
  • C# wrapper for Asar DLL was non-functional since it didn't specify a calling convention, making it always lead to an exception in some scenarios.

  • Just like the last version, this version of Asar was built in MSVC rather than g++, but this time I also updated the Asar DLL (which I had overlooked last time). I'm not sure if Windows applications are compatible with DLLs that were built by a different compiler, so if you're planning to use the DLL, this is something to watch out for. If you're planning to use a compiler other than MSVC, I recommend just rebuilding the DLL from source in whatever compiler you're using (or directly including the Asar library code in your project).
Posted by: o RPG Hacker -
RPG Hacker
Please read this.

Also if a tools moderator sees this, can you please moderate this version? I don't want to submit version 1.50 before version 1.40 has been approved (or denied). Thanks!
Posted by: o RPG Hacker -
RPG Hacker
Originally posted by imamelia
Did anyone ever fix the bug with indirect JMPs and JSRs to labels?

I'm late (don't regularly check the comments here). What bug is it? Maybe report it here if it still exists and needs to be fixed?
Posted by: o RPG Hacker -
There's a reason we renamed it to Destroyer.

The first sentence of its description should be removed.
Posted by: Alcaro -
No, do not use that tool. It will break your ROM completely.

Kamekku, don't mislead people like that.
Posted by: o Sayuri -
Originally posted by toad64
How i remove Asar patches.

Use Destroyer.
Posted by: kamekku14 -
Did anyone ever fix the bug with indirect JMPs and JSRs to labels?
Posted by: o imamelia -
Konata Izumi
@toad64: Use LM's restore option
Posted by: Konata Izumi -
How i remove Asar patches.
Posted by: toad64 -
whoops, I forgot to update the tests. Good catch, and good work on this, seems like a lotta neat fixes.
Posted by: Raidenthequick -
Defines in elseif conditionals now get properly resolved

I don't really see much uses for the new functions but readfile seems cool.
Posted by: o Erik -
RPG Hacker
Just copy-pasting the list of new features from the changelog:

New features:
  • readfile functions: readfile1(filename, offset), readfile2(filename, offset), readfile3(filename, offset), readfile4(filename, offset) - similiar to read1() etc. functions, except data is read from another file instead of from the ROM (note that offset is a PC offset, not a SNES offset). You can pass an optional third value which is returned if the read fails.
  • canreadfile functions: canreadfile1(filename, offset), canreadfile2(filename, offset), canreadfile3(filename, offset), canreadfile4(filename, offset), canreadfile(filename, offset, length) - basically the readfile() equivalents of canread1() etc.
  • snestopc(address) and pctosnes(address) functions: for manually converting addresses (note that those functions are dependent on the ROM's mapping mode, so use them with caution - chance are you'll never need them, anyways)
  • max(a, b), min(a, b) and clamp(value, min, max) functions: max()/min() return the maximum/minimum of two values, whereas clamp() makes sure that that value is >= min and <= max
  • safediv(dividend, divisor, exception) function: divides dividend by divisor, unless divisor is 0, in which case exception is returned
  • select(statement, true, false) function: if statement is 0, false is returned, in any other case, true is returned. Basically, a mathematical version of "if/else". Please note that unlike if/else blocks, function arguments in asar are always evaluated before a function returns. In other words: if you do select(1, 1/1, 1/0), asar will throw a "division by zero" error, even though the function would return 1/1. In this particular case, it's recommended to simply use the safediv() function in place of a regular division.
  • not(value) function: returns 1 if value is 0 and 0 in any other case
  • comparison functions: equal(a, b), notequal(a, b), less(a, b), lessequal(a, b), greater(a, b), greaterequal(a, b) - rather self-explanatory, return 1 if the respective comparison is true and 0 otherwise. Primarily intended to be passed as statement to select() function.
  • logical functions: and(a, b), or(a, b), nand(a, b), nor(a, b), xor(a, b) - also self-explanatory, return 1 if the respective logical operation is true and 0 otherwise. Primarily intended to be passed as statement to select() function.
  • while loops: Added compile-time while loops to Asar. Those work similar to if conditionals, with the difference that their blocks are compiled repeatedly until their condition becomes false. For easier implementation and higher compatibility, while loops are terminated with endifs, just like if conditionals. When using while loops, be careful not to cause an infinite loop.
  • Multiline commands: You can now put \ at the end of any line of source code and Asar will append the following lines to that line. This is similar to putting , at the end of a line, with the difference, that the \ does not appear in the concatenated string, whereas the , does. This is useful to split long functions into multiplie lines, for example. Note that all whitespace following the \ is removed, whereas whitespace preceeding the \ isn't. So


    turns into


    for example, whereas

    db \

    turns into

    db $FF

  • double(num) print function: Can be passed to print to print a double variable with its fractional part. Has a default precision of 5 decimal places, but can be passed a second argument to override the precision.
  • round(num, precision) function: Rounds the double variable num to precision decimal places. Pass 0 to precision to round to the nearest integer.

Bug fixes:
  • Asar 1.37 suppported overloaded versions of read1() to read4(), but always threw "Wrong number of parameters to function" errors when actually using those overloaded versions
  • Asar 1.37 threw "Wrong number of parameters to function" for function canread() when passing 2 arguments to it, because it actually treated it as canread1() due to an error in string comparison
  • Using better double -> int conversions in some places - where dd $FFFFFFFF would assemble to 00 00 00 80 ($80000000) in Asar 1.37, it now assembles to FF FF FF FF
  • Defines in elseif conditionals now get properly resolved
  • The #= define operator now doesn't truncate its value when using "math round off", making it possible to do double-precision math with it
  • Asar 1.37 detected misplaced elses and endifs, but not misplaced elseifs
  • Putting "@xkas : @asar 1.37" on the first line would previously lead to an error, whereas putting "@asar 1.37 : @xkas" there would not. Both variations lead to an error message now, since it really doesn't make much sense to use them together in any combination.
  • Special commands like @asar or @include could previously be used on the first line only and needed to be chained with a : inbetween. They can now be used on any line as long as no other command comes before or inbetween them.
  • Asar 1.37 fixed a bug in SuperFX compilation, but src/test/arch-superfx.asm was never edited to acknowledge this fix, so the test always failed
  • Added different define operators (=, +=, :=, #=, ?=) to manual.txt. Those have been in Asar for quite a while, but were never documented yet, although they can be quite useful.

  • This version of Asar was build in MSVC rather than g++, mainly because I already had that installed and use Visual Studo as an IDE, anyways. Functionally, this shouldn't make any difference, unless using Asar in unintended ways, where anything goes. I did build the Linux version in g++ to confirm compatibility, though.
Posted by: o RPG Hacker -

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2018 - SMW Central
Legal Information - Privacy Policy - Link To Us

Total queries: 31


Follow Us On

  • Facebook
  • Twitter
  • YouTube


  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • MFGG
  • Gaming Reinvented