SNES Development
Romancing Saga 2

Romancing Saga 2

ROM Map

OffsetDescription
43E52Audio / SPC Pointers
44077Audio / Sample Indexes

Elite Dialog Routine

;; 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)

Audio

SPC ASM Log

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]   "   "

SPC Pointers

PointerAddressDescription / Song
2D2EC772E2DSilence
532EC772E53The Legend Begins
5D30C77305DRest Theme
0931C773109Village 1
8832C773288Wiped Out
8E34C77348ESong of Everlasting Battles
5336C773653Dungeon 1
1C3DC773D1CMermaid Legend
0F3FC773F0FAnother Country’s Town
9642C774296Dungeon 3
A247C7747A2The Sinking Ship
154DC774D15Last Dungeon
D652C7752D6Heartful Tears
5B57C77575BPrologue (part 4)
FB60C7760FBVoyage
BF63C7763BFVictory
AD67C7767ADTitle
AC70C7770ACWind?
D871C7771D8Dungeon 2
1D74C77741DStrangeness ~ Victor’s Death
CF77C7777CFPrologue (part 1)
547CC777C54Canal Fortress
D984C7784D9Prologue (part 3)
C586C7786C5Unknown 1
5189C778951Weird…
078CC778C07Village 2
1D90C77901DEmpire’s Front Line
A197C7797A1Empire City Avalon
C19BC779BC1Jingle
0C9DC779D0CAncient Ruins
709FC779F70Unknown 2
96A0C77A096Unknown 3
0AA1C77A10ARun!
DDA3C77A3DDBattle with Kujinshi
A2ACC77ACA2Unknown 4
62ADC77AD62The Last Battle
48B6C77B648The Legend Begins (Short)
11B8C77B811Dance 1
2D2EC772E2DSilence
08BAC77BA08Dance 3
BCBCC77BCBCThe Dragon’s Hole
08C0C77C008The Seven Heros’ Battle
CBC2C77C2CBDance 4
EEC4C77C4EEThe Last Battle
70CFC77CF70Prologue (part 5)
F5D1C77D1F5Unknown 5
4CD3C77D34CPrologue (part 2)
21D7C77D721Epilogue
1ADAC77DA1ASuccessive Emperor
2D2EC772E2DSilence
5DDDC77DD5DEnding Theme

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