data/claims/dw2-tables.yamlDragon Warrior II's data tables (Nathan-R-Og/dq2)
Game: Dragon Warrior II.
Each of the 82 monsters, from the Slime (ID 1) to Malroth (ID 82), has 15 bytes of stats: maximum HP, a byte whose high nibble is its dodge chance in 64ths, gold, the low byte of its experience, agility, attack, defense, then eight bytes of resistances, attack patterns, and the experience's two high parts (two bits each, worth 256 and 1024). Each monster also has a drop byte: an item ID in the low six bits and a chance of 1/8, 1/16, 1/32, or 1/128 in the high two. A drop needs a free inventory slot: the code checks the party's slots first and skips the drop when they are full. Two exceptions: on map $04 (Midenhall B1) every fight drops the Staff of Thunder if a slot is free, and Hargon and Malroth (IDs $51 and up) skip the drop check, so they drop nothing. HP runs from 5 (Slime, Iron Ant) to 250 (Atlas, Bazuzu, Zarlox, and others), experience, computed from its three parts, from 0 (Hargon, Malroth) to 2200 (Zarlox), and gold from 0 (Hargon, Malroth) to 255 (Gold Orc, Metal Babble, Zarlox). A fight's gold is the sum of the killed monsters' gold, capped at 65,535; the party gets that total less a random cut of up to a quarter (total − ⌊⌊total ÷ 4⌋ × r ÷ 256⌋, r a random byte), and the total is doubled before the cut when a monster's treasure chest turns out empty because it held an item the party already has and may hold only one of. dw2-tables/monster-stats
src/us/prg/bank4.asm#L9342-L9424; Enemy Stats (Max HP, [4-bit evade chance / 64, 4-bit unused], Max Gold dropped, EXP low byte, AGI, Attack Power, Defense Power, [2-bit attack probability list, 3-bit Sleep res., 3-bit spell damage res.], [2-bit EXP * 256, 3-bit Defeat res., 3-bit Stopspell res.], [2-bit EXP * 1024, 3-bit Defense res., 3-bit Surround res.], [4-bit Attack command 1, 4-bit Attack command 2], [4-bit Attack command 3, 4-bit Attack command 4], [4-bit Attack command 5, 4-bit Attack command 6], [4-bit Attack command 7, 4-bit Attack command 8], 8*1-bit use alternate attack command)
.byte $05,$10,$02,$01,$03,$07,$05,$40,$07,$00,$50,$50,$00,$00,$00 ; Monster ID #$01: Slime
.byte $08,$00,$03,$02,$03,$09,$06,$00,$07,$00,$00,$00,$00,$00,$00 ; Monster ID #$02: Big Slug
.byte $05,$10,$04,$02,$04,$0B,$0D,$00,$07,$00,$00,$00,$00,$00,$00 ; Monster ID #$03: Iron Ant
.byte $09,$00,$03,$03,$05,$0C,$08,$40,$07,$01,$05,$00,$00,$00,$00 ; Monster ID #$04: Drakee
.byte $0A,$10,$05,$05,$08,$0E,$0B,$80,$07,$02,$50,$00,$00,$55,$00 ; Monster ID #$05: Wild Mouse
.byte $19,$00,$05,$0F,$14,$0F,$0A,$5B,$0F,$00,$CC,$CC,$0C,$CC,$00 ; Monster ID #$06: Healer
.byte $0C,$20,$06,$06,$08,$12,$0A,$00,$07,$00,$00,$00,$00,$00,$00 ; Monster ID #$07: Ghost Mouse
.byte $0D,$10,$04,$08,$09,$10,$0D,$08,$07,$00,$00,$00,$20,$2E,$80 ; Monster ID #$08: Babble
.byte $0C,$00,$02,$04,$08,$13,$0D,$50,$0F,$01,$00,$C0,$00,$CC,$C4 ; Monster ID #$09: Army Ant
.byte $0F,$00,$0A,$0A,$0B,$11,$0B,$40,$08,$01,$56,$06,$06,$05,$00 ; Monster ID #$0A: Magician
.byte $10,$20,$05,$07,$0F,$13,$0B,$80,$0F,$02,$50,$00,$00,$5E,$80 ; Monster ID #$0B: Big Rat
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L6400-L6450ldy #$00
lda ($B5), y
sta $0161 ; current monster ID
jsr B04_9EDC ; given an index + 1 (in A) into the array of enemy stat structures at $B7F5, set $BB-$BC to the address of the corresponding item inside that structure
ldx $A7
cpx #$77
beq B04_A73E
ldy #$09
lda ($BB), y
rol
rol
rol
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L9779-L9863; monster drop rates/items
; indexed data load target (from $97A8)
DropRates:
.byte $FC ; Monster ID #$01: Slime; 1/128 chance for #$3C: Medical Herb
.byte $BC ; Monster ID #$02: Big Slug; 1/32 chance for #$3C: Medical Herb
.byte $3C ; Monster ID #$03: Iron Ant; 1/8 chance for #$3C: Medical Herb
.byte $85 ; Monster ID #$04: Drakee; 1/32 chance for #$05: Club
.byte $3C ; Monster ID #$05: Wild Mouse; 1/8 chance for #$3C: Medical Herb
.byte $B3 ; Monster ID #$06: Healer; 1/32 chance for #$33: Lottery Ticket
.byte $51 ; Monster ID #$07: Ghost Mouse; 1/16 chance for #$11: Clothes
.byte $46 ; Monster ID #$08: Babble; 1/16 chance for #$06: Copper Sword
.byte $7C ; Monster ID #$09: Army Ant; 1/16 chance for #$3C: Medical Herb
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3518-L3580ldx #$02 ; otherwise Moonbrooke has to be alive, right?
B04_979C:
stx $A8
lda map_id
cmp #$04 ; guaranteed drop; #$04 = both Item ID #$04: Staff of Thunder and Map ID #$04: Midenhall B1
beq B04_97D9
ldx $0161 ; current monster ID
dex ; monster IDs start at 1, drop list starts at 0
lda DropRates, x ; monster drop rates/items
bne B04_97B0 ; if monster has a drop, see if you get it
jmp B04_986A ; otherwise, on with the show...
B04_97B0:
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3461-L3466jsr B0F_C595
lda $0161 ; current monster ID
cmp #$51 ; monster #$51 = Hargon
bcc B04_9768 ; if you beat anything less than Hargon or Malroth, go see if you got an item dropdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3484-L3495B04_9777:
lda $0600, x ; Midenhall inventory item 1 (| #$40 if equipped)
beq B04_9784 ; if you have an empty slot, maybe you'll get an item drop
inx ; otherwise get ready to check the next slot
cpx $A3 ; max possible inventory offset based on current party
bcc B04_9777 ; if there are more slots to check, check them
jmp B04_986A ; if you get here, you have a full inventory; no item drop for you!dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L6441-L6452ldy #$02
lda ($BB), y
clc
adc $06E6
sta $06E6
lda #$00
adc $06EC
sta $06EC
bcc B04_A73E
lda #$FF
sta $06E6
sta $06ECdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3584-L3591B04_97DD:
lda $0600, x ; Midenhall inventory item 1 (| #$40 if equipped)
and #$3F ; pick out the base item, don't care whether it's equipped or not
cmp $A4 ; do you already have one of these items?
beq B04_984A ; if yes, go see if it's one you're allowed to get another copy of anywaydq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3644-L3650lda #$65 ; String ID #$0105: Seeing a treasure chest, [name] opened it.[wait][end-FC]
jsr B04_9CCA ; for A < #$60, display string ID specified by A; for A >= #$60, display string ID specified by A + #$A0
lda $A4 ; dropped item
beq B04_9864 ; branch if no dropped itemdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3679-L3748B04_984A:
cmp #$33 ; Item ID #$33: Lottery Ticket
beq B04_97EB ; allowed to keep duplicates
cmp #$34 ; Item ID #$34: Fairy Water
beq B04_97EB ; allowed to keep duplicates
cmp #$35 ; Item ID #$35: Wing of the Wyvern
beq B04_97EB ; allowed to keep duplicates
cmp #$3B ; Item ID #$3B: Antidote Herb
beq B04_97EB ; allowed to keep duplicates
cmp #$3C ; Item ID #$3C: Medical Herb
beq B04_97EB ; allowed to keep duplicates
lda #$00 ; otherwise, not allowed to keep the dropped item :(
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L5290-L5354B04_A05B:
lda #$00
sta $9C
; 16-bit multiplication: ($99-$9A) = ($99-$9A) * ($9B-$9C), overflow in $9E, copy of ($99-$9A) in ($A1-$9D)
B04_A05F:
lda #$00 ; initialize vars to #$00
sta $9D ; result byte 1
sta $9E ; result byte 2
sta $A1 ; result byte 0
sta $A2 ; multiplicand byte 2
lda $9B ; original multiplicant byte 0
sta $9F ; current multiplicand byte 0
…Checked by claude, 2026-10-28 — read every row of the stats table and of DropRates at the pinned commit (values parsed from the lines quoted), the code that adds a kill's experience (byte 3, plus the high two bits of byte 9 then byte 8 as the high byte) and gold (byte 2), and the drop code's four chances, and the code that sums the fight's gold and awards itRevised after a check by a second AI model, 2026-10-28.Revised after a check by a second AI model, 2026-10-28.Names are the disassembly's comments. The gold column is byte 2, which the kill code adds to the fight's gold total; the disassembly calls it "Max Gold dropped", and the award code (bank 4 lines 3704-3748) cuts it as the statement says before adding it to the party's gold, which it caps at 65,535. The items a party may hold more than one of are the Lottery Ticket, Fairy Water, Wing of the Wyvern, Antidote Herb, and Medical Herb (lines 3679-3703). The doubling is a 16-bit shift, so a total of 32,768 or more would lose its top bit. Bytes 7-14 are left as bytes; the disassembly reads them as an attack-probability list, Sleep, spell-damage, Defeat, Stopspell, Defense and Surround resistances, eight attack commands, and alternate-command bits. The comments in the drop table name the same monster IDs as the stats rows. The experience column is computed: byte 3, plus 256 times the top two bits of byte 8, plus 1024 times the top two bits of byte 9, as the kill code at bank 4 lines 6409-6421 assembles it. Hargon's drop byte (line 9862) names a Mysterious Hat at 1/128, but the code at lines 3461-3466 never reaches the table for monsters $51 and up, and that line's own comment says so. The multiply the award calls (B04_A05B, bank 4 lines 5290-5354) leaves the product's three bytes in $A1, $9D, and $9E; the award subtracts $9D-$9E, the product's top two bytes, so the cut is the product ÷ 256.
The experience table stores, for each hero and level, the experience gained since the last level: Midenhall to level 50, Cannock to 45, and Moonbrooke to 35, each ending at 1,000,000 in all. Moonbrooke's steps from level 30 are over 65,535, and the table stores them less 65,536. The level lookup adds the 65,536 back: from Moonbrooke's level-30 entry on, it adds 1 to the third byte of its running total at each level, so her levels still come at the totals shown. The experience it returns as needed for the next level keeps only the low two bytes of the difference, so while Moonbrooke needs 65,536 or more, the number comes out 65,536 short. dw2-tables/level-exp
src/us/prg/bank4.asm#L9426-L9560; EXP per level
; Exp needed for Midenhall
ExpNeeded:
; indexed data load target (from $9D61, $9D6D)
.word 12 ; Lv 2: (12 total)
.word 20 ; Lv 3: (32 total)
.word 40 ; Lv 4: (72 total)
.word 68 ; Lv 5: (140 total)
.word 140 ; Lv 6: (280 total)
.word 280 ; Lv 7: (560 total)
.word 440 ; Lv 8: (1000 total)
.word 800 ; Lv 9: (1800 total)
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L4622-L4721; per-hero offsets into required EXP lists
B04_9D40:
.byte $00,$62,$BA
; given hero ID in X and hero's current EXP in $0626-$0628, set $8F-$90 to EXP required to reach next level; return current level in A
B04_9D43:
lda B04_9D40, x ; per-hero offsets into required EXP lists
tax
lda #$00
sta $0629 ; current hero's required EXP, byte 0
sta $062A ; current hero's required EXP, byte 1
sta $062B ; current hero's required EXP, byte 2
lda #$01
…Checked by claude, 2026-10-28 — read every .word of ExpNeeded at the pinned commit (values parsed from the lines quoted); the totals are the disassembly's comments, which also mark Moonbrooke's levels 30-35 as having 65536 EXP pre-added; also the level lookup that sums it (B04_9D43)Revised after a check by a second AI model, 2026-10-28.Checked by a second AI model, 2026-10-28.The total column is the disassembly's running sum, from each line's comment; the stored column is the word itself. The lookup is B04_9D43 (bank 4 lines 4627-4721): it starts each hero at an offset into the table ($00, $62, $BA), sums words into a three-byte total, and adds 1 to the third byte from offset $F2, Moonbrooke's level 30, on (lines 4642-4670); it returns the difference's low two bytes in $8F-$90 (lines 4710-4719). Moonbrooke's steps from level 30 are 90,000 and 100,000, so the difference is never 131,072 or more.
Each hero's level-1 strength, agility, maximum HP, and maximum MP, then each level's gains, two nybbles a byte: Midenhall to level 50, Cannock to 45, Moonbrooke to 35. Midenhall's MP gain is 0 at every level. dw2-tables/level-stats
src/us/prg/bank4.asm#L9562-L9566Starting_Stats:
;STR, AGI, Max Hp, Max Mp
.byte 5, 4,28,$00 ; Midenhall
.byte 4, 4,31,$06 ; Cannock
.byte 2,22,32,$1C ; Moonbrookedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L9568-L9697; level up stat nybbles (STR/AGI, HP/MP)
.define levelnybble(xstr, xagi, xhp, xmp) .byte (xstr << 4) | xagi, (xhp << 4) | xmp
LevelStatUps:
levelnybble 2, 1, 9, 0 ; Midenhall Lv 2
levelnybble 0, 3, 3, 6 ; Cannock Lv 2
levelnybble 0, 4, 0, 0 ; Moonbrooke Lv 2
levelnybble 5, 2, 3, 0 ; Midenhall Lv 3
levelnybble 2, 2, 1, 4 ; Cannock Lv 3
levelnybble 0, 0, 5, 7 ; Moonbrooke Lv 3
levelnybble 5, 0, 8, 0 ; Midenhall Lv 4
levelnybble 1, 2, 3, 2 ; Cannock Lv 4
levelnybble 1, 2, 0, 9 ; Moonbrooke Lv 4
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L4923-L4944; process high nybble of level up data
B04_9E97:
lda LevelStatUps, x ; level up stat nybbles (STR/AGI, HP/MP)
ror ; shift high nybble down to low nybble
ror
ror
ror
; process low nybble of level up data
B04_9E9E:
and #$0F
sta $00A3, y ; stat gain for this level
clc
…Checked by claude, 2026-10-28 — read Starting_Stats and every levelnybble row of LevelStatUps at the pinned commit (values parsed from the lines quoted), and the routines that split each byte's nybbles into a level's gainsRevised after a check by a second AI model, 2026-10-28.Level-1 rows are starting values; the other rows are gains at that level. Levels are counted by row per hero; the disassembly's comment on line 9600 reads "Lv 111" for Moonbrooke's level 11.
The level at which Cannock and Moonbrooke learn each spell, eight battle and eight field slots each: Cannock learns Heal at 1 and Sacrifice at 28, Moonbrooke Healmore at 1 and Chance at 25. A learned-spell list gets one bit per slot, set when the hero's level is at least the slot's level; Midenhall has no list. The slot order is the code's: a field menu shows slot n on line n, and the battle menu shows slots 0, 4, 1, 5, 2, 6, 3, 7 on lines 1-8 (dw2-tables/spell-lists), so the battle list's Firebal, Heal, Stopspell, ... are slots 0, 4, 1, ... dw2-tables/spell-levels
src/us/prg/bank4.asm#L9699-L9736; levels for learning spells
SpellLevels:
; Cannock level for learning battle spells
.byte 3 ; Spell ID #$01: Firebal
.byte 8 ; Spell ID #$06: Stopspell
.byte 18 ; Spell ID #$03: Firebane
.byte 23 ; Spell ID #$04: Defeat
.byte 1 ; Spell ID #$09: Heal
.byte 14 ; Spell ID #$0B: Healmore
.byte 20 ; Spell ID #$0A: Increase
.byte 28 ; Spell ID #$0C: Sacrifice
; Cannock level for learning field spells
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L4900-L4918lda $A8 ; hero
beq B04_9E96 ; if Midenhall, then done
cmp #$02
ldx #$00 ; Cannock's spell learning list offset
bcc B04_9E8A ; if not Cannock, then Moonbrooke
ldx #$10 ; Moonbrooke's spell learning list offset
B04_9E8A:
jsr B04_9EAC ; update learned spell list
sta $0618, y ; Cannock's learned battle spell list
jsr B04_9EAC ; update learned spell list
sta $061A, y ; Cannock's learned field spell listdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L4945-L4972; update learned spell list
B04_9EAC:
lda $A9 ; current level
ldy #$08 ; 8 spells per battle/field list
B04_9EB0:
cmp SpellLevels, x ; levels for learning spells
bne B04_9EB7
dec $B3 ; update number of spells learned
B04_9EB7:
rol $99 ; $99 morphs into learned spell list, 1 bit per spell
inx ; increment spell list index
dey ; decrement number of spells left to check
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L9839-L9839.byte "Defence",$FFdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L11087-L11120lda #$80
sta $11
lda $60AC ; menu list index
ldx $609D ; menu function parameter
bne B0F_F35A ; branch if field spells
lsr
ldx #$88
stx $11
; control flow target (from $F353)
B0F_F35A:
tax
; control flow target (from $F360)
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L8948-L8966; Cannock battle spell list
BattleSpells:
.byte $01 ; Spell ID #$01: Firebal
.byte $09 ; Spell ID #$09: Heal
.byte $06 ; Spell ID #$06: Stopspell
.byte $0B ; Spell ID #$0B: Healmore
.byte $03 ; Spell ID #$03: Firebane
.byte $0A ; Spell ID #$0A: Increase
.byte $04 ; Spell ID #$04: Defeat
.byte $0C ; Spell ID #$0C: Sacrifice
; Moonbrooke battle spell list
.byte $02 ; Spell ID #$02: Sleep
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L11147-L11160B0F_F392:
lda #$00
ldx $60AC ; menu list index
sta $60BA, x
lda #$FF
rts
; code -> data
; indexed data load target (from $F36F)
.byte $F0
.byte $0FCannock's and Moonbrooke's spell menus, eight lines each for battle and for the field: each line's spell, by the menu's spell lists in bank 6, and the learning slot whose bit shows it. A field menu shows slot n on line n. The battle menu interleaves: lines 1-8 show slots 0, 4, 1, 5, 2, 6, 3, 7, so the battle list's order (Firebal, Heal, Stopspell, ...) is the learning table's battle slots taken alternately from its two halves. Each hero's eighth field line holds no spell. CodeChecked by claude, 2026-10-28 — read SpellLevels at the pinned commit (values parsed from the lines quoted), the routine that builds each learned-spell list from it, and the battle menu's test of each line's learned bit (fixed bank lines 11087-11120) against the battle spell listRevised after a check by a second AI model, 2026-10-28.Revised after a check by a second AI model, 2026-10-28.Spell names are the disassembly's comments, slot by slot, and the menu code agrees with them: the field menus read the slots in order, and the battle menus read slots 0, 4, 1, 5, 2, 6, 3, 7 for the lines of BattleSpells (Firebal, Heal, Stopspell, ...), which puts each battle spell on the slot its comment names. $FF slots (no spell) are left out. Defence is spelled as the game's spell-name list spells it (bank 6 line 9839). The battle menu's masks are the two bytes .byte $F0 and .byte $0F (fixed bank lines 11159-11160), read by lda $F39D, x (line 11118): they follow B0F_F392's eleven bytes of instructions ($F392-$F39C, lines 11147-11153), so they sit at $F39D.
Cannock's and Moonbrooke's spell menus, eight lines each for battle and for the field: each line's spell, by the menu's spell lists in bank 6, and the learning slot whose bit shows it. A field menu shows slot n on line n. The battle menu interleaves: lines 1-8 show slots 0, 4, 1, 5, 2, 6, 3, 7, so the battle list's order (Firebal, Heal, Stopspell, ...) is the learning table's battle slots taken alternately from its two halves. Each hero's eighth field line holds no spell. dw2-tables/spell-lists
src/us/prg/bank6.asm#L8928-L8966; Cannock field spell list
FieldSpells:
.byte $09 ; Spell ID #$09: Heal
.byte $10 ; Spell ID #$10: Antidote
.byte $14 ; Spell ID #$14: Return
.byte $12 ; Spell ID #$12: Outside
.byte $0B ; Spell ID #$0B: Healmore
.byte $16 ; Spell ID #$16: Stepguard
.byte $17 ; Spell ID #$17: Revive
.byte $00 ; Spell ID #$00: (no spell)
; Moonbrooke field spell list
.byte $0B ; Spell ID #$0B: Healmore
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L8869-L8893B06_AE30:
asl $4A ; convert hero ID - 1 to spell list start index; 8 spells per hero
asl $4A
asl $4A
; add list start offset to spell menu selection index
adc $4A
tax
lda FieldSpells, x ; Cannock field spell list
rts
; given hero ID - 1 in $4A and battle spell menu selection index in A, return spell ID in A
; from $0F:$F4AC via $8014
B06_AE3D:
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L11076-L11160lda $609D ; menu function parameter
asl ; A is either #$00 (battle spells) or #$01 (field spells), so this is either #$00 or #$02
adc $4A ; hero ID - 1
tax
lda $0618, x ; Cannock's learned battle spell list
sta $10 ; selected hero's learned spell list
lda #$80
sta $11
lda $60AC ; menu list index
ldx $609D ; menu function parameter
bne B0F_F35A ; branch if field spells
lsr
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L9818-L9851; Spell name list
SpellNames:
.byte "Firebal",$FF
.byte "Heal",$FF
.byte "Stopspell",$FF
.byte "Healmore",$FF
.byte "Firebane",$FF
.byte "Increase",$FF
.byte "Defeat",$FF
.byte "Sacrifice",$FF
.byte "Heal",$FF
.byte "Antidote",$FF
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L4945-L4972; update learned spell list
B04_9EAC:
lda $A9 ; current level
ldy #$08 ; 8 spells per battle/field list
B04_9EB0:
cmp SpellLevels, x ; levels for learning spells
bne B04_9EB7
dec $B3 ; update number of spells learned
B04_9EB7:
rol $99 ; $99 morphs into learned spell list, 1 bit per spell
inx ; increment spell list index
dey ; decrement number of spells left to check
…Checked by claude, 2026-10-28 — read the field and battle spell lists, the routines that index them by hero and menu line, the menu code that tests a line's learned bit and picks its name, the spell-name list, and the routine that builds the learned bitsChecked by a second AI model, 2026-10-28.The menu tests a line's bit in the hero's learned byte ($0618 + 2 × kind + hero, fixed bank lines 11076-11085): on a field line i it tests $80 shifted right i times; on a battle line it shifts $88 right by i/2 and keeps the high nibble on an even line and the low on an odd one ($F0 and $0F, lines 11159-11160). The learning routine rolls each slot's bit in from the bottom, so slot s ends at bit 7 − s. A line's name is the spell-name list's entry 16 × hero + 8 × kind + line, so the menu names a spell from its own list, not from the spell ID. Slot numbers are 0-7 within each kind, as in dw2-tables/spell-levels.
Dragon Warrior II's spell-ID-to-name table in bank 6: for each of spells $01-$17, the entry of the 32-name spell-name list that names it. The table is read at its own address minus one, so its first byte belongs to spell $01, not $00. Spell $11, a second Heal that no hero's menu lists, takes the same name as $09, Cannock's field Heal. dw2-tables/spell-name-index
src/us/prg/bank6.asm#L8895-L8926; given spell ID in A, set A to spell name index
B06_AE4A:
tax
lda SpellIDS-1, x
rts
; spell ID -> spell name index (built in offset from $AE4F)
SpellIDS:
.byte $00 ; Spell ID #$00: (no spell)
.byte $10 ; Spell ID #$01: Firebal
.byte $04 ; Spell ID #$02: Sleep
.byte $06 ; Spell ID #$03: Firebane
.byte $12 ; Spell ID #$04: Defeat
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L9818-L9851; Spell name list
SpellNames:
.byte "Firebal",$FF
.byte "Heal",$FF
.byte "Stopspell",$FF
.byte "Healmore",$FF
.byte "Firebane",$FF
.byte "Increase",$FF
.byte "Defeat",$FF
.byte "Sacrifice",$FF
.byte "Heal",$FF
.byte "Antidote",$FF
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L47-L47.addr B06_AE4AChecked by claude, 2026-10-28 — read the table, the routine that reads it at SpellIDS-1, its listing in bank 6's entry table, and the spell-name list it indexesChecked by a second AI model, 2026-10-28.The disassembly's comments on the table sit one line above the bytes they describe, because the read is lda SpellIDS-1, x: its line for "Spell ID #$00" holds spell $01's entry, and the last byte (line 8926, no comment) is spell $17's, Revive. Read that way, every spell the menus list gets its own name, as the spell column shows; read the comments' way, Firebal would be named Sleep. Names come from the spell-name list (bank 6 lines 9820-9851): entries 0-7 are Cannock's battle spells, 8-15 his field spells, 16-23 Moonbrooke's battle spells, 24-31 her field spells.
Dragon Warrior II's save points: 12 entries of four bytes (map, X, Y, and a fourth byte whose meaning isn't traced), from which the game places the party by the last save point's ID. Entries 0-6 are the seven places where the game saves, each set by the code that calls the save routine there (Midenhall's also on two other paths): Midenhall 2F, Cannock, Tantegel, Osterfair, Beran, the Rhone Shrine, and Hamlin. Entry 7, a second spot in Midenhall 2F, is set for one placement and replaced by entry 0 right after it; entries 8-11 (Moonbrooke, Midenhall 1F, and two world-map spots) are set only by bank 7's prologue. dw2-tables/save-points
src/us/prg/constant.asm#L1626-L1657; control flow target (from $C81F, $D2D8, $FF5A)
lda #$FF
sta $44 ; non-saved event status (#$00 = event start, #$01 = Lianport Gremlins defeated, #$02 = met with Lianport grandfather/have no friends at Shrine SW of Cannock, #$03 = King Midenhall moved to stairs, #$04 = King Midenhall moved down stairs, #$05 = King Midenhall spoke on Midenhall 1F, #$0B = Lighthouse Wizard 7F, #$1B Lighthouse Wizard 2F spoke, #$64 = Hargon dead, #$FF = event end)
lda $48 ; last save point ID
asl
asl
tay
lda $C7EF, y ; save point map ID
sta $31 ; current map ID
lda $C7F0, y ; save point X-pos
sta $16 ; current map X-pos (1)
sta $28 ; current map X-pos (2)
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L1684-L1703; save point map ID
; indexed data load target (from $C7B8)
; save point X-pos
.byte $02
; indexed data load target (from $C7BD)
; save point Y-pos
.byte $03
; indexed data load target (from $C7C6)
; save point ???
.byte $04
; indexed data load target (from $C7CF)
; indirect data load target
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L1450-L1456lda #$07
sta $48 ; last save point ID
jsr $C81F
lda #$00 ; Save Point ID #$00: Midenhall 2F
sta $48 ; last save point IDdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L2985-L2989lda #$00 ; Save Point ID #$00: Midenhall 2F
sta $48 ; last save point ID
jsr B06_A35D ; save game handlerdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L3005-L3005lda #$00 ; Save Point ID #$00: Midenhall 2Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L3191-L3195lda #$01 ; Save Point ID #$01: Cannock
sta $48 ; last save point ID
jsr B06_A35D ; save game handlerdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L3525-L3525lda #$02 ; Save Point ID #$02: Tantegeldq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L3617-L3617lda #$03 ; Save Point ID #$03: Osterfairdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L4038-L4044; handler for dialogue ID #$C0: Wizard in Map ID #$15: Beran
B06_93E1:
lda #$04 ; Save Point ID #$04: Beran
; update save point $48 to A, run through the whole save point sequence
B06_93E3:
sta $48 ; last save point IDdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L4102-L4102lda #$05 ; Save Point ID #$05: Rhone Shrinedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L347-L347lda #$06 ; Save Point ID #$06: Hamlindq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L395-L396lda #$08
sta $48 ; last save point IDdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1036-L1037lda #$0A
sta $48 ; last save point IDdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1104-L1105lda #$0B
sta $48 ; last save point IDdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1140-L1141lda #$09
sta $48 ; last save point IDdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank0.asm#L489-L489.byte $01 ; Map ID #$01: World Mapdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1746-L1746; Map ID #$02: Midenhall 2Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1826-L1826; Map ID #$03: Midenhall 1Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1768-L1768; Map ID #$06: Cannockdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1785-L1785; Map ID #$07: Hamlindq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1819-L1819; Map ID #$09: Moonbrookedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1867-L1867; Map ID #$0C: Tantegeldq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1914-L1914; Map ID #$0F: Osterfairdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1986-L1986; Map ID #$15: Berandq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L2078-L2078; Map ID #$1F: Rhone ShrineChecked by claude, 2026-10-28 — read the table, the routine that places the party from it, and every store of a save point ID to $48 in every bankRevised after a check by a second AI model, 2026-10-28.Map names are the disassembly's map comments. X and Y are map squares; the routine multiplies them by 16 for pixels (fixed bank lines 1664-1677). The fourth byte goes to $45, which the code also sets when the party enters a map in other ways; bank 6 line 10626 tests it for $FF, 0, and 1, and its meaning isn't traced here. The routine is called from $C81F, $D2D8, and $FF5A (line 1626).
Hargon's minions: three fixed fights in Hargon's Castle, one each on 4F, 5F, and 6F (Atlas, Bazuzu, and Zarlox), each an entry of five bytes: map, X and Y in units of two squares, a status bit, and a fixed encounter. Stepping onto the spot starts the fight unless the minion's bit is already set; the bit is set after the fight unless the fight ends in an outcome not traced here ($FC). The check is skipped on Osterfair's map. dw2-tables/hargons-minions
Value: No. 0, 1, 2 · map $46 Hargon's Castle 4F, $47 Hargon's Castle 5F, $48 Hargon's Castle 6F · X ÷ 2 6, 1, 11 · Y ÷ 2 5, 1, 3 · Status bit $04, $08, $10 · Fixed encounter 8, 9, 10 · monster Atlas, Bazuzu, Zarlox
Codedq2: Disassembly of NES Dragon Warrior II ·src/us/prg/constant.asm#L1792-L1811; Hargon's minion map ID
; indexed data load target (from $C8AF)
; Hargon's minion X-pos
.byte $46
; indexed data load target (from $C8B7)
; indirect data load target
; Hargon's minion Y-pos
.byte $06
; indexed data load target (from $C8BF)
; Hargon's minion $05FD value
.byte $05
; indexed data load target (from $C8C4)
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L1858-L1910lda $31 ; current map ID
cmp #$0F ; Map ID #$0F: Osterfair
beq B0F_C90B
ldy #$00
; control flow target (from $C8EA)
B0F_C8AF:
cmp $C870, y ; Hargon's minion map ID
bne B0F_C8E3
lda $16 ; current map X-pos (1)
lsr
cmp $C871, y ; Hargon's minion X-pos
bne B0F_C8EC
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L682-L684; Fixed Encounters (group 1 Monster ID, group 1 count, group 2 Monster ID, group 2 count)
B04_8346:
.byte $FF,$00,$1E,$02 ; 2 Gremlins (Lianport)dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L2395-L2395; Map ID #$46: Hargon's Castle 4Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L692-L692.byte $FF,$00,$4E,$01 ; 1 Atlas (Hargon's Castle)dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L2403-L2403; Map ID #$47: Hargon's Castle 5Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L693-L693.byte $FF,$00,$4F,$01 ; 1 Bazuzu (Hargon's Castle)dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L2411-L2411; Map ID #$48: Hargon's Castle 6Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L694-L694.byte $FF,$00,$50,$01 ; 1 Zarlox (Hargon's Castle)Checked by claude, 2026-10-28 — read the table and the routine that walks it at stride five after each step, and the fixed-encounter table it indexesRevised after a check by a second AI model, 2026-10-28.The routine compares the party's map X and Y, each halved, with the entry's (fixed bank lines 1869-1880), so a spot is a 2-by-2 block of squares. The status bits are in $D1, which the disassembly says also holds the Hamlin Waterway Gremlins' and the Evil Clown's bits. Map and monster names are the disassembly's comments; encounter numbers are those of dw2-tables/fixed-encounters. What outcome $FC means isn't traced here.
The crest-name list in bank 6 holds three names, Sun Crest, Water Crest, and Life Crest, for the message when a treasure gives a crest. The code picks by crest ID: $43 gets Water Crest, $40 Sun Crest, and any other crest ID ($41, $42, or $44) Life Crest. dw2-tables/crest-names
src/us/prg/bank6.asm#L6410-L6414; Crest Names
CrestNames:
.byte "Sun Crest",$FA
.byte "Water Crest",$FA
.byte "Life Crest",$FAdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L5811-L5852B06_9C05:
lda $96 ; temp storage for item/spell/type/etc. IDs; item ID
cmp #$40 ; Crest ID #$40: Sun Crest
bcc B06_9C62 ; find a regular item
cmp #$45 ; Chest Gold ID #$45: 15 - 30 G
bcs B06_9C37 ; generate randomized gold amount for treasure ID in A
lda $96 ; temp storage for item/spell/type/etc. IDs; ... yup, still item ID
cmp #$43 ; Crest ID #$43: Water Crest
bne B06_9C19
ldy #$0A ; offset from CrestNames for start of "Water Crest"
bne B06_9C23
B06_9C19:
…Checked by claude, 2026-10-28 — read the list and the treasure code that picks a name from it by crest IDChecked by a second AI model, 2026-10-28.Each name ends in $FA, and the code copies from an offset into the list (bank 6 lines 5824-5852). The disassembly's comment at line 5833 notes that $41 and $42 would print Life Crest too; no treasure giving those IDs is traced here.
Cannock's and Moonbrooke's names: two lists of eight 8-byte names in bank 6, picked from the name the player gives the hero of Midenhall. The game adds up that name's eight bytes, each addition's carry going into the next, and Cannock's name is entry (sum AND 7), Moonbrooke's entry (sum AND $38) ÷ 8. dw2-tables/hero-names
src/us/prg/bank6.asm#L8712-L8732; Prince of Cannock Names
PrinceNames:
.byte "Bran "
.byte "Glynn "
.byte "Talint "
.byte "Numor "
.byte "Lars "
.byte "Orfeo "
.byte "Artho "
.byte "Esgar "
; Princess of Moonbrooke Names
PrincessNames:
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L8657-L8710B06_ACEB:
lda #$00
ldx #$03
clc
B06_ACF0:
adc $7009, x ; Midenhall name bytes 0-3, SRAM buffer; first 4 characters of Midenhall's name
adc $7063, x ; party names, bytes 4-7, SRAM buffer; last 4 characters of Midenhall's name
dex
bpl B06_ACF0
pha
and #$07 ; Cannock's name is based on bits 0-2 of the sum of Midenhall's name
asl ; << 3 since names are 8 bytes long
…Checked by claude, 2026-10-28 — read both lists and the routine that sums Midenhall's name and copies the two names it picksChecked by a second AI model, 2026-10-28.The routine masks the sum with $38 and uses it as the byte offset directly (bank 6 lines 8692-8698), so Moonbrooke's entry comes from bits 3-5 of the sum; the disassembly's comment says bits 3-6. Names are padded with spaces to eight bytes, and the code copies them in two halves of four.
The six bytes after the name lists in bank 6 spell DQ2USA in ASCII: a battery-save signature. The game compares each byte with three copies in the cartridge's RAM; a byte that matches none of them makes it clear the save data and write the signature to all three copies. dw2-tables/save-signature
src/us/prg/bank6.asm#L8734-L8735B06_ADB9:
.byte $44,$51,$32,$55,$53,$41dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L7817-L7871B06_A8CA:
ldx #$05
B06_A8CC:
lda B06_ADB9, x
cmp $75FA, x
beq B06_A8DE
cmp $6001, x
beq B06_A8DE
cmp $61A7, x
bne B06_A8E3
B06_A8DE:
dex
…Checked by claude, 2026-10-28 — read the six bytes and the routine that checks and rewrites themChecked by a second AI model, 2026-10-28.The copies are at $75FA, $6001, and $61A7; the clearing loop zeroes 13 blocks of $73 bytes and marks every save slot empty (bank 6 lines 7832-7862). The disassembly leaves the bytes unnamed (B06_ADB9).
The equipment table gives the power of each of the 35 weapons, armors, shields, and helmets (item IDs 1-35): from 2 (Bamboo Stick, Clothes) to 93 (Sword of Destruction). dw2-tables/equipment
src/us/prg/bank4.asm#L9738-L9777; equipment power list
EquipmentStats:
.byte 2 ; Item ID #$01: Bamboo Stick
.byte 12 ; Item ID #$02: Magic Knife
.byte 8 ; Item ID #$03: Wizard’s Wand
.byte 15 ; Item ID #$04: Staff of Thunder
.byte 8 ; Item ID #$05: Club
.byte 10 ; Item ID #$06: Copper Sword
.byte 15 ; Item ID #$07: Chain Sickle
.byte 20 ; Item ID #$08: Iron Spear
.byte 5 ; Item ID #$09: Falcon Sword
.byte 30 ; Item ID #$0A: Broad Sword
…Checked by claude, 2026-10-28 — read every row of EquipmentStats at the pinned commit (values parsed from the lines quoted)Revised after a check by a second AI model, 2026-10-28.Names are the disassembly's comments.
Each of the 64 item IDs has a price, and each piece of equipment a bit field of who can equip it ($01 Midenhall, $02 Cannock, $04 Moonbrooke). The Staff of Thunder is priced at 26,000 and the Sword of Erdrick at 2. dw2-tables/items
src/us/prg/bank6.asm#L6452-L6521; Item Prices
ItemPrices:
.word $00 ; Item ID #$00: (no item)
.word $14 ; Item ID #$01: Bamboo Stick
.word $C8 ; Item ID #$02: Magic Knife
.word $09C4 ; Item ID #$03: Wizard’s Wand
.word $6590 ; Item ID #$04: Staff of Thunder
.word $3C ; Item ID #$05: Club
.word $64 ; Item ID #$06: Copper Sword
.word $0186 ; Item ID #$07: Chain Sickle
.word $0302 ; Item ID #$08: Iron Spear
.word $61A8 ; Item ID #$09: Falcon Sword
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L7169-L7212; Bit fields controlling who can equip each item
; #$01 = Midenhall, #$02 = Cannock, #$04 = Moonbrooke
.define equipbytes(miden,cann,moon) .byte (moon << 2) | (cann << 1) | miden
EquipFields:
equipbytes 0, 0, 0 ; Item ID #$00: (no item)
equipbytes 1, 1, 1 ; Item ID #$01: Bamboo Stick
equipbytes 1, 1, 1 ; Item ID #$02: Magic Knife
equipbytes 1, 1, 1 ; Item ID #$03: Wizard’s Wand
equipbytes 1, 1, 1 ; Item ID #$04: Staff of Thunder
equipbytes 1, 1, 0 ; Item ID #$05: Club
equipbytes 1, 1, 0 ; Item ID #$06: Copper Sword
equipbytes 1, 1, 0 ; Item ID #$07: Chain Sickle
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L9716-L9721ItemNames2_1:
.byte "Mysterious",$FF
.byte "Iron",$FF
.byte "Helmet of",$FF
.byte "Token of",$FF
.byte "Tresures",$FFdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L9746-L9746.byte "Perilous",$FFChecked by claude, 2026-10-28 — read every row of ItemPrices and EquipFields at the pinned commit (values parsed from the lines quoted)Revised after a check by a second AI model, 2026-10-28.Names are the disassembly's comments. Items past the equipment have no EquipFields row; their cells are empty. The price table's comments name $25 "Tresures" and $3E "Perilous", and the item-name list in bank 6 has both spellings (lines 9721 and 9746).
Each spell's MP cost in a fight, with the Mysterious Hat, and on the field, and its base target in a fight. Increase, Sacrifice, Explodet, and Chance can't be cast on the field and have no field cost. In a fight Chance costs the most, 15 (12 with the hat); Revive costs 15 on the field. dw2-tables/spells
src/us/prg/bank4.asm#L8812-L8843; MP Cost in Battle (normal)
.byte $02 ; Spell ID #$01: Firebal
.byte $02 ; Spell ID #$02: Sleep
.byte $04 ; Spell ID #$03: Firebane
.byte $04 ; Spell ID #$04: Defeat
.byte $04 ; Spell ID #$05: Infernos
.byte $03 ; Spell ID #$06: Stopspell
.byte $02 ; Spell ID #$07: Surround
.byte $02 ; Spell ID #$08: Defence
.byte $03 ; Spell ID #$09: Heal
.byte $02 ; Spell ID #$0A: Increase
.byte $05 ; Spell ID #$0B: Healmore
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L8845-L8861; Base Target for Spells - (00: Open Cast) (01: Select Enemy) (02: Select Ally)
B04_B518:
.byte $01 ; Spell ID #$01: Firebal
.byte $01 ; Spell ID #$02: Sleep
.byte $00 ; Spell ID #$03: Firebane
.byte $01 ; Spell ID #$04: Defeat
.byte $01 ; Spell ID #$05: Infernos
.byte $01 ; Spell ID #$06: Stopspell
.byte $01 ; Spell ID #$07: Surround
.byte $00 ; Spell ID #$08: Defence
.byte $02 ; Spell ID #$09: Heal
.byte $00 ; Spell ID #$0A: Increase
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L2507-L2523; MP Cost for Spells on Field (referenced as B06_8CE6-9, x)
B06_8CE6:
.byte $03 ; Spell ID #$09: Heal
.byte $00 ; Spell ID #$0A: Increase
.byte $05 ; Spell ID #$0B: Healmore
.byte $00 ; Spell ID #$0C: Sacrifice
.byte $08 ; Spell ID #$0D: Healall
.byte $00 ; Spell ID #$0E: Explodet
.byte $00 ; Spell ID #$0F: Chance
.byte $03 ; Spell ID #$10: Antidote
.byte $02 ; Spell ID #$11: Heal (not used by heroes)
.byte $06 ; Spell ID #$12: Outside
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L9839-L9839.byte "Defence",$FFdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L8928-L8947; Cannock field spell list
FieldSpells:
.byte $09 ; Spell ID #$09: Heal
.byte $10 ; Spell ID #$10: Antidote
.byte $14 ; Spell ID #$14: Return
.byte $12 ; Spell ID #$12: Outside
.byte $0B ; Spell ID #$0B: Healmore
.byte $16 ; Spell ID #$16: Stepguard
.byte $17 ; Spell ID #$17: Revive
.byte $00 ; Spell ID #$00: (no spell)
; Moonbrooke field spell list
.byte $0B ; Spell ID #$0B: Healmore
…Checked by claude, 2026-10-28 — read the three bank-4 tables and the bank-6 field cost table at the pinned commit (values parsed from the lines quoted)Revised after a check by a second AI model, 2026-10-28.Names are the disassembly's comments. The target key is the disassembly's (00 open, 01 select enemy, 02 select ally); Chance's 03 isn't in it. The field cost table starts at spell 9, Heal, and has a row for spell $11, which the disassembly calls Heal "not used by heroes". The field cost table holds 0 for Increase, Sacrifice, Explodet, Chance; neither hero's field spell list (bank 6 lines 8928-8947) has them, so they can't be cast outside a fight, and their field cost is left empty.
The wares of 8 weapon-and-armor shops and 11 tool shops, six slots each; an empty slot is 0. dw2-tables/shop-wares
src/us/prg/bank6.asm#L6428-L6450; Weapon Shop inventories
ShopInventories:
.byte $05,$06,$02,$07,$16,$1C ; Shop ID #00, Weapons/Armor, Map ID #$05: Leftwyne
.byte $07,$08,$0A,$16,$19,$1E ; Shop ID #01, Weapons/Armor, Map ID #$07: Hamlin
.byte $02,$0A,$03,$19,$12,$1E ; Shop ID #02, Weapons/Armor, Map ID #$0B: Lianport
.byte $0A,$0B,$03,$12,$1E,$22 ; Shop ID #03, Weapons/Armor, Map ID #$0C: Tantegel
.byte $0A,$0B,$0D,$12,$18,$22 ; Shop ID #04, Weapons/Armor, Map ID #$0F: Osterfair
.byte $03,$09,$0D,$18,$1D,$22 ; Shop ID #05, Weapons/Armor, Map ID #$11: Tuhn
.byte $0B,$0D,$0E,$14,$1D,$22 ; Shop ID #06, Weapons/Armor, Map ID #$14: Wellgarth Underground
.byte $0B,$03,$0D,$1E,$1D,$22 ; Shop ID #07, Weapons/Armor, Map ID #$15: Beran
; Tool Shop inventories
.byte $3C,$3B,$00,$00,$00,$00 ; Shop ID #$00, Items, Map IDs #$00/#$03: Fake Midenhall/Midenhall 1F
…Each of the 64 item IDs has a price, and each piece of equipment a bit field of who can equip it ($01 Midenhall, $02 Cannock, $04 Moonbrooke). The Staff of Thunder is priced at 26,000 and the Sword of Erdrick at 2. Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L6454-L6454.word $00 ; Item ID #$00: (no item)Checked by claude, 2026-10-28 — read every row of ShopInventories at the pinned commit (values parsed from the lines quoted, with names from ItemPrices' comments)Revised after a check by a second AI model, 2026-10-28.Places are the disassembly's comments. Item names come from the item price table's comments, by ID. ID 0 is "(no item)" in the price table's comments, an empty slot.
Each inn's price per party member, from 2 (Tantegel) to 40 (Tuhn, and Wellgarth Underground); a tenth entry, 30, has no inn named. dw2-tables/inn-prices
src/us/prg/bank6.asm#L6416-L6427; Inn prices per party member
InnPrices:
.byte 4 ; Inn ID #$00, Map IDs #$00/#$03: Fake Midenhall/Midenhall 1F
.byte 6 ; Inn ID #$01, Map ID #$05: Leftwyne
.byte 8 ; Inn ID #$02, Map ID #$06: Cannock
.byte 12 ; Inn ID #$03, Map ID #$07: Hamlin
.byte 20 ; Inn ID #$04, Map ID #$0B: Lianport
.byte 2 ; Inn ID #$05, Map ID #$0C: Tantegel
.byte 25 ; Inn ID #$06, Map ID #$0F: Osterfair
.byte 30 ; Inn ID #$07, Map ID #$10: Zahan
.byte 40 ; Inn ID #$08, Map ID #$11: Tuhn / Map ID #$14: Wellgarth Underground
.byte 30 ; ?Checked by claude, 2026-10-28 — read every row of InnPrices at the pinned commit (values parsed from the lines quoted)Checked by a second AI model, 2026-10-28.Places are the disassembly's comments; the last row's comment is "?".
The game's 61 listed treasures, each a map, X, Y, and contents: an item, a crest, a trap, nothing, or gold. IDs $45-$51 are gold amounts, each a base amount plus a random part. dw2-tables/treasure
src/us/prg/bank6.asm#L6287-L6355; Treasure List 1 (map ID, X-pos, Y-pos, item ID)
TreasureList1:
.byte $03,$0E,$02,$06 ; Item ID #$06: Copper Sword (Midenhall Castle)
.byte $03,$13,$0E,$35 ; Item ID #$35: Wing of Wyvern (Midenhall Castle)
.byte $03,$14,$0E,$3C ; Item ID #$3C: Medical Herb (Midenhall Castle)
.byte $03,$13,$0F,$47 ; Item ID #$47: 50 - 113 G (Midenhall Castle)
.byte $03,$14,$0F,$00 ; Item ID #$00: Empty (Midenhall Castle)
.byte $03,$15,$0F,$24 ; Item ID #$24: Token of Erdrick (Midenhall Castle)
.byte $06,$0A,$0A,$20 ; Item ID #$20: Shield of Erdrick (Cannock Castle)
.byte $0F,$06,$14,$1A ; Item ID #$1A: Armor of Gaia (Osterfair)
.byte $0F,$06,$16,$02 ; Item ID #$02: Magic Knife (Osterfair)
.byte $10,$02,$02,$2D ; Item ID #$2D: Magic Loom (Zahan)
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L6357-L6366; Treasure List 2 (map ID, X-pos, Y-pos, item ID)
TreasureList2:
.byte $01,$92,$6D,$2B ; Item ID #$2B: Mirror of Ra (Swamp SE of Hamlin)
.byte $01,$1E,$FC,$25 ; Item ID #$25: Tresures (Ocean NW of Tantegal)
.byte $01,$BB,$DD,$29 ; Item ID #$29: Leaf of World Tree (Island E of Wellgarth)
.byte $08,$05,$01,$43 ; Item ID #$43: Water Crest (Hamlin)
.byte $1E,$08,$00,$40 ; Item ID #$40: Sun Crest (Monolith E of Wellgarth)
.byte $10,$12,$04,$37 ; Item ID #$37: Golden Key location #1 (Zahan)
.byte $10,$16,$08,$37 ; Item ID #$37: Golden Key location #2 (Zahan)
.byte $FF ; end of Treasure List 2dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L6392-L6408; random treasure chest gold amount
; leftmost word is the base amount.
; rightmost byte is the amount to increase randomly.
RandomChestGold:
.byte $0F,$00,$0F ; Chest Gold ID #$45: 15 - 30 G
.byte $1F,$00,$0F ; Chest Gold ID #$46: 31 - 46 G
.byte $32,$00,$3F ; Chest Gold ID #$47: 50 - 113 G
.byte $33,$00,$1F ; Chest Gold ID #$48: 51 - 82 G
.byte $64,$00,$3F ; Chest Gold ID #$49: 100 - 163 G
.byte $31,$02,$3F ; Chest Gold ID #$4A: 561 - 624 G
.byte $6F,$00,$1F ; Chest Gold ID #$4B: 111 - 142 G
.byte $29,$00,$0F ; Chest Gold ID #$4C: 41 - 56 G
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L5709-L5709cmp #$FF ; Item ID #$FF: Trap!dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank0.asm#L422-L495 — Map ID comments for maps $2B-$6C, $01, $08, $0B, $10, and $16-$18.byte $80 ; Map ID #$2B: Cave to Hamlin; Cave tileset #1
.byte $40 ; Map ID #$2C: Lake Cave B1; Cave tileset #1
.byte $40 ; Map ID #$2D: Lake Cave B2; Cave tileset #1
.byte $60 ; Map ID #$2E: Sea Cave B1; Cave tileset #1 + Cave lava tileset
.byte $60 ; Map ID #$2F: Sea Cave B2; Cave tileset #1 + Cave lava tileset
.byte $60 ; Map ID #$30: Sea Cave B3-1; Cave tileset #1 + Cave lava tileset
.byte $60 ; Map ID #$31: Sea Cave B3-2; Cave tileset #1 + Cave lava tileset
.byte $60 ; Map ID #$32: Sea Cave B4; Cave tileset #1 + Cave lava tileset
.byte $60 ; Map ID #$33: Sea Cave B5; Cave tileset #1 + Cave lava tileset
.byte $80 ; Map ID #$34: Charlock Castle B1/B2; Cave tileset #1
.byte $80 ; Map ID #$35: Charlock Castle B3/B4-1/B5-1; Cave tileset #1
.byte $80 ; Map ID #$36: Charlock Castle B4-2/B5-2/B6; Cave tileset #1
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1826-L1826; Map ID #$03: Midenhall 1Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1768-L1768; Map ID #$06: Cannockdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1914-L1914; Map ID #$0F: Osterfairdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L2071-L2071; Map ID #$1E: Shrine NW of ZahanChecked by claude, 2026-10-28 — read every row of TreasureList1, TreasureList2, and RandomChestGold at the pinned commit (values parsed from the lines quoted)Revised after a check by a second AI model, 2026-10-28.Places are the disassembly's comments and map names come from its Map ID comments. List 2 holds the world-map finds, the Water and Sun Crests, and Zahan's Golden Key, which has two entries ("location #1" and "#2"); the Life Crest is in list 1. Item $FF is a trap (bank 6 line 5709 tests for it). Gold ranges are base to base plus the random byte, as the comments give them. The empty chest on Lighthouse 2F triggers the Star Crest battle, by its comment.
The per-terrain encounter rates, out of 255: 10 on grass, 4 at sea, 16 in forest, desert, and swamp, 25 on mountains, 8 in dungeons, 84 on the terrain the disassembly calls transitions, and 16 on a terrain the code sets only for maps $3D and $3E (the disassembly's Cave to Rhone 4F and 5F). The code also sends map $37 (Cave to Rhone B1) to the transitions terrain, so it uses 84, and Moonbrooke (map $09) to the dungeon terrain, so it uses 8. The overrides for maps $37, $3D, and $3E don't run when the check comes in on the transitions terrain, which keeps 84. dw2-tables/encounter-rates
src/us/prg/bank4.asm#L647-L656; per-terrain encounter rates
B04_832C:
.byte $0A ; Terrain ID #$00: Grass
.byte $54 ; Terrain ID #$01: Transitions, Chamber of Horks
.byte $08 ; Terrain ID #$02: Dungeon, Lava, Tower, Castle
.byte $04 ; Terrain ID #$03: Sea
.byte $10 ; Terrain ID #$04: Forest, Desert
.byte $19 ; Terrain ID #$05: Mountain
.byte $10 ; Terrain ID #$06: Swamp
.byte $10 ; Terrain ID #$07: Cave to Rhone floors 5-7dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L157-L166B04_80A4:
and #$3F
B04_80A6:
sta $D8 ; battle formation index
lda B04_832C, x ; per-terrain encounter rates
cmp $32 ; RNG byte 0; compare to previously generated non-zero number
bcc B04_806D ; no encounter; encounter rate < RNG => no encounter
B04_80AF:
dec $D9 ; maximum # of attempts at starting a battleIn Dragon Warrior II (the North American NES release), each step draws a random byte from 1 to 255 and starts a fight when the terrain's rate is at least that byte: on the world map 10 on grass, 16 in forest, desert, and swamp, 25 on mountains, and 4 at sea; 8 on maps numbered $2B and up and in Moonbrooke, while the other maps below $2B have none. Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L61-L79lda map_id
cmp #$01 ; Map ID #$01: World Map
beq B04_806E ; determine world map battle formation
cmp #$09 ; Map ID #$09: Moonbrooke
beq @B04_8066 ; override terrain ID to Terrain ID #$02: Dungeon, Lava, Tower, Castle and use battle formation #$11: Zombie, Big Cobra, ---, Smoke, Centipod, Metal Slime
sec
sbc #$2B ; aside from the world map and Moonbrooke, map IDs < #$2B do not have random encounters
bcc B04_806D ; no encounter
tay
lda Dungeon_Formations, y ; Dungeon Encounter Formations
cpx #$01 ; Terrain ID #$01: Transitions, Chamber of Horks
beq B04_80A4 ; use the current battle formation ID
…Checked by claude, 2026-10-28 — read the table and the step code that compares a rate with the random byte at the pinned commitRevised after a check by a second AI model, 2026-10-28.Terrain names are the disassembly's comments; it labels terrain 7 "Cave to Rhone floors 5-7", but lines 74-79 set it only for maps $3D and $3E. On the world map the code indexes the table by terrain ID less one for every terrain but grass; dw2/encounter-rate reads the rates as the game applies them.
The fixed encounters, two groups each (a monster and a count; $FF is no group), from the Lianport Gremlins to Malroth. dw2-tables/fixed-encounters
src/us/prg/bank4.asm#L682-L696; Fixed Encounters (group 1 Monster ID, group 1 count, group 2 Monster ID, group 2 count)
B04_8346:
.byte $FF,$00,$1E,$02 ; 2 Gremlins (Lianport)
.byte $FF,$00,$36,$01 ; 1 Evil Clown (Midenhall)
.byte $FF,$00,$3A,$01 ; 1 Saber Lion (Osterfair)
.byte $FF,$00,$3C,$02 ; 2 Ozwargs (Hamlin)
.byte $FF,$00,$4C,$02 ; 2 Gold Batboons (Hargon's Castle)
.byte $FF,$00,$1E,$04 ; 4 Gremlins (Lighthouse)
.byte $FF,$00,$36,$02 ; 2 Evil Clown (Sea Cave)
.byte $36,$01,$37,$02 ; 1 Evil Clown, 2 Ghouls (???)
.byte $FF,$00,$4E,$01 ; 1 Atlas (Hargon's Castle)
.byte $FF,$00,$4F,$01 ; 1 Bazuzu (Hargon's Castle)
…Checked by claude, 2026-10-28 — read every row of the fixed encounter table at the pinned commit (values parsed from the lines quoted)Checked by a second AI model, 2026-10-28.Places are the disassembly's comments; it marks the eighth row's place "???". Monster names are from the stats table's comments.
The world map's encounter zones: a byte for each 16x16 block, read by the party's position; the low six bits are the land formation, and the high two pick one of four ocean formations ($40-$43). Each cell is written land/ocean. dw2-tables/world-map-zones
Value: Y block 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 · x0 33/1, 24/0, 24/0, 23/0, 22/0, 22/0, 24/0, 24/0, 33/1, 33/0, 33/0, 33/1, 33/0, 33/1, 13/1, 13/1 · x1 33/0, 24/0, 23/0, 23/0, 22/0, 22/0, 22/0, 21/0, 36/0, 33/0, 33/0, 33/0, 32/0, 33/0, 14/0, 14/0 · x2 33/0, 25/0, 25/0, 24/0, 25/0, 25/0, 21/0, 21/2, 36/2, 36/0, 33/0, 33/0, 32/0, 33/0, 33/0, 33/0 · x3 8/0, 25/0, 25/0, 25/0, 26/0, 26/0, 21/0, 57/2, 36/2, 36/2, 33/1, 33/0, 33/0, 33/0, 33/0, 33/0 · x4 8/0, 26/0, 26/0, 27/0, 27/0, 27/0, 27/0, 21/0, 37/2, 37/2, 36/1, 33/0, 8/0, 59/1, 27/1, 27/1 · x5 8/0, 8/0, 26/0, 27/0, 27/0, 16/0, 16/0, 16/0, 37/2, 37/2, 51/2, 50/0, 8/0, 59/1, 37/1, 37/1 · x6 7/0, 8/0, 8/0, 27/0, 27/0, 15/0, 15/0, 15/3, 15/3, 51/3, 51/2, 50/0, 37/0, 34/1, 27/3, 27/3 · x7 7/0, 6/0, 7/0, 13/0, 13/0, 13/0, 14/0, 15/3, 15/3, 51/3, 50/2, 50/0, 37/0, 34/0, 27/1, 27/1 · x8 5/0, 6/0, 7/0, 13/0, 13/0, 14/0, 15/0, 16/3, 37/3, 51/3, 50/2, 50/0, 37/0, 34/0, 27/1, 27/1 · x9 5/0, 4/0, 4/0, 4/0, 14/0, 14/0, 15/0, 16/0, 35/0, 35/0, 34/1, 34/3, 34/1, 34/0, 27/1, 27/1 · x10 4/0, 3/0, 3/0, 3/0, 3/0, 14/0, 15/0, 17/1, 35/1, 35/1, 35/1, 15/1, 7/1, 34/0, 34/0, 34/0 · x11 4/0, 4/0, 2/0, 2/0, 3/0, 24/1, 24/1, 24/3, 35/3, 35/3, 37/3, 16/1, 1/1, 34/0, 34/1, 34/1 · x12 5/1, 4/0, 2/0, 1/0, 3/0, 4/0, 24/1, 35/3, 35/1, 35/0, 35/0, 35/1, 2/1, 34/0, 34/1, 34/1 · x13 5/1, 4/1, 3/0, 0/0, 1/0, 3/0, 35/0, 35/1, 35/0, 35/0, 35/0, 35/1, 1/1, 34/3, 34/3, 34/3 · x14 6/1, 6/1, 5/1, 5/0, 5/0, 4/0, 5/0, 35/0, 35/0, 35/0, 35/0, 35/1, 2/1, 27/3, 1/3, 1/3 · x15 33/3, 24/1, 24/1, 24/0, 24/0, 24/1, 24/1, 24/1, 35/0, 35/1, 35/1, 35/1, 22/1, 27/3, 35/3, 35/3
Codedq2: Disassembly of NES Dragon Warrior II ·src/us/prg/bank4.asm#L767-L785; World Map Encounters
; indexed data load target (from $807D)
WorldMap_Encounters:
.byte $61,$21,$21,$08,$08,$08,$07,$07,$05,$05,$04,$04,$45,$45,$46,$E1
.byte $18,$18,$19,$19,$1A,$08,$08,$06,$06,$04,$03,$04,$04,$44,$46,$58
.byte $18,$17,$19,$19,$1A,$1A,$08,$07,$07,$04,$03,$02,$02,$03,$45,$58
.byte $17,$17,$18,$19,$1B,$1B,$1B,$0D,$0D,$04,$03,$02,$01,$00,$05,$18
.byte $16,$16,$19,$1A,$1B,$1B,$1B,$0D,$0D,$0E,$03,$03,$03,$01,$05,$18
.byte $16,$16,$19,$1A,$1B,$10,$0F,$0D,$0E,$0E,$0E,$58,$04,$03,$04,$58
.byte $18,$16,$15,$15,$1B,$10,$0F,$0E,$0F,$0F,$0F,$58,$58,$23,$05,$58
.byte $18,$15,$95,$B9,$15,$10,$CF,$CF,$D0,$10,$51,$D8,$E3,$63,$23,$58
.byte $61,$24,$A4,$A4,$A5,$A5,$CF,$CF,$E5,$23,$63,$E3,$63,$23,$23,$23
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L102-L160; determine world map battle formation
B04_806E:
lda map_xpos
; world map encounters are based on which 16x16 block you're in
lsr
lsr
lsr
lsr
sta $D5
lda map_ypos
and #$F0
ora $D5 ; $D5 = high nybble of Y-pos | (high nybble of X-pos >> 4)
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L859-L860Battle_Formations_sizeof:
.byte $40Checked by claude, 2026-10-28 — read every row of WorldMap_Encounters at the pinned commit (values parsed from the lines quoted) and the code that indexes it by the high nybbles of X and Y and splits the byteRevised after a check by a second AI model, 2026-10-28.The formation each map from $2B up uses; maps below $2B other than the world map and Moonbrooke have no random encounters, and Moonbrooke uses formation $11. dw2-tables/dungeon-zones
src/us/prg/bank4.asm#L787-L855; Dungeon Encounter Formations
; indexed data load target (from $8046)
Dungeon_Formations:
.byte $0C ; Map ID #$2B: Cave to Hamlin
.byte $0A ; Map ID #$2C: Lake Cave B1
.byte $0B ; Map ID #$2D: Lake Cave B2
.byte $2A ; Map ID #$2E: Sea Cave B1
.byte $2B ; Map ID #$2F: Sea Cave B2
.byte $2C ; Map ID #$30: Sea Cave B3-1
.byte $2C ; Map ID #$31: Sea Cave B3-2
.byte $36 ; Map ID #$32: Sea Cave B4
.byte $37 ; Map ID #$33: Sea Cave B5
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L60-L95tax
lda map_id
cmp #$01 ; Map ID #$01: World Map
beq B04_806E ; determine world map battle formation
cmp #$09 ; Map ID #$09: Moonbrooke
beq @B04_8066 ; override terrain ID to Terrain ID #$02: Dungeon, Lava, Tower, Castle and use battle formation #$11: Zombie, Big Cobra, ---, Smoke, Centipod, Metal Slime
sec
sbc #$2B ; aside from the world map and Moonbrooke, map IDs < #$2B do not have random encounters
bcc B04_806D ; no encounter
tay
lda Dungeon_Formations, y ; Dungeon Encounter Formations
cpx #$01 ; Terrain ID #$01: Transitions, Chamber of Horks
…Checked by claude, 2026-10-28 — read every row of Dungeon_Formations at the pinned commit (values parsed from the lines quoted) and the code that indexes it by map ID less $2BChecked by a second AI model, 2026-10-28.Map names are the disassembly's comments. Formation $3F (63) means no encounters.
The 64 land and 4 ocean formations, six monster slots each. The high bits of the six bytes, read as one 6-bit number (computed; the special column), pick a special formation: a fight uses it 1 time in 8, and a formation whose number is $3F (every bit set) rolls again instead. A regular fight takes r, the random byte's low three bits (0 is the special formation): r = 7 gives slot 6 alone, one monster; r = 6 gives slot 5 alone, 3-6 of it; r = 5 gives slot 4, one monster, and by a second draw adds slot 1, 2, or 3 (42 in 256 each, computed), slots 3 and 1, 1 and 2, or 2 and 3 (26 in 256 each, computed), or all three (52 in 256, computed); r = 1-4 picks slot 1, 1, 2, or 3, then by a second draw keeps it alone (126 in 256, computed), adds the next or the one after among slots 1-3 (39 in 256 each, computed), or adds all three (52 in 256, computed). An empty picked slot makes the fight draw again; an empty added slot is skipped. Slots 1, 2, and 3 fill groups 2, 1, and 4, and slots 4-6 group 3. A group whose count isn't set gets 1, 2, 3, or 5 monsters (6, 6, 3, and 1 in 16, computed); then formations 0-12 are cut to 3 monsters in all and 13-17 to 4, one from each group in turn. dw2-tables/formations
Value
{
"no": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67
],
"monsters": [
"Slime, -, -, -, Slime, Big Slug",
"Slime, Big Slug, Slime, Big Slug, -, -",
"Big Slug, Slime, Slime, Iron Ant, Big Slug, -",
"Iron Ant, Drakee, Big Slug, Drakee, Iron Ant, Ghost Mouse",
"Drakee, Wild Mouse, Big Slug, Iron Ant, Drakee, Ghost Mouse",
"Wild Mouse, Drakee, Babble, Big Slug, Wild Mouse, Healer",
"Babble, Drakee, Wild Mouse, Babble, Babble, Magician",
"Big Cobra, Babble, Big Rat, Big Slug, Army Ant, Healer",
"Big Cobra, Big Rat, Ghost Mouse, Magician, Army Ant, -",
"Wild Mouse, Big Slug, Iron Ant, Drakee, Wild Mouse, Big Cobra",
"Big Rat, Ghost Mouse, Big Cobra, Healer, Big Cobra, Magic Ant",
"Big Cobra, Big Rat, Magician, Magician, Army Ant, Centipod",
"Ghost Mouse, Big Rat, Magician, -, Big Cobra, Centipod",
"Centipod, Magician, Big Cobra, Magidrakee, Big Rat, Zombie",
"Baboon, Lizard Fly, Centipod, Magician, Army Ant, Smoke",
"Centipod, Magidrakee, Lizard Fly, Magic Ant, Big Rat, Zombie",
"Babble, Smoke, Magic Ant, Zombie, Magic Ant, Megapede",
"Zombie, Big Cobra, -, Smoke, Centipod, Metal Slime",
"Zombie, Magician, Big Rat, Zombie, Big Cobra, Megapede",
"Smoke, Zombie, Zombie, Ghost Mouse, Ghost Rat, Megapede",
"Ghost Rat, Zombie, Magidrakee, Magic Ant, Ghost Rat, -",
"Baboon, Ghost Rat, Carnivog, Metal Slime, Baboon, Mummy Man",
"Carnivog, Baboon, Ghost Rat, Magidrakee, Megapede, Zombie",
"Mud Man, Carnivog, Zombie, Enchanter, Magic Baboon, Demighost",
"Magic Baboon, Mud Man, Enchanter, Demighost, Zombie, Metal Slime",
"Mud Man, Demighost, Mud Man, Enchanter, Gremlin, Slime",
"Gremlin, Magic Baboon, Demighost, Slime, Poison Lily, Drakee",
"Poison Lily, Smoke, Magidrakee, Saber Tiger, Saber Tiger, Orc",
"Mummy Man, Gorgon, Saber Tiger, Gremlin, -, Basilisk",
"Gorgon, Mummy Man, Saber Tiger, Enchanter, Demighost, -",
"Saber Tiger, Mummy Man, Gorgon, Undead, Dragon Fly, -",
"Undead, Gorgon, Magic Ant, Gremlin, Dragon Fly, Gold Orc",
"Titan Tree, Dragon Fly, Basilisk, Basilisk, Goopi, Orc",
"Orc, Basilisk, Titan Tree, Orc, Basilisk, -",
"Evil Tree, Gas, Goopi, Magic Ant, -, Sorcerer",
"Hawk Man, -, Gas, Sorcerer, Evil Tree, Hork",
"Hunter, Puppet Man, Hibabango, Sorcerer, Hork, Metal Babble",
"Hibabango, Hunter, Graboopi, Gold Orc, Sorcerer, Gold Orc",
"Mummy, Evil Eye, Graboopi, -, Ghoul, Evil Clown",
"Gold Orc, Vampirus, Puppet Man, Gold Orc, Ghoul, -",
"Vampirus, -, Ghoul, -, Evil Clown, Metal Babble",
"Gargoyle, Gargoyle, Gold Orc, Evil Clown, -, Metal Babble",
"Evil Eye, Graboopi, Gas, Evil Clown, -, -",
"Gold Orc, Graboopi, Evil Tree, Gold Orc, Puppet Man, Metal Babble",
"Saber Lion, Gold Orc, Mummy, Gold Orc, Saber Lion, Saber Lion",
"Mega Knight, Saber Lion, Metal Hunter, Evil Clown, Dark Eye, Metal Babble",
"Ozwarg, Mega Knight, Dark Eye, Ozwarg, Ghoul, -",
"Orc King, Gargoyle, Berserker, Hork, -, Metal Babble",
"Flame, Berserker, Hargon’s Knight, Hargon’s Knight, Berserker, Attackbot",
"Berserker, Magic Vampirus, Green Dragon, Attackbot, Green Dragon, Silver Batboon",
"Cyclops, Silver Batboon, Attackbot, Blizzard, Cyclops, -",
"Giant, Blizzard, Gold Batboon, Bullwong, Gold Batboon, Bullwong",
"-, Metal Babble, Giant, Mace Master, Mace Master, -",
"Green Dragon, Flame, Silver Batboon, Attackbot, Green Dragon, Bullwong",
"Mega Knight, Saber Lion, Puppet Man, Gold Orc, Mega Knight, Metal Babble",
"Metal Hunter, Mega Knight, Dragon Fly, Evil Clown, Metal Hunter, Metal Hunter",
"Hork, Hork, Hork, Hork, Hork, -",
"Ghost Rat, Baboon, Carnivog, Megapede, Zombie, Metal Slime",
"Medusa Ball, Baboon, Carnivog, Enchanter, Medusa Ball, Demighost",
"Big Cobra, Poison Lily, Titan Tree, Wild Mouse, Hunter, Puppet Man",
"-, -, -, -, -, -",
"-, -, -, -, -, -",
"-, -, -, -, -, -",
"-, -, -, -, -, -",
"Man O’ War, Sea Slug, Medusa Ball, -, Ghost Mouse, -",
"Sea Slug, Magidrakee, Man O’ War, Hawk Man, -, Gargoyle",
"Hunter, Hawk Man, Hork, Gas, -, -",
"Vampirus, Smoke, Lizard Fly, Gargoyle, -, -"
],
"special": [
"none",
"none",
"none",
"none",
"none",
"none",
"none",
"none",
0,
"none",
1,
"none",
"none",
17,
"none",
18,
4,
14,
14,
"none",
5,
5,
"none",
2,
6,
2,
6,
10,
15,
"none",
"none",
"none",
9,
9,
7,
10,
7,
8,
8,
11,
11,
"none",
"none",
"none",
"none",
"none",
10,
"none",
"none",
13,
"none",
"none",
12,
"none",
"none",
"none",
"none",
3,
3,
"none",
"none",
"none",
"none",
"none",
"none",
"none",
16,
"none"
]
}src/us/prg/bank4.asm#L861-L927; Battle Formations
Battle_Formations:
.byte $81,$FF,$FF,$FF,$81,$82 ; Battle Formation #$00: Slime, ---, ---, ---, Slime, Big Slug
.byte $81,$82,$81,$82,$FF,$FF ; Battle Formation #$01: Slime, Big Slug, Slime, Big Slug, ---, ---
.byte $82,$81,$81,$83,$82,$FF ; Battle Formation #$02: Big Slug, Slime, Slime, Iron Ant, Big Slug, ---
.byte $83,$84,$82,$84,$83,$87 ; Battle Formation #$03: Iron Ant, Drakee, Big Slug, Drakee, Iron Ant, Ghost Mouse
.byte $84,$85,$82,$83,$84,$87 ; Battle Formation #$04: Drakee, Wild Mouse, Big Slug, Iron Ant, Drakee, Ghost Mouse
.byte $85,$84,$88,$82,$85,$86 ; Battle Formation #$05: Wild Mouse, Drakee, Babble, Big Slug, Wild Mouse, Healer
.byte $88,$84,$85,$88,$88,$8A ; Battle Formation #$06: Babble, Drakee, Wild Mouse, Babble, Babble, Magician
.byte $8C,$88,$8B,$82,$89,$86 ; Battle Formation #$07: Big Cobra, Babble, Big Rat, Big Slug, Army Ant, Healer
.byte $0C,$0B,$07,$0A,$09,$7F ; Battle Formation #$08: Big Cobra, Big Rat, Ghost Mouse, Army Ant, ---
.byte $85,$82,$83,$84,$85,$8C ; Battle Formation #$09: Wild Mouse, Big Slug, Iron Ant, Drakee, Wild Mouse, Big Cobra
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L929-L934; Ocean Formations (high 2 bits of encounter group)
Ocean_Formations:
.byte $90,$98,$99,$FF,$87,$FF ; Battle Formation #$40: Man O’ War, Sea Slug, Medusa Ball, ---, Ghost Mouse, ---
.byte $98,$8E,$90,$AE,$FF,$BE ; Battle Formation #$41: Sea Slug, Magidrakee, Man O’ War, Hawk Man, ---, Gargoyle
.byte $31,$AE,$2D,$2C,$7F,$7F ; Battle Formation #$42: Hunter, Hawk Man, Hork, Gas, ---, ---
.byte $B8,$93,$91,$BE,$FF,$FF ; Battle Formation #$43: Vampirus, Smoke, Lizard Fly, Gargoyle, ---, ---dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L177-L232B04_80BA:
ldx #$00 ; pointer high byte offset
asl
bcc B04_80C1 ; high bit of battle formation is never set, but if it were, this would add 3 to the high byte of the battle formation pointer
ldx #$03
B04_80C1:
sta $D5 ; $D5 = battle formation * 2
asl
bcc B04_80C7 ; if second highest bit of battle formation is set, add 1 to the high byte of the battle formation pointer
inx
B04_80C7:
clc
…Each of the 82 monsters, from the Slime (ID 1) to Malroth (ID 82), has 15 bytes of stats: maximum HP, a byte whose high nibble is its dodge chance in 64ths, gold, the low byte of its experience, agility, attack, defense, then eight bytes of resistances, attack patterns, and the experience's two high parts (two bits each, worth 256 and 1024). Each monster also has a drop byte: an item ID in the low six bits and a chance of 1/8, 1/16, 1/32, or 1/128 in the high two. A drop needs a free inventory slot: the code checks the party's slots first and skips the drop when they are full. Two exceptions: on map $04 (Midenhall B1) every fight drops the Staff of Thunder if a slot is free, and Hargon and Malroth (IDs $51 and up) skip the drop check, so they drop nothing. HP runs from 5 (Slime, Iron Ant) to 250 (Atlas, Bazuzu, Zarlox, and others), experience, computed from its three parts, from 0 (Hargon, Malroth) to 2200 (Zarlox), and gold from 0 (Hargon, Malroth) to 255 (Gold Orc, Metal Babble, Zarlox). A fight's gold is the sum of the killed monsters' gold, capped at 65,535; the party gets that total less a random cut of up to a quarter (total − ⌊⌊total ÷ 4⌋ × r ÷ 256⌋, r a random byte), and the total is doubled before the cut when a monster's treasure chest turns out empty because it held an item the party already has and may hold only one of. Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L290-L316B04_813B:
cmp #$07 ; low 3 bits of RNG byte 0 are not all 0; check if they're all 1
bne B04_8154
ldy #$05
lda ($D5), y
and #$7F
cmp #$7F
bne B04_814C
jmp B04_80AF
B04_814C:
ldx #$02
jsr B04_83A3
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L290-L419B04_813B:
cmp #$07 ; low 3 bits of RNG byte 0 are not all 0; check if they're all 1
bne B04_8154
ldy #$05
lda ($D5), y
and #$7F
cmp #$7F
bne B04_814C
jmp B04_80AF
B04_814C:
ldx #$02
jsr B04_83A3
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L495-L567B04_824F:
jsr B0F_C3AB ; generate a random number and store it in $32-$33 (two passes)
ldx #$00
stx $D5
B04_8256:
lda #$FF
cmp $0663, x ; monster ID, group 1
beq B04_827D
cmp $066C, x
bne B04_8275
ldy #$04
B04_8264:
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L664-L680B04_8336:
.byte $01 ; # of monsters per group
.byte $02
.byte $01
.byte $02
.byte $03
.byte $01
.byte $02
.byte $01
.byte $02
.byte $03
.byte $01
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L713-L765; take current RNG value $33, figure out which $8398 bucket it fits into, and store that index in Y
B04_8389:
ldy #$00
lda $33 ; RNG byte 1
B04_838D:
cmp B04_8398, x
bcs B04_8397
iny
inx
jmp B04_838D
B04_8397:
rts
…Checked by claude, 2026-10-28 — read every row of Battle_Formations and Ocean_Formations at the pinned commit (values parsed from the lines quoted), the code that builds the special formation number from the high bits, and the code that turns a regular formation's slots into groups and countsRevised after a check by a second AI model, 2026-10-28.Revised after a check by a second AI model, 2026-10-28.Monster names are from the stats table's comments, by the low seven bits; - is $7F or $FF, no monster. Lines 290-316 mask slots 5 and 4 with $7F and treat $7F as empty. Rows 8, 13, 27, and 47 are decoded from the bytes; their comments differ (#$08 omits Magician, #$0D lists five, #$1B names Gremlin, #$2F names Magic Vampirus). Slots are numbered from 1 in the order of the monsters column. The regular-fight code is bank 4 lines 290-419: the second draws compare the second random byte with $D6, $AC, $82, $68, $4E, $34, $00 (for r = 5) and $82, $5B, $34, $00 (for r = 1-4) (lines 714-731), and slots 1-3 map to groups by B04_83BE (lines 760-761). Counts are drawn and cut at lines 495-567; the cut goes by formation index ($D8). A draw again counts against a limit of tries ($D9, lines 165-175), after which no fight starts.
The special formations: four slots each, read when a fight picks one 1 time in 8. dw2-tables/special-formations
src/us/prg/bank4.asm#L936-L957; Special Formations
; indexed data load target (from $8101)
Special_Formations:
.byte $FF,$FF,$09,$FF ; Special Formation #$00: Army Ant
.byte $FF,$FF,$0D,$FF ; Special Formation #$01: Magic Ant
.byte $FF,$1C,$FF,$0E ; Special Formation #$02: Magic Baboon, Magidrakee
.byte $FF,$15,$FF,$06 ; Special Formation #$03: Baboon, Healer
.byte $FF,$FF,$FF,$09 ; Special Formation #$04: Army Ant
.byte $FF,$17,$FF,$13 ; Special Formation #$05: Megapede, Smoke
.byte $FF,$1D,$FF,$0D ; Special Formation #$06: Demighost, Magic Ant
.byte $FF,$28,$FF,$06 ; Special Formation #$07: Orc, Healer
.byte $FF,$FF,$31,$0E ; Special Formation #$08: Hunter, Magidrakee
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L232-L250jmp B04_80AF ; otherwise loop to try again
B04_80FC:
asl ; special formations are 4 bytes each
asl
tax
ldy #$00
B04_8101:
lda Special_Formations, x ; Special Formations
and #$7F
cmp #$7F
beq B04_810D ; #$FF and #$7F => no enemy
sta $0663, y ; monster ID, group 1; store monster IDChecked by claude, 2026-10-28 — read every row of Special_Formations at the pinned commit (values parsed from the lines quoted) and the code that copies a row's monstersChecked by a second AI model, 2026-10-28.Monster names are from the stats table's comments; - is no monster.
Dragon Warrior II's song table has 27 entries, each four channel pointers; this is the game's track listing, by song number, with where the game plays each, named from the code that requests it. Every entry is requested: 26 by a constant in the code (songs 14, 16, and 17 also through the music table of the town and castle maps), and song 15 only through that table, so the table holds no unused song. dw2-tables/tracks
src/us/prg/bank3.asm#L645-L754; code -> data
B03_83F9:
.addr $852F ; $03:$852F
.addr $8530 ; $03:$8530
.addr $8530 ; $03:$8530
.addr $8530 ; $03:$8530
.addr $998B ; $03:$998B
.addr $999A ; $03:$999A
.addr $8530 ; $03:$8530
.addr $8530 ; $03:$8530
.addr $99A4 ; $03:$99A4
.addr $99B8 ; $03:$99B8
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank3.asm#L461-L482; play PCM specified by A (>= #$80 = sound effect [SFX], < #$80 = background music [BGM])
; control flow target (from $8003, $829F, $82A4)
B03_82A9:
php
sei
asl
bcs B03_82EE
asl
asl
ora #$06
tax
ldy #6
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L7608-L7732; control flow target (from $D3C5, $D4A9)
lda $1F ; some kind of map type (#$00: World Map, #$01: other non-dungeon maps, #$02: maps #$2B - #$43 inclusive, #$03: maps >= #$44, #$FF => game menu)
bpl B0F_E337
lda #$0C ; Music ID #$0C: game menu / Wellgarth singer BGM
bne B0F_E37B
; control flow target (from $E331)
B0F_E337:
bne B0F_E387
lda $CF ; ship status (#$04 = on ship, #$02 = own ship, #$01 = beat Lianport Gremlins)
and #$04
beq B0F_E343
lda #$16 ; Music ID #$16: sea BGM
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank3.asm#L450-L450lda #$00 ; Music ID #$00: BGM offdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L963-L963lda #$17 ; Music ID #$17: normal battle BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L968-L968lda #$18 ; Music ID #$18: Malroth battle BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3318-L3318lda #$12 ; Music ID #$12: party defeat BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3440-L3440lda #$09 ; Music ID #$09: battle win BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3801-L3801lda #$08 ; Music ID #$08: level up BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L238-L238lda #$07 ; Music ID #$07: add party member BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L329-L329lda #$0C ; Music ID #$0C: game menu / Wellgarth singer BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L462-L462lda #$01 ; Music ID #$01: Inn BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L1252-L1252lda #$02 ; Music ID #$02: revive BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L1417-L1417lda #$06 ; Music ID #$06: lottery win BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L1932-L1932lda #$0A ; Music ID #$0A: cursed BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L4764-L4764lda #$07 ; Music ID #$07: add party member BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L5234-L5234lda #$03 ; Music ID #$03: Echoing Flute echoing BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L5249-L5249lda #$04 ; Music ID #$04: Echoing Flute not echoing BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L6864-L6864lda #$12 ; Music ID #$12: party defeat BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L6945-L6945lda #$05 ; Music ID #$05: Rubiss BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L7901-L7901lda #$0A ; Music ID #$0A: cursed BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L10273-L10273lda #$19 ; Music ID #$19: end credits BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L430-L430lda #$00 ; Music ID #$00: BGM offdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L441-L441lda #$17 ; Music ID #$17: normal battle BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L842-L842lda #$12 ; Music ID #$12: party defeat BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank8.asm#L331-L331lda #$0B ; Music ID #$0B: title theme part 1 BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank8.asm#L344-L344lda #$1A ; Music ID #$1A: title theme part 2 BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L6938-L6945B06_A2B1:
lda #$27
jsr B06_A369 ; check for item A in party inventory, returning inventory index of item in A/X if found, #$FF if not
cmp #$FF
bne B06_A2B0
lda #$05 ; Music ID #$05: Rubiss BGMdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L1200-L1211; control flow target (from $C59B)
B0F_C595:
jsr B0F_C1DC ; set $6007 = #$00, set $00 = #$01, wait for interrupt, set $00 = #$FF
lda $0156 ; probably music playing flag? set to #$00 when music finishes
bne B0F_C595
; control flow target (from $C5A8)
B0F_C59D:
lda $05F7 ; probably BGM for current area
jmp $C561 ; play PCM specified by A (>= #$80 = sound effect [SFX], < #$80 = background music [BGM])dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3453-L3458lda $0161 ; current monster ID
cmp #$52
bne B04_975B
lda #$00
sta $05F7 ; probably BGM for current areadq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L1934-L1953lda $31 ; current map ID
cmp #$29 ; Map ID #$29: Rubiss' Shrine B7
bne B0F_C921
jsr $CD26 ; set Z if your current map position is the (X, Y) co-ordinates given by the next 2 bytes
; code -> data
; indirect data load target
; indirect data load target
.byte $03
.byte $03
; data -> code
bne B0F_C921
jsr $D2FB ; load ROM bank 6
…Each of the 64 item IDs has a price, and each piece of equipment a bit field of who can equip it ($01 Midenhall, $02 Cannock, $04 Moonbrooke). The Staff of Thunder is priced at 26,000 and the Sword of Erdrick at 2. Codedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1746-L1746; Map ID #$02: Midenhall 2Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1826-L1826; Map ID #$03: Midenhall 1Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1754-L1754; Map ID #$04: Midenhall B1dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1761-L1761; Map ID #$05: Leftwynedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1768-L1768; Map ID #$06: Cannockdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1785-L1785; Map ID #$07: Hamlindq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1801-L1801; Map ID #$08: Hamlin Waterwaydq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1860-L1860; Map ID #$0B: Lianportdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1867-L1867; Map ID #$0C: Tantegeldq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1886-L1886; Map ID #$0D: Tantegel Town 2Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1907-L1907; Map ID #$0E: Tantegel Castle 2Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1914-L1914; Map ID #$0F: Osterfairdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1920-L1920; Map ID #$10: Zahandq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1939-L1939; Map ID #$11: Tuhndq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1956-L1956; Map ID #$12: Tuhn Watergatedq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1972-L1972; Map ID #$13: Wellgarthdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1978-L1978; Map ID #$14: Wellgarth Undergrounddq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L1986-L1986; Map ID #$15: Berandq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L4839-L4839beq B0F_D504 ; Map ID #$00: Fake MidenhallChecked by claude, 2026-10-28 — read the song table, the play routine that indexes it, the map-music code and its table, and every constant song request at the pinned commitRevised after a check by a second AI model, 2026-10-28.Names are ours, from where the game plays each song. The disassembly's names: 0 "BGM off", 1 "Inn", 2 "revive", 3 "Echoing Flute echoing", 4 "Echoing Flute not echoing", 5 "Rubiss", 6 "lottery win", 7 "add party member", 8 "level up", 9 "battle win", 10 "cursed", 11 "title theme part 1", 12 "game menu / Wellgarth singer", 13 "Tantegel", 14 "town music 1", 16 "cave", 17 "tower", 18 "party defeat", 19 "shrine", 20 "full party", 21 "small party", 22 "sea", 23 "normal battle", 24 "Malroth battle", 25 "end credits", 26 "title theme part 2". Song 15 has no name there; only the map table requests it. Requests are bank and line in src/us/prg; "map table" is the fixed bank's map music (lines 7723-7732), read for maps $00-$18 that the code before it doesn't route elsewhere. Stores to $05F7 aren't requests: they set the music that resumes after a jingle (fixed bank lines 1200-1211 wait for the jingle to end, then play $05F7), so none is listed. One sets 0 after the fight with Malroth (bank 4 lines 3453-3458), so silence follows that victory jingle.
Dragon Warrior II's sound-effect table in bank 3 ($84D1) has 30 entries, IDs $80-$9D, each a pointer whose top bit picks the channel: set, the effect plays on pulse 2; clear, on noise. The entries that read $1Bxx or $1Cxx have the bit clear in the table; the play routine keeps the entry's high byte for the channel and sets the bit on the pointer it plays from. This is the game's sound-effect listing, by ID, with where the game plays each, named from the code that requests it. 24 are requested by a constant in the code and the last four only by bank 8's intro, which computes its IDs and can request $9A-$9D, or $80 (sound off) after a button press; $84 and $8E have no request in the code, so they are unused candidates. dw2-tables/sfx
src/us/prg/bank3.asm#L755-L785; indexed data load target (from $82F9)
.addr $8530 ; $03:$8530
.addr $1B84 ; $03:$1B84
.addr $1B99 ; $03:$1B99
.addr $1BA8 ; $03:$1BA8
.addr $1BB9 ; $03:$1BB9
.addr $9BBF ; $03:$9BBF
.addr $9BC4 ; $03:$9BC4
.addr $1BCC ; $03:$1BCC
.addr $1BD6 ; $03:$1BD6
.addr $9BE4 ; $03:$9BE4
.addr $1BED ; $03:$1BED
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank3.asm#L503-L512B03_82EE:
tax
lda $84D2,X
sta $0142
ora #$80
sta $FB
lda $84D1,X
sta $FA
lda #$01
sta $0132dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank3.asm#L87-L96ldx #$02
ldy #$04
lda $0132
beq B03_8082
lda $0142
bpl B03_8082
jsr $8270 ; clear bit 7 of $0149,X
ldy #$10
jsr $80C3dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank3.asm#L121-L130ldx #$06
ldy #$0C
lda $0132
beq B03_80C0
lda $0142
bmi B03_80C0
jsr $8270 ; clear bit 7 of $0149,X
ldy #$10
jsr $80C3dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank3.asm#L166-L169pha
ldy $013E,X
lda $850D,Y
sta $FCdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank8.asm#L303-L320pha
and #$03
clc
adc #$1A
ora #$80
pha
tya
lsr
pla
ldx $99
beq B08_81E5
lda #$80 ; Music ID #$80: SFX off
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L1603-L1606lda $0663, y ; monster ID, group 1
cmp #$4E
bcs B04_8AE8dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L4322-L4329B04_9BB8:
lda $99
cmp #$F0
bcc B04_9BC6
eor #$FF
jsr B04_9CD0 ; print name of hero given by low 2 bits of A to $6119, terminated by #$FA
jmp B04_9C4D ; if $9B < #$60, display string ID specified by $9B, otherwise display string ID specified by $9B + #$A0; play extra SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L4244-L4272lda $B3
and #$0F
jsr B0F_FBFF
lda $B3
and #$20
beq B04_9B84
lda $B4
cmp #$0D
beq B04_9B5F
cmp #$0E
beq B04_9B5F
cmp #$07
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L4389-L4480lda $9B
cmp #$06
beq B04_9C82
cmp #$0B
beq B04_9C87
cmp #$0F
beq B04_9C8A
cmp #$19
beq B04_9C8F
cmp #$24
beq B04_9C8F
cmp #$26
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L6700-L6715lda $CC
cmp #$0A
bcs B06_A17E
lda #$53
jsr B06_A1B5
bcs B06_A1A1
B06_A17E:
lda $96 ; temp storage for item/spell/type/etc. IDs
bne B06_A19A
tya
pha
lda $CC
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L6917-L6918B06_A296:
lda #$81 ; Music ID #$81: hit 1 SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L11941-L11947cmp #$19 ; Menu ID #$19: General menu: YES/NO
beq B0F_F691 ; YES/NO menu extra: play double beep SFX
cmp #$04 ; Menu ID #$04: Dialogue window
beq B0F_F6A3 ; initialize main dialogue windowdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L577-L585B0F_C2EB:
lda $3C
cmp #$30
bne B0F_C2F9
lda #$00
jsr $C3D5 ; save A to $05F6, X to $43, and load bank specified by A
; call to code in a different bank ($00:$800F)
jsr $800Fdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L4833-L4836lda $3B ; high nybble = terrain ID
and #$F0
sta $3Cdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank3.asm#L454-L454lda #$80 ; Music ID #$80: SFX offdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L1625-L1625lda #$81 ; Music ID #$81: hit 1 SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L4845-L4845lda #$82 ; Music ID #$82: Stairs SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L4862-L4862lda #$82 ; Music ID #$82: Stairs SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L4914-L4914lda #$82 ; Music ID #$82: Stairs SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1023-L1023lda #$82 ; Music ID #$82: Stairs SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1125-L1125lda #$82 ; Music ID #$82: Stairs SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1315-L1315lda #$82 ; Music ID #$82: Stairs SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3161-L3161lda #$83 ; Music ID #$83: flee SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L11990-L11990lda #$85 ; Music ID #$85: single beep SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L9354-L9354lda #$85 ; Music ID #$85: single beep SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank2.asm#L5596-L5596lda #$85 ; Music ID #$85: single beep SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L1856-L1856lda #$85 ; Music ID #$85: single beep SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L1586-L1586lda #$85 ; Music ID #$85: single beep SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L11979-L11979lda #$86 ; Music ID #$86: double beep SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L1607-L1607lda #$87 ; Music ID #$87: hit 2 SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L2473-L2473lda #$87 ; Music ID #$87: hit 2 SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L10444-L10444lda #$87 ; Music ID #$87: hit 2 SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1384-L1384lda #$87 ; Music ID #$87: hit 2 SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1356-L1356lda #$88 ; Music ID #$88: critical hit SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1342-L1342lda #$89 ; Music ID #$89: attack 1 SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L2480-L2480lda #$8A ; Music ID #$8A: hit 3 SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1374-L1374lda #$8A ; Music ID #$8A: hit 3 SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1349-L1349lda #$8B ; Music ID #$8B: attack 2 SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L13496-L13496lda #$8F ; Music ID #$8F: speech SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L2252-L2252lda #$90 ; Music ID #$90: casting SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1363-L1363lda #$90 ; Music ID #$90: casting SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L10514-L10514lda #$91 ; Music ID #$91: swamp SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1330-L1330lda #$91 ; Music ID #$91: swamp SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L3964-L3964lda #$92 ; Music ID #$92: open chest SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank4.asm#L3624-L3624lda #$92 ; Music ID #$92: open chest SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L3810-L3810lda #$93 ; Music ID #$93: door open SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L3856-L3856lda #$93 ; Music ID #$93: door open SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank0.asm#L1020-L1020lda #$94 ; Music ID #$94: burning SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank0.asm#L1037-L1037lda #$94 ; Music ID #$94: burning SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L10468-L10468lda #$94 ; Music ID #$94: burning SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L10526-L10526lda #$94 ; Music ID #$94: burning SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L10535-L10535lda #$94 ; Music ID #$94: burning SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1080-L1080lda #$94 ; Music ID #$94: burning SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1463-L1463lda #$94 ; Music ID #$94: burning SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank7.asm#L1473-L1473lda #$94 ; Music ID #$94: burning SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L2389-L2389lda #$95 ; Music ID #$95: Return SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank6.asm#L4862-L4862lda #$96 ; Music ID #$96: Watergate SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L4267-L4267lda #$97 ; Music ID #$97: shoals submerging SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L4279-L4279lda #$97 ; Music ID #$97: shoals submerging SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/constant.asm#L5307-L5307lda #$98 ; Music ID #$98: more Watergate? SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank0.asm#L1248-L1248lda #$99 ; Music ID #$99: teleport SFXdq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank3.asm#L137-L159lda $013F,X
bpl B03_80EE
ldx #$30
cmp #$FF
beq B03_80D0
ldx #$32
; control flow target (from $80CC, $8112)
B03_80D0:
txa
cpy #$08
bcs B03_80EA
pha
…dq2: Disassembly of NES Dragon Warrior II · src/us/prg/bank8.asm#L442-L447jsr $C476 ; read joypad 1 data into $2F
lda $2F ; joypad 1 data
beq B08_82A4
inc $99Checked by claude, 2026-10-28 — read the sound-effect table, the play routine's effect branch and channel choice, every call to the play routines in every bank (matched against a byte search of the ROM for calls to $C561), the code around each request, and bank 8's intro, which computes four IDsRevised after a check by a second AI model, 2026-10-28.Names are ours, from where the game plays each effect. The disassembly's names: $80 "SFX off", $81 "hit 1", $82 "Stairs", $83 "flee", $85 "single beep", $86 "double beep", $87 "hit 2", $88 "critical hit", $89 "attack 1", $8A "hit 3", $8B "attack 2", $8C "miss 1", $8D "miss 2", $8E "bump" (marked unused), $8F "speech", $90 "casting", $91 "swamp", $92 "open chest", $93 "door open", $94 "burning", $95 "Return", $96 "Watergate", $97 "shoals submerging", $98 "more Watergate?", $99 "teleport"; $84 and $9A-$9D have none. Requests are bank and line in src/us/prg. The play routine reads the table at $84D1 + 2 × (ID − $80) and sets the pointer's top bit before it plays; a clear top bit in the table puts the effect on the noise channel, a set one on pulse 2. The channel code writes each channel's control byte with sta $4000,Y (bank 3 line 159): the effect's Y is 4 when it takes pulse 2 and $0C when it takes noise, so it writes $4004, pulse 2's control register, or $400C, the noise channel's. The 17 pointers after the table, from $850D, are a different table, read by the stream code (bank 3 line 168), not by the effect routine. Bank 8's intro adds $1A to the low two bits of a step value and sets the top bit, so it can play only $9A-$9D, on odd steps; which of the four come up depends on its step tables, not quoted here. A joypad press during the intro counts up $99 (bank 8 lines 442-447), and with $99 not 0 the intro plays $80 in place of its computed ID (line 314), on the same odd steps: the step's low bit goes to the carry (tya, lsr, lines 309-310), and bcc at line 318 skips the play when it is clear. "The prologue" is bank 7's scene of the attack on Moonbrooke. Unused at a higher tier would need a full-game probe of the requests; neither $84 nor $8E is played through a computed ID in the code read.