Legacy of the Wizard: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
m (will need to find a more convenient way to list different releases with different info later)
mNo edit summary
 
Line 15: Line 15:
|image = [[File:Legacy of the Wizard Title.png]]
|image = [[File:Legacy of the Wizard Title.png]]
|mapperno = 4 <!--/ 206-->
|mapperno = 4 <!--/ 206-->
|mappername = TFROM <!--/ NAMCOT-3416-->
|mappername = Nintendo MMC3 <!--/ NAMCOT-3416-->
|prgrom = 8 x 16 KiB
|prgrom = 8 x 16 KiB
|chrrom = 8 x 8 KiB
|chrrom = 8 x 8 KiB

Latest revision as of 22:50, 13 February 2024

Title Screen

Legacy of the Wizard

Also known as: Dragon Slayer IV: Drasle Family (JP)
Developer: Nihon Falcom
Publishers: Namco (JP), Brøderbund (US), Bandai Namco (EU/AU)
Platforms: NES
Released in JP: July 17, 1987
Released in US: April 1989
Released in EU: June 18, 2020 (Namco Museum Archives Vol. 2)
Released in AU: June 18, 2020 (Namco Museum Archives Vol. 2)


ROMIcon.png ROM map
RAMIcon.png RAM map
Cactisprite.png TCRF
Legacy of the Wizard
Mapper No. 4
Mapper Name Nintendo MMC3
PRG-ROM Pages 8 x 16 KiB
CHR-ROM Pages 8 x 8 KiB
Mirroring Vertical
4-Screen Mirroring No
SRAM Enabled No


Sub-pages

Read about development information and materials for this game.
ROM map
Read about prototype versions of this game that have been released or dumped.
RAM map

Tools

Documents

Enemy Drops

Drop index Item
$00 Bread
$01 Potion
$02 Money
$03 Poison
$04 Key
$05 Ring
$06 Cross
$07 Scroll

First, before any RNG is rolled whatsoever, three checks are done, in priority order (at $07EF85~$07EF9B):

  • If health is less than 20 ($14 hex), guaranteed bread drop ($00 drop index).
  • If magic is less than 30 ($1E hex), guaranteed magic potion drop ($01 drop index).
  • If key count is less than 2, guaranteed key drop ($04 drop index).

If none of these conditions are met, we then roll a random number from 0 to 19 ($14 hex modulus / exclusive upper bound). Fully detailed results for each value:

RNG roll value Result
$00 Poison
$01 Poison
$02 Poison
$03 Poison
$04 Key
$05 Key
$06 Ring
$07 Cross
$08 Scroll
$09~$13 Bread / Potion / Money based on checks (see below)

There's a 45% chance that it simply fetches from the drop table at $07EFE7~$07EFEF, meaning 20% chance for poison, 10% key, 5% ring, 5% cross, 5% scroll. The other 55% will do the following checks, in priority order (at $07EFAC~$07EFC3):

  • If life < magic, drop bread
  • If magic < gold, drop potion
  • Otherwise, drop money

RNG

Random number generation follows a simple PRNG formula that's based on nothing but its own previous values, and only ever changes when a new random number is rolled. This means it can be "seeded" and predictably determined based on # of times rolled. The pertinent RAM addresses are $0039, $003A, and $003B. $0038 also stores a modulus / exclusive upper bound that can be passed in via accumulator, which governs how many times to reroll for one single RNG call. The code is:

 07:CC64:  STA $0038
 07:CC66:  BEQ $CC8E
 07:CC68:  LDX $003B
 07:CC6A:  LDY $003A
 07:CC6C:  STY $0039
 07:CC6E:  TYA
 07:CC6F:  ASL
 07:CC70:  TAY
 07:CC71:  TXA
 07:CC72:  ROL
 07:CC73:  TAX
 07:CC74:  INY
 07:CC75:  BNE $CC78
 07:CC77:  INX
 07:CC78:  CLC
 07:CC79:  TYA
 07:CC7A:  ADC $003A
 07:CC7C:  TAY
 07:CC7D:  TXA
 07:CC7E:  ADC $003B
 07:CC80:  CLC
 07:CC81:  ADC $0039
 07:CC83:  AND #$7F
 07:CC85:  TAX
 07:CC86:  STX $003B
 07:CC88:  STY $003A
 07:CC8A:  CMP $0038
 07:CC8C:  BCS $CC6C
 07:CC8E:  RTS