ff3:ff3us:patches:madsiur:battle_form

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ff3:ff3us:patches:madsiur:battle_form [2017/04/09 06:16]
madsiur [Screenshots]
ff3:ff3us:patches:madsiur:battle_form [2019/02/12 11:32] (current)
Line 50: Line 50:
 |$C0D613 - $C0D616  |Bank $F2 Implementation: JML to Command Code | |$C0D613 - $C0D616  |Bank $F2 Implementation: JML to Command Code |
 |$F20000 - $F2004B  |Bank $F2 Implementation: Command Code | |$F20000 - $F2004B  |Bank $F2 Implementation: Command Code |
 +
 +==== Code ====
 +
 +<code>
 +Bank $C0 Implementation
 +
 +org $C0992C                     ; Jump table edit
 +dw cmd69
 +
 +org $C0D613                     ; Change to relocate command in bank $C0
 +cmd69:                          ; Requires $4B bytes of free space
 +    REP #$20                    ; 16-Bit Accumulator
 +    LDA $EB                     ; Battle formation
 +    STA $0011E0                 ; Store as battle formation
 +    TDC                         ; Clear Accumulator
 +    SEP #$20                    ; 8-Bit Accumulator
 +    LDA $ED                     ; Battle intro effects and background
 +    AND #$C0                    ; Isolate battle blur and battle sound effect disabling
 +    STA $078A                   ; Save value in RAM
 +    LDA $ED                     ; Battle intro effects and background
 +    AND #$3F                    ; Isolate bits 0-5 (battle background ID, max #$3F)
 +    CMP #$3F                    ; Check if equal to #$3F
 +    BNE lblA                    ; If not, set as background
 +    LDA $0522                   ; Load $0522 (#$7F = battle background ID)
 +    AND #$7F                    ; Isolate bits 0-6 (battle background ID, max #$7F)
 +lblA:
 +    STA $0011E2                 ; Store as battle background ID
 +    TDC                         ; Clear Accumulator
 +    STA $0011E3                 ; ???
 +    LDA $1ED7                   ;
 +    AND #$10                    ; Continue music during battle?
 +    LSR                         ;
 +    STA $0011E4                 ; Set to continue current music
 +    LDA #$01                    ;
 +    STA $56                     ; Enable battle
 +    LDX $0541                   ; BG1 X,Y Center Coordinate
 +    STX $1F66                   ; Store as Field XY Scroll Position
 +    LDX $00AF                   ; Party's X,Y Position
 +    STX $1FC0                   ; Set as Party XY Position
 +    LDA #$E0                    ;
 +    STA $11FA                   ; enable startup event, disable fade-in, no update on map load
 +    LDA #$04                    ; Number of bytes: 4
 +    JMP $9B70                   ; Advance the event queue of 4 bytes
 +</code>
  
 ==== Links ==== ==== Links ====
Line 61: Line 105:
 ==== Screenshots ==== ==== Screenshots ====
  
-{{  gallery>ff3:ff3us:patches:madsiur:battle_form:?128x128&lightbox  }}+{{gallery>ff3:ff3us:patches:madsiur:battle_form:?128x128&lightbox}}
  
 [[ff3:ff3us:patches:madsiur|{{ff3:ff3us:patches:madsiur:madbutton.png}}]] [[ff3:ff3us:patches:madsiur|{{ff3:ff3us:patches:madsiur:madbutton.png}}]]
  • ff3/ff3us/patches/madsiur/battle_form.1491718599.txt.gz
  • Last modified: 5 years ago
  • (external edit)