Banner
C3 is "Over", but stay tuned for voting.
Views: 659,470,783
Time:
7 users online: Alucard648, Eminus, Final Theory, Io_Cqxz, randombot999, Schieber1234, VilelaBot - Guests: 45 - Bots: 560Users: 35,354 (1,224 active)
Latest: suman11
SMWC3 Content Spotlight
Asar 1.60 release!
Not logged in.
Asar 1.60 release thread
Forum Index - Important - C3 Summer 2018 - Asar 1.60 release thread
Pages: « 1 »
The moment you've all been waiting for...

Asar 1.60 has FINALLY been released!

Brought to you by RPG Hacker and randomdude999 with contributions from boldowa (6646), zetaPRIME, Horrowind, TheBiob, BenJuan26, Vitor Vilela, KevinCathcart and KungFuFurby.

Big fat download link

Fancy new features:
  • Very fancy changelog and manual. You can check them out here and here.
  • I wrote a Python binding for the Asar DLL
  • New defined() function and undef command, which check if a define is defined and allow you to delete existing defines
  • Syntax highlighting file for Sublime Text
  • If you start a label with #, it won't modify existing label hierarchies
  • Include search paths, which will be searched for files to include when a file with that name isn't found using the usual means.
  • "standard include paths" and "standard define" files, which will be read for include paths/defines and usable in all files
  • The DLL's asar_patch function has a much more configurable variant called asar_patch_ex, check your wrapper's source code for more info
  • You can do pushbase/pullbase now because one person wanted that
  • You can escape ! by using \!, and \ with \\
  • You can check the title of the ROM you're patching to using the new check title command
  • You can nest namespaces now, enable it with namespace nested on
  • You can disable bank cross checking with check bankcross off
  • New filesize() and getfilestatus() functions that you can use to check whether a file exists and see its size
  • You can manually set defines now with -Dname=value on the command line
  • You can put @includeonce at the start of a file to prevent it from being included multiple times (everything after first include of it will be ignored)
  • A few more things, check here for more info

Also includes tons of bugfixes, check the changelog. Most notably, fixed the freedata align freeze, and SA-1 overwriting some banks randomly sometimes.
Love that new ASAR 😍😍😍
It's interesting how many patches and tools on SMWC are now collaborative projects on GitHub. (We're only like half a decade late to that bandwagon!)

Looks like you guys have been really productive indeed! I'll give this a try later and report back if it breaks any of my patches and/or workflows.

--------------------


 
Sounds very cool, I'm gonna check it out. Good job #smrpg{y}

--------------------
Go and follow me in my basement for WIPs and just to talk about anything! Here.
Now it's better than ever!
--------------


--------------
C3 Day 1 - Kaizo Hack
C3 Day 2 - GFX Rips
C3 Day 3 - ASM!!!
Just posting here to say that I claim a trophy as well in case this wins any.

Hope you enjoy some of those changes. Especially tools should greatly benefit from some of the stuff we added.

--------------------
Feel free to visit my website/blog - it now isn't actually shit anymore!
Can you use an older version of ASAR and then use a newer one on the same ROM?

If so then that would be awesome.

Even if that is not the case its always nice to see updates to some of the more commonly used programs in SMW Hacking. Thanks :D
Originally posted by 1UPdudes
Can you use an older version of ASAR and then use a newer one on the same ROM?

Yes, of course.
Originally posted by 1UPdudes
its always nice to see updates to some of the more commonly used programs in SMW Hacking. Thanks :D

youre welcome

e: also it's either Asar or asar but not ASAR
Originally posted by randomdude999
Originally posted by 1UPdudes
Can you use an older version of ASAR and then use a newer one on the same ROM?

Yes, of course.
Originally posted by 1UPdudes
its always nice to see updates to some of the more commonly used programs in SMW Hacking. Thanks :D

youre welcome

e: also it's either Asar or asar but not ASAR


Thanks for the quick reply. I thought Asar meant something else and was just shortened to that. My bad.
It's nice to see that the new version of asar is finally done! :) Some of the new features like #Label, check backcross, etc. are going to be very useful for some of the things I've been working on, and I'm also really glad that the canreadfile/readfile crash has been fixed!

