st20dis is a command-line disassembler for the
SGS-Thomson ST20 C2/C4 instruction set
which includes additional functions to assist with development of patches
to existing binaries. A manual page is available.
Shoog over at
Digital Spy) raw BMPsaf123 there.
I'm interested in experiences with st20dis,
problems you encountered, proposals for enhancements, etc.
st20dis is free of charge for private, educational
and commercial use. No responsiblity is taken for any damage caused by
using st20dis.
Commercial distribution of either the original or modified versions of
st20dis or including st20dis into commercial
products is only allowed if explicitly permitted by the original author.
00000000: 60 be sub_0: ajw #-2 00000002: 23 46 ldc #36 00000004: 21 fb ldpi
sub_0: ajw #-2
ldc #36
ldpi
sub_0: ajw #-2 ; adjust workspace - Move workspace pointer
ldc #36 ; load constant - A = n, B=A, C=B
ldpi ; Load pointer to instruction - A = next instruction + A
noscenes patch for the DigiFusion
software does is change the byte at location 0xa57b to
0x02 from 0xa2. Disassemble this subroutine:
C:\>st20dis -S a57b <firmware file>
0000a546: 60 be sub_a546: ajw #-2 0000a548: 11 ldlp #1 0000a549: 73 ldl #3 ...Note that the subroutine actually starts at
0xa546.
Look at the bytes around 0xa57b:
C:\>st20dis -s a57a -e +4 <firmware file>
0000a57a: 70 loc_a57a: ldl #0 0000a57b: a2 cj loc_a57e 0000a57c: 62 0f j loc_a55dAnd try the patch:
C:\>st20dis -s a57a -e +4 -p a57b=2 <firmware file>
0000a57a: 70 loc_a57a: ldl #0 0000a57b: 02 j loc_a57e 0000a57c: 62 0f j loc_a55dThe conditional jump has been changed to an unconditional one.
Read the man page for full details.
Microsoft Windows, Intel.
Sun Solaris 10, SPARC, 64-bit.
Sun Solaris 10 (or OpenSolaris), x86, 32/64-bit.
MacOSX Snow Leopard, Intel.
Microsoft Windows, Intel.
Sun Solaris 10, SPARC, 64-bit.
Sun OpenSolaris 11, Intel.
MacOSX Leopard, Intel.
Linux, Intel.
Version 1.0.1 - released 25/03/2008
Version 1.0.0 - released 09/03/2008
Version 0.0.2 - released 26/2/2008
Version 0.0.1 - released 22/2/2008