ZDoom ACS disassembler/decompiler

Any utility that assists in the creation of mods, assets, etc, go here. For example: Ultimate Doom Builder, Slade, WadSmoosh, Oblige, etc.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: ZDoom ACS disassembler/decompiler

Post by wildweasel »

nambona890 wrote:Hey, well you might need to update ListACS to a new ACS version, because there is this WAD that was pulled from /idgames called Caverns of Blood. It is a Terry WAD that slipped past the filter because the scripts and strings were obfuscated, and the scripts were obfuscated by adding an ACS command that ListACS doesn't support which blanks out all the scripts. The trap also occurs VERY randomly, but in gamemodes like LMS for Zandronum, it takes only 3 minutes. But if you are playing single player, it can take anywhere from a few minutes, to a few hours. The WAD was also made by Terry himself.
Thank you for the heads-up. If it hasn't already been reported, you should also consider sending Ty Halderman a message about it so the proper action can be taken.
User avatar
nambona890
Posts: 64
Joined: Fri May 30, 2014 11:00 pm
Location: Realm 69
Contact:

Re: ZDoom ACS disassembler/decompiler

Post by nambona890 »

wildweasel wrote:
nambona890 wrote:Hey, well you might need to update ListACS to a new ACS version, because there is this WAD that was pulled from /idgames called Caverns of Blood. It is a Terry WAD that slipped past the filter because the scripts and strings were obfuscated, and the scripts were obfuscated by adding an ACS command that ListACS doesn't support which blanks out all the scripts. The trap also occurs VERY randomly, but in gamemodes like LMS for Zandronum, it takes only 3 minutes. But if you are playing single player, it can take anywhere from a few minutes, to a few hours. The WAD was also made by Terry himself.
Thank you for the heads-up. If it hasn't already been reported, you should also consider sending Ty Halderman a message about it so the proper action can be taken.
I already said it was pulled from /idgames, just saying. :)
User avatar
quake3guy
Posts: 8
Joined: Sun Sep 27, 2015 5:44 pm

Re: ZDoom ACS disassembler/decompiler

Post by quake3guy »

ListACS needs to update the list of pcodes, I'm trying to fix a missing script reference in Wrath of Cronos by pulling the script from a previous version (not sure why it was removed and still referenced in the latest version..) but I can't decompile its ACS, I get the following error:

Code: Select all

C:\games\zdoom_2_7_1\listacs>c:\Python27\python.exe listacs.py -d RPGSCRIP.o
<failed id was 72>
Traceback (most recent call last):
  File "listacs.py", line 288, in <module>
    main()
  File "listacs.py", line 259, in main
    p = SwitchParserScript(m, acsf)
  File "listacs.py", line 77, in __init__
    self.stgt = self.read_instructions(scr.ptr)
  File "C:\games\zdoom_2_7_1\listacs\acsutil.py", line 665, in read_instructions
    self.run()
  File "C:\games\zdoom_2_7_1\listacs\acsutil.py", line 604, in run
    func(*args)
  File "C:\games\zdoom_2_7_1\listacs\acsutil.py", line 637, in read_instruction
    pcd = pcodes[pcd]
IndexError: list index out of range
Seidolon
Posts: 463
Joined: Wed Oct 09, 2013 11:11 pm

Re: ZDoom ACS disassembler/decompiler

Post by Seidolon »

I know this is a really old thread, but to anyone who might have trouble, I got it working by using these command lines:

Code: Select all

echo off
cls
set /p fname=Filename: 
listacs.py -d *input* -o "output"
pause
exit
That's the same as what TZK posted earlier, just with the .py after listacs.

After that I had to install python 2.5. I had a newer version before, but that makes it incompatible with this application, so installing 2.5 worked.
EpicTyphlosion
Posts: 12
Joined: Wed Mar 20, 2019 3:14 am
Graphics Processor: nVidia (Modern GZDoom)
Location: The Republic of Nowhere

Re: ZDoom ACS disassembler/decompiler

Post by EpicTyphlosion »

Seidolon wrote:I know this is a really old thread, but to anyone who might have trouble, I got it working by using these command lines:

Code: Select all

echo off
cls
set /p fname=Filename: 
listacs.py -d *input* -o "output"
pause
exit
That's the same as what TZK posted earlier, just with the .py after listacs.

After that I had to install python 2.5. I had a newer version before, but that makes it incompatible with this application, so installing 2.5 worked.
I tried this, and it still doesn't work for me. I've even installed Python 2.5, too.

What I end up getting after typing in a filename is this:

Code: Select all

Filename:test.acs
Traceback (most recent call last):
  File "C:\Users\EpicT\Documents\ListACS-master\listacs.py", line 34, in <module>
    import doomwad
  File "C:\Users\EpicT\Documents\ListACS-master\doomwad.py", line 38
    'THINGS',
            ^
SyntaxError: invalid syntax
Press any key to continue...
If this is telling me that the person who released this on Github didn't even check for something as simple as syntax errors, I'm going to lose it...
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: ZDoom ACS disassembler/decompiler

Post by _mental_ »

If this was about my fork, I didn’t check anything of course. Or maybe I did... Anyway, set literals require Python 2.7 while you are using 2.5 for no apparent reason.
EpicTyphlosion
Posts: 12
Joined: Wed Mar 20, 2019 3:14 am
Graphics Processor: nVidia (Modern GZDoom)
Location: The Republic of Nowhere

Re: ZDoom ACS disassembler/decompiler

Post by EpicTyphlosion »

I don't think so, it was from someone named alexey-lysiuk on Github. I was using 2.5 because the person who replied to this thread before me said you'd have to install it, and since the files in alexey's fork was so outdated I figured that doing so might get it to work. What's ironic is that I had 2.7 (2.7.2 to be specific) installed before I deleted it and installed 2.5, lol
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: ZDoom ACS disassembler/decompiler

Post by _mental_ »

It's me, and Python 2.7 in needed to run my fork. Regarding being outdated, you are right, there are some features that are not supported. I don't even know what they are exactly. If execution stops with exception, that's probably caused by one of them.
EpicTyphlosion
Posts: 12
Joined: Wed Mar 20, 2019 3:14 am
Graphics Processor: nVidia (Modern GZDoom)
Location: The Republic of Nowhere

Re: ZDoom ACS disassembler/decompiler

Post by EpicTyphlosion »

Just installed 2.7, and now I'm getting a completely different traceback:

Code: Select all

Filename:test.acs
<failed id was 53>
Traceback (most recent call last):
  File "C:\Users\EpicT\Documents\ListACS-master\listacs.py", line 299, in <module>
    main()
  File "C:\Users\EpicT\Documents\ListACS-master\listacs.py", line 270, in main
    p = SwitchParserScript(m, acsf)
  File "C:\Users\EpicT\Documents\ListACS-master\listacs.py", line 83, in __init__
    self.stgt = self.read_instructions(scr.ptr)
  File "C:\Users\EpicT\Documents\ListACS-master\acsutil.py", line 695, in read_instructions
    self.run()
  File "C:\Users\EpicT\Documents\ListACS-master\acsutil.py", line 635, in run
    func(*args)
  File "C:\Users\EpicT\Documents\ListACS-master\acsutil.py", line 670, in read_instruction
    instr = pcd.parse(self, addr)
  File "C:\Users\EpicT\Documents\ListACS-master\acsutil.py", line 1613, in parse
    ret.parse(p, inst_args, *self.args)
  File "C:\Users\EpicT\Documents\ListACS-master\acsutil.py", line 1402, in parse
    func = p.getfunc(funcnum)
  File "C:\Users\EpicT\Documents\ListACS-master\acsutil.py", line 699, in getfunc
    return self.behavior.functions[n]
IndexError: list index out of range
Press any key to continue . . .
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: ZDoom ACS disassembler/decompiler

Post by _mental_ »

EpicTyphlosion wrote:Just installed 2.7, and now I'm getting a completely different traceback:
_mental_ wrote:... there are some features that are not supported. ... If execution stops with exception, that's probably caused by one of them.
EpicTyphlosion
Posts: 12
Joined: Wed Mar 20, 2019 3:14 am
Graphics Processor: nVidia (Modern GZDoom)
Location: The Republic of Nowhere

Re: ZDoom ACS disassembler/decompiler

Post by EpicTyphlosion »

Guess I'm out of luck then
Post Reply

Return to “Creation, Conversion, and Editing”