Language…
15 users online: anonimzwx, Dennsen86, derv82,  Donut, ForthRightMC, Fozymandias, hhuxy,  LouisDoucet, masl, oliver1, playagmes169, RichardDS90,  Segment1Zone2, steelsburg, zAce08xZ - Guests: 286 - Bots: 277
Users: 64,795 (2,375 active)
Latest user: mathew

Asar: Under new management

Originally posted by WhiteYoshiEgg
I'm sure my setup isn't so complex as to be a full test suite, but if you'd like, I can run your version with my patchall.bat and see if that turns up any blatant errors.


That would be quite helpful, actually. The new version potentially breaking any compatibility with previous patches is my my biggest concern. If new features don't work quite as intended, that's "a bummer", but not a major issue.

Originally posted by JackTheSpades
Also, I'd honestly suggest you upload the new version right away even without 1.40 having been moderated.
I think you're just needlessly having things moderated twice.


That's what I'd like to do, but there doesn't seem to be any way to submit a tool as an update for another waiting tool (only for already moderated tools), and I don't want version 1.40 to be lost completely from the version history. Unless I can just put something in the notes, asking a moderator to "please maintain the version history". Is that technically possible?
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Originally posted by RPG Hacker
but there doesn't seem to be any way to submit a tool as an update for another waiting tool (only for already moderated tools)

Check the waiting tool's ID, go to Submit Update page, fiddle with the URL? Not sure if site accepts that, but worth a try.

Quote
and I don't want version 1.40 to be lost completely from the version history

I'm not sure why that'd matter.

Quote
asking a moderator to "please maintain the version history". Is that technically possible?

No, it's not.
<blm> zsnes users are the flatearthers of emulation
Alright, so after a first encounter with Asar 1.50, my ROM seems to have taken it pretty well! It plays just fine, and I got no error messages on any of my ~40 patches, so at least there's that.


 
The other day I encountered a phenomenon that seems to be a bug in Asar, so I will report on its contents.

(I thought it was fixed in 1.5.0 but it was my misunderstanding)

-----
When using asar.dll, duplicate function name error occurs

Asar version
  • 1.37
  • 1.40
  • 1.50
OS
  • Windows 8.1 (64bit)
  • Windows XP (32bit)
  • Arch Linux(x64) Linux 4.9.8-1-ARCH
Occurrence condition
Problems that exist only in asar.dll.
This problem occurs when multiple times assembling an asm file where function exists,
or when the same name exists in multiple files.

Is the cause of this problem caused by the absence of function clearing processing?
I do not know well.
-----

Also, I found the following problem as well.
However, as I think that there are not many people using Asar on Linux, the importance is low.

-----
Invalid pointer error occurs when calling asar_close

Asar version
Same above

OS
Arch Linux(x64) Linux 4.9.8-1-ARCH
(*Linux only, Windows seems to have no problem...)

Occurrence condition
  1. Call asar_init()
  2. Call asar_patch() with a filename that doesn't exist *1
  3. Call asar_close()
*1 : In this step, even if you specify a file other than asm, the same result may be obtained.
-----

Remarks
These issues don't occur when using asar.exe(asar)
--
For reference, uploaded the file I used for verification here.
Asar's source code was difficult for me.
I hope that someone will deal with it.
---
Post footer:
Also known as signature. This will be appended to your posts. HTML is allowed.
Alright, thanks WYE!

Originally posted by 6646
Is the cause of this problem caused by the absence of function clearing processing?


I assume so. I suppose asar_patch() just doesn't automatically clean up its mess, though I think the API has a function for manually cleaning up everything?

If that doesn't work, what if you always call asar_close() and asar_init() before calling asar_patch(), does that fix the issue? If not, it's something that's worth looking into.

Originally posted by 6646
Invalid pointer error occurs when calling asar_close


That's interesting. I'm not sure if I can currently debug the Linux build on my system (I can build it here, using Bash for Windows 10, but I'm not sure about debugging, haven't looked into that). I could install a Virtual Machine, though. Can anyone else confirm this problem before I do that?

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

So anyways, I've went ahead and just edited the current waiting v1.40 (cause apparently that's a thing that can be done). The URL hack didn't work, but I'll live with it now.

Originally posted by Alcaro
Originally posted by RPG Hacker
and I don't want version 1.40 to be lost completely from the version history

I'm not sure why that'd matter.


To a minor degree, for historical preservation, but to a way larger degree, just out of paranoia. I've worked as a professional programmer for just barely two years now, but that time was already more than enough to make me really, really appreciate propper source/version control (you don't want to know how many times this has saved our butts just for Darksiders alone). And with Asar not (officially) being managed under any kind of source control, the version history on SMW Central is basically the "best" alternative we get.

I mean, you should really know what I'm talking about - approximately 25% of the whole Asar source code are just code that was commented out, because, who knows, "we might still need it after all". In fact, while working on those new versions, I removed a good bunch of those lines whereever I was confident that they weren't needed anymore ever again. I personally do not leave any commented out code in any of my commits (except for maybe a few lines or code that's left in for debugging purposes), mainly because it's considered a bad business practice here, but also because I think it makes the code more fragmented and harder to read, so I only ever do temporarily and make sure to remove commented code at some point (when I don't forget to, anyways).

So long story short, I kinda like to see the version history as a "poor man's version control". Though at least for the stuff I added myself, I actually do have some degree of source control, since I actually used a private GitHub repository while implementing all of those new features. It would actually be good to have an official SMW Central GitHub repository or something like that where all of the source code of tools and stuff could officially be hosted so that people could just fork it and contribute to it. Having all of the source code in just the upload itself is "kinda okay", but nowadays, there are simply better and more reassuring alternatives.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Originally posted by RPG Hacker
I assume so. I suppose asar_patch() just doesn't automatically clean up its mess, though I think the API has a function for manually cleaning up everything?

If that doesn't work, what if you always call asar_close() and asar_init() before calling asar_patch(), does that fix the issue? If not, it's something that's worth looking into.

Last encounter I've had with asar not cleaning shit (even when calling the clean/refresh/whatever API function) was with errors remaining. I used asar_math("1+1"); (or something like that, don't remember exact syntax) which cleared the errors. Maybe it does the same here.
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
Originally posted by RPG Hacker
I assume so. I suppose asar_patch() just doesn't automatically clean up its mess, though I think the API has a function for manually cleaning up everything?
Although asar_reset exists, it does not seem to make much sense.

Originally posted by RPG Hacker

If that doesn't work, what if you always call asar_close() and asar_init() before calling asar_patch(), does that fix the issue? If not, it's something that's worth looking into.

Execution result:
asar_patch
asar_reset
asar_patch
NG(function dup err, Both Windows and Linux were NG.)
(Windows)
asar_patch
asar_close
asar_init
asar_patch
OK
(Linux)
asar_patch
asar_close
asar_init
asar_patch
NG(Segmentation fault, core dump)

#wario{-_-?} Segmentation fault? I wonder why.
---
Post footer:
Also known as signature. This will be appended to your posts. HTML is allowed.
Does the version currently waiting work fine? Anyone used it?
I have no idea what any of the new features do or how to use them so I can't test them, but I appear to be the only mod that cares about tools, so some help from someone that actually did use it would be appreciated. It works fine with all patches I happened to have lying around at least.
Your layout has been removed.
Originally posted by WhiteYoshiEgg
I got no error messages on any of my ~40 patches, so at least there's that.

Not sure how much use I make of the less reliable features though.


 
Yeah I saw that as well, but I wasn't sure about the new features working correctly.
I accepted it anyway cause push and pulltable worked and we actually used structs in the VLDC9 overworld sprite system (prerelease asar from p4), so I'll just have faith in the actual DLL stuff working fine (I mean, RPG Hacker probably tested it better than I ever could).
Your layout has been removed.
Thanks!

I think that as long as all the existing patches still work fine (which thankfully seems to be the case so far), approving it at least shouldn't possibly cause any harm. As for bugs that pop up along the way (if they're related to any of the new features), I can still take a look at them whenever they're discovered. Structs should definitely work just as fine as in p4plus2's verison, though. I pretty much just copied the code from his GitHub repository exactly.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
I think this patch isn't working as same as the last version of asar.

I didn't test thoroughly, but it assembles without any error, and crashes,
which past versions won't. (I tried on asar 1.37)

By the way, how can I get former versions of asar?
I need it so I can test it in various versions.
Receiving?
You can always check the version history.
Originally posted by SkywinDragoon
I didn't test thoroughly, but it assembles without any error, and crashes


Do you mean "it assembles without any errors and without any crashes" or do you mean "it assembles without any erros, but then it crashes"?

I'm assuming you mean the latter. When applying the patch with Asar 1.50 to a clean ROM, does the patch still seem to work correctly, or does it fuck something up entirely (or not even apply the patch)? Knowing this should help figuring out where exactly it's crashing (though I should of course be able to see that at home in the debugger, anysways, as long as I can reproduce it).
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Originally posted by RPG Hacker
Originally posted by SkywinDragoon
I didn't test thoroughly, but it assembles without any error, and crashes


Do you mean "it assembles without any errors and without any crashes" or do you mean "it assembles without any erros, but then it crashes"?

I'm assuming you mean the latter. When applying the patch with Asar 1.50 to a clean ROM, does the patch still seem to work correctly, or does it fuck something up entirely (or not even apply the patch)? Knowing this should help figuring out where exactly it's crashing (though I should of course be able to see that at home in the debugger, anysways, as long as I can reproduce it).


Sorey for confusion, what i mean is the latter one.
It crashes after applying some major patches like amk or gps.
But it seems fine when I applied on clean rom.
Receiving?
A thing I've recently encountered. It would be neat if the freespace command could be passed an argument to define the bank.
I've encountered this with cluster sprites where, by the default code, all sprites are inserted in the same bank. Doing this via tool would be kinda difficult thus if I'm to loop over sprites.
Sure, I can just update the code but maybe there is an actual need for this ^^'

Example:
Code
freespace bank(2) ;search for freespace in bank 2


Second... dunno if this is already the case but could you please have asar drop it's enforcing if smc and sfc file headers?
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
Originally posted by JackTheSpades
Second... dunno if this is already the case but could you please have asar drop it's enforcing if smc and sfc file headers?

Please don't. While it is indeed slightly inconvenient, it is highly intentional: It makes two of four un/headered sfc/smc combinations highly inconvenient, leaving the extension as an accurate indicator of whether it's headered. I consider this worth the minor inconvenience.

A freespace finder for the unexpanded area is a good idea in theory, but dangerous in practice. First, I'm not sure how well RATS tags work in the unexpanded area, I think LM gets angry if you try. Second, unexpanded freespace is FF FF FF FF, and many tables are terminated by one or more FFs; there's no way to know whether this one FF is used or not.

This can, of course, be worked around by ignoring the first two FFs, but that feels ugly. ...but so is the rest of Asar.
<blm> zsnes users are the flatearthers of emulation