Guest User

Untitled

a guest
Jan 31st, 2016
165
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dragon Warrior III rough memory map
  2. ===================================
  3.  
  4. [Note: item, spell, Return target lists were taken from
  5. http://datacrystal.romhacking.net/wiki/Dragon_Warrior_III:RAM_map]
  6.  
  7. Memory map
  8. ----------
  9. 0000+4 ???
  10. 0004+10 Temporary storage
  11. 0014+2 Controller state: newly pressed buttons on controllers 1 and 2
  12. 0016+2 Controller state: still-pressed buttons on controllers 1 and 2
  13. 0018+2 Controller state: repeat timers for controllers 1 and 2
  14. 001A+1 ???
  15. 001B+1 Some sort of flag byte?
  16. $01: lock flag used by $C1F9/$C1FD/$C204
  17. $04: seems to be a lock, see $C2B0 and $C2BA
  18. $10: OAM mirror lock (set by $C427, cleared by $C431)
  19. 001C+2 RNG seed (2 bytes)
  20. 001E+3 ???
  21. 0021+5 Temporary storage
  22. 0026+2 ???
  23. 0028+1 Saved message buffer line for multi-target spells? (see 14/$ABE4)
  24. 0029+1 ???
  25. 002A+2 Lead party member X/Y tile position on overworld
  26. 002C+1 Flag: nonzero = movement blocked? (see sta $2C in bank 14)
  27. 002D+2 Ship X/Y tile position on overworld
  28. 002F+1 Map type flags:
  29. $01 = in town/dungeon (not set = overworld)
  30. $02 = in Alefgard
  31. 0030+2 Lead party member X/Y tile position in current map
  32. 0032+1 Flag? (see $C90A)
  33. 0033+1 Set to 2 by NMI to indicate that the OAM mirror ($02xx) has been
  34. pushed to OAM, or 0 to indicate that OAM was not updated; the
  35. sprite swapping routine ($C90A) doesn't attempt to swap sprites
  36. if this is zero.
  37. 0034+3 Save space for A/X/Y registers in BRK handler
  38. 0037+5 ???
  39. 003C+27 Temporary storage
  40. 0040+2: call pointer for battle functions applied to all allies/enemies
  41. 0042+1: used by bank 0 spell lookup routines
  42. 004C+1: number of living party members in battle
  43. 004D+1: number of living enemies in battle
  44. 0050+1: used to return menu result (menu item index, $FF if cancelled)
  45. 0051+1: current character (0-3=party, 4-11=enemies) in battle routines
  46. 0052+1: current turn order index (0-11) in battle turn resolution
  47. 0062+1: passes preset encounter ID ($6A6B) to battle entry point
  48. 0063+2 ???
  49. 0065+1 Temporary storage (some routines store number of characters in party)
  50. 0066+2 Temporary storage (used as counter and limit in 14/$B1EE)
  51. 0068+4 ???
  52. 006C+2 Temporary storage (used as pointer for map data in $DA32)
  53. 006E+2 ???
  54. 0070+10 Temporary storage
  55. 007C: holds tile returned from tile lookup routine at 15/$EF34
  56. 0080+1 Current column in message window
  57. 0081+1 Current row in message window
  58. 0082+4 ???
  59. 0086+1 Flag: nonzero = map has no poison damage (? see $CE52)
  60. 0087+1 Flag: nonzero = disable player control (? see $CE52)
  61. 0088+2 Width and height of current map (in tiles)
  62. 008A+1 Out-of-range tile for current map
  63. 008B+1 Current map number
  64. 008C+1 $E0: Current map layer (high 3 bits of tile bytes)
  65. 008D+4 ???
  66. 0090+1 Field frame counter (advances whenever the player can move)
  67. 0091+1 ???
  68. 0092+1 Tile type lead party member is about to step on (when moving)
  69. 0093+4 Tile type under each party member
  70. 0097+3 ??? (see 13/$995D)
  71. 0098+2 ???
  72. 009A+1 Type of current map
  73. <$0C = Return is allowed
  74. 009B+2 ??? (might be ghost ship position? cleared in Return handling at 6/$B607)
  75. 009D+1 ??? (might be ghost ship orientation? see 13/$9971)
  76. 009E+2 Ramia X/Y tile position on world map
  77. 00A0+1 ???
  78. 00A1+1 Temporary storage (loop counter used by $C952)
  79. 00A2+2 ???
  80. 00A4+1 Random number counter, added to the low 8 bits of the RNG seed to
  81. return a random number
  82. 00A5+8 ???
  83. 00AD+1 Repel status
  84. Bits 0-6: Remaining step count
  85. Bit 7: 1 if Fairy Water, 0 if Repel
  86. 00AE+2 ???
  87. 00B0+4 Movement flags for party members:
  88. $01: No damage from damage tiles (Water Flying Cloth, etc.)
  89. $02: Gain HP while walking (Armor of Radiance, Ring of Life)
  90. $04: Gain experience while walking (Shoes of Happiness)
  91. 00B4+4 ???
  92. 00B8+2 Arguments to some bank 2 routines (2/$9939, 2/$9956)
  93. 00BA+1 Temporary storage (2/$9939)
  94. 00BB+F ???
  95. 00CA+1 Controller status returned by $CB86
  96. 00CB+3 ???
  97. 00CE+7 Temporary storage; mostly used to pass arguments to bank 0 and
  98. message routines
  99. 00CE+1: Party member index for various subroutines
  100. 00CF+2: Damage amount for damage subroutine (0/$9302), etc.
  101. 00CE+3: Gold add/subtract amount (0/$95FD, 0/$963D)
  102. 00CF+3: Experience add amount (0/$959A)
  103. 00D3+1: spell/item ID for messages
  104. 00D4+1: item ID for second item name in messages
  105. 00D5+1 ???
  106. 00D6+8 Pointers to music data for each of 4 sound channels
  107. 00DE+2 Pointer for the PCM channel
  108. 00E0+2 Temporary storage (pointer for music routines)
  109. 00E2+8 Timers? for each of 4 sound channels
  110. 00EA+1 Flag for the PCM channel
  111. 00EB+2 ???
  112. 00ED+8 ??? for each of 4 sound channels
  113. 00F5+1 ??? for the PCM channel
  114. 00F6+8 Envelope type and offset for each of 4 sound channels
  115. 00FE+2 ???
  116.  
  117. 0100+74 Character sprite data (4 bytes per slot: X pos, Y pos, char ID?, flags)
  118. First 4 entries are for the party
  119. Flags:
  120. $80 = stationary NPC
  121. $40 = terminate processing? (see $CE52)
  122. $10 = ???
  123. $0C = slots 0-3 (party): party index
  124. $03 = direction (0=up, 1=right, 2=down, 3=left)
  125. $FF = slot unused
  126.  
  127. 02xx OAM mirror
  128.  
  129. 03E7+1 Current background color
  130. 03E8+18 Current palette (8 tile/sprite palettes * 3 colors each)
  131.  
  132. 0472+8 ??? for each of 4 sound channels (see 30/$B904)
  133. 047C+1 ??? (see 30/$B904; initialized to $FF)
  134. 047D+1 ??? (see 30/$B904; gets first byte from channel 0)
  135. 047E+1 ??? (see 30/$B904)
  136. 047F+1 ??? (see 30/$B904)
  137.  
  138. 0500+10 Current HP for each of 8 enemies
  139. 0510+8 Current MP for each of 8 enemies
  140. 0518+8 Current agility for each of 8 enemies
  141. 0520+10 Current defense power for each of 8 enemies
  142. 0530+10 Current status for each of 8 enemies:
  143. Status byte 0:
  144. $80 = character present (?)
  145. $40 = BeDragon
  146. $20 = StopSpell
  147. $10 = Surround
  148. $0C = enemy group number
  149. $03 = max # turns of sleep left
  150. Status byte 1:
  151. $80 = alive ($00 indicates a dead character)
  152. $40 = parrying
  153. $20 = asleep
  154. $10 = confused
  155. $0F = Bounce (set to $0F when Bounce is cast on the character)
  156. 10540+C Flags for each character:
  157. $80 = character is enemy
  158. $78 = turn order
  159. $07 = enemy index (if enemy)
  160. $03 = party index (if not enemy); this is the battle party
  161. index (as modified by Limbo/Chance), not the
  162. original party index
  163. 054C+C Battle command (bits $70) and target (bits $87) for each character
  164. 0 = Attack
  165. 1 = Spell
  166. 2 = Parry
  167. 3 = Item
  168. 4 = (BeDragon action 0)
  169. 5 = (BeDragon action 1)
  170. 7 = Do nothing (dummy value used for dead characters)
  171. (also used to hold randomized speed when computing turn order)
  172. 0558+C Battle command data (e.g. item ID) for each party member; action
  173. ID for each enemy (also used to hold turn order when computing
  174. turn order)
  175. 0564+1 ???
  176. 0565+1 Bitmask of enemies with Bikill status
  177. 0566+1 Battle flags:
  178. $C0 = Ironize turns left
  179. $20 = last attack missed
  180. $10 = ???
  181. $08 = suppress enemy actions, 100% hit/run chance
  182. (preemptive attack)
  183. $04 = suppress party actions, 25% chance to cancel enemy
  184. actions (failed run, back attack)
  185. $03 = run counter (number of run attempts so far during
  186. the battle)
  187. 0567+1
  188. Battle flags:
  189. $80 = current effect is reflectable
  190. $40 = current effect was reflected
  191. $20 = Chance forced-critical effect
  192. $10 = forced effect (e.g. Spider's Web, Dream Ruby)
  193. $0C = Chance time-stop effect turns left
  194. $03 = Character who used Chance to get the time-stop effect
  195. 0568+1 Battle flags:
  196. $80 = enemies "departed"
  197. $40 = at least one enemy defeated
  198. $20 = multiple enemy types present
  199. $10 = spells disallowed (Pyramid basement or Chance darkness)
  200. $08 = ??? (set at beginning of an enemy action)
  201. $01 = used for battle message selection with some effects
  202. 0569+4 Action index for scripted enemies (4 bits per enemy)
  203. 056D+4 Enemy IDs for each enemy group (used in encounter setup, see 0/$844E)
  204. 0571+4 Enemy counts for each enemy group (used in encounter setup)
  205. 0575+1 Special effect flags for attacks:
  206. $80: Possible instant death (Poison Needle)
  207. $20: Damage from Shield of Sorrow
  208. $10: Extra damage (Zombie Slasher / Dragon Killer)
  209. $08: High miss chance (Demon Axe)
  210. $04: Return 1/4 damage to attacker (Multi-Edge Sword)
  211. $02: 8x critical chance (Sword of Destruction / Demon Axe)
  212. $01: Return 1/2 damage to attacker (Swordedge Armor)
  213. 0576+1 Used by enemy AI to avoid using spells without enough MP more than once
  214. 0577+9 ???
  215. 0580+B0 Message window buffer (22 characters * 8 lines)
  216.  
  217. 0634+A ??? (see 1/$82A9)
  218. 063F+3 Number for messages
  219. 0642+1 Temporary storage (used in map decompression)
  220. 0643+8 Second action command for multi-action enemies
  221. 0643+1: Also used in map decompression (16-bit address with $0642)
  222. 064B+8 Second action target for multi-action enemies
  223. 0653+8 Third action command for multi-action enemies
  224. 065B+8 Third action target for multi-action enemies
  225. 0663+4 ???
  226. 0667+10 Temporary storage (holds computed damage per enemy during battle)
  227. 0677+8 Temporary storage (holds post-damage HP / 4 or $FE if overkill)
  228. 067F+48 ???
  229. 06C7+1 MMC1 register 0 mirror
  230. 06C8+1 MMC1 register 1 mirror
  231. 06C9+9 ???
  232. 06D2+1 NMI counter
  233. 06D3+1 ???
  234. 06D4+1 Flags:
  235. $10 = run battle entry animation? (see 0/$88BD)
  236. 06D5+1 Current $8000 ROM bank
  237. 06D6+1 ???
  238. 06D7+1 ??? (see $C925, $C204)
  239. 06D8+5 ???
  240. 06DD+1 Current message speed (0-7)
  241. 06DE+2 Day/night timer (16 bits)
  242. - Incremented by #$DF+random()%32 each step outside; see $D022
  243. - Cycle length = $CC00
  244. - $1E00 = midday, $3C00 = afternoon, $5A00 = evening, $7800 = night
  245. 06E0+1 Current text color
  246. 06E1+1 (? see 12/$AF95)
  247. 06E2+E ???
  248. 06F0+1 Flag? (see 30/$B9B3, 30/$B9BC)
  249. 06F1+1 Channel counter for music routines
  250. 06F2+1 ??? (see 30/$B962)
  251. 06F3+1 ??? (see 30/$B96A)
  252. 06F4+C ???
  253.  
  254. 0700+4 Party member level
  255. 0704+4 Party member strength
  256. 0708+4 Party member agility
  257. 070C+4 Party member intelligence
  258. 0710+4 Party member luck
  259. 0714+4 Party member vitality
  260. 0718+4 Party member class/sex
  261. Bits 0-2: class
  262. 0 = Hero
  263. 1 = Wizard
  264. 2 = Pilgrim
  265. 3 = Sage
  266. 4 = Soldier
  267. 5 = Merchant
  268. 6 = Fighter
  269. 7 = Goof-off
  270. Bit 3: sex (0 = male, 1 = female)
  271. 071C+8 Party member HP (16 bits)
  272. 0724+8 Party member max HP (16 bits)
  273. 072C+8 Party member MP (16 bits)
  274. 0734+8 Party member max MP (16 bits)
  275. 073C+8 Party member status (2 bytes of flags)
  276. Status byte 0:
  277. $80 = character present
  278. $40 = BeDragon
  279. $20 = StopSpell
  280. $10 = Surround
  281. $08 = Bikill
  282. $04 = Barrier
  283. $03 = max # turns of sleep left (note that sleep status
  284. is recorded at $6A9B+N for party member N)
  285. Status byte 1:
  286. $80 = alive ($00 indicates a dead character)
  287. $40 = numb
  288. $20 = poison
  289. $10 = confused
  290. $0F = Bounce (set to $0F when Bounce is cast on the character)
  291. 0744+C Party member experience (24 bits)
  292. 0750+C Party member Return list (3 bytes)
  293. Byte 0:
  294. $01 = Aliahan
  295. $02 = Reeve
  296. $04 = Romaly
  297. $08 = Kanave
  298. $10 = Noaniels
  299. $20 = Assaram
  300. $40 = Isis
  301. $80 = Portoga
  302. Byte 1:
  303. $01 = Baharata
  304. $02 = Dhama
  305. $04 = Lancel
  306. $08 = Jipang
  307. $10 = Eginbear
  308. $20 = Samano
  309. $40 = Soo
  310. $80 = Tantegel
  311. Byte 2:
  312. $01 = Hauksness
  313. $02 = Cantlin
  314. $04 = Kol
  315. $08 = Rimuldar
  316. 075C+20 Party member name (8 bytes)
  317. 077C+20 Party member inventory (8 bytes, see item list below)
  318. 079C+20 Party member spells (8 bytes, see spell list below)
  319. 07BC+3 Party gold (24 bits)
  320. 07BF+2 Bitmap of in-use stored PC slots (16 bits)
  321. 07C1+4 Party order (stored PC slot indices, $FF = none)
  322. 07C5+3B Unused
  323.  
  324. 6001+C ??? (copied to save file at $6313, etc.)
  325. 600D+80 Vault contents
  326. 608D+1 Vault gold (in units of 1000 gold)
  327. 608E+1 Game flags:
  328. $08 = Final Key chest
  329. 608F+1 Game flags:
  330. $04 = ???
  331. $02 = ???
  332. 6090+1 Game flags:
  333. $80 = ???
  334. $40 = ???
  335. $20 = ???
  336. $10 = ???
  337. $08 = ???
  338. $04 = Norud's cave, left chest
  339. $02 = Norud's cave, right chest
  340. 6091+1 Game flags?
  341. 6092+1 Game flags:
  342. $20 = Pyramid 1F chest, hidden NW room
  343. $10 = Pyramid 1F chest, hidden N room left side
  344. $08 = Pyramid 1F chest, hidden N room right side
  345. $04 = Pyramid 1F chest, top of W side 3-way fork
  346. $02 = Pyramid 1F chest, middle of W side 3-way fork
  347. $01 = Pyramid 1F chest, bottom of W side 3-way fork
  348. 6093+1 Game flags:
  349. $80 = Pyramid 1F chest, SW room
  350. $40 = Pyramid 1F chest, SE room
  351. $10 = ???
  352. $02 = Aliahan castle treasury, upper-left chest
  353. $01 = Aliahan castle treasury, upper-right chest
  354. 6094+1 Game flags:
  355. $80 = Aliahan castle treasury, middle-left chest
  356. $40 = Aliahan castle treasury, middle-right chest
  357. $20 = Aliahan castle treasury, lower-left chest
  358. $10 = Aliahan castle treasury, lower-right chest
  359. $04 = Isis castle B2 chest (Meteorite Armband)
  360. $02 = Isis castle NW treasury, upper-left chest
  361. $01 = Isis castle NW treasury, upper-right chest
  362. 6095+1 Game flags:
  363. $80 = Isis castle NE treasury, upper-left chest
  364. $40 = Isis castle NE treasury, upper-right chest
  365. $20 = Isis castle NW treasury, lower-left chest
  366. $10 = Isis castle NW treasury, lower-right chest
  367. $08 = Isis castle NE treasury, lower-left chest
  368. $04 = Isis castle NE treasury, lower-right chest
  369. 6096+1 Game flags:
  370. $20 = Portoga castle treasury, left chest
  371. $10 = Portoga castle treasury, center chest
  372. $08 = Portoga castle treasury, right chest
  373. 6097+1 Game flags?
  374. 6098+1 Game flags:
  375. $08 = ???
  376. $04 = ???
  377. $02 = ???
  378. $01 = ???
  379. 6099+1 Game flags:
  380. $80 = ???
  381. $40 = ???
  382. $20 = ???
  383. $10 = ???
  384. $08 = ???
  385. $04 = ???
  386. $02 = ???
  387. $01 = ???
  388. 609A+1 Game flags:
  389. $80 = ???
  390. 609B+3 Game flags?
  391. 609E+1 Game flags:
  392. $02 = Charlock B3 SW chest (Multi-edge Sword)
  393. $01 = Charlock B4 treasure room chest #1 (Mimic)
  394. 609F+1 Game flags:
  395. $80 = Charlock B4 treasure room chest #2 (Stone of Life)
  396. $80 = Charlock B4 treasure room chest #3 (Leaf of World Tree)
  397. $80 = Charlock B4 treasure room chest #4 (Sage's Stone)
  398. $80 = Charlock B4 treasure room chest #5 (Wizard's Ring)
  399. $80 = Charlock B4 treasure room chest #6 (Mimic)
  400. $04 = Pyramid 2F chest
  401. $02 = Pyramid 3F left chest
  402. $01 = Pyramid 3F right chest (Magic Key)
  403. 60A0+1 Game flags:
  404. $80 = Pyramid 5F chest
  405. $40 = Pyramid 5F chest
  406. $20 = Pyramid 5F chest
  407. $10 = Pyramid 5F chest
  408. $08 = Pyramid 5F chest
  409. $04 = Pyramid 5F chest
  410. $02 = Pyramid 5F chest
  411. $01 = Pyramid 5F chest
  412. 60A1+1 Game flags:
  413. $80 = Pyramid 5F chest
  414. $40 = Pyramid 5F chest
  415. $20 = Pyramid 5F chest
  416. $10 = Pyramid 5F chest
  417. $08 = Pyramid 6F chest (Flashy Clothes)
  418. $04 = ???
  419. $02 = ???
  420. $01 = ???
  421. 60A2+1 Game flags?
  422. 60A3+1 Game flags:
  423. $10 = ???
  424. $08 = ???
  425. $04 = ???
  426. 60A4+1 Game flags?
  427. 60A5+1 Game flags:
  428. $01 = ???
  429. 60A6+1 Game flags?
  430. 60A7+1 Game flags:
  431. $01 = found Wizard's Ring in Isis Castle 3F
  432. 60A8+1 ??? (does not seem to be a bitmask)
  433. 60A9+D Game flags?
  434. 60B6+1 Game flags:
  435. $20 = opened Norud passage
  436. $04 = used Vase of Drought
  437. $02 = ???
  438. 60B7+1 Game flags:
  439. $80 = prevent Return in maps $0C and $7A (see 6/$B512)
  440. Also affects text, see 2/$A9EF
  441. Appears to be set and cleared in various places
  442. $40 = ??? (see 9/$BC84)
  443. $20 = currently in battle (suppresses blue text at nighttime,
  444. $C90A sprite swapping, etc.)
  445. $10 = pressed SW button on Pyramid 3F
  446. $08 = pressed SE button on Pyramid 3F
  447. $04 = used Wake-Up Powder in Noaniels
  448. 60B8+1 Game flags:
  449. $C0 = if $80, the ship is owned (see 6/$B5C4 Return handling)
  450. $3F = ??? (see 14/$B91E)
  451. 60B9+1 Game flags:
  452. $40 = Ramia available
  453. $10 = ???
  454. $04 = saw Galen event in Baharata
  455. $02 = ???
  456. $01 = thrown into Samanoa prison
  457. 60BA+1 Game flags:
  458. $08 = talked to king of Tantegel
  459. $04 = ???
  460. $01 = prevent Return (see 6/$B512)
  461. 60BB+4 New Town merchant name (first 4 characters)
  462. 60BF+1 Game flags:
  463. $40 = Received Royal Scroll from Portoga king
  464. $20 = ???
  465. $02 = ???
  466. 60C0+2 ??? (does not seem to a bitmask)
  467. 60C2+1 Game flags?
  468. 60C3+1 Game flags:
  469. $02 = ???
  470. $01 = ???
  471. 60C4+1 Game flags:
  472. $80 = defeated 3rd pair of Granite Titans
  473. $40 = defeated 2nd pair of Granite Titans
  474. $20 = defeated 1st pair of Granite Titans
  475. $1F = number of steps in Charlock's Granite Titan room
  476. (entrance closes at 1; battles at 27, 29, 31)
  477. 60C5+1 Game flags:
  478. $80 = Zoma defeated?
  479. - Disables field damage (see 14/$B16A)
  480. - Suppresses night mode in Alefgard (see 6/$B59D)
  481. 60C6+1 Game flags:
  482. $40 = talked to the Aliahan king (if clear, hero's mother
  483. blocks the castle exit)
  484. $10 = set on talking to the Aliahan king for the first time
  485. 60C7+1 Game flags:
  486. $80 = ???
  487. $40 = obtained Orochi Sword
  488. 60C8+1 Game flags:
  489. $80 = ???
  490. 60C9+1 Game flags:
  491. $3F = ??? (see 14/$B91E)
  492. 60CA+1 Game flags:
  493. $80 = defeated first Orochi
  494. 60CB+1 Game flags:
  495. $80 = defeated Baramos
  496. $10 = saw Zoma cutscene in Aliahan
  497. 60CC+1 Game flags?
  498. 60CD+1 New Town flags:
  499. $01 = merchant left in New Town
  500. $02 = New Town can reach level 2 (set by entering ship after leaving merchant)
  501. $04 = New Town reached level 2
  502. $08 = New Town can reach level 3 (set by getting Purple Orb)
  503. $10 = New Town reached level 3
  504. $20 = New Town can reach level 4 (set by defeating Boss Troll)
  505. $40 = New Town reached level 4
  506. $80 = Yellow Orb available in New Town (set by getting 3 orbs)
  507. 60CE+1 Game flags:
  508. $20 = obtained Green Orb
  509. $10 = obtained Blue Orb
  510. $08 = obtained Purple Orb
  511. $04 = obtained Yellow Orb
  512. $02 = obtained Red Orb
  513. $01 = obtained Silver Orb
  514. 60CF+2 Game flags?
  515. 60D1+4 New Town merchant name (last 4 characters)
  516. 60D5+1 ???
  517.  
  518. Saved game data (for the active save slot; others follow at $315-byte intervals)
  519. ---------------
  520. 60D6+C PC level (for all stored PCs, 12 slots)
  521. 60E2+C PC strength
  522. 60EE+C PC agility
  523. 60FA+C PC intelligence
  524. 6106+C PC vitality
  525. 6112+C PC luck
  526. 611E+C PC class/sex
  527. 612A+18 PC HP (16 bits)
  528. 6142+18 PC max HP (16 bits)
  529. 615A+18 PC MP (16 bits)
  530. 6172+18 PC max MP (16 bits)
  531. 618A+18 PC status (2 bytes)
  532. 61A2+24 PC experience (24 bits)
  533. 61C6+24 PC Return list (3 bytes)
  534. 61EA+60 PC name (8 bytes)
  535. 624A+60 PC inventory (8 bytes)
  536. - Note that there's a 1-byte overrun when writing the inventory for
  537. a new character, which causes the "hero learns first 8 battle
  538. spells when registering the maximum number of characters" bug.
  539. This is caused by a missing INY instruction after the INX at
  540. $AF59 in bank 7 (in the code to store the initial inventory).
  541. This bug may have been introduced during localization, since in
  542. the Japanese version, all extra PCs start out with only Clothes
  543. in their inventories, and the king of Aliahan gives the hero
  544. weapons for the party.
  545. 62AA+60 PC spells (8 bytes)
  546. 630A+3 Party gold
  547. 630D+2 Bitmap of in-use stored PC slots (16 bits)
  548. 630F+4 Party order (stored PC slot indices, $FF = none)
  549. 6313+C ???
  550. 631F+80 Vault contents
  551. 639F+1 Vault gold (in units of 1000 gold)
  552. 63A0+47 Game flags
  553. 63E7+1 Message speed (0-7)
  554. 63E8+1 Save file index for the main menu (0-2)
  555. 63E9+2 Save file checksum
  556.  
  557. 63EB... Second save file (may not actually be save file number 2; see the
  558. ...66FF save file index byte)
  559.  
  560. 6700... Third save file (may not actually be save file number 3; see the
  561. ...6A14 save file index byte)
  562.  
  563. 6A15+1A Two copies of the string "MANABU YAMADA", used to check whether
  564. save RAM has been initialized
  565. 6A2F+3 ??? (possibly related to save files; see bank 7)
  566. 6A30+2 ???
  567. 6A32+1 Message drawing flags:
  568. $20 = end of message reached
  569. 6A33+1 Temporary storage (saved value of A used by a few routines in bank 14)
  570. 6A34+9 ???
  571. 6A3D+1 DMC enable flag
  572. 6A3E+1 ???
  573. 6A3F+C Next level's experience for each character
  574. 6A4B+4 ??? (some 1-byte data for characters, see 0/$9B8D)
  575. 6A4F+14 ???
  576. 6A63+1 Battle flags:
  577. $80: non-interactive battle (unset = normal battle)
  578. $40: if $80, Ortega/Hydra battle (unset = monster arena battle)
  579. 6A64+1 $80 if in a monster arena battle, $00 otherwise (does not seem to be
  580. used anywhere)
  581. 6A65+1 Group index of enemy that won a non-interactive battle, -2 if the
  582. battle ended with no enemies left, or -1 if a monster arena battle
  583. was aborted after 10 turns with no result
  584. 6A66+1 Battle turn counter (used to end arena battles after 10 turns)
  585. 6A67+1 Player's chosen monster group in monster arena battles
  586. 6A68+1 Random number set after entering commands for all characters in
  587. battle; used as a counter to drive the RNG in 4/$ACBE. This is
  588. not cleared on reset, which is why battles can have different
  589. outcomes even after resetting the RNG seed with a known save
  590. checksum.
  591. 6A69+1 ???
  592. 6A6A+1 Lead party member's level minus highest enemy level in an encounter
  593. (0 if enemy's level is higher)
  594. 6A6B+1 Current preset encounter ID + 1, or 0 if a random encounter
  595. 6A6C+3 ???
  596. 6A6F+4 Original enemy ID for each enemy group in battle
  597. 6A73+4 Effective enemy ID for each enemy group in battle (for Shadows,
  598. this is the enemy the Shadow is imitating)
  599. 6A77+4 Enemy group flags:
  600. $80 = group is present
  601. $03 = focus-fire target (party index)
  602. 6A7B+20 Flags for enemies in each battle group (8 bytes * 4 groups):
  603. $80 = valid value
  604. $07 = enemy index
  605. 6A9B+4 PC battle flags (see 0/$93D0, 4/$950E)
  606. $20 = parrying
  607. $10 = ??? (see 0/$9BCC)
  608. $08 = asleep
  609. $04 = ??? (copied from $08 at start of turn)
  610. $03 = original party index (may differ from current battle
  611. index due to Limbo/Chance)
  612. 6A9F+4 PC current speed in battle
  613. 6AA3+8 PC current defense power in battle
  614. 6AAB+8 PC current attack power in battle
  615. 6ABE+5 Temporary storage (see 14/$B91E)
  616. 6ACB+1 Message buffer line number * 2
  617. 6ACC+1 Message buffer offset (see 14/$AB4F)
  618. 6ACD+1 Character popped from message buffer (see 14/$AB9E)
  619. 6ACE+1 Step counter for poison
  620. 6AD0+1 ??? (see 14/$AC10)
  621. 6AE6+1 Flags:
  622. $02 = just changed rooms in a dungeon (higher encounter rate)
  623.  
  624. 6B0A+16 Message buffer
  625.  
  626. 6B2F... Far call trampolines to bank 0 subroutines
  627. ...6C50
  628.  
  629. 6C51+1F Copy of subroutine at 0/$A26E
  630.  
  631. 6DE0+20 Tile types for each map tile (low 5 bits of tile byte used as index)
  632.  
  633. 7400... Tile data for current map
  634. ...7FFF
  635.  
  636. -------------------------------------------------------------------
  637.  
  638. Map list
  639. --------
  640. | +0 | +1 | +2 | +3
  641. ---+------------------+------------------+------------------+------------------
  642. 00 | Aliahan | Romaly | Eginbear | Castle of Baramos
  643. 04 | Final Key shrine | ---------------- | Samanao | Brecconary
  644. 08 | Charlock 1F | Reeve | Portoga | Noaniels
  645. 0C | Assaram | ---------------- | Baharata | Lancel
  646. 10 | Cantlin | Rimuldar | Hauksness | Luzami
  647. 14 | Kanave | Tedanki | Muor | Jipang
  648. 18 | Pirate House | Soo | Kol | Ali E field house
  649. 1C | Portoga S shrine | Shrine Jail | Isis swamp shrine| Isis south shrine
  650. 20 | Necrogond shrine | Inn N of Dhama | Hobbit shrine | Dragon Queen cstl
  651. 24 | Jipang shrine | Liamland shrine | Samanao shrine | Greenlad shrine
  652. 28 | Garinham | Cantlin shrine | Shrine of Honor | Rom-Prt shrine W
  653. 2C | Rom-Prt shrine E | Aliahan SW cave | Dream Ruby B1 | Assaram tunnel
  654. 30 | Assaram tunnel(*)| Necrogond 5F | Necrogond 1F | Dhama
  655. 34 | Baharata cave B1 | Jipang cave B1 | Lancel cave B1 | Samanao cave B1
  656. 38 | Erdrick Cave B1 | Rock Mtn Cave B1 | Swamp Cave | Pyramid 1F
  657. 3C | Najima Tower 1F | Garuna Tower 1F | Arp Tower 1F | Shanpane 1F
  658. 40 | Kol Tower 1F | Hero's home 2F | Aliahan house 2F | Aliahan inn 2F
  659. 44 | Luisa 2F | Aliahan cstl B1 | Aliahan castle | Aliahan cstl 2F
  660. 48 | Romaly arena | ---------------- | Romaly castle 2F | Romaly cstl 3F-W
  661. 4C | Romaly cstl 4F-W | Romaly cstl 4F-E | Eginbear B1 | Eginbear 2F
  662. 50 | Isis | Isis house 2F | Isis house 2F | Isis castle B2
  663. 54 | Isis castle B1 | Isis castle 1F | Isis castle 2F | Isis castle 3F
  664. 58 | Baramos boss rm | Baramos B1 | Baramos 2F | -----------------
  665. 5C | Dhama 2F | Samanao house 2F | Samanao shop 2F | Samanao cstl B2
  666. 60 | Samanao cstl B1 | Samanao castle | Samanao cstl 2F | Samanao cstl 3F
  667. 64 | Samanao cstl 4F | Brecconary 2F-A | Brecconary 2F-B | Brecconary 2F-C
  668. 68 | Tantegel B1 | Tantegel Castle | Tantegel 2F-A | Tantegel 2F-B
  669. 6C | Tantegel 2F-C | Reeve inn 2F | Reeve house 2F | Portoga B1
  670. 70 | Portoga house 2F | Portoga castle | New Town (Lv1) | New Town (Lv2)
  671. 74 | New Town (Lv3) | New Town (Lv4) | (empty map) | Noaniels house
  672. 78 | Noaniels shop 2F | Assaram house 2F | Assaram fortune | -----------------
  673. 7C | ---------------- | Baha pepper 2F | Lancel house 2F | Cantlin 2F
  674. 80 | Rimuldar 2F | Brecconary 2F(+) | Luzami observ 2F | Kanave tavern 2F
  675. 84 | Elf Village | Tedanki B1 | Tedanki shop 2F | Isis arena
  676. 88 | ---------------- | Muor shop 2F | Jipang cellar | Pirate House B1A
  677. 8C | Pirate House B1B | Greenlad house | Kol shop 2F | Port S shrine 2F
  678. 90 | Garinham B1 | Alefgard port | Romaly S gate 1F | Romaly S gate B1
  679. 94 | Rom-Port pass B1 | ---------------- | Isis oasis | AliTnl Reeve ent
  680. 98 | Aliahan E lake | Samanao arena | Cantlin arena | Romaly cstl 3F-E
  681. 9C | Phantom Ship 1F | Phantom Ship B1 | ---------------- | Aliahan Tunnel
  682. A0 | Ali lake cave B1 | Ali lake cave B2 | Ali lake cave B3 | Dream Ruby B2
  683. A4 | Dream Ruby B3 | Dream Ruby B4 | Giaga Pit (open) | Rock Mtn Cave B2
  684. A8 | Necrogond 2F | Necrogond 3F | Necrogond 4F | -----------------
  685. AC | ---------------- | ---------------- | ---------------- | -----------------
  686. B0 | ---------------- | ---------------- | Baharata cave B2 | -----------------
  687. B4 | ---------------- | ---------------- | ---------------- | -----------------
  688. B8 | ---------------- | ---------------- | ---------------- | Jipang cave B2
  689. BC | Lancel cave B2 | Lancel cave B3 | Samanao cave B2 | Samanao cave B3
  690. C0 | ---------------- | ---------------- | ---------------- | Erdrick Cave B2
  691. C4 | ---------------- | Erdrick Cave B3 | Giaga Pit (clsd) | -----------------
  692. C8 | Charlock B1 | Charlock B2 | Charlock B3 | Charlock B4
  693. CC | Charlock B5 | ---------------- | ---------------- | Pyramid B2
  694. D0 | Pyramid B1 | Pyramid 2F | Pyramid 3F | Pyramid 4F
  695. D4 | Pyramid 5F | Pyramid 6F/ext. | Najima Tower 2F | Najima Tower 3F
  696. D8 | Najima Tower 4F | ---------------- | ---------------- | Garuna Tower 2F
  697. DC | Garuna Tower 3F | Garuna Tower 4F | Garuna Twr 5F/6F | -----------------
  698. E0 | ---------------- | ---------------- | ---------------- | -----------------
  699. E4 | Arp Tower 2F | Arp Tower 3F | Arp Tower 4F | Arp Tower 5F
  700. E8 | Shanpane 2F | Shanpane 3F | ---------------- | Shanpane 4F
  701. EC | Shanpane 5F | Najima Tower inn | Shanpane 6F | Kol Tower 5F
  702. F0 | Kol Tower 2F | Kol Tower 3F | Kol Tower 4F | -----------------
  703.  
  704. (*) Maps $2F and $30 are the same map (the Assaram-Dhama tunnel); it has
  705. two entries for the convenience of the code to handle overworld-dungeon
  706. transitions.
  707. (+) Map $81 is for the unreachable stairways behind the two NPCs in the
  708. small rooms in Brecconary (the place where the curse removal NPC was
  709. in the original Dragon Warrior).
  710.  
  711. Item list
  712. ---------
  713. 00 - Cypress Stick
  714. 01 - Club
  715. 02 - Copper Sword
  716. 03 - Magic Knife
  717. 04 - Iron Spear
  718. 05 - Battle Axe
  719. 06 - Broad Sword
  720. 07 - Wizard's Wand
  721. 08 - Poison Needle
  722. 09 - Iron Claw
  723. 0A - Thorn Whip
  724. 0B - Giant Shears
  725. 0C - Chain Sickle
  726. 0D - Thor's Sword
  727. 0E - Snowblast Sword
  728. 0F - Demon Axe
  729. 10 - Staff of Rain
  730. 11 - Sword of Gaia
  731. 12 - Staff of Reflection
  732. 13 - Sword of Destruction
  733. 14 - Multi-edge Sword
  734. 15 - Staff of Force
  735. 16 - Sword of Illusion
  736. 17 - Zombie Slasher
  737. 18 - Falcon Sword
  738. 19 - Sledge Hammer
  739. 1A - Thunder Sword
  740. 1B - Staff of Thunder
  741. 1C - Sword of Kings
  742. 1D - Orochi Sword
  743. 1E - Dragon Killer
  744. 1F - Staff of Judgement
  745.  
  746. 20 - Clothes
  747. 21 - Training Suit
  748. 22 - Leather Armor
  749. 23 - Flashy Clothes
  750. 24 - Half Plate Armor
  751. 25 - Full Plate Armor
  752. 26 - Magic Armor
  753. 27 - Cloak of Evasion
  754. 28 - Armor of Radiance
  755. 29 - Iron Apron
  756. 2A - Animal Suit
  757. 2B - Fighting Suit
  758. 2C - Sacred Robe
  759. 2D - Armor of Hades
  760. 2E - Water Flying Cloth
  761. 2F - Chain Mail
  762. 30 - Wayfarer's Clothes
  763. 31 - Revealing Swimsuit
  764. 32 - Magic Bikini
  765. 33 - Shell Armor
  766. 34 - Armor of Terrafirma
  767. 35 - Dragon Mail
  768. 36 - Swordedge Armor
  769. 37 - Angel's Robe
  770.  
  771. 38 - Leather Shield
  772. 39 - Iron Shield
  773. 3A - Shield of Strength
  774. 3B - Shield of Heroes
  775. 3C - Shield of Sorrow
  776. 3D - Bronze Shield
  777. 3E - Silver Shield
  778.  
  779. 3F - Golden Crown
  780. 40 - Iron Helmet
  781. 41 - Mysterious Hat
  782. 42 - Unlucky Helmet
  783. 43 - Turban
  784. 44 - Noh Mask
  785. 45 - Leather Helmet
  786. 46 - Iron Mask
  787.  
  788. 47 - Sacred Amulet
  789. 48 - Ring of Life
  790. 49 - Shoes of Happiness
  791. 4A - Golden Claw
  792. 4B - Meteorite Armband
  793. 4C - Book of Satori
  794. 4D - (empty name)
  795. 4E - Wizard's Ring
  796.  
  797. 4F - Black Pepper
  798. 50 - Sage's Stone
  799. 51 - Mirror of Ra
  800. 52 - Vase of Drought
  801. 53 - Lamp of Darkness
  802. 54 - Staff of Change
  803. 55 - Stone of Life
  804. 56 - Invisibility Herb
  805. 57 - Magic Ball
  806.  
  807. 58 - Thief's Key
  808. 59 - Magic Key
  809. 5A - Final Key
  810.  
  811. 5B - Dream Ruby
  812. 5C - Wake-up Powder
  813. 5D - Royal Scroll
  814. 5E - Oricon
  815.  
  816. 5F - Strength Seed
  817. 60 - Agility Seed
  818. 61 - Vitality Seed
  819. 62 - Luck Seed
  820. 63 - Intelligence Seed
  821. 64 - Acorns of Life
  822.  
  823. 65 - Medical Herb
  824. 66 - Antidote Herb
  825. 67 - Fairy Water
  826. 68 - Wing of Wyvern
  827. 69 - Leaf of World Tree
  828.  
  829. 6A - (empty name)
  830. 6B - Locket of Love
  831. 6C - Full Moon Herb
  832. 6D - Water Blaster
  833. 6E - Sailor's Thigh Bone
  834. 6F - Echoing Flute
  835. 70 - Fairy Flute
  836. 71 - Silver Harp
  837. 72 - Sphere of Light
  838. 73 - Poison Moth Powder
  839. 74 - Spider's Web
  840. 75 - Stone of Sunlight
  841.  
  842. 76 - Rainbow Drop
  843. 77 - Silver Orb
  844. 78 - Red Orb
  845. 79 - Yellow Orb
  846. 7A - Purple Orb
  847. 7B - Blue Orb
  848. 7C - Green Orb
  849.  
  850. 7D - Stick Slime
  851. 7E - Black Raven
  852. 7F - Sword Horned
  853.  
  854. 80-FE - Equipped versions of items
  855. FF - Nothing
  856.  
  857. Spell list
  858. ----------
  859. Byte | $01 | $02 | $04 | $08 | $10 | $20 | $40 | $80
  860. -------+---------+---------+---------+---------+---------+---------+---------+---------
  861. 0 (Wz) |Blaze |Upper |IceBolt |Increase |Firebal |Return |Bang |Slow
  862. 1 (Wz) |Blazemore|RobMagic |Snowblast|IceSpears|Firebane |Bikill |Boom |Bounce
  863. 2 (Wz) |Blazemost|Chaos |Snowstorm|BeDragon |Firevolt |Transform|Explodet |Chance
  864. 3 (Wz) |Outside |Return |X-Ray |StepGuard|Day-Night|CurseOff |Invisible|Open
  865. 4 (Pr) |Sap |Heal |Expel |Antidote |Infernos |SpeedUP |Surround |Sleep
  866. 5 (Pr) |Defence |Healmore |Beat |NumbOff |Infermore|StopSpell|Limbo |Awake
  867. 6 (Pr) |Barrier |Healall |Defeat |Healus |Infermost|Vivify |Sacrifice|Revive
  868. 7 (Pr) |Heal |Antidote |Healmore |NumbOff |Vivify |Healall |Healus |Revive
  869. 0 (Hr) |Blaze |Heal |Expel |Ironize |Firebal |Return |Stopspell|Sleep
  870. 1 (Hr) |Zap |Healmore |Firebane |Healall |Boom |Vivify |Lightning|Healusall
  871. 2 (Hr) | (this byte is unused)
  872. 3 (Hr) |Heal |Return |Outside |Repel |Healmore |Healall |Vivify |Healusall
RAW Paste Data