Romancing Saga 2

Offset | Description |
---|---|

`43E52` | Audio / SPC Pointers |

`44077` | Audio / Sample Indexes |

```
;; Store 0x40 zeroes to $7FA492 (clear out the memory we need!)
$C0/CC2E: A2 00 00 LDX #$0000 ;; load X from $0000 (start count at zero)
$C0/CC31: C2 20 REP #$20 ;; set to 16 bit accumulator mode
$C0/CC33: 9E 92 A4 STZ $A492,X [$7F:A492] ;; store zero to memory
$C0/CC36: E8 INX ;; increment X
$C0/CC37: E8 INX ;; increment X (increment the count by 2)
$C0/CC38: E0 40 00 CPX #$0040 ;; compare x with $0040
$C0/CC3B: D0 F6 BNE $F6 [$CC33] ;; branch to $CC33 if result is not equal ($F6 is a relative address)
;; (stop when count hits 0x40)
$C0/CC3D: E2 20 SEP #$20 ;; set to 8 bit accumulator mode
$C0/CC3F: A6 B4 LDX $B4 [$00:13B4] ;; Load X from $B4 (since X is the offset of where it reads...
;; so too must be $B4, therefore its used to tell what letter to load)
$C0/CC41: A0 00 00 LDY #$0000 ;; set Y to #$0000
$C0/CC44: BF 00 00 D4 LDA $D40000,X [$D4:0370] ;; load accumulator from $D40000+X (read the left half)
$C0/CC48: EB XBA ;; swap low and high bytes of accumulator
$C0/CC49: BF 08 00 D4 LDA $D40008,X [$D4:0378] ;; load accumulator from $D40008+X (read the right half)
$C0/CC4D: C2 20 REP #$20 ;; set to 16 bit accumulator mode
$C0/CC4F: 85 B1 STA $B1 [$00:13B1] ;; store accumulator to $B1 (make a copy of what we just read)
$C0/CC51: 4A LSR A ;; shift bits in accumulator 'A' right by 1
;; (also has the effect of dividing the number by 2)
;; store A to memory (lower plane)
$C0/CC52: E2 20 SEP #$20 ;; set to 8 bit accumulator mode
$C0/CC54: 99 B4 A4 STA $A4B4,Y [$7F:A4B4] ;; store A to $7FA4B4 (its just memory) (store low byte of A)
$C0/CC57: EB XBA ;; swap low and high bytes of accumulator
$C0/CC58: 99 94 A4 STA $A494,Y [$7F:A494] ;; store A to $7FA594 (store what used to be the high byte of A)
$C0/CC5B: EB XBA ;; swap low and high bytes of accumulator (back to normal)
;; this "adds" the original bits to the shifted set of bits
;; most likely this adds a shadow effect
$C0/CC5C: C2 20 REP #$20 ;; set to 16 bit accumulator mode
$C0/CC5E: 05 B1 ORA $B1 [$00:13B1] ;; OR accumulator with memory at $B1
$C0/CC60: 4A LSR A ;; Shift Right accumulator/memory..(divide A by 2)
$C0/CC61: 05 B1 ORA $B1 [$00:13B1] ;; OR accumulator with memory at $B1
;; again, store A to memory (upper plane)
$C0/CC63: E2 20 SEP #$20 ;; set to 8 bit accumulator mode
$C0/CC65: 99 B5 A4 STA $A4B5,Y [$7F:A4B5] ;; store Y to $A4B5
$C0/CC68: EB XBA ;; exchange a & b
$C0/CC69: 99 95 A4 STA $A495,Y [$7F:A495] ;; store Y to $A4B5
$C0/CC6C: C8 INY ;; y++
$C0/CC6D: C8 INY ;; y++ (add 2 to y to go to next row, because each line is 2 bytes..1 per plane)
$C0/CC6E: E8 INX ;; x++ (increment the reading position)
$C0/CC6F: C0 10 00 CPY #$0010 ;; compare Y with $0010 (the tile is 0x10 bytes)
$C0/CC72: D0 0A BNE $0A [$CC7E] ;; branch to $cc7e if Y <> 0x10 (loop back if all bytes haven't been copied)
;; if Y = 0x10 then (if its got through the first row of tiles)
;; X = X + 0x78 (move reading position to next row)
$C0/CC74: C2 20 REP #$20 ;; set to 16 bit accumulator mode
$C0/CC76: 8A TXA ;; transfer X to accumulator
$C0/CC77: 18 CLC ;; Clear the carry flag (always done with addition)
$C0/CC78: 69 78 00 ADC #$0078 ;; Add with carry: A = A + 0x0078 (A is being used as a temp variable)
$C0/CC7B: AA TAX ;; transfer accumulator to X
$C0/CC7C: E2 20 SEP #$20 ;; set to 8 bit accumulator mode
$C0/CC7E: C0 1E 00 CPY #$001E ;; Compare Y with #$001E (check if the entire letter is done)
$C0/CC81: D0 C1 BNE $C1 [$CC44] ;; branch to $CC44 if Y <> 0x1E (go back to top of loop if not)
;; if Y = 0x1E then (if the letter was completely copied)
$C0/CC83: A2 00 00 LDX #$0000 ;; Load X from #$0000
$C0/CC86: A0 00 00 LDY #$0000 ;; Load Y from #$0000
;; copy the higher plane onto the lower plane (this just changes the color)
$C0/CC89: BD 94 A4 LDA $A494,X [$7F:A494] ;; Load A from $7FA494+X
$C0/CC8C: 19 93 A4 ORA $A493,Y [$7F:A493] ;; OR A with $7FA493+Y
$C0/CC8F: 99 93 A4 STA $A493,Y [$7F:A493] ;; Store A to $A493+Y
$C0/CC92: BD 94 A4 LDA $A494,X [$7F:A494] ;; Load A from $7FA494+X
$C0/CC95: 19 97 A4 ORA $A497,Y [$7F:A497] ;; OR A with $7FA497+Y
$C0/CC98: 99 97 A4 STA $A497,Y [$7F:A497] ;; Store A to $7FA497+Y
$C0/CC9B: E8 INX ;; x++
$C0/CC9C: E8 INX ;; x++
$C0/CC9D: C8 INY ;; y++
$C0/CC9E: C8 INY ;; y++
$C0/CC9F: E0 3A 00 CPX #$003A ;; compare X with #$003A
$C0/CCA2: D0 E5 BNE $E5 [$CC89] ;; branch to $CC89 if X <> 0x3A (go back to top of loop)
;; we're done!
$C0/CCA4: 60 RTS ;; return from subroutine (end of routine)
```

