Disassembly of the bytecode of the Final Fantasy 4 rom, focusing on the Dark Wave ability routine and the data that it uses. The bytes located at $03A002 are:

27 44 BC E2 AD BC E1 44 BC E2 AD BC E1 44 BC E2 AD BC E1 44 BC 45 45 45

The following are all copied directly from a chat with Moonshot’s Kimi language model. They are likely a mix of canny guesses plus concrete deductions from the submitted data— like most technical discussions with LLMs.


🗡️ Cecil's Dark Wave - Decoded

Address Context

$03A002 falls in bank $03 ($03:8000-$03:FFFF), which in FF4 (Japanese Final Fantasy IV) is typically battle code and character ability data. This is legitimately in the heart of the battle engine.

The Dark Wave Mechanics

Dark Wave is Cecil's HP-sacrifice area attack (Dark Knight ability). The formula is approximately:

Damage = (Cecil's HP / 2^N) × (some multiplier) - enemy defense

But the implementation is more nuanced...

Offset Bytes Instruction Operand Dark Wave Context
03A002 27 44 AND [$44],Y Mask HP value with table lookup
03A004 BC E2 AD LDY $ADE2,X Load Y from character stat table + X offset
03A007 BC E1 44 LDY $44E1,X Wait - misaligned?
03A00A BC E2 AD LDY $ADE2,X Repeating pattern...
Byte Pattern Purpose
27 44 Header/entry point or AND mask for valid levels
BC E2 AD Pointer to Dark Wave base power table
BC E1 44 Pointer to HP sacrifice divisor table
E2 AD Repeated power references (multiple levels?)
45 45 Terminator or XOR checksum (EOR $45 ×2)

The repeating pattern suggests multiple entries for different levels: