data/claims/dw1-tables.yamlDragon Warrior's data tables (nmikstas/dragon-warrior-disassembly)
Game: Dragon Warrior.
Each of the 40 monsters, from the Slime to the Dragonlord's true form, has 16 bytes of stats: attack, defense, base HP, a spells byte, an agility byte, a byte whose high nibble resists Hurt and low nibble sets the dodge chance, experience, and gold, then eight bytes the table's comment calls unused. Attack runs from 5 (Slime) to 140 (Dragonlord True Self), base HP from 3 (Slime) to 160 (Stoneman), experience from 0 (Dragonlord, Dragonlord True Self) to 115 (Metal slime), and gold from 0 (Dragonlord, Dragonlord True Self) to 200 (Goldman). dw1-tables/monster-stats
source_files/Bank01.asm#L4439-L4598EnStatTbl:
;Enemy $00-Slime.
; Att Def HP Spel Agi Mdef Exp Gld |--------------Unused--------------|
L9E4B: .byte $05, $03, $03, $00, $0F, $01, $01, $02, $69, $40, $4A, $4D, $FA, $FA, $FA, $FA
;Enemy $01-Red Slime.
; Att Def HP Spel Agi Mdef Exp Gld |--------------Unused--------------|
L9E5B: .byte $07, $03, $04, $00, $0F, $01, $01, $03, $69, $40, $4A, $4D, $26, $F8, $69, $FA
;Enemy $02-Drakee.
; Att Def HP Spel Agi Mdef Exp Gld |--------------Unused--------------|
L9E6B: .byte $09, $06, $06, $00, $0F, $01, $02, $03, $42, $40, $6A, $4E, $FA, $FA, $FA, $FA
;Enemy $03-Ghost.
; Att Def HP Spel Agi Mdef Exp Gld |--------------Unused--------------|
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank01.asm#L3859-L3881LoadEnemyStats:
L9961: PHA ;
L9962: TYA ;Store A and Y.
L9963: PHA ;
L9964: LDY #$0F ;16 bytes per enemy in EnStatTbl.
L9966: LDA EnDatPtrLB ;
L9968: CLC ;
L9969: ADC EnStatTblPtr ;Add enemy data offset to the table pointer.
L996C: STA GenPtr3CLB ;
L996E: LDA EnDatPtrUB ;
L9970: ADC EnStatTblPtr+1 ;Save a copy of the pointer in a general use pointer.
L9973: STA GenPtr3CUB ;
…The dodge nibble of the 40 monsters (each dodges of the hero's attacks, dodge) is 1 or 2 for 27 of them; the Demon Knight's is 15, the Werewolf's 7, the Poltergeist's and Drakeema's 6, six monsters' 4, and the Golem's and both Dragonlord forms' 0. CodeThe high nibble of the same byte blocks Hurt and Hurtmore of the time (hero-spells); it is 0 for 26 of the 40 monsters and 15 for seven, the Metal Slime, Golem, Demon Knight, Wizard, Red Dragon, and both Dragonlord forms. Codedragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L4712-L4719CopyEnUpperBytes:
LDBE4: LDA #$08 ;
LDBE6: STA GenPtr3CLB ;Copy the unused enemy bytes into the description buffer.
LDBE8: LDA #$01 ;
LDBEA: STA GenPtr3CUB ;
LDBEC: LDY #$00 ;Index is always 0.
LDBEE: BEQ GetThisDescLoop ;Branch always.Checked by claude, 2026-10-28 — read every row of EnStatTbl at the pinned commit (values parsed from the lines quoted) and LoadEnemyStats, which copies a row's 16 bytes to $0100-$010F as a fight startsRevised after a check by a second AI model, 2026-10-28.The names are the disassembly's comments. The hurt-resist and dodge columns split the sixth byte as dw1/monster-dodge and dw1/monster-hurt-resist read it; the spells and agility bytes are left as numbers. LoadEnemyStats copies all 16 bytes to $0100, and CopyEnUpperBytes points the description buffer's copy at $0108, where the upper eight bytes sit, so some code does read them; they end in $FA, the text end marker.
Each of the 40 monsters has a Repel value, from 5 (Slime) to 140 (Dragonlord True Self). While Repel works on the overworld, a monster drawn for a fight is turned away when half the hero's defense power, rounded down, exceeds its value , or when ; in every other case the fight starts. dw1-tables/repel-values
About: Dragon Warrior Random encounter
Codedragon-warrior-disassembly: NES Dragon Warrior software disassembly ·source_files/Bank03.asm#L9052-L9062;The following table is used during the random fight generation to determine if the player is
;strong enought to repel an enemy when the repel spell is active. each entry in the table
;corresponds to an enemy and the index is the same as the enemy number. We can call each entry
;in the table the enemy's RepelVal. The formula for figuring out if repel will work is as
;follows: IF [RepelVal - DisplayedDefns/2 < 0] OR [RepelVal/2 < (RepelVal - DisplayedDefns/2)]
;Then repel will be successful.
RepelTbl:
LF4FA: .byte $05, $07, $09, $0B, $0B, $0E, $12, $14, $12, $18, $16, $1C, $1C, $24, $28, $2C
LF50A: .byte $0A, $28, $32, $2F, $34, $38, $3C, $44, $78, $30, $4C, $4E, $4F, $56, $58, $56
LF51A: .byte $50, $5E, $62, $64, $69, $78, $5A, $8Cdragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L2177-L2206LCF20: LDA MapNumber ;Is player on the overworld map?
LCF22: CMP #MAP_OVERWORLD ;If so, there is a chance the fight can be repelled.
LCF24: BNE ReadyFight ;If not, branch to prepare the fight.
ChkFightRepel:
LCF26: LDA RepelTimer ;Is the repel spell active?
LCF28: BEQ ReadyFight ;If not, branch to start fight.
LCF2A: LDA DisplayedDefns ;
LCF2C: LSR ;Get a copy of the player's defense / 2.
LCF2D: STA GenByte3E ;
LCF2F: LDX _EnNumber ;Get enemy's repel value from RepelTbl.
LCF31: LDA RepelTbl,X ;
LCF34: SEC ;Is enemy's repel value less than DisplayedDefns/2?
…Checked by claude, 2026-10-28 — read RepelTbl and ChkFightRepel at the pinned commit: SBC with carry set, BCC to RepelSucceeded, then CMP of R/2 against the difference and BCC to ReadyFightRevised after a check by a second AI model, 2026-10-28.The comment on the code at $CF3F gives the second test the other way round (repelled when the difference), as does the formula in the comment above RepelTbl; the code branches to the fight in that case. The check runs only on the overworld map, and only while the Repel timer is running.
Each of 20 encounter zones has five monster slots, the first 14 zones for the overworld and the rest for dungeons, as the table's comment puts it; a fight draws a slot with equal chance, so a monster in two slots comes twice as often. dw1-tables/zone-monsters
About: Dragon Warrior Random encounter
Codedragon-warrior-disassembly: NES Dragon Warrior software disassembly ·source_files/Bank03.asm#L9085-L9112;The following table controls the random enemy encounters. Each dungeon or zone on the overworld
;map can have up to 5 different enemies to encounter. Each row in the table represents those
;enemies. The first 14 rows are the overworld enemies and correspond to nibbles in the
;OvrWrldEnGrid table. The remaining entries are for the various dungeons as described above.
EnemyGroupsTbl:
LF54F: .byte EN_SLIME, EN_RSLIME, EN_SLIME, EN_RSLIME, EN_SLIME
LF554: .byte EN_RSLIME, EN_SLIME, EN_RSLIME, EN_DRAKEE, EN_RSLIME
LF559: .byte EN_SLIME, EN_GHOST, EN_DRAKEE, EN_GHOST, EN_RSLIME
LF55E: .byte EN_RSLIME, EN_RSLIME, EN_DRAKEE, EN_GHOST, EN_MAGICIAN
LF563: .byte EN_GHOST, EN_MAGICIAN, EN_MAGIDRAKE, EN_MAGIDRAKE, EN_SCORPION
LF568: .byte EN_GHOST, EN_MAGICIAN, EN_MAGIDRAKE, EN_SCORPION, EN_SKELETON
LF56D: .byte EN_MAGIDRAKE, EN_SCORPION, EN_SKELETON, EN_WARLOCK, EN_WOLF
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L2154-L2175GetEnemyRow:
LCF04: STA EnemyOffset ;This calculates the proper row of enemies to
LCF06: ASL ;choose a fight from in EnemyGroupsTbl.
LCF07: ASL ;
LCF08: CLC ;
LCF09: ADC EnemyOffset ;EnemyOffset * 5. 5 enemy entries per row.
LCF0B: STA EnemyOffset ;
;All chances to evade the enemy has failed(except repel). Figure out which enemy to fight.
;At this point, we have the index to the row of enemies in EnemyGroupsTbl.
GetEnemyInRow:
LCF0D: JSR UpdateRandNum ;($C55B)Get random number.
LCF10: LDA RandNumUB ;
…Each fight picks one of its zone's five monster slots with equal chance; zone 0, around Tantegel Castle, holds three Slime slots and two Red Slime slots, and zone 1 adds a Drakee, all with dodge 1. CodeChecked by claude, 2026-10-28 — read EnemyGroupsTbl and GetEnemyRow/GetEnemyInRow at the pinned commit: zone × 5, then a roll of 0–7 redrawn until it is below 5Revised after a check by a second AI model, 2026-10-28.Monster names are EnStatTbl's comments, by the monster numbers the rows hold.
The overworld is divided into an 8 by 8 grid of 15 by 15 squares, each naming its encounter zone, a row of the zone table (dw1-tables/zone-monsters), in a nibble: the high nibble for the even column, the low for the odd. Zone 0, the slime zone, holds two squares, row 2's columns 2 and 3, around Tantegel; there a fight the step has rolled is called off half the time, and three times in four on hills, before a monster is drawn. dw1-tables/overworld-zones
About: Dragon Warrior Random encounter
Value: Row (Y ÷ 15) 0, 1, 2, 3, 4, 5, 6, 7 · Column 0 3, 3, 4, 5, 5, 10, 10, 11 · Column 1 3, 2, 1, 1, 5, 9, 10, 11 · Column 2 2, 1, 0, 1, 4, 8, 11, 12 · Column 3 2, 2, 0, 12, 12, 12, 12, 13 · Column 4 3, 3, 2, 6, 9, 12, 13, 13 · Column 5 5, 3, 3, 6, 7, 12, 13, 12 · Column 6 4, 4, 4, 6, 7, 8, 9, 9 · Column 7 5, 5, 5, 6, 7, 7, 8, 9
Codedragon-warrior-disassembly: NES Dragon Warrior software disassembly ·source_files/Bank03.asm#L9068-L9076OvrWrldEnGrid:
LF522: .byte $33, $22, $35, $45
LF526: .byte $32, $12, $33, $45
LF52A: .byte $41, $00, $23, $45
LF52E: .byte $51, $1C, $66, $66
LF532: .byte $55, $4C, $97, $77
LF536: .byte $A9, $8C, $CC, $87
LF53A: .byte $AA, $BC, $DD, $98
LF53E: .byte $BB, $CD, $DC, $99dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L2049-L2114DoRandomFight:
LCE7C: LDA MapNumber ;Is player on the overworld map?
LCE7E: CMP #MAP_OVERWORLD ;
LCE80: BNE ChkDungeonFights ;If not, branch to check other maps.
;This section of code calculates the proper enemies for the player's world map position.
LCE82: LDA CharYPos ;Divide player's Y location on overworkd map by 15.
LCE84: STA DivNum1LB ;This gives a number ranging from 0 to 7.
LCE86: LDA #$0F ;The enemy zones on the overworld map are an 8X8 grid.
LCE88: STA DivNum2 ;
LCE8A: JSR ByteDivide ;($C1F0)Divide a 16-bit number by an 8-bit number.
LCE8D: LDA DivNum1LB ;Save Y data for enemy zone calculation.
LCE8F: STA GenByte42 ;
…A different reading: AND #$03 lets the fight through only when both low bits are 0, one time in four, so on hills three of these fights in four don't happen. (dw1/encounter-zone-0)Checked by claude, 2026-10-28 — read OvrWrldEnGrid and DoRandomFight at the pinned commit: Y and X each divided by 15, row × 4 + X ÷ 2 indexes the byte, an even column shifts the high nibble downRevised after a check by a second AI model, 2026-10-28.On hills the comment says the fight is called off a quarter of the time, but the code starts it only when both low bits of the random byte are zero (AND #$03, BEQ GetEnemyRow), so it is called off three times in four; elsewhere AND #$01 calls it off half the time.
Each of the 13 dungeon maps from the Dragonlord's castle's first sublevel to the Cave of Garinham's fourth floor has its encounter zone, a row of the zone table (dw1-tables/zone-monsters), in map order from the castle's first sublevel. dw1-tables/dungeon-zones
About: Dragon Warrior Random encounter
Codedragon-warrior-disassembly: NES Dragon Warrior software disassembly ·source_files/Bank03.asm#L9082-L9083CaveEnIndexTbl:
LF542: .byte $10, $11, $11, $11, $12, $12, $13, $13, $0E, $0E, $07, $0F, $0Fdragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L2147-L2153DoDungeonEnemy:
LCEFB: LDA MapNumber ;
LCEFD: SEC ;Convert map number into a value that can be used to find
LCEFE: SBC #$0F ;the index to the enemy data.
LCF00: TAX ;
LCF01: LDA CaveEnIndexTbl,X ;Get enemy index data byte. points to a row in EnemyGroupsTbl.Checked by claude, 2026-10-28 — read CaveEnIndexTbl and DoDungeonEnemy at the pinned commit (SBC #$0F, then LDA CaveEnIndexTbl,X)Revised after a check by a second AI model, 2026-10-28.Map names are the disassembly's comments and aliases. The code subtracts $0F from the map number to index CaveEnIndexTbl.
The hero's base Strength, Agility, maximum HP, and maximum MP at each of the 30 levels, and two bytes of spell flags: from level 1 to 30 Strength runs 4–140, Agility 4–130, HP 15–210, and MP 0–200. The flags give the ten spells at levels 3 (Heal), 4 (Hurt), 7 (Sleep), 9 (Radiant), 10 (Stopspell), 12 (Outside), 13 (Return), 15 (Repel), 17 (Healmore), 19 (Hurtmore). dw1-tables/level-stats
source_files/Bank01.asm#L4603-L4638;Byte 1-Strength, byte 2-Agility, byte 3-Max HP, byte 4-Max MP, byte 5-Healmore and Hurtmore
;spell flags, byte 6-All other spell flags.
LA0CB: .word BaseStatsTbl
BaseStatsTbl:
LA0CD: .byte $04, $04, $0F, $00, $00, $00 ;Level 1.
LA0D3: .byte $05, $04, $16, $00, $00, $00 ;Level 2.
LA0D9: .byte $07, $06, $18, $05, $00, $01 ;Level 3.
LA0DF: .byte $07, $08, $1F, $10, $00, $03 ;Level 4.
LA0E5: .byte $0C, $0A, $23, $14, $00, $03 ;Level 5.
LA0EB: .byte $10, $0A, $26, $18, $00, $03 ;Level 6.
LA0F1: .byte $12, $11, $28, $1A, $00, $07 ;Level 7.
LA0F7: .byte $16, $14, $2E, $1D, $00, $07 ;Level 8.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank01.asm#L3928-L3964SetBaseStats:
L99B4: TYA ;Save Y on the stack.
L99B5: PHA ;
L99B6: LDA BaseStatsTbl-2 ;
L99B9: STA PlayerDatPtrLB ;Load base address for the BaseStatsTbl.
L99BB: LDA BaseStatsTbl-1 ;
L99BE: STA PlayerDatPtrUB ;
L99C0: LDY LevelDatPtr ;Load offset for player's level in the table.
L99C2: LDA (PlayerDatPtr),Y ;
L99C4: STA DisplayedStr ;Load player's base strength.
L99C6: INY ;
L99C7: LDA (PlayerDatPtr),Y ;
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L4595-L4615ShowSpells:
LDB56: JSR IncDescBuffer ;($D92E)Write #$01-#$0A to the description buffer.
LDB59: LDA #$02 ;Start description bytes for spells at #$02. 2 will be
LDB5B: STA SpellDescByte ;subtracted before the function returns.
LDB5D: LDX #$01 ;Start at index 1 in the description buffer.
GetSpellsLoop:
LDB5F: LSR SpellFlagsUB ;Rotate spell flags through the carry bit to see if the
LDB61: ROR SpellFlagsLB ;player has a given spell. Does the player have the spell?
LDB63: BCC nextSpell ;If not, branch to check the next spell.
LDB65: LDA SpellDescByte ;
LDB67: STA DescBuf,X ;Player has the spell. Put it in the description buffer.
LDB69: INX ;
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L4360-L4365DoSpell:
LDA11: LDA SpellFlags ;
LDA13: STA SpellFlagsLB ;
LDA15: LDA ModsnSpells ;Get a copy of all the spells the player has.
LDA17: AND #$03 ;
LDA19: STA SpellFlagsUB ;dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Dragon_Warrior_Defines.asm#L1119-L1128.alias SPL_HEAL $00 ;Heal.
.alias SPL_HURT $01 ;Hurt
.alias SPL_SLEEP $02 ;Sleep.
.alias SPL_RADIANT $03 ;Radiant.
.alias SPL_STOPSPELL $04 ;Stopspell.
.alias SPL_OUTSIDE $05 ;Outside.
.alias SPL_RETURN $06 ;Return.
.alias SPL_REPEL $07 ;Repel.
.alias SPL_HEALMORE $08 ;Healmore.
.alias SPL_HURTMORE $09 ;Hurtmore.Checked by claude, 2026-10-28 — read BaseStatsTbl and SetBaseStats at the pinned commit (six bytes a level: Strength, Agility, max HP, max MP, a byte ORed into ModsnSpells, a byte stored as SpellFlags), and ShowSpells, which shifts the 16-bit flags right and takes bit n as spell n in description orderRevised after a check by a second AI model, 2026-10-28.Spell names are the disassembly's comments on its spell numbers (SPL_HEAL 0 to SPL_HURTMORE 9). The new-spells column is computed from the flag bits: LoadStats ORs the fifth byte, which the table's comment calls the Healmore and Hurtmore flags, into ModsnSpells and stores the sixth in SpellFlags; DoSpell copies SpellFlags to SpellFlagsLB and the low two bits of ModsnSpells to SpellFlagsUB; and ShowSpells rotates the pair right one bit at a time, taking the low byte's bit 0 as spell 0 (Heal) through the high byte's bit 1 as spell 9 (Hurtmore).
The experience each of the 30 levels needs, from 7 for level 2 to 65,535 for level 30; the game finds the hero's level by working down the table from level 30. dw1-tables/level-exp
source_files/Bank03.asm#L8886-L8916LevelUpTbl:
LF35B: .word $0000 ;Level 1 - 0 exp.
LF35D: .word $0007 ;Level 2 - 7 exp.
LF35F: .word $0017 ;Level 3 - 23 exp.
LF361: .word $002F ;Level 4 - 47 exp.
LF363: .word $006E ;Level 5 - 110 exp.
LF365: .word $00DC ;Level 6 - 220 exp.
LF367: .word $01C2 ;Level 7 - 450 exp.
LF369: .word $0320 ;Level 8 - 800 exp.
LF36B: .word $0514 ;Level 9 - 1300 exp.
LF36D: .word $07D0 ;Level 10 - 2000 exp.
LF36F: .word $0B54 ;Level 11 - 2900 exp.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L345-L364GetPlayerStatPtr:
LC156: LDX #$3A ;Start at level 30 and point to the end of LevelUpTbl.
LC158: LDA #LVL_30 ;Work backwards to find the proper level.
LC15A: STA DisplayedLevel ;
PlayerStatLoop:
LC15C: LDA ExpLB ;
LC15E: SEC ;Subtract entries in LevelUpTbl from player's current exp.
LC15F: SBC LevelUpTbl,X ;
LC162: LDA ExpUB ;
LC164: SBC LevelUpTbl+1,X ;Has the correct level for the player been found?
LC167: BCS PlayerStatEnd ;If so, branch to the exit.
LC169: DEC DisplayedLevel ;Move down to the next level and stats table entry.
…Checked by claude, 2026-10-28 — read LevelUpTbl and GetPlayerStatPtr at the pinned commitRevised after a check by a second AI model, 2026-10-28.Each spell's MP cost: Heal 4, Hurt 2, Sleep 2, Radiant 3, Stopspell 2, Outside 6, Return 8, Repel 2, Healmore 10, Hurtmore 5. dw1-tables/spell-costs
source_files/Bank00.asm#L2574-L2584SpellCostTbl:
L9D53: .byte $04 ;Heal 4MP.
L9D54: .byte $02 ;Hurt 2MP.
L9D55: .byte $02 ;Sleep 2MP.
L9D56: .byte $03 ;Radiant 3MP.
L9D57: .byte $02 ;Stopspell 2MP.
L9D58: .byte $06 ;Outside 6MP.
L9D59: .byte $08 ;Return 8MP.
L9D5A: .byte $02 ;Repel 2MP.
L9D5B: .byte $0A ;Healmore 10MP.
L9D5C: .byte $05 ;Hurtmore 5MP.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L4635-L4644CheckMP:
LDB85: STA SpellToCast ;
LDB87: LDX SpellToCast ;Does player have enough MP to cast the spell?
LDB89: LDA MagicPoints ;
LDB8B: CMP SpellCostTbl,X ;
LDB8E: BCS PlyrCastSpell ;If so, branch.
LDB90: LDA #$32 ;TextBlock4, entry 2.
LDB92: RTS ;Player does not have enough MP. Return.Checked by claude, 2026-10-28 — read SpellCostTbl and CheckMP at the pinned commit (CMP and SBC SpellCostTbl,X)Revised after a check by a second AI model, 2026-10-28.Spell names are the disassembly's comments.
Each weapon's bonus to attack power, added to Strength: None 0, Bamboo pole 2, Club 4, Copper sword 10, Hand axe 15, Broad sword 20, Flame sword 28, Erdrick's sword 40. dw1-tables/weapon-bonuses
source_files/Bank00.asm#L2238-L2246WeaponsBonusTbl:
L99CF: .byte $00 ;None +0.
L99D0: .byte $02 ;Bamboo pole +2.
L99D1: .byte $04 ;Club +4.
L99D2: .byte $0A ;Copper sword +10.
L99D3: .byte $0F ;Hand axe +15.
L99D4: .byte $14 ;Broad sword +20.
L99D5: .byte $1C ;Flame sword +28
L99D6: .byte $28 ;Erdrick's sword +40.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L8655-L8694AddItemBonuses:
LF0CD: LDA EqippedItems ;Get equipped items.
LF0CF: LSR ;
LF0D0: LSR ;
LF0D1: LSR ;Shift weapons down to lower 3 bits.
LF0D2: LSR ;
LF0D3: LSR ;
LF0D4: TAX ;Use the 3 bits above as index into the WeaponsBonusTbl.
LF0D5: LDA WeaponsBonusTbl,X ;
LF0D8: CLC ;
LF0D9: ADC DisplayedStr ;Add bonus from weapons table to strength attribute.
LF0DB: STA DisplayedAttck ;
…The hero's attack power is Strength plus the weapon's bonus; defense power is half of Agility, rounded down, plus the armor's and shield's bonuses, plus 2 with the Dragon's Scale. CodeChecked by claude, 2026-10-28 — read WeaponsBonusTbl and AddItemBonuses at the pinned commit; the equipped-items byte's bits index the tableRevised after a check by a second AI model, 2026-10-28.Weapon names are the disassembly's comments.
Each armor's bonus to defense power, added with half of Agility: None 0, Clothes 2, Leather armor 4, Chain mail 10, Half plate 16, Full plate 24, Magic armor 24, Erdrick's armor 28. dw1-tables/armor-bonuses
source_files/Bank00.asm#L2251-L2259ArmorBonusTbl:
L99D7: .byte $00 ;None +0.
L99D8: .byte $02 ;Clothes +2.
L99D9: .byte $04 ;Leather armor +4.
L99DA: .byte $0A ;Chain mail +10.
L99DB: .byte $10 ;Half plate +16.
L99DC: .byte $18 ;Full plate +24.
L99DD: .byte $18 ;Magic armor +24.
L99DE: .byte $1C ;Erdrick's armor +28.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L8655-L8694AddItemBonuses:
LF0CD: LDA EqippedItems ;Get equipped items.
LF0CF: LSR ;
LF0D0: LSR ;
LF0D1: LSR ;Shift weapons down to lower 3 bits.
LF0D2: LSR ;
LF0D3: LSR ;
LF0D4: TAX ;Use the 3 bits above as index into the WeaponsBonusTbl.
LF0D5: LDA WeaponsBonusTbl,X ;
LF0D8: CLC ;
LF0D9: ADC DisplayedStr ;Add bonus from weapons table to strength attribute.
LF0DB: STA DisplayedAttck ;
…The hero's attack power is Strength plus the weapon's bonus; defense power is half of Agility, rounded down, plus the armor's and shield's bonuses, plus 2 with the Dragon's Scale. CodeChecked by claude, 2026-10-28 — read ArmorBonusTbl and AddItemBonuses at the pinned commit; the equipped-items byte's bits index the tableRevised after a check by a second AI model, 2026-10-28.Armor names are the disassembly's comments.
Each shield's bonus to defense power, added with half of Agility: None 0, Small shield 4, Large shield 10, Silver shield 20. dw1-tables/shield-bonuses
source_files/Bank00.asm#L2264-L2268ShieldBonusTbl:
L99DF: .byte $00 ;None +0.
L99E0: .byte $04 ;Small shield +4.
L99E1: .byte $0A ;Large shield +10.
L99E2: .byte $14 ;Silver shield +20.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L8655-L8694AddItemBonuses:
LF0CD: LDA EqippedItems ;Get equipped items.
LF0CF: LSR ;
LF0D0: LSR ;
LF0D1: LSR ;Shift weapons down to lower 3 bits.
LF0D2: LSR ;
LF0D3: LSR ;
LF0D4: TAX ;Use the 3 bits above as index into the WeaponsBonusTbl.
LF0D5: LDA WeaponsBonusTbl,X ;
LF0D8: CLC ;
LF0D9: ADC DisplayedStr ;Add bonus from weapons table to strength attribute.
LF0DB: STA DisplayedAttck ;
…The hero's attack power is Strength plus the weapon's bonus; defense power is half of Agility, rounded down, plus the armor's and shield's bonuses, plus 2 with the Dragon's Scale. CodeChecked by claude, 2026-10-28 — read ShieldBonusTbl and AddItemBonuses at the pinned commit; the equipped-items byte's bits index the tableRevised after a check by a second AI model, 2026-10-28.Shield names are the disassembly's comments.
The 33 prices the shops charge for an item: the most expensive is the Silver shield at 14,800 gold, Erdrick's sword and Erdrick's armor are priced at 2, and 7 quest items at 0. dw1-tables/item-prices
source_files/Bank00.asm#L2139-L2172ItemCostTbl:
L9947: .word $000A ;Bamboo pole - 10 gold.
L9949: .word $003C ;Club - 60 gold.
L994B: .word $00B4 ;Copper sword - 180 gold.
L994D: .word $0230 ;Hand axe - 560 gold.
L994F: .word $05DC ;Broad sword - 1500 gold.
L9951: .word $2648 ;Flame sword - 9800 gold.
L9953: .word $0002 ;Erdrick's sword - 2 gold.
L9955: .word $0014 ;Clothes - 20 gold.
L9957: .word $0046 ;Leather armor - 70 gold.
L9959: .word $012C ;Chain mail - 300 gold.
L995B: .word $03E8 ;Half plate - 1000 gold.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L3438-L3446LD588: TAX ;
LD589: LDA GoldLB ;
LD58B: SEC ;Subtract item price from player's gold to
LD58C: SBC ItemCostTbl,X ;see if player has enough money.
LD58F: LDA GoldUB ;
LD591: SBC ItemCostTbl+1,X ;
LD594: BCS DoWeapPurchase ;Does player have enough money? if so, branch.Checked by claude, 2026-10-28 — read ItemCostTbl at the pinned commit and the weapon shop's purchase check, which subtracts the 16-bit price from the hero's goldRevised after a check by a second AI model, 2026-10-28.Item names are the disassembly's comments. Bank 1 holds a second price table for the shop windows (dw1-tables/window-prices).
The 35 prices the shop windows show, by the window's item numbers, which run in a slightly different order from the shops' price table (dw1-tables/item-prices); every item both tables name has the same price in each. dw1-tables/window-prices
source_files/Bank01.asm#L9551-L9589WndCostTblPtr:
LBE0E: .word WndCostTbl ;($BE10)Pointer to table below.
WndCostTbl:
LBE10: .word $000A ;Bamboo pole - 10 gold.
LBE12: .word $003C ;Club - 60 gold.
LBE14: .word $00B4 ;Copper sword - 180 gold.
LBE16: .word $0230 ;Hand axe - 560 gold.
LBE18: .word $05DC ;Broad sword - 1500 gold.
LBE1A: .word $2648 ;Flame sword - 9800 gold.
LBE1C: .word $0002 ;Erdrick's sword - 2 gold.
LBE1E: .word $0014 ;Clothes - 20 gold.
LBE20: .word $0046 ;Leather armor - 70 gold.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank01.asm#L5955-L5955LA83C: .word WndCostTblPtr ;($BE0E)Item costs, used in shop inventory windows.Revised after a check by a second AI model, 2026-10-28.Item names are the disassembly's comments; the table names the Stones of Sunlight twice, at numbers 28, 30.
The wares of 12 shops, seven weapon and armor shops and five tool shops, as numbers in the shops' price table (dw1-tables/item-prices), each list closed by an end marker; Cantlin has three weapon and armor shops and two tool shops. dw1-tables/shop-wares
source_files/Bank00.asm#L2196-L2232ShopItemsTbl:
;Koll weapons and armor shop.
L9991: .byte $02, $03, $0A, $0B, $0E, $FD
;Brecconary weapons and armor shop.
L9997: .byte $00, $01, $02, $07, $08, $0E, $FD
;Garinham weapons and armor shop.
L999E: .byte $01, $02, $03, $08, $09, $0A, $0F, $FD
;Cantlin weapons and armor shop 1.
L99A6: .byte $00, $01, $02, $08, $09, $0F, $FD
;Cantlin weapons and armor shop 2.
L99AD: .byte $03, $04, $0B, $0C, $FD
;Cantlin weapons and armor shop 3.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L3638-L3660LD676: STA ShopIndex ;Store a copy of the table index.
LD678: BEQ ShopEntryFound ;Is the index 0? If so, no need to search the table.
ShopEntryLoop:
LD67A: LDA ShopItemsTbl,X ;
LD67D: INX ;Increment through ShopItemsTbl to find end of
LD67E: CMP #ITM_TBL_END ;current shop index.
LD680: BNE ShopEntryLoop ;
LD682: DEC ShopIndex ;Have we found the proper index for this shop?
LD684: BNE ShopEntryLoop ;If not, branch to move to next index.
ShopEntryFound:
LD686: TXA ;Use current offset as index into table for specific item.
LD687: PHA ;Save base offset of this shop's table.
…Checked by claude, 2026-10-28 — read ShopItemsTbl and ShopEntryLoop at the pinned commit: it counts $FD ends to reach a shop's listRevised after a check by a second AI model, 2026-10-28.Shop names are the disassembly's comments; the wares are named by ItemCostTbl's comments. The end marker is $FD.
A magic key's price at the three key sellers: Cantlin 98 gold, Rimuldar 53 gold, Tantegel Castle 85 gold; the seller's dialogue control byte picks the entry. dw1-tables/key-prices
source_files/Bank00.asm#L2176-L2179KeyCostTbl:
L9989: .byte $62 ;Cantlin - 98 gold.
L998A: .byte $35 ;Rimuldar - 53 gold.
L998B: .byte $55 ;Tantagel castle - 85 gold.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L3938-L3944LD7ED: SEC ;There are three key shops. The dialog control byte
LD7EE: SBC #$0C ;determines what the price of the key is.
LD7F0: TAX ;Convert control byte to index for KeyCostTbl.
LD7F1: LDA KeyCostTbl,X ;
LD7F4: STA GenWrd00LB ;Checked by claude, 2026-10-28 — read KeyCostTbl and the key seller's dialogue at the pinned commit (SBC #$0C, LDA KeyCostTbl,X)Revised after a check by a second AI model, 2026-10-28.Seller names are the disassembly's comments. The code subtracts $0C from the dialogue control byte to index KeyCostTbl; which byte belongs to which seller rests on the comments alone.
A night's price at the five inns: Kol 20 gold, Brecconary 6 gold, Garinham 25 gold, Cantlin 100 gold, Rimuldar 55 gold; the innkeeper's dialogue control byte picks the entry. dw1-tables/inn-prices
source_files/Bank00.asm#L2183-L2188InnCostTbl:
L998C: .byte $14 ;Kol - 20 gold.
L998D: .byte $06 ;Brecconary - 6 gold.
L998E: .byte $19 ;Garinham - 25 gold.
L998F: .byte $64 ;Cantlin - 100 gold.
L9990: .byte $37 ;Rimuldar - 55 gold.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L4068-L4074LD895: SEC ;Convert dialog control byte to
LD896: SBC #$11 ;proper index in InnCostTbl.
LD898: TAX ;Get inn cost from InnCostTbl.
LD899: LDA InnCostTbl,X ;
LD89C: STA GenWrd00LB ;Checked by claude, 2026-10-28 — read InnCostTbl and InnDialog at the pinned commit (SBC #$11, LDA InnCostTbl,X)Revised after a check by a second AI model, 2026-10-28.Town names are the disassembly's comments. The code subtracts $11 from the dialogue control byte to index InnCostTbl; which byte belongs to which town rests on the comments alone.
The game's 31 treasure chests, four bytes each: the map, the X and Y position, and the contents, which are an item, a range of gold, or the Death Necklace or gold; the game copies all 124 bytes into RAM. dw1-tables/treasure-chests
source_files/Bank01.asm#L4390-L4421TreasureTbl:
L9DCD: .byte MAP_TANTCSTL_GF, $01, $0D, TRSR_GLD2 ;Tant castle, GF at 1,13: 6-13g.
L9DD1: .byte MAP_TANTCSTL_GF, $01, $0F, TRSR_GLD2 ;Tant castle, GF at 1,15: 6-13g.
L9DD5: .byte MAP_TANTCSTL_GF, $02, $0E, TRSR_GLD2 ;Tant castle, GF at 2,14: 6-13g.
L9DD9: .byte MAP_TANTCSTL_GF, $03, $0F, TRSR_GLD2 ;Tant castle, GF at 3,15: 6-13g.
L9DDD: .byte MAP_THRONEROOM, $04, $04, TRSR_GLD5 ;Throne room at 4,4: 120g.
L9DE1: .byte MAP_THRONEROOM, $05, $04, TRSR_TORCH ;Throne room at 5,4: Torch.
L9DE5: .byte MAP_THRONEROOM, $06, $01, TRSR_KEY ;Throne room at 6,1: Magic key.
L9DE9: .byte MAP_RIMULDAR, $18, $17, TRSR_WINGS ;Rumuldar at 24,23: wings.
L9DED: .byte MAP_GARINHAM, $08, $05, TRSR_GLD3 ;Garingham at 8,5: 10-17g.
L9DF1: .byte MAP_GARINHAM, $08, $06, TRSR_HERB ;Garingham at 8,6: Herb.
L9DF5: .byte MAP_GARINHAM, $09, $05, TRSR_TORCH ;Garingham at 9,5: Torch.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank01.asm#L3843-L3849L9951: PHA ;
L9952: LDX #$7B ;Prepare to copy 124 bytes.
L9954:* LDA TreasureTbl,X ;Copy treasure table into RAM starting at $0320.
L9957: STA BlockRAM+$20,X ;
L995A: DEX ;Have 124 bytes been copied?Revised after a check by a second AI model, 2026-10-28.Contents and map names are the disassembly's names for the values. The copy routine in bank 1 copies the 124 bytes to $0320.
Each of 30 map numbers (map 0 unused) has a pointer to its data, its highest X and Y (one less than its width and height), and the block shown past its edge; the overworld is the largest at 120 by 120. dw1-tables/maps
source_files/Bank00.asm#L62-L242MapDatTbl: ;Data for game maps.
;Unused. Map #$00.
L801A: .word NULL ;Map data pointer.
L801C: .byte $00 ;Columns.
L801D: .byte $00 ;Rows.
L801E: .byte $00 ;Boundary block.
;Overworld. Map #$01.
L801F: .word WrldMapPtrTbl ;($A653)Pointer to row pointers.
L8021: .byte $77 ;120 colums.
L8022: .byte $77 ;120 rows.
L8023: .byte $0F ;Water.
;Dragonlord's castle - ground floor. Map #$02.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank00.asm#L4775-L4795LAF7E: ADC MapNumber ;
LAF80: TAY ;
LAF81: LDA MapDatTbl,Y ;
LAF84: STA MapDatPtrLB ;
LAF86: INY ;Get the pointer to the map layout data.
LAF87: LDA MapDatTbl,Y ;
LAF8A: STA MapDatPtrUB ;
LAF8C: INY ;
LAF8D: LDA MapDatTbl,Y ;Get the map width.
LAF90: STA MapWidth ;
LAF92: INY ;
LAF93: LDA MapDatTbl,Y ;Get the map height.
…Checked by claude, 2026-10-28 — read MapDatTbl and the map loader in InitMapData at the pinned commit: five bytes a map, pointer, width, height, boundary blockRevised after a check by a second AI model, 2026-10-28.Map names and the edge blocks are the disassembly's comments.
The game's 51 map links, as parallel rows: a square on one map, the map and square it leads to, and the way the hero then faces. Stepping onto a link or taking stairs down reads a row forward, and he faces the row's way unless he arrives by descending stairs, when he faces right; taking stairs up reads it backward, from the square a row leads to back to its first square, and he faces left. dw1-tables/map-links
About: Dragon Warrior Stairs
Codedragon-warrior-disassembly: NES Dragon Warrior software disassembly ·source_files/Bank03.asm#L8940-L9048MapEntryTbl:
LF3C8: .byte MAP_OVERWORLD, $02, $02 ;Overworld(2,2) -> Garinham(0,14).
LF3CB: .byte MAP_OVERWORLD, $51, $01 ;Overworld(81,1) -> Staff of rain cave(4,9).
LF3CD: .byte MAP_OVERWORLD, $68, $0A ;Overworld(104,10) -> Koll(19,23).
LF3D1: .byte MAP_OVERWORLD, $30, $29 ;Overworld(48,41) -> Brecconary(0,15).
LF3D4: .byte MAP_OVERWORLD, $2B, $2B ;Overworld(43,43) -> Tant castle GF(11,29).
LF3D7: .byte MAP_OVERWORLD, $68, $2C ;Overworld(104,44) -> Swamp cave(0,0).
LF3DA: .byte MAP_OVERWORLD, $30, $30 ;Overworld(48,48) -> DL castle GF(10,19).
LF3DD: .byte MAP_OVERWORLD, $68, $31 ;Overworld(104,49) -> Swamp cave(0,29).
LF3E0: .byte MAP_OVERWORLD, $1D, $39 ;Overworld(29,57) -> Rock mtn B1(0,7).
LF3E3: .byte MAP_OVERWORLD, $66, $48 ;Overworld(102,72) -> Rimuldar(29,14).
LF3E6: .byte MAP_OVERWORLD, $19, $59 ;Overworld(25,89) -> Hauksness(0,10).
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank00.asm#L2124-L2131MapEntryDirTbl:
L9914: .byte DIR_RIGHT, DIR_DOWN, DIR_UP, DIR_RIGHT, DIR_UP, DIR_RIGHT, DIR_UP, DIR_RIGHT
L991C: .byte DIR_RIGHT, DIR_LEFT, DIR_RIGHT, DIR_DOWN, DIR_DOWN, DIR_RIGHT, DIR_DOWN, DIR_DOWN
L9924: .byte DIR_DOWN, DIR_DOWN, DIR_RIGHT, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN
L992C: .byte DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN
L9934: .byte DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN
L993C: .byte DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN, DIR_DOWN
L9944: .byte DIR_DOWN, DIR_DOWN, DIR_DOWNdragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L4199-L4243LD93D: LDA #$00 ;Indicate player came down stairs. Always faces right.
LD93F: BEQ + ;Branch always.
CalcNextMap:
LD941: LDA #$01 ;Indicate player new facing direction is table lookup.
LD943:* STA GenByte2C ;Store player direction source flag.
LD945: LDX #$00 ;Zero out indexes.
LD947: LDY #$00 ;
MapCheckLoop1:
LD949: LDA MapNumber ;Has the right map been found in the table?
LD94B: CMP MapEntryTbl,X ;
LD94E: BNE NextMapEntry1 ;If not, branch to check next table entry.
LD950: LDA CharXPos ;Does the X position in the table match the player's position?
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L8993-L8995;This table is the same size as the table above and each entry is the destination from the exits
;above. Entry 1 in the table above corresponds to entry 1 in the table below. Stairs up use this
;table for the current map and use the table above for the destination.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L4296-L4335LD9C3: CMP #BLK_STAIR_UP ;Is player standing on stair up block?
LD9C5: BNE NoStairsFound ;If not, branch to tell player no stairs are here.
StairUpFound:
LD9C7: LDX #$00 ;Zero out indexes.
LD9C9: LDY #$00 ;
MapCheckLoop2:
LD9CB: LDA MapNumber ;Has the right map been found in the table?
LD9CD: CMP MapTargetTbl,X ;
LD9D0: BNE NextMapEntry2 ;If not, branch to check next table entry.
LD9D2: LDA CharXPos ;Does the X position in the table match the player's position?
LD9D4: CMP MapTargetTbl+1,X ;
LD9D7: BNE NextMapEntry2 ;If not, branch to check next table entry.
…Checked by claude, 2026-10-28 — read the three tables and MapCheckLoop1 at the pinned commit: a match on map, X, and Y sets the target map and position; StairsFaceRight when the hero came down stairs, else MapEntryDirTblRevised after a check by a second AI model, 2026-10-28.Map names and numbers are the disassembly's comments and aliases. The facing table has 51 entries for the 51 links.
The song of each of the 30 map numbers, the one a map change starts and the one play returns to after the flute or harp on the map, after putting on a cursed item, and at the end of a fight (won, fled, or the monster running away): the overworld, the five towns, and the throne room each have their own; Tantegel's ground floor and sublevel share one with the Staff of Rain and Rainbow Drop caves; and the other maps play one of the eight dungeon songs (dw1-tables/tracks), the first on the Dragonlord's ground floor and on the first floor of each cave, the next a floor deeper, the fourth at Hauksness, and the eighth on the Dragonlord's bottom floor. dw1-tables/map-music
source_files/Bank00.asm#L5195-L5225ResumeMusicTbl:
LB1AE: .byte MSC_NOSOUND ;Unused. Silence music.
LB1AF: .byte MSC_OUTDOOR ;overworld. Resume overworld music.
LB1B0: .byte MSC_DUNGEON1 ;dragonlord castle, ground floor map. Resume dungeon 1 music.
LB1B1: .byte MSC_DUNGEON4 ;Hauksness. Resume dungeon 4 music.
LB1B2: .byte MSC_TANTAGEL2 ;Tantagel castle, ground floor. Resume tantagel 2 music.
LB1B3: .byte MSC_THRN_ROOM ;Tantagel castle, throne room. Resume tantagel 1 music.
LB1B4: .byte MSC_DUNGEON8 ;Dragonlord castle, bottom floor. Resume dungeon 8 music.
LB1B5: .byte MSC_VILLAGE ;Kol. Resume village music.
LB1B6: .byte MSC_VILLAGE ;Brecconary. Resume village music.
LB1B7: .byte MSC_VILLAGE ;Garinham. Resume village music.
LB1B8: .byte MSC_VILLAGE ;Cantlin. Resume village music.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank00.asm#L5079-L5084LB10E: LDX MapNumber ;Get current map number.
LB110: LDA ResumeMusicTbl,X ;Use current map number to resume music.
LB113: BRK ;
LB114: .byte $04, $17 ;($81A0)InitMusicSFX, bank 1.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Dragon_Warrior_Defines.asm#L1023-L1050;Music/Sounds.
.alias MSC_NOSOUND $00 ;No sound.
.alias MSC_INTRO $01 ;Intro music.
.alias MSC_THRN_ROOM $02 ;Throne room castle music.
.alias MSC_TANTAGEL2 $03 ;Tantagel 2 castle music.
.alias MSC_VILLAGE $04 ;Village/pre-game music.
.alias MSC_OUTDOOR $05 ;Outdoor music.
.alias MSC_DUNGEON1 $06 ;Dungeon 1 music.
.alias MSC_DUNGEON2 $07 ;Dungeon 2 music.
.alias MSC_DUNGEON3 $08 ;Dungeon 3 music.
.alias MSC_DUNGEON4 $09 ;Dungeon 4 music.
.alias MSC_DUNGEON5 $0A ;Dungeon 5 music.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L5062-L5072LDDAF: LDA #MSC_FRY_FLUTE ;Fairy flute music.
LDDB1: BRK ;
LDDB2: .byte $04, $17 ;($81A0)InitMusicSFX, bank 1.
LDDB4: BRK ;Wait for the music clip to end.
LDDB5: .byte $03, $17 ;($815E)WaitForMusicEnd, bank 1.
LDDB7: LDX MapNumber ;Get current map number.
LDDB9: LDA ResumeMusicTbl,X ;Use current map number to resume music.
LDDBC: BRK ;
LDDBD: .byte $04, $17 ;($81A0)InitMusicSFX, bank 1.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L5181-L5185HarpFail:
LDE41: LDX MapNumber ;Get current map number.
LDE43: LDA ResumeMusicTbl,X ;Use current map number to resume music.
LDE46: BRK ;
LDE47: .byte $04, $17 ;($81A0)InitMusicSFX, bank 1.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L5201-L5206LDE58: JSR WearCursedItem ;($DFE7)Player puts on cursed item.
LDE5B: LDX MapNumber ;Get current map number.
LDE5D: LDA ResumeMusicTbl,X ;Use current map number to resume music.
LDE60: BRK ;
LDE61: .byte $04, $17 ;($81A0)InitMusicSFX, bank 1.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L5219-L5224LDE6E: JSR ChkDeathNecklace ;($E00A)Check if player is wearking the death necklace.
LDE71: LDX MapNumber ;Get current map number.
LDE73: LDA ResumeMusicTbl,X ;Use current map number to resume music.
LDE76: BRK ;
LDE77: .byte $04, $17 ;($81A0)InitMusicSFX, bank 1.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7202-L7206RunSuccessful:
LE8A4: LDX MapNumber ;Get current map number.
LE8A6: LDA ResumeMusicTbl,X ;Use current map number to resume music.
LE8A9: BRK ;
LE8AA: .byte $04, $17 ;($81A0)InitMusicSFX, bank 1.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7526-L7536LEA79: PLA ;Did player level up?
LEA7A: CMP DisplayedLevel ;
LEA7C: BNE DoLevelUp ;If so, branch.
LEA7E: BRK ;Wait for the music clip to end.
LEA7F: .byte $03, $17 ;($815E)WaitForMusicEnd, bank 1.
LEA81: LDX MapNumber ;Get current map number.
LEA83: LDA ResumeMusicTbl,X ;Use current map number to resume music.
LEA86: BRK ;
LEA87: .byte $04, $17 ;($81A0)InitMusicSFX, bank 1.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7546-L7556LEA90: LDA #MSC_LEVEL_UP ;Level up music.
LEA92: BRK ;
LEA93: .byte $04, $17 ;($81A0)InitMusicSFX, bank 1.
LEA95: BRK ;Wait for the music clip to end.
LEA96: .byte $03, $17 ;($815E)WaitForMusicEnd, bank 1.
LEA98: LDX MapNumber ;Get current map number.
LEA9A: LDA ResumeMusicTbl,X ;Use current map number to resume music.
LEA9D: BRK ;
LEA9E: .byte $04, $17 ;($81A0)InitMusicSFX, bank 1.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L8472-L8480LEFD0: JSR CopyEnUpperBytes ;($DBE4)Copy enemy upper bytes to description RAM.
LEFD3: JSR DoDialogLoBlock ;($C7CB)The enemy is running away.
LEFD6: .byte $E3 ;TextBlock15, entry 3.
LEFD7: LDX MapNumber ;Get current map number.
LEFD9: LDA ResumeMusicTbl,X ;Use current map number to resume music.
LEFDC: BRK ;
LEFDD: .byte $04, $17 ;($81A0)InitMusicSFX, bank 1.Checked by claude, 2026-10-28 — read ResumeMusicTbl and the map change's request at the pinned commit (LDX MapNumber, LDA ResumeMusicTbl,X, then InitMusicSFX)Revised after a check by a second AI model, 2026-10-28.Song names follow dw1-tables/tracks, which says where the game plays each; song numbers are the MSC_ defines, and the comments on ResumeMusicTbl name the maps.
Dragon Warrior's song table has 27 entries, each the start of a song's first square, second square, and triangle parts (0 for a silent part); 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: 19 by a constant in the code and the other 8 only through the song of each map (dw1-tables/map-music), so the table holds no unused song. dw1-tables/tracks
About: Dragon Warrior Music driver
Codedragon-warrior-disassembly: NES Dragon Warrior software disassembly ·source_files/Bank01.asm#L505-L532MscStrtIndxTbl:
L8297: .word SQNoSnd, SQNoSnd, TRINoSnd ;($84CB, $84CB, $84CE)No sound.
L829D: .word SQ1Intro, SQ2Intro, TriIntro ;($8D6D, $8E3D, $8F06)Intro.
L82A3: .word SQ1ThrnRm, NULL, TRIThrnRm ;($84D3, $0000, $853E)Throne room.
L82A9: .word SQ1Tantagel, NULL, TRITantagel ;($85AA, $0000, $85B4)Tantagel castle.
L82AF: .word SQ1Village, NULL, TRIVillage ;($872F, $0000, $87A2)Village/pre-game.
L82B5: .word SQ1Outdoor, NULL, TRIOutdoor ;($8844, $0000, $8817)Outdoors.
L82BB: .word SQ1Dngn, NULL, TRIDngn1 ;($888B, $0000, $891D)Dungeon 1.
L82C1: .word SQ1Dngn, NULL, TRIDngn2 ;($888B, $0000, $8924)Dungeon 2.
L82C7: .word SQ1Dngn, NULL, TRIDngn3 ;($888B, $0000, $892B)Dungeon 3.
L82CD: .word SQ1Dngn, NULL, TRIDngn4 ;($888B, $0000, $8932)Dungeon 4.
L82D3: .word SQ1Dngn, NULL, TRIDngn5 ;($888B, $0000, $8937)Dungeon 5.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank01.asm#L349-L373InitMusicSFX:
L81A0: LDX #$FF ;Indicate the sound engine is active.
L81A2: STX SndEngineStat ;
L81A5: TAX ;
L81A6: BMI DoSFX ;If MSB set, branch to process SFX.
DoMusic:
L81A8: ASL ;Index into table is 4*n + 4. Points to last word in table entry.
L81A9: STA MusicTemp ;
L81AB: ASL ;There are 3 words for each music entry in the table.
L81AC: ADC MusicTemp ;The entries are for SQ1, SQ2 and TRI from left to right.
L81AE: ADC #$04 ;
L81B0: TAY ;Use Y as index into table.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank00.asm#L5195-L5225ResumeMusicTbl:
LB1AE: .byte MSC_NOSOUND ;Unused. Silence music.
LB1AF: .byte MSC_OUTDOOR ;overworld. Resume overworld music.
LB1B0: .byte MSC_DUNGEON1 ;dragonlord castle, ground floor map. Resume dungeon 1 music.
LB1B1: .byte MSC_DUNGEON4 ;Hauksness. Resume dungeon 4 music.
LB1B2: .byte MSC_TANTAGEL2 ;Tantagel castle, ground floor. Resume tantagel 2 music.
LB1B3: .byte MSC_THRN_ROOM ;Tantagel castle, throne room. Resume tantagel 1 music.
LB1B4: .byte MSC_DUNGEON8 ;Dragonlord castle, bottom floor. Resume dungeon 8 music.
LB1B5: .byte MSC_VILLAGE ;Kol. Resume village music.
LB1B6: .byte MSC_VILLAGE ;Brecconary. Resume village music.
LB1B7: .byte MSC_VILLAGE ;Garinham. Resume village music.
LB1B8: .byte MSC_VILLAGE ;Cantlin. Resume village music.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank01.asm#L3066-L3066L9362: LDA #MSC_NOSOUND ;Silence music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L1608-L1608LCC19: LDA #MSC_NOSOUND ;Silence music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank02.asm#L3517-L3517LBCC7: LDA #MSC_INTRO ;Start intro music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L3254-L3254LD49C: LDA #MSC_THRN_ROOM ;Throne room castle music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L1244-L1244LCA03: LDA #MSC_VILLAGE ;Village music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L4140-L4140LD8F6: LDA #MSC_VILLAGE ;Village music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L5319-L5319LDF00: LDA #MSC_OUTDOOR ;Outdoor music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L2455-L2455LD09F: LDA #MSC_DUNGEON1 ;Dungeon 1 music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7074-L7074LE801: LDA #MSC_END_BOSS ;End boss music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7119-L7119LE83B: LDA #MSC_END_BOSS ;End boss music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank01.asm#L3111-L3111L939D: LDA #MSC_END ;End music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L5149-L5149LDE10: LDA #MSC_SILV_HARP ;Silver harp music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7104-L7104LE828: LDA #MSC_SILV_HARP ;Silver harp music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L5062-L5062LDDAF: LDA #MSC_FRY_FLUTE ;Fairy flute music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7059-L7059LE7EE: LDA #MSC_FRY_FLUTE ;Fairy flute music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L5265-L5265LDEB2: LDA #MSC_RNBW_BRDG ;Rainbow bridge music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L8085-L8085LED9C: LDA #MSC_DEATH ;Death music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L8095-L8095LEDA7: LDA #MSC_DEATH ;Death music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L4123-L4123LD8DF: LDA #MSC_INN ;Inn music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L2448-L2448LD097: LDA #MSC_PRNCS_LOVE ;Gwaelin's love music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L3247-L3247LD494: LDA #MSC_PRNCS_LOVE ;Gwaelin's love music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L5522-L5522LDFFA: LDA #MSC_CURSED ;Cursed music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7070-L7070LE7FC: LDA #MSC_REG_FGHT ;Regular fight music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7115-L7115LE836: LDA #MSC_REG_FGHT ;Restart regular fight music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7151-L7151LE865: LDA #MSC_REG_FGHT ;Regular fight music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7163-L7163LE874: LDA #MSC_REG_FGHT ;Regular fight music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7375-L7375LE999: LDA #MSC_VICTORY ;Victory music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L7546-L7546LEA90: LDA #MSC_LEVEL_UP ;Level up music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Dragon_Warrior_Defines.asm#L1023-L1050;Music/Sounds.
.alias MSC_NOSOUND $00 ;No sound.
.alias MSC_INTRO $01 ;Intro music.
.alias MSC_THRN_ROOM $02 ;Throne room castle music.
.alias MSC_TANTAGEL2 $03 ;Tantagel 2 castle music.
.alias MSC_VILLAGE $04 ;Village/pre-game music.
.alias MSC_OUTDOOR $05 ;Outdoor music.
.alias MSC_DUNGEON1 $06 ;Dungeon 1 music.
.alias MSC_DUNGEON2 $07 ;Dungeon 2 music.
.alias MSC_DUNGEON3 $08 ;Dungeon 3 music.
.alias MSC_DUNGEON4 $09 ;Dungeon 4 music.
.alias MSC_DUNGEON5 $0A ;Dungeon 5 music.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L6493-L6499LE4E3: CMP #EN_DRAGONLORD2 ;Is this the final boss?
LE4E5: BNE + ;If not, branch to play enter fight music.
LE4E7: LDA #MSC_END_BOSS ;End boss music.
LE4E9: BNE LoadFightMusic ;Branch always.
LE4EB:* LDA #MSC_ENTR_FGHT ;Enter fight music.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank03.asm#L3193-L3198LD452: JSR DoDialogHiBlock ;($C7C5)Rest then for a while...
LD455: .byte $26 ;TextBlock19, entry 6.
LD456: BRK ;Shut down game after player chooses not to continue.
LD457: .byte $05, $17 ;($9362)ExitGame, bank 1.Checked by claude, 2026-10-28 — read MscStrtIndxTbl, InitMusicSFX (song n reads the three words at 6n), ResumeMusicTbl, and every LDA #MSC_ line in the four banks at the pinned commit; each request names its routineRevised after a check by a second AI model, 2026-10-28.Song names say where the game plays each: no soundtrack release or sound test found prints a title for each of the game's songs. The disassembly's names, its MSC_ defines' comments, by number: 0 No sound; 1 Intro; 2 Throne room; 3 Tantegel castle; 4 Village/pre-game; 5 Outdoors; 6 Dungeon 1; 7 Dungeon 2; 8 Dungeon 3; 9 Dungeon 4; 10 Dungeon 5; 11 Dungeon 6; 12 Dungeon 7; 13 Dungeon 8; 14 Enter fight; 15 End boss; 16 End game; 17 Silver harp; 18 Fairy flute; 19 Rainbow bridge; 20 Player death; 21 Inn; 22 Princess Gwaelin; 23 Cursed; 24 Regular fight; 25 Victory; 26 Level up. A request's routine is the nearest label above its line. The eight dungeon songs share one first-square part and start the triangle part at eight points seven bytes apart, so they are one tune in eight versions; song 14 starts every ordinary fight, and song 24 is requested only to restart fight music after an item's tune.
The sound effects table points to the data of the 22 sound effects by number; a request with the high bit set plays one instead of starting a song, and the sound engine sets up the second square and noise channels for it. Player hit 1 and Player hit 2 point to the same data. dw1-tables/sound-effects
About: Dragon Warrior Sound effects
Code notesdragon-warrior-disassembly: NES Dragon Warrior software disassembly ·source_files/Bank01.asm#L536-L558SFXStrtIndxTbl:
L8339: .word FFDamageSFX ;($836E)Force field damage.
L833B: .word WyvernWngSFX ;($8377)Wyvern wing.
L833D: .word StairsSFX ;($839E)Stairs.
L833F: .word RunSFX ;($83C2)Run away.
L8341: .word SwmpDmgSFX ;($83F8)Swamp damage.
L8343: .word MenuSFX ;($8401)Menu button.
L8345: .word ConfirmSFX ;($8406)Confirmation.
L8347: .word EnHitSFX ;($8411)Enemy hit.
L8349: .word ExclntMvSFX ;($8420)Excellent move.
L834B: .word AttackSFX ;($843B)Attack.
L834D: .word HitSFX ;($844A)Player hit 1.
…dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank01.asm#L349-L353InitMusicSFX:
L81A0: LDX #$FF ;Indicate the sound engine is active.
L81A2: STX SndEngineStat ;
L81A5: TAX ;
L81A6: BMI DoSFX ;If MSB set, branch to process SFX.dragon-warrior-disassembly: NES Dragon Warrior software disassembly · source_files/Bank01.asm#L397-L414DoSFX:
L81E2: ASL ;*2. Pointers in table are 2 bytes.
L81E3: TAX ;
L81E4: LDA #$01 ;Indicate a SFX is active.
L81E6: STA SFXActive ;
L81E8: LDA SFXStrtIndxTbl,X ;
L81EB: STA NoisIndexLB ;Get pointer to SFX data from table.
L81ED: LDA SFXStrtIndxTbl+1,X ;
L81F0: STA NoisIndexUB ;
L81F2: LDA #$08 ;Disable SQ2 sweep unit.
L81F4: STA SQ2Cntrl1 ;
L81F7: LDA #$30 ;Disable length counter and set constant
…Revised after a check by a second AI model, 2026-10-28.Effect names are the disassembly's comments. Its data labels, by number: 0 FFDamageSFX, 1 WyvernWngSFX, 2 StairsSFX, 3 RunSFX, 4 SwmpDmgSFX, 5 MenuSFX, 6 ConfirmSFX, 7 EnHitSFX, 8 ExclntMvSFX, 9 AttackSFX, 10 HitSFX, 11 HitSFX, 12 AtckPrepSFX, 13 Missed1SFX, 14 Missed2SFX, 15 WallSFX, 16 TextSFX, 17 SpellSFX, 18 RadiantSFX, 19 OpnChestSFX, 20 OpnDoorSFX, 21 FireSFX.