--------------------
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Inside Story (on hold)
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6 / Latest Test Build (Mario & Yoshi's Strange Quests)

Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
The biggest game-changer!!! #thp{=D}
It ain’t about the holidays, bruh. C’mon.
A lot of battle royale games coming out smh
Originally posted by kamekku14
The biggest game-changer!!! #thp{=D}

I wouldn't say THAT much, butó

Hey! While most of these features won't find any use by a majority of users here, I'm sure that they're a welcome addition for the few that will. Besides, it's always nice to see some bugfixes along the way, too. Well done, you all!
Just gave it a whirl, and it works perfectly! No bugs on my end as far as I'm aware.

Granted, I make use of exactly zero of the new features, but still, I figure it's good to be sure that nothing breaks.

--------------------


 
Heck yes new viking helmet!
The #Label function seems very promising. Do you have to refer to it with the # as well? If you want to load the address for whatever reason, do you have to do LDA ##Label?

Check out Extra Mario World!
Nope, if I remember correctly, you only use it when you declare it. That made the most sense to me to solve the particular problem this type of label was made for. So something like this should work:

Code
MyMainLabel:

#MyOtherLabel:

.MySubLabel:

	dl MyMainLabel,MyOtherLabel,MyMainLabel_MySubLabel


--------------------
Feel free to visit my website/blog - it now isn't actually shit anymore!
Trying to assemble the inflate code with this latest asar gives me a few errors:

Code
inflate.asm:388 (called from inflate.asm:712): warning: (W1018): xkas-style conditional compilation detected. Please use the if command instead.
inflate.asm:194: error: (E5060): Label 'trees.ree' wasn't found. [.dynamic_ltree: skip sizeof(tree)]
inflate.asm:195: error: (E5060): Label 'trees.ree' wasn't found. [.dynamic_dtree: skip sizeof(tree)]
inflate.asm:202: error: (E5060): Label 'tables.ree' wasn't found. [.code_tree: skip sizeof(tree)]
inflate.asm:468: error: (E5060): Label 'tree' wasn't found. [lda.w #sizeof(tree)*2]


It does assemble just fine in asar which I downloaded from the tools section, though. What's happening here?

mod edit: table stretch is deprecated as well
My blog. I could post stuff now and then
Layout by Counterfeit.
I assume you only mean the errors, not the warning, right? I think the warning was already in previous Asar versions and is a result of that one macro's expansion leading to a negative rep. I assume you're aware of that, so in this version you can now actually disable this warning via
Code
warnings disable W1018


As for the errors, I think those are a result of "fixing" the way the sizeof() function works in Asar, leading to an incompatibility that was overlooked and thus not documentated (might want to either add this to the manual or restore the old code and throw a deprecation warning). In older versions of Asar, this function was just kinda hacked in there. Newer Asar versions, however, have specialized support for string parameters in functions, but this requires passing them to the function delimited by double quotes. Since I cleaned up some of the hacky code in Asar, I've changed this function to work like other functions and take regular string parameters, but forgot to mention this anywhere. So in other words: I think changing those calls from a
Code
sizeof(tree)

to
Code
sizeof("tree")

should fix the problem. Thanks for pointing that out (hope that doesn't cause any incompatibility with any existing resources on the site - not sure how widely used that function has been here):

--------------------
Feel free to visit my website/blog - it now isn't actually shit anymore!
It does fix the problem, but (in my opinion) it's kind of a strange workaround. sizeof("tree") makes me think that I'm getting the size of the literal string "tree" (4 bytes) rather than the struct(/label). Isn't there a way to make it support both labels and strings and any other type?


Other than the problem I have encountered though, I'm really, really glad to see that asar is actively being worked on.
My blog. I could post stuff now and then
Layout by Counterfeit.
Originally posted by Ersanio
Isn't there a way to make it support both labels and strings and any other type?


That's tricky to answer. I mean from a purely technical standpoint, there probably is (after all scripting languages like Ruby or Python do just that), don't know how easy it would be to add to Asar. I mean Asar doesn't really have a concept of types and it was something I literally added myself to support functions like readfile() etc.

There definitely needs to be a validation at some point, because otherwise there's nothing to prevent a user from passing a number to readfile(), for example, likely making Asar crash (trying to access a double as a string pointer). I think I mainly used the double quote delimiter because it was easy to parse and because it made it possible to check the typing of a parameter before actually using it. I think not requiring the delimiters would require one of two things: either add some kind of guessing algorithm (like "everything that's not a number or a function call is a string"), which seems kinda shaky to me, or let each function evaluate their own parameters themselves, which would be more reliable, though I'm not a fan of that solution (it's basically what sizeof() used to do).

One thing I like about the double quotes is that they're pretty reliable and easy to parse, while also clearly communicating the coder's intention to the program (aka whether they meant a string or something else). I kinda like this from the perspective of code clarity, but on the other hand I'd also like the function to remain backwards-compatible, so I kinda have two conflicting opinions on this. Though one thing I'd definitely like to avoid is what the old sizeof() function did, which basically had its own parameter validation with its own error message. If we added support for untyped parameters back, I'd still want it to work with a generic implementation of parameter validation to make it easy to add new functions to Asar. In other words, this code at the beginning of the sizeof() function
Code
validateparam(structname, 0, Type_String);

should still work as expected and be the only bit of code needed to validate the function's parameter, so if a solution to this could be found, I suppose it would have to be within the context of this validateparam() macro. Can't quite say how simple that would be to do without looking into it further, though.

--------------------
Feel free to visit my website/blog - it now isn't actually shit anymore!
Pages: « 1 »
Forum Index - Important - C3 Summer 2018 - Asar 1.60 release thread

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: 21

Menu

Follow Us On

  • Facebook
  • Twitter
  • YouTube

Affiliates

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