```
ASM log:
$C4/026B BF 52 3E C4 LDA $C43E52,x[$C4:3E82] SPC Code
$C4/026F 85 14 STA $14 [$00:1C14] " "
$C4/0271 BF 53 3E C4 LDA $C43E53,x[$C4:3E83] " "
$C4/0275 85 15 STA $15 [$00:1C15] " "
$C4/0277 BF 54 3E C4 LDA $C43E54,x[$C4:3E84] " "
$C4/027B 85 16 STA $16 [$00:1C16] " "
```

Pointer | Address | Description / Song |
---|---|---|

`2D2EC7` | `72E2D` | Silence |

`532EC7` | `72E53` | The Legend Begins |

`5D30C7` | `7305D` | Rest Theme |

`0931C7` | `73109` | Village 1 |

`8832C7` | `73288` | Wiped Out |

`8E34C7` | `7348E` | Song of Everlasting Battles |

`5336C7` | `73653` | Dungeon 1 |

`1C3DC7` | `73D1C` | Mermaid Legend |

`0F3FC7` | `73F0F` | Another Country’s Town |

`9642C7` | `74296` | Dungeon 3 |

`A247C7` | `747A2` | The Sinking Ship |

`154DC7` | `74D15` | Last Dungeon |

`D652C7` | `752D6` | Heartful Tears |

`5B57C7` | `7575B` | Prologue (part 4) |

`FB60C7` | `760FB` | Voyage |

`BF63C7` | `763BF` | Victory |

`AD67C7` | `767AD` | Title |

`AC70C7` | `770AC` | Wind? |

`D871C7` | `771D8` | Dungeon 2 |

`1D74C7` | `7741D` | Strangeness ~ Victor’s Death |

`CF77C7` | `777CF` | Prologue (part 1) |

`547CC7` | `77C54` | Canal Fortress |

`D984C7` | `784D9` | Prologue (part 3) |

`C586C7` | `786C5` | Unknown 1 |

`5189C7` | `78951` | Weird… |

`078CC7` | `78C07` | Village 2 |

`1D90C7` | `7901D` | Empire’s Front Line |

`A197C7` | `797A1` | Empire City Avalon |

`C19BC7` | `79BC1` | Jingle |

`0C9DC7` | `79D0C` | Ancient Ruins |

`709FC7` | `79F70` | Unknown 2 |

`96A0C7` | `7A096` | Unknown 3 |

`0AA1C7` | `7A10A` | Run! |

`DDA3C7` | `7A3DD` | Battle with Kujinshi |

`A2ACC7` | `7ACA2` | Unknown 4 |

`62ADC7` | `7AD62` | The Last Battle |

`48B6C7` | `7B648` | The Legend Begins (Short) |

`11B8C7` | `7B811` | Dance 1 |

`2D2EC7` | `72E2D` | Silence |

`08BAC7` | `7BA08` | Dance 3 |

`BCBCC7` | `7BCBC` | The Dragon’s Hole |

`08C0C7` | `7C008` | The Seven Heros’ Battle |

`CBC2C7` | `7C2CB` | Dance 4 |

`EEC4C7` | `7C4EE` | The Last Battle |

`70CFC7` | `7CF70` | Prologue (part 5) |

`F5D1C7` | `7D1F5` | Unknown 5 |

`4CD3C7` | `7D34C` | Prologue (part 2) |

`21D7C7` | `7D721` | Epilogue |

`1ADAC7` | `7DA1A` | Successive Emperor |

`2D2EC7` | `72E2D` | Silence |

`5DDDC7` | `7DD5D` | Ending Theme |

*Dialog RoutineCoded by LordTech of Wakdhacks.**SPC information described by JCE3000GT.*