Cite as
“Mother (Japan)”
Licence
proprietary; never redistributed (docs/data-policy.md#roms)
Credit
Ape (developer) and Nintendo
Notes
NES 2.0 header: 256 KB PRG ROM, 128 KB CHR ROM, mapper 4 (MMC3), battery-backed PRG RAM. Without the 16-byte header the SHA-1 is 196f0cc52131ad059f26322ebd0ce68d9a8727d3. Its MD5, bf1e0bc9c390fdbb2b3ca22d784db7d2, is one of the two Nathan-R-Og/mother lists for MOTHER (JP), and that disassembly's Japanese build rebuilds it byte for byte.

Cited on

No page cites it yet.

Claims (10)

Mother's cartridge ROM (the Japanese release), counted by part of the game: each stretch of code or data goes to the part the disassembly's labels and comments say it serves, and the value sums the bytes of each part. The count covers the 256 KB of PRG and the 128 KB of CHR.0x10-0x6000fCode notes
The JP build's item table has 128 entries of 8 bytes: the name's address; a byte whose bit 7 keeps the item from being thrown away or sold, whose bit 6 lets the Eat command use it, and whose low six bits say who may use or equip it (Ninten, Ana, Lloyd, Teddy, Pippi, and a last bit EVE and Flying Man share); a power byte; the number of the action the item runs when used on the field, and of the action a battle sets for its user; and the price. A power byte that isn't 0 makes the item equipment: its top two bits pick the slot (weapon, coin, ring, pendant), and the low six bits add to offense for a weapon or to defense for a coin or ring, or for a pendant are shifted up one bit and set in the wearer's resistance byte. Computed from that shift, bits 5, 4, and 3 of a pendant's byte give fire, freeze, and thunder protection, which is what the power column shows for pendants: the flame pendant (ほのおのペンダント) protects against freeze and the droplet pendant (しずくのペンダント) against fire. 36 entries have no name. The code finds an item's entry at 8 bytes a number, so it reads item numbers 128 and up past the table's end, in the order the tables are placed: 128-183 are the destination table's entries and 184-255 the character rates and PSI (computed from the tables' sizes). The english column is the English release's name for each entry the JP build names; the English build gives items 39, 70, 77, 96, 103, and 106 no name of their own and points them at other entries' names, so those rows are empty.0x1810-0x1c0fCode
The PSI table has 64 entries of 8 bytes: the name's address, the levels Ninten and Ana must pass to learn the power ($FF for never), its field and battle action numbers, a byte that is 0 in every entry, and the PP cost. After a battle's experience is added, each power whose level a character has passed and doesn't know is learned with a chance of 1 in 4 (a random byte's top two bits both 0), checked once per power per battle; a character rate byte picks which of the two level columns a character reads, so only Ninten and Ana learn PSI this way. A character whose status byte's top bit (unconscious) is set learns nothing. The check also runs after a battle that ended by running away or a slip, which adds no experience. Nothing is learned in a battle an object's script starts, unless the object is stored in the first 32 bytes of object memory: the script command stores the object's offset in object memory ÷ 32 as the flag the learning code tests. 18 entries have no name. The english column is the English release's name for each entry the JP build names.0x1e10-0x200fCode
The character rate table holds 8 rows of 8 bytes, one for no one and one each for Ninten, Ana, Lloyd, Teddy, Pippi, EVE, and Flying Man: an experience rate, a byte that is 0 in every row, which PSI level column the character reads (Ninten's, Ana's, or none), and growth rates for fight, speed, wisdom, strength, and force. After a battle, each character whose status byte's top bit (unconscious) is clear gains experience, unless the battle ended by running away or a slip. Then, while the experience reaches ⌊(L+1)² × (L+2) × rate ÷ 256⌋ for the character's level L, the character levels up, to level 99 at most, so a higher rate means slower levels. Each level adds ⌊(rate + r) ÷ 2⌋ to each of the five stats (r a random 0-3, capped at 255), the fight gain to offense and the speed gain to defense. Maximum HP then rises toward a target of 20 plus twice strength (255 plus strength once strength is 236 or more), and for Ninten and Ana maximum PP toward force plus half of it, by ⌊r × m ÷ 16⌋, with r a random 0-15. Here m is twice the gap to the target, at most 16 (twice the gap is kept to a byte, so gaps of 128-135 give 0-14), and 2 when the value is already past the target. Each level's gain is 0-15, at most 1 past the target, and never a loss. The experience-for-level-2 column is computed from the formula with L = 1.0x1dd0-0x1e0fCode
The enemy table has 122 entries of 32 bytes: an unknown byte, 0 in every entry, a starting status, a flag byte (sprays, and resistances to beam, to defense-down, confusion and sleep, to thunder, freeze, and fire, and two more bits), HP, PP, offense, and defense in the low 10 bits of four words whose top bits hold palette, graphics, and battle settings, then fight, speed, wisdom, strength, and force, eight action bytes, the name's address, experience, money, an item drop, and a graphics page. Each enemy killed adds its experience and money to the battle's rewards; a nonzero drop byte replaces the battle's pending item, so the last such enemy killed decides it, and after the battle the item is given with a chance from its price's high byte: 1/16 below 8,192, 1/32 below 16,384, 1/64 below 32,768, else 1/128, to the first character with room. A battle that ended by running away or a slip gives no experience, money, or item. The drop chance column is computed from each drop item's price by that rule. The english column is the English release's name for each entry the JP build names.0x2c010-0x2cf4fCode
The battle table has 165 entries of 10 bytes: four slots of an enemy number ($FF for empty) and a byte whose low bits give the enemy's letter (battle 2's two rats have 1 and 2) and whose bit 7 holds that enemy back: it starts out of the fight, and joins when another enemy's call for help finds it, then a byte of a battle script (top three bits) and an enemy position (low five), and a byte of a song (top four bits) and a palette (low four). Song value 5 plays song $2C; the others play their own number (2, 3, or 4), and the song column gives the song played.0x2cfa8-0x2d619Code
The encounter sets are 32 lists of 16 battle numbers, one list per area number a map sector gives. When the encounter roll passes, the code picks a list entry with a random byte's top four bits and rerolls while it picks 0, so a battle listed twice comes up twice as often.0x29210-0x2940fCode
The destination table has 56 entries of 8 bytes: a name's address, a word of an X position and a song, a word of a Y position and a facing, and a word that is a price when a shop lists the entry. The code reads it as item numbers 128-183, so a shop's list can hold destinations: the Teleport places (0-7), eight empty entries, twelve train routes with their fares, three flight plans (5, 10, and 15), three hints, four entries named どくけし (antidote) that nothing lists, the scientist's two gags (3,485 and 2,775), and sixteen empty entries. The english column is the English release's name for each entry the JP build names; the English build gives entries 162, 163, 164, and 165 no name of their own and points them at other entries' names, so those rows are empty.0x1c10-0x1dcfCode
The save file's starting template, which a new game copies into the current save, holds 7 characters of 64 bytes, Ninten, Ana, Lloyd, Teddy, Pippi, EVE, and Flying Man, the records the game reads each party member from: maximum HP and PP, offense, defense, the five stats, level, experience, items, equipment, PSI bits, and in the JP build a default name.0x3be50-0x3c00fCode
The JP build's song table has 49 entries, songs $01-$31, in two lists of 10-byte headers (a byte, a tempo offset, and four channel addresses); this is the game's track listing, by song number, with where the game plays each, named from the code and data that request it. Requests are the play-song script command in the object scripts, the song in a door's, teleport's, or destination's data (played on arrival), the battle table's song byte, and fixed numbers in the code. Every entry but song $2B is requested; songs $24-$2A each play where the party learns a melody, followed by the message that it did; song $07 only as the substitute the sound code plays for song $06 when the party has more than one member.0x3904e-0x39268Code