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:24] madsiur [Code] |
ff3:ff3us:patches:madsiur:battle_form [2019/02/12 11:32] (current) |
||
---|---|---|---|
Line 60: | Line 60: | ||
org $C0D613 | org $C0D613 | ||
- | cmd69: ; Requires $4B bytes of free space | + | cmd69: |
- | REP #$20 ; 16-Bit Accumulator | + | REP #$20 ; 16-Bit Accumulator |
- | LDA $EB ; Battle formation | + | LDA $EB ; Battle formation |
STA $0011E0 | STA $0011E0 | ||
TDC ; Clear Accumulator | TDC ; Clear Accumulator | ||
SEP #$20 ; 8-Bit Accumulator | SEP #$20 ; 8-Bit Accumulator | ||
- | LDA $ED ; Battle intro effects and background | + | LDA $ED ; Battle intro effects and background |
- | AND #$C0 ; Isolate battle blur and battle sound effect disabling | + | AND #$C0 ; Isolate battle blur and battle sound effect disabling |
- | STA $078A ; Save value in RAM | + | STA $078A ; Save value in RAM |
- | LDA $ED ; Battle intro effects and background | + | LDA $ED ; Battle intro effects and background |
- | AND #$3F ; Isolate bits 0-5 (battle background ID, max #$3F) | + | AND #$3F ; Isolate bits 0-5 (battle background ID, max #$3F) |
CMP #$3F ; Check if equal to #$3F | CMP #$3F ; Check if equal to #$3F | ||
- | BNE lblA ; If not, set as background | + | BNE lblA ; If not, set as background |
- | LDA $0522 ; Load $0522 (#$7F = battle background ID) | + | LDA $0522 ; Load $0522 (#$7F = battle background ID) |
- | AND #$7F ; Isolate bits 0-6 (battle background ID, max #$7F) | + | AND #$7F ; Isolate bits 0-6 (battle background ID, max #$7F) |
lblA: | lblA: | ||
- | STA $0011E2 | + | STA $0011E2 |
- | TDC ; Clear Accumulator | + | TDC ; Clear Accumulator |
- | STA $0011E3 | + | STA $0011E3 |
- | LDA $1ED7 ; | + | LDA $1ED7 ; |
AND #$10 ; Continue music during battle? | AND #$10 ; Continue music during battle? | ||
- | LSR ; | + | LSR ; |
- | STA $0011E4 | + | STA $0011E4 |
- | LDA #$01 ; | + | LDA #$01 ; |
- | STA $56 ; Enable battle | + | STA $56 ; Enable battle |
- | LDX $0541 ; BG1 X,Y Center Coordinate | + | LDX $0541 ; BG1 X,Y Center Coordinate |
- | STX $1F66 ; Store as Field XY Scroll Position | + | STX $1F66 ; Store as Field XY Scroll Position |
LDX $00AF ; Party' | LDX $00AF ; Party' | ||
- | STX $1FC0 ; Set as Party XY Position | + | STX $1FC0 ; Set as Party XY Position |
- | LDA #$E0 ; | + | LDA #$E0 ; |
- | STA $11FA ; enable startup event, disable fade-in, no update on map load | + | STA $11FA ; enable startup event, disable fade-in, no update on map load |
- | LDA #$04 ; Number of bytes: 4 | + | LDA #$04 ; Number of bytes: 4 |
JMP $9B70 ; Advance the event queue of 4 bytes | JMP $9B70 ; Advance the event queue of 4 bytes | ||
</ | </ |