View Single Post
  #23    
Old February 4th, 2008, 10:39 AM
score_under's Avatar
score_under
I program the *other* ASM.
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 21
Nature: Rash
This post applies to an OLD version of the program only

Old post:
Spoiler:
OK, but to do this at the moment, I do:
Code:
pksv ruby.gba ABCDEF > script.txt
Check here to see some of my compiler woes implementing the feature:
Spoiler:

EDIT:
Compiler blues atm :(
Code:
In file included from codeproc.h:182,
                 from pksv.c:28:
decompiler.h: In function `writescr':
decompiler.h:50: error: syntax error before "va_list"
decompiler.h: In function `DecodeProc':
decompiler.h:73: warning: assignment from incompatible pointer type
Fixed with a simple replacement of va_list with va_arg (simple mistake)
and placing (typeof(func)) before one of the lines.
Now, I'm getting:
Code:
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s: Assembler messages:
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2681: Error: ambiguous operand size for `cmp'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2683: Error: ambiguous operand size for `dec'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2686: Error: no such instruction: `movl -16(%ebp),%edx'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2687: Error: no such instruction: `leal -16(%ebp),%eax'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2688: Error: no such instruction: `addl $4,(%eax)'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2689: Error: no such instruction: `movl (%edx),%eax'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2690: Error: no such instruction: `movl %eax,-65564(%ebp)'
EDIT:
All solved with vsprintf. Good old vsprintf. Also freed about 6 bytes of memory!

New post:

Hey people! I got a new version out today.
It can decompile codes for the slot-machine much better now, with commands for altering and checking the coin case, and some purely semantic commands (to prevent false data being decompiled).
The unknown commands are prefixed with a "CMD_" both in the program AND in the decompiled code, and are useless until I find out what they actually do :D
@swampert22: This version can now do that!

EDIT:

Random no-confirmation trading script
Code:
setvar 0x8004 0x0 ' Their poke, slot number (still don't know the variable for trainer)
setvar 0x8005 0x0 ' Our poke, slot number [0-5]
special 0xfd
special 0xfe
waitspecial
__________________
Plz not to PM me, I don't come here often enough. Email if you need me

Last edited by score_under; August 23rd, 2008 at 04:45 AM.