Skip to content
Clément Gallet edited this page Jun 29, 2014 · 14 revisions

List of commands you can obtain with aiming byte 0x41 and mold 4: 32, 44, 56, 65, 86, 92, 96, 109, 129, 152, 172, 173, 231, 255

Command 56 and 109: jump to C2/20E2

Jump in the middle of Command #$2A (Flee, or fail to, from running)

$C2/20E2 7F C2 20 A9 ADC $A920C2,x[$A9:20F6]
$C2/20E6 02 09       COP #$09
Back to correct code
$C2/20E8 8D 28 3A    STA $3A28  [$00:3A28]
$C2/20EB E2 20       SEP #$20
$C2/20ED A5 B1       LDA $B1    [$00:00B1]
...

Command 86: jump to C2/C260

Jump into uncommented code
$C2/C260 10 AA       BPL $AA    [$C20C]
\
  $C2/C20C 6F 18 65 12 ADC $126518[$12:6518]   A:0000 X:0034 Y:0800 P:envMxDIZC
  Back to correct code
  $C2/C210 9D 84 6F    STA $6F84,x[$00:6FB8]   A:0000 X:0034 Y:0800 P:envMxDIZC
  $C2/C213 80 1A       BRA $1A    [$C22F]      A:0000 X:0034 Y:0800 P:envMxDIZC
  $C2/C215 A5 10       LDA $10    [$00:0010]   A:0000 X:0034 Y:0800 P:envMxDIZC
  ...

Command 231: jump to C2/FCAA

Jump in data
C2/FCAA: 55 42        EOR $42,X
C2/FCAC: 58           CLI 
C2/FCAD: 82 5A B3     BRL $C0B00A
\
  C0/B00A:	A901    	LDA #$01
  C0/B00C:	4C5C9B  	JMP $9B5C
...
C2/FCB0: 5C D7 5E EB  JMP $EB5ED7
C2/FCB4: 60           RTS 

Command 255: jump to C2/FFA9

Jump in the middle of the decompression routine
$C2/FFA9 FE B7 F3    INC $F3B7,x[$00:F3EB]
back to normal code
$C2/FFAC 85 FF       STA $FF    [$00:00FF]
$C2/FFAE C8          INY
$C2/FFAF 46 FF       LSR $FF    [$00:00FF]
$C2/FFB1 90 11       BCC $11    [$FFC4]
...

Command 92: jump to C2/A960

C2/A960: 60           RTS

Command 96: jump to C2/3A2D

jump in the middle of steal for monsters
C2/3A2D: 90 02        BCC $3A31      (branch if no overflow)
C2/3A2F: 7B           TDC 
C2/3A30: 3A           DEC            (if sum overflowed, set enemy's gold to 65535)
C2/3A31: 9D 98 3D     STA $3D98,X    (update enemy's gold)
C2/3A34: E2 20        SEP #$20       (set 8-bit A)
C2/3A36: A9 3F        LDA #$3F
C2/3A38: 8D 01 34     STA $3401      (Set message to "# GP was stolen!!")
C2/3A3B: 60           RTS

Command 65: jump to C2/FEC9

Jump into data
C2/FEC9: 62 60 5E     PER $C05D2C
C2/FECC: 5C 5A 58 55  JMP $55585A       (where is this?)
C2/FED0: 53 51        EOR ($51,S),Y
C2/FED2: 4E 4C 49     LSR $494C
C2/FED5: 47 44        EOR [$44]
C2/FED7: 41 3F        EOR ($3F,X)
C2/FED9: 3C 39 36     BIT $3639,X
C2/FEDC: 33 31        AND ($31,S),Y
...
Clone this wiki locally