Users browsing this thread: 1 Guest(s)
Command Changing Relics :3

#1
Posts: 1,261
Threads: 250
Thanks Received: 11
Thanks Given: 7
Joined: Jun 2009
Status
Traitor
Code:
Data: Commands to change FROM
C3/6198:    05          (Steal)
C3/6199:    0F          (Slot)
C3/619A:    0D          (Sketch)
C3/619B:    02          (Magic)
C3/619C:    00          (Fight)

Data: Commands to change TO
C3/619D:    06          (Capture)
C3/619E:    18          (GP Rain)    
C3/619F:    0E          (Control)
C3/61A0:    17          (X-Magic)
C3/61A1:    16          (Jump)
  Find
Quote  

#2
Posts: 831
Threads: 41
Thanks Received: 16
Thanks Given: 12
Joined: Nov 2009
Reputation: 18
Status
None
The code you provided for the relics, zeemis, will only change commands in the menu - the bank C3 deals with all matters in the menu.

If you want any changes to apply in battle as well, you need to go over the C2 bank.

Code:
C2/53A5: B9 FC 00     LDA $00FC,Y   (get command from menu slot)
C2/53A8: A2 04        LDX #$04
C2/53AA: 48           PHA
C2/53AB: A9 04        LDA #$04
C2/53AD: 85 EE        STA $EE        (start checking Bit 2 of variable $11D6)
C2/53AF: BF 52 54 C2  LDA $C25452,X  (commands that can be changed FROM)
C2/53B3: C3 01        CMP $01,S      (is current command one of those commands?)
C2/53B5: D0 0D        BNE $53C4      (branch if not)
C2/53B7: AD D6 11     LDA $11D6     (check Battle Effects 1 byte.
                                     Bit 2 = Fight -> Jump, Bit 3 = Magic -> X-Magic,
                                     Bit 4 = Sketch -> Control, Bit 5 = Slot -> GP Rain,
                                     Bit 6 = Steal -> Capture)
                
C2/53BA: 24 EE        BIT $EE
C2/53BC: F0 06        BEQ $53C4
C2/53BE: BF 57 54 C2  LDA $C25457,X   (commands to change TO)
C2/53C2: 83 01        STA $01,S       (replace command on stack)
C2/53C4: 06 EE        ASL $EE         (will check the next highest bit of $11D6
                                       in our next iteration)
C2/53C6: CA           DEX
C2/53C7: 10 E6        BPL $53AF       (loop for all 5 possible commands that can be
                                       converted)

The two important parts of code are as follows:

C2/53AF: BF 52 54 C2 LDA $C25452,X (commands that can be changed FROM) ***LOADS ADDRESS C2/5452, which contains the commands

Code:
(Data - commands that can be replaced with other commands thanks to Relics)

C2/5452: 05   (Steal)
C2/5453: 0F   (Slot)
C2/5454: 0D   (Sketch)
C2/5455: 02   (Magic)
C2/5456: 00   (Fight)

The second important part of the code is the one that loads the new command:

C2/53BE: BF 57 54 C2 LDA $C25457,X (commands to change TO) ***LOADS ADDRESS C2/5457

Code:
(Data - commands that can replace above commands due to Relics)

C2/5457: 06   (Capture)
C2/5458: 18   (GP Rain)
C2/5459: 0E   (Control)
C2/545A: 17   (X-Magic)
C2/545B: 16   (Jump)

I may be missing something, but that's all I could find concerning the swapping of commands done by relics. Hope this helps :p
Quote  

#3
Posts: 1,261
Threads: 250
Thanks Received: 11
Thanks Given: 7
Joined: Jun 2009
Status
Traitor
Good deal, thanks. Me and Djinn were looking over this today via Skype.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite