Differences
This shows you the differences between two versions of the page.
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 | |$C0D613 - $C0D616 | ||
|$F20000 - $F2004B | |$F20000 - $F2004B | ||
+ | |||
+ | ==== Code ==== | ||
+ | |||
+ | < | ||
+ | Bank $C0 Implementation | ||
+ | |||
+ | org $C0992C | ||
+ | dw cmd69 | ||
+ | |||
+ | org $C0D613 | ||
+ | cmd69: | ||
+ | REP #$20 ; 16-Bit Accumulator | ||
+ | LDA $EB ; Battle formation | ||
+ | STA $0011E0 | ||
+ | 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 | ||
+ | TDC ; Clear Accumulator | ||
+ | STA $0011E3 | ||
+ | LDA $1ED7 ; | ||
+ | AND #$10 ; Continue music during battle? | ||
+ | LSR ; | ||
+ | STA $0011E4 | ||
+ | LDA #$01 ; | ||
+ | STA $56 ; Enable battle | ||
+ | LDX $0541 ; BG1 X,Y Center Coordinate | ||
+ | STX $1F66 ; Store as Field XY Scroll Position | ||
+ | LDX $00AF ; Party' | ||
+ | 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 | ||
+ | </ | ||
==== Links ==== | ==== Links ==== | ||
Line 61: | Line 105: | ||
==== Screenshots ==== | ==== Screenshots ==== | ||
- | {{ gallery> | + | {{gallery> |
[[ff3: | [[ff3: |