Where to download CusASM ?

Discussions about all other tools (CusPop, SAV/HOF editors) and hex editing.
Post Reply
Tristan
Wise Scribe
Wise Scribe
Posts: 337
Joined: October 21st, 2009, 4:22 pm
Location: Holland

Where to download CusASM ?

Post by Tristan »

Where to download CusASM ? please give a link xd

[Edit: Download here. Live version here. Slightly edited your post. --Norbert]
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Where to download CusASM ?

Post by Norbert »

I am bumping this thread, because http://www.princed.org/cusasm/ (still) says "Under Construction".
I'm making this 'the' thread about CusAsm. :) There wasn't one yet.

As far as I know the only package that still has some CusAsm file(s) is:
http://www.popot.org/other_useful_tools ... src.tar.gz
Note that cusasm.phps and gethack/cusasm.phps inside that package are different.

It's unclear to me how useful CusAsm is/would be nowadays.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Where to download CusASM ?

Post by Norbert »

I have fixed CusAsm.
So, finally the "Under Construction" notice is gone. :)

http://www.princed.org/cusasm/

Press the "Example (loose tiles in level 12)" button on that page to see what it can do, what kind of tool it is.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Where to download CusASM ?

Post by David »

I think I found a bug:
Click the example button at the bottom.
Note that one line contains "b8 ff 00".
But in the XML, BBCode and Hex output, "00" becomes "..".

Code: Select all

		$mask[$i] = ($c == '..' ? '..' : sprintf ('%02x', $c));
That "==" should be "===".
But after this fix, new problems appear in the BBCode output:

Code: Select all

[b]ff [b]ff[/b]
And in the XML output:

Code: Select all

	<read default="ff {ff" name="name here" type=""/>
This latter bug also appears without the fix. For example with this:

Code: Select all

00001B5B B8BC02                         mov       ax,02BC
00001B5E 50                             push      ax
00001B5F B80400                         mov       ax,0004
00001B62 50                             push      ax
00001B63 B8FFFF                         mov       ax,FFFF
00001B66 50                             push      ax
Here is the fixed version.
Attachments
cusasm.php_fixed.zip
(2.73 KiB) Downloaded 59 times
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Where to download CusASM ?

Post by Norbert »

Thanks for finding and fixing that.
The updated CusAsm is now live.
Also released as a 2.2.1 package.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Where to download CusASM ?

Post by Norbert »

Since 2.2.1, the XML output for the example has changed.
Suddenly there are 7 changeable values instead of 5.
It looks like it 2.2.1 added "ff 00" and "0f 00".
Is this correct? It's different from what CusPoP's princehack.xml says.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Where to download CusASM ?

Post by David »

CusAsm simply autodetects constants in all instructions, as before.
However, the two new lines were not detected before, because they contain zero bytes. (The bugfix was exactly about zero bytes.)

Code: Select all

1109 833E9E0F0D     cmp    word ptr [0F9E],000D <-- level
1110 833E9E4017     cmp    word ptr [409E],0017 <-- room 1
1117 833E9E4010     cmp    word ptr [409E],0010 <-- room 2
112A C606ED4216     mov    byte ptr [42ED],16 <-- start tile
112F B8FF00         mov    ax,00FF
113A 250F00         and    ax,000F
1149 803EED421B     cmp    byte ptr [42ED],1B <-- end tile
To delete these from the XML/BBCode output, delete the braces around them in the Hex textbox and click Get Code again.
(The braces will reappear in the Hex textbox for some reason, though.)

Maybe it would be nice if CusAsm detected the "<-- level" and similar comments? (and marked only those parts as changeable?)
Post Reply