Banner
VLDCX ENDS IN
3 DAYS, 2 HOURS, 10 MINUTES AND 58 SECONDS
Views: 517,027,844
Time: 2017-03-24 04:49:02 PM
12 users online: EddyCartoon, FrozenQuills, Golden Yoshi, J_128, Kenny, levelengine, MercuryPenny, msi810, PokerFace, Roberto zampari, RussianMan, StrikeForcer - Guests: 41 - Bots: 91Users: 30,981 (1,328 active)
Latest: aymende7
Tip: Do you want to create custom blocks, but have little to no experience with ASM? Use Kipernal's Blockreator!Not logged in.
Details for Asar v1.50
Tools - Asar v1.50
File Name: Asar v1.50
Added: 2017-02-28 12:22:30 AM
Version History: View
Authors: Alcaro, RPG Hacker, Raidenthequick, p4plus2
Operating System: Windows, Mac OS X, Linux
Platforms: SNES
Games: General
Source Included: Yes
Featured: Yes
Website:
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: 4)
Download: Download - 866.59 KiB
508 downloads
  Submit Update
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.


Notes:
  • 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 - 2017-02-21 10:44:12 AM
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 - 2017-01-22 01:09:28 PM
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 - 2017-01-17 02:36:41 PM
Alcaro
There's a reason we renamed it to Destroyer.

The first sentence of its description should be removed.
Posted by: Alcaro - 2017-01-16 11:38:41 PM
Sayuri
No, do not use that tool. It will break your ROM completely.

Kamekku, don't mislead people like that.
Posted by: o Sayuri - 2017-01-16 11:34:44 PM
kamekku14
Originally posted by toad64
How i remove Asar patches.

Use Destroyer.
Posted by: kamekku14 - 2017-01-16 07:54:32 PM
imamelia
Did anyone ever fix the bug with indirect JMPs and JSRs to labels?
Posted by: o imamelia - 2017-01-10 08:54:01 AM
M A R I O W O R L D
@toad64: Use LM's restore option
Posted by: M A R I O W O R L D - 2017-01-09 11:40:05 PM
toad64
How i remove Asar patches.
Posted by: toad64 - 2017-01-02 02:39:35 PM
Raidenthequick
whoops, I forgot to update the tests. Good catch, and good work on this, seems like a lotta neat fixes.
Posted by: Raidenthequick - 2016-12-09 12:33:59 AM
Erik557
Quote
Defines in elseif conditionals now get properly resolved

niiice.
I don't really see much uses for the new functions but readfile seems cool.
Posted by: o Erik557 - 2016-10-23 07:52:41 PM
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

    Code
    db\
    	   $FF


    turns into

    Code
    db$FF


    for example, whereas

    Code
    db \
    	   $FF


    turns into

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




Notes:
  • 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 - 2016-10-23 07:45:38 PM

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

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


Total queries: 32

Menu

Follow Us On

  • Facebook
  • Twitter
  • YouTube

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented