Keitai Denjuu Telefang/ROM map

From Data Crystal
Jump to navigation Jump to search

Chip tiny.png The following article is a ROM map for Keitai Denjuu Telefang.

The following ROM map is for the unofficial English translation Pokemon Diamond.

Hmmm...
To do:
Many more ROM addresses were documented from the GitHub disassembly. Can be found here: Power Version; Speed Version
Any ROM addresses not listed on this page should be copied from there.

Text Values

  • 02E652-02E871 (00220) = Item Names
  • 02E8FA-02F9F9 (01100) = Unused Text?
  • 03A2DD-03A30A (0002E) = Credits Text Pointer Table
  • 03A30B-03A695 (0038B) = Credits Text
  • 040000-040161 (00162) = Picture Book Pointer Table
  • 040162-0416EF (0158E) = Picture Book Entries
  • 040162-041782 (01621) = Picture Book Entries (Bootleg)
  • 041783-042979 (011F7) = Unused Picture Book Entries (Bootleg only; this is empty space in Japanese version)
  • 099130-09A0A8 (00F79) = Call Text
  • 0AA875-0AAA74 (00200) = Map Location Pointer Table
  • 0AAA75-0AAAFE (0008A) = Map Location Names
  • 0AAA75-0AAADE (00070) = Cave/Dungeon Pointer Table
  • 0AAADF-0AAC7D (0019F) = Cave/Dungeon Names
  • 0ABF30-0ABFFB (000CC) = Map Location Names (Bootleg)
  • 100000-1000AF (000B0) = Dialog Pointer Table
  • 1000B0-101CD0 (01C21) = ???Text???
  • 1141A4-115071 (00ECE) = Battle Text
  • 11527B-117F50 (02CD6) = ???Text???
  • 118200-11A2B5 (020B6) = ???Call Text???
  • 11C158-127FFF (0BEA8) = People Text
  • 1D4000-1D457F (00580) = Denjuu Names
  • 1D4580-1D46BF (00140) = T-Fanger Names
  • 1D4700-1D4B47 (00448) = Denjuu Attacks
  • 1D5628-1D563F (00018) = Denjuu Types
  • 1D5888-1D6367 (00AE0) = Denjuu Arrive Phrase

(Each phrase has a 16 (10h)-character limit, and goes in the order of each Denjuu. Using all sixteen characters has a text wrapping issue, however.)

  • 1D6368-1D6E47 (00AE0) = Denjuu Attack Phrase

(Each phrase has a 16 (10h)-character limit, and goes in the order of each Denjuu. Using all sixteen characters has a text wrapping issue, however.)

  • 1D6E48-1D7927 (00AE0) = Unused Text
  • 1D7928-1D7987 (00060) = Denjuu Personality

(Each personality has an 8-character limit.)

  • 1D7988-1D79C7 (00040) = Status Effects
    • 1D7988-1D798B (00004) = ???
    • 1D798C-1D798F (00004) = Hiding
    • 1D7990-1D7993 (00004) = Jumping
    • 1D7994-1D7997 (00004) = Flight
    • 1D7998-1D799B (00004) = Confused
    • 1D799C-1D799F (00004) = Paralyzed
    • 1D79A0-1D79A3 (00004) = Cursed
    • 1D79A4-1D79A7 (00004) = Asleep
    • 1D79A8-1D79AB (00004) = Frightened
    • 1D79AC-1D79AF (00004) = Fog
    • 1D79B0-1D79B3 (00004) = Poisoned
    • 1D79B4-1D79B7 (00004) = Blind
    • 1D79B8-1D79BF (00004) = ???
    • 1D79C0-1D79C3 (00004) = Frozen
    • 1D79C4-1D79C7 (00004) = Burned

Denjuu Data

Stats

  • 1D4B48-1D5627 (0AE0) = Denjuu Stats, Movesets, Evolutions, and Types
Format of data is 16 (10h) bytes for each Denjuu and is as follows:
aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp
aa = Base HP A base stat is the stat that a Denjuu would have at Level 1, without any influence from gaining any levels. bb = Base Speed cc = Base Attack dd = Base Defense ee = Base Denma Attack ff = Base Denma Defense gg = Move 1 (List can be found at http://telefang.meowcorp.us/attacklist.txt) hh = Move 2 ii = Move 3 jj = Move 4 (A move in this slot will always be a Denma Attack, meaning it will take numerous turns to charge up, and runs off the user's Denma Attack stat and the opponent's Denma Defense stat) kk = ??? ll = Level of evolution (Natural Evolution only; otherwise this is 00, even if it evolves another way) mm = Denjuu it evolves into (if Natural Evolution, this goes by Denjuu number, if it evolves any other way, or not at all, this is 00) nn = Type 00 = Mountain 01 = Grassland 02 = Forest 03 = Aquatic 04 = Sky 05 = Desert Anything else = glitch type oo = Level of learning 3rd move (If it learns it from the start, this value is 00; if it never learns a 3rd move, this value is 64; otherwise, this value is whatever level the Denjuu is supposed to learn the third move) pp = Level of learning 4th move (If it learns it from the start, this value is 00; if it never learns a 4rd move, this value is 64; otherwise, this value is whatever level the Denjuu is supposed to learn the fourth move)

Stat growth rate

  • 09C715-09CB28 (0414) = Level Influence on Stats

This determines how much a stat is gained in two levels. Each Denjuu takes up 6 bytes, one for each stat: HP, Speed, Attack, Defense, Denma Attack, and Denma Defense in that order. The higher the value, the more stat points a Denjuu will gain every level. The stats have a formula:

Stat = Base Stat + (Current Level - 1) * Stat Growth / 2

If this formula causes a stat to be a decimal, it will be rounded down, unless the Denjuu is at Level 2, in which case it will round up. If any of these values are high enough to cause the stat value to go past 255, it will be reduced mod 256, so be careful not to use too high values. Avoid using stat growth values above 5.

Evolution

  • 0AA0B1-0AA368 (02B8) = Mod & Experimental Evolution
Format of data is 4 bytes for each Denjuu and is as follows:

aa bb cc dd

aa = Item 1 used to mod evolve/experimentally evolve

     If a value from 00-39 is used, the evolution will be a mod evolution. If
     a value from 40-42 is used, the evolution will be a experimental evolution.
     No other value (either from 3A-3F, or 43 or above) will cause a Denjuu to
     evolve either of these two ways. However, the value FF is used if a Denjuu
     doesn't evolve these two ways.

     Index numbers can be found here.

bb = Item 2 used to mod evolve/experimentally evolve

     If a value from 00-39 is used, the evolution will be a mod evolution. If
     a value from 40-42 is used, the evolution will be a experimental evolution.
     No other value (either from 3A-3F, or 43 or above) will cause a Denjuu to
     evolve either of these two ways. However, the value FF is used if a Denjuu
     doesn't evolve these two ways. The same item list for above also applies
     here.

cc = Denjuu 1 it mod/experimentally evolves into

     This is the Denjuu that the current Denjuu will evolve into if Item 1 is
     used. If Item 1 is FF (unused), this value will be 00.

dd = Denjuu 2 it mod/experimentally evolves into

     This is the Denjuu that the current Denjuu will evolve into if Item 2 is
     used. If Item 2 is FF (unused), this value will be 00.

Experience Items

  • 0A9A93-0AA0B0 (0061E) = Exp. Items

Almost every Denjuu is capable of getting experience points by giving them items in the same screen that you mod evolve Denjuu. There are an unlimited amount of items that can be used to give a small amount of experience, and one item that can be used for a large amount of experience. This data determines which items these are for every Denjuu.

Format is 9 bytes for every Denjuu.

The first eight bytes determine the items for small experience, and the last
byte determines the item that can be used for large expereince. For small
experience, there is one bit for each of the first 64 (40h) items, and this
determines whether or not an item can be used on that Denjuu. If the bit is a 1,
it can be used. If the bit is a 0, it cannot be used. The item order is the same
as how the game arranges the items in the game. However, it is important to
note that the game starts from the least significant bit (the rightmost bit)
first and ends at the most significant bit (the leftmost bit).

In this list of items, the bootleg (Pokémon Diamond/Jade) names are listed
first, then their real translations are listed second.

(Byte 1)
.......x = A-gun    (Flamethrower)
......x. = Gun      (Gun)
.....x.. = Revolver (Revolver)
....x... = R-gun    (Bazooka)
...x.... = Mo-gun   (Machine Gun)
..x..... = Missile  (Missile)
.x...... = Bomb     (Bomb)
x....... = Ma-gun   (Gatling Gun)

(Byte 2)
.......x = Sabre    (Sabre)
......x. = Drill    (Drill)
.....x.. = Jet      (Jet Engine)
....x... = Propelle (Propeller Engine)
...x.... = Dart     (Shuriken)
..x..... = Battery  (Battery)
.x...... = Shooter  (Archery Set)
x....... = Range    (Microwave)

(Byte 3)
.......x = Flatiron (Iron)
......x. = Blender  (Mixer)
.....x.. = Phone    (Telephone)
....x... = Antenna  (Antenna)
...x.... = Spanner  (Spanner)
..x..... = Saw      (Saw)
.x...... = ChainSaw (Chainsaw)
x....... = L-gun    (Beam Gun)

(Byte 4) 
.......x = Axe      (Axe)
......x. = Screwdri (Screwdriver)
.....x.. = Screw    (Screw)
....x... = Spring   (Spring)
...x.... = Gear     (Gear)
..x..... = P-card   (Telecard)
.x...... = Spear    (Lance)
x....... = Crane    (Crane)

(Byte 5)
.......x = Dagger   (Army Knife)
......x. = Sickle   (Sickle)
.....x.. = Computer (Computer)
....x... = Moving   (Laptop)
...x.... = Hammer   (Hammer)
..x..... = Injector (Syringe)
.x...... = Camera   (Camera)
x....... = Video    (Video Camera)

(Byte 6)
.......x = Flying   (Frypan)
......x. = Pencil   (Pencil)
.....x.. = Tire     (Tire)
....x... = O-bottle (Gas Tank)
...x.... = Tap      (Faucet)
..x..... = Bucket   (Bucket)
.x...... = Cleaner  (Vacuum)
x....... = Mouse    (Mouse)

(Byte 7)
.......x = Key      (Key)
......x. = Game     (Game Machine)
.....x.. = Toy      (Plush)
....x... = Pengpeng (Comic BonBon)
...x.... = Racket   (Scooter)
..x..... = Tsita    (Titarium)
.x...... = Luna     (Lunatium)
x....... = Diamond  (Giamond)

(Byte 8)
.......x = L-medal  (Round Medal)
......x. = Tayta    (Titanyum)
.....x.. = Reform1  (Mod Pass 1)
....x... = Reform2  (Mod Pass 2)
...x.... = Reform3  (Mod Pass 3)
..x..... = Test1    (Experimental Pass 1)
.x...... = Test2    (Experimental Pass 2)
x....... = Test3    (Experimental Pass 3)

The items in red will never show up at all when trying to give experience (or
mod evolving Denjuu), so they are never used. Because of this, they area all 0.

The 9th and last byte determines the item used to give more experience than any
of the other items. Each Denjuu can only have one of these, and it follows a
different format from the other bytes.

Index numbers for each item can be found here.

Items 3A-3F will never show up at all when trying to give experience (or mod
evolving Denjuu), so they are never used. Because of this, these items are never
used for experience.

Experience Table by Level

  • 9C000-9C4A3 (04A4) = Exp Tables
    • 9C000-9C0C5 (00C6) = Mountain type
    • 9C9C6-9C18B (00C6) = Grassland type
    • 9C18C-9C251 (00C6) = Forest type
    • 9C252-9C317 (00C6) = Aquatic type
    • 9C318-9C3DD (00C6) = Sky type
    • 9C3DE-9C4A3 (00C6) = Desert type
Each level takes up 2 bytes, in little endian. Since experience is measured in
multiples of 0.5, and only show the integer portion, rounded down, the entries
in the table will display as such on the Denjuu's status screen. For example,
Level 5 is 0F 00 internally, which shows up as 7 Experience to the user.

Denjuu Encounter Data

Map Acre Data

Each map has information about the Denjuu that appear in every acre. Each byte in the data represents one acre (or screen), and tells which group of Denjuu should appear. The data is read from left to right, then from top to bottom. Each value is a pointer, where you can find the starting address with this formula:

$1D56EE + $05 * (value)

For example, if an acre is $00, then it points to starting address $1D56EE. If an acre is $01, then it points to starting address $1D56F3, and so on.

  • 03E487-03E4C6 = Overworld map (Top left quadrant)
  • 03E4C7-03E506 = Overworld map (Top right quadrant)
  • 03E507-03E546 = Overworld map (Bottom left quadrant)
  • 03E547-03E586 = Overworld map (Bottom right quadrant)
  • 03E587-03E5C6 = Antenna trees* (Top left quadrant)
  • 03E5C7-03E606 = Antenna trees* (Top right quadrant)
  • 03E607-03E646 = Antenna trees* (Bottom left quadrant)
  • 03E647-03E686 = Antenna trees* (Bottom right quadrant)
  • 03E687-03E6C6 = Toronko Village Spring
  • 03E6C7-03E706 = Marts/Houses**
  • 03E707-03E746 = Kurinon Cave - Floor 1
  • 03E747-03E786 = Kurinon Cave - Floor 2
  • 03E787-03E7C6 = Craft Research Center
  • 03E7C7-03E806 = Dementia's Mansion
  • 03E807-03E846 = Tripa Antenna Tree Cave - Floor 1
  • 03E847-03E886 = Tripa Antenna Tree Cave - Floor 2
  • 03E887-03E8C6 = Tripa Antenna Tree Cave - Floor 3
  • 03E8C7-03E906 = Tripa Antenna Tree Cave - Floor 4
  • 03E907-03E946 = Tripa Antenna Tree Cave - Floor 5
  • 03E947-03E986 = Pepperi Mountains - Floor 1
  • 03E987-03E9C6 = Pepperi Mountains - Floor 2
  • 03E9C7-03EA06 = Pepperi Mountains - Floor 3
  • 03EA07-03EA46 = Pepperi Mountains - Floor 4
  • 03EA47-03EA86 = Pepperi Mountains - Floor 5
  • 03EA87-03EAC6 = Cactos Ruins - Floor 1
  • 03EAC7-03EB06 = Cactos Ruins - Floor 2
  • 03EB07-03EB46 = Cactos Ruins - Floor 3
  • 03EB47-03EB86 = Cactos Ruins - Floor 4
  • 03EB87-03EBC6 = Cactos Ruins - Floor 5
  • 03EBC7-03EC06 = Cactos Ruins - Floor 6
  • 03EC07-03EC46 = Cactos Ruins - Floor 7
  • 03EC47-03EC86 = Cactos Ruins - Floor 8
  • 03EC87-03ECC6 = Burion Ruins - Floor 1
  • 03ECC7-03ED06 = Burion Ruins - Floor 2
  • 03ED07-03ED46 = Burion Ruins - Floor 3
  • 03ED47-03ED86 = Burion Ruins - Floor 4
  • 03ED87-03EDC6 = Burion Ruins - Floor 5
  • 03EDC7-03EE06 = Burion Ruins - Floor 6
  • 03EE07-03EE46 = Burion Ruins - Floor 7
  • 03EE47-03EE86 = Burion Ruins - Floor 8
  • 03EE87-03EEC6 = Burion Ruins - Floor 9
  • 03EEC7-03EF06 = Human World - Main Area**
  • 03EF07-03EF46 = Human World - Antenna Tree**
  • 03EF47-03EF86 = Human World - Unused Buildings**
  • 03EF87-03EFC6 = Teletel/Dendel's cave**
  • 03EFC7-03F006 = Unused replica of Golaking's room**
  • 03F007-03F046 = Room with second D-Shot**
  • 03F047-03F086 = Room with Palm Sea Antenna Tree switch**
  • 03F087-03F0C6 = Sanaeba Research Center - Floor 1
  • 03F0C7-03F106 = Sanaeba Research Center - Basement 1
  • 03F107-03F146 = Sanaeba Research Center - Basement 2

* Antenna trees have the same Denjuu encounter data as the overworld; however, it is impossible to find Denjuu in any antenna tree. Even if an antenna tree has water (like in Palm Sea), you cannot find any Denjuu. Even if you were to hack in grass in an antenna tree, Denjuu still cannot be found. This is only listed for completeness sake.
** There is no way to find Denjuu in these places, but these are assumed to be the correct maps due to the way that the game orders the maps.

Grass data

Determines whether Denjuu can be found just by walking on flat terrain, or whether they can only be found in grass/water. A value of 00 means Denjuu can be found in any terrain, whereas 01 (or any other value) means that they can only be found through grass or water (assuming that grass/water is in the acre, which it sometimes isn't).

  • 0AA775-0AA7B4 = Overworld (Top left quadrant)
  • 0AA7B5-0AA7F4 = Overworld (Top right quadrant)
  • 0AA7F5-0AA834 = Overworld (Bottom left quadrant)
  • 0AA835-0AA874 = Overworld (Bottom right quadrant)

Denjuu & Level Data

  • 1D56EE-1D5887 = Denjuu & Level Information

Each 5 bytes represents a group of Denjuu that can appear in a given acre. The first four bytes determine the four possible Denjuu that can appear, which the game chooses at random when a wild Denjuu appears. The probabilities for each Denjuu are different, depending on which byte it takes up. The probabilities are: 40% for the first slot, 30% for the second slot, 20% for the third and 10% for the fourth. It is possible to include the same Denjuu twice to make it more likely to appear. The fifth byte determines the median level that the Denjuu in the acre will be at, with a random possibility of ±1 level. For example, if this value is $05, the level of a Denjuu in that acre can be anywhere between 4-6, inclusive.

Secret Denjuu data

  • 013C0D-013C44 (0038) = Data of secret Denjuu

Each Denjuu here has 4 bytes of data:

  • The species (added by 1)
  • Level
  • FD
  • Personality

Tiles

  • 02CF61-02D000 (000A0) = Text box border
  • 02D229-02D8C0 (00698) = Characters (kana/numbers) used in most of game (1BPP compression)
  • 0A0000-0A3FFF (04000) = Map squares used in interior locations
  • 0A4964-0A4BA3 (00240) = Digits used in Denjuu's phone numbers
  • 0A5D29-0A5E08 (000E0) = FD indicator when a Denjuu calls you
  • 0AACC6-0ABD85 (010C0) = Item icons
  • 0AC000-0B3FFF (08000) = Items

(Each item is 1E0h bytes long.)

  • 0B8000-0C7FFF (10000) = Human and Denjuu walking icons
  • 0D4000-0D7FFF (04000) = Compressed tiles (Usage unknown)
  • 0D8000-0DBFFF (04000) = Compressed tiles (Used for title screen and possibly other screens?)
  • 0DC000-0DDD6E (01D6F) = Compressed tiles (Used for D-Shot screen?)
  • 0DDD6F-0DFFFF (02291) = D-Shot phones
  • 0E0000-0E03BF (003C0) = Scenery
  • 0E0418-0E0B07 (006F0) = Status bar
  • 0E0B08-0E0B37 (00030) = Animated cursor
  • 0E0B38-0E0C37 (00100) = Digits + text icons
  • 0E1208-0E1307 (00100) = Kanji?
  • 0E1650-0E166F (00020) = LV: icon
  • 0E1670-0E168F (00020) = EX: icon
  • 0E173C-0E187B (00140) = Scenery
  • 0E197C-0E19FB (00080) = Animated spinning coin
  • 0E1D74-0E1E13 (000A0) = ? icon
  • 0E1E14-0E27C3 (009B0) = Overworld Map squares
  • 0E2D54-0E2ED3 (00180) = Digits used in clock on bottom of screen
  • 0E2ED4-0E2F13 (00040) = Animated border used on map
  • 0E2F14-0E2F93 (00080) = Blank (unvisited) Map squares
  • 0E318C-0E319B (00010) = Baseball (that bounces at beginning of game)
  • 0E319C-0E345B (002C0) = Money/HP/Level/FD display on overworld screen
  • 0E4000-0E7FFF (04000) = Compressed tiles (Usage unknown)
  • 0E8000-0EBFFF (04000) = Compressed tiles (Usage unknown)
  • 104000-107FFF (04000) = Attack animations
  • 108000-10BFFF (04000) = Attack animations
  • 164000-167FFF (04000) = Compressed tiles (Used for Burion Ruins and possibly other locations?)
  • 180000-183FFF (04000) = Images (Unused?)
  • 1AC000-1AFEFF (03F00) = Denjuu #1-18
  • 1B0000-1B3EFF (03F00) = Denjuu #19-36
  • 1B4000-1B7EFF (03F00) = Denjuu #37-54
  • 1B8000-1BBEFF (03F00) = Denjuu #55-72
  • 1BC000-1BFEFF (03F00) = Denjuu #73-90
  • 1C0000-1C3EFF (03F00) = Denjuu #91-108
  • 1C4000-1C7EFF (03F00) = Denjuu #109-126
  • 1C8000-1CBEFF (03F00) = Denjuu #127-144
  • 1CC000-1CFEFF (03F00) = Denjuu #145-162
  • 1D0000-1D29FF (03A00) = Denjuu #163-174

(Each Denjuu is 380h bytes long, and is easily editable under a tile editor.)

  • 1D2A00-1D2D7F (00380) = Unidentified symbol
  • 1D8000-1DBFFF (04000) = Backgrounds of Denjuu encounters
  • 1E4000-1E7FFF (04000) = D-Shot (Game Boy)
    • 1E4000-1E4FFF (01000) = Power Version
    • 1E5000-1E5FFF (01000) = Speed Version
    • 1E6000-1E6FFF (01000) = ???
    • 1E6000-1E7FFF (01000) = (blank)
  • 1E8000-1EBFFF (04000) = Top of D-Shot
  • 1EC000-1EFFFF (04000) = D-Shot (Game Boy Color)
    • 1EC000-1ECFFF (01000) = Power Version
    • 1ED000-1EDFFF (01000) = Speed Version
    • 1EE000-1EEFFF (01000) = ???
    • 1EF000-1EFFFF (01000) = (blank)
  • 1F4000-1F517F (01180) = T-Fangers

(Each T-Fanger is 380h bytes long, and is easily editable under a tile editor.)

  • 1F5180-1F5B3F (009C0) = Denjuu Evolution Stages

(Each evolution stage is C0h bytes long.)

  • 1F5B40-1F5E3F (00300) = Denjuu Personality Icons
  • 1F8000-1FFFFF (04000) = T-Fangers

(Each T-Fanger is 380h bytes long, and is easily editable under a tile editor.)

Tile Arrangements

This determines how tiles in different maps are arranged. Each four bytes makes up a 16x16-pixel square on the map.

  • 178066-1782DD (00278) = Overworld
  • 1785F4-17874F (0015C) = Antenna Tree
  • 178E91-178FA0 (00110) = Toronko Spring, Northeast Cavern
  • 1790F5-179214 (00120) = Marts, Houses
  • 178903-178B7A (00278) = Craft Research Center, Dimentia's Mansion, Sanaeba Research Center
  • 17937D-1795EC (00270) = Tripa Antenna Tree
  • 1798F9-179B70 (00278) = Pepperi Mountains
  • 179E87-17A0F6 (00270) = Cactos Ruins
  • 17A403-17A672 (00270) = Burion Ruins
  • 17A97F-17AA4A (000CC) = Human World – Main Area
  • 17AB4A-17ACBD (00174) = Human World – Antenna Tree
  • 17AE8F-17AFF2 (00164) = Human World – Unused Buildings
  • 17B1B0-17B427 (00278) = Teletel/Dendel room, Unused replica of Golaking's room, Second D-Shot room, Palm Sea Antenna Tree switch room

Tile Colors

This determines what colors tiles on the map should have. Each four bytes determines the color of a 16x16-pixel square. Each tile in a square can have different colors. Each value in this range can be from 00-07, which assigns each tile a given palette.

  • 1782DE-178555 (00278) = Overworld
  • 178750-1788AB (0015C) = Antenna tree
  • 178FA1-1790B0 (00110) = Toronko Spring, Northeast Cavern
  • 179215-179334 (00120) = Marts, Houses
  • 178B7B-178DF2 (00278) = Craft Research Center, Dimentia's Mansion, Sanaeba Research Center
  • 1795ED-17985C (00270) = Tripa Antenna Tree
  • 179B71-179DE8 (00278) = Pepperi Mountains
  • 17A0F7-17A366 (00270) = Cactos Ruins
  • 17A673-17A8E2 (00270) = Burion Ruins
  • 17AA4B-17AB16 (000CC) = Human World – Main area
  • 17ACBE-17AE31 (00174) = Human World – Antenna Tree
  • 17AFF3-17B156 (00164) = Human World – Unused Buildings
  • 17B428-17B69F (00278) = Teletel/Dendel room, Unused replica of Golaking's room, Second D-Shot room, Palm Sea Antenna Tree switch room

Color Palettes

Denjuu

  • 034800-034D6F (00570) = Denjuu Colors

Locations

Overworld

  • 035280-0352A7 (00028) = 00:00-00:59
  • 0352A8-0352CF (00028) = 01:00-01:59
  • 0352D0-0352F7 (00028) = 02:00-02:59
  • 0352F8-03531F (00028) = 03:00-03:59
  • 035320-035347 (00028) = 04:00-04:59
  • 035348-03536F (00028) = 05:00-05:59
  • 035370-035397 (00028) = 06:00-06:59
  • 035398-0353BF (00028) = 07:00-07:59
  • 0353C0-0353E7 (00028) = 08:00-08:59
  • 0353E8-03540F (00028) = 09:00-09:59
  • 035410-035437 (00028) = 10:00-10:59
  • 035438-03545F (00028) = 11:00-11:59
  • 035460-035487 (00028) = 12:00-12:59
  • 035488-0354AF (00028) = 13:00-13:59
  • 0354B0-0354D7 (00028) = 14:00-14:59
  • 0354D8-0354FF (00028) = 15:00-15:59
  • 035500-035527 (00028) = 16:00-16:59
  • 035528-03554F (00028) = 17:00-17:59
  • 035550-035577 (00028) = 18:00-18:59
  • 035578-03559F (00028) = 19:00-19:59
  • 0355A0-0355C7 (00028) = 20:00-20:59
  • 0355C8-0355EF (00028) = 21:00-21:59
  • 0355F0-035617 (00028) = 22:00-22:59
  • 035618-03563F (00028) = 23:00-23:59
  • 034470-034477 (00008) = Overworld status bar on bottom of screen

Other Locations

  • 034480-0344B7 (00038) = Toronko Village Spring, Northeast Cavern
  • 0344C0-0344F7 (00038) = Craft Research Center, Dementia's Mansion, Sanaeba Research Center
  • 034500-034537 (00038) = Tripa Antenna Tree Cave
  • 034540-034577 (00038) = Pepperi Mountains
  • 034580-0345B7 (00038) = Cactos Ruins
  • 0345C0-0345F7 (00038) = Marts & Houses
  • 034600-034637 (00038) = Burion Ruins
  • 034640-034677 (00038) = Human World
  • 034680-0346B7 (00038) = Human World - Antenna Tree
  • 0346C0-0346F7 (00038) = Human World - Unused Buildings

(Note: The last eight bytes for all these determines the color of the status bar on the bottom of the screen.)

Intro Screen

Background

  • 035700-03573F (00040) = Screen #1 (Cave with Angios/Gymnos)
  • 035740-03577F (00040) = Screen #2 (Shigeki talking on phone)
  • 035780-0357BF (00040) = Screen #3 (Forest)
  • 0357C0-0357FF (00040) = Screen #4 (Shigeki with Krypto/Fungus in cave)
  • 035800-03583F (00040) = Screen #5 (Angios/Gymnos)
  • 035840-03587F (00040) = Screen #6 (Krypto/Fungus)

Sprites

  • 035E80-035EA7 (00028) = Screen #1 (Cave with Angios/Gymnos)
  • 035EA8-035EB7 (00010) = Screen #2 (Shigeki talking on phone)
  • 035EF8-035F17 (00020) = Screen #3 (Forest)
  • 035ED8-035EE7 (00010) = Screen #4 (Shigeki with Krypto/Fungus in cave)

Text boxes

  • 003ED0, 003ED3 = Yellow text box
  • 003ED8, 003EDB = Cyan text box
  • 003EE0, 003EE3 = Magenta text box
  • 003EE8, 003EEB = Green text box

Game Maps

Each map is 8x8 acres. The overworld map is actually four different maps combined to form one large 16x16-acre map. Each byte in these offsets starts on the top-left of the map, and goes from left to right, then top to bottom.
The pointer table for this data is located from $19C000-$19C09E. This pointer table is irregular in that each pointer is three bytes long instead of two. The first byte determines the map's graphics, music, tiles, and which ROM bank should be used for its acre data (how this exactly works is not known), and the next two tell the game where to find the map data in the ROM.

  • 19C09F-19C0DE (00040) = ???
  • 19C0E7-19C126 (00040) = ???
  • 19C152-19C191 (00040) = Overworld Map - Upper left quadrant
  • 19C330-19C36F (00040) = Overworld Map - Upper right quadrant
  • 19C50E-19C54D (00040) = Overworld Map - Lower left quadrant
  • 19C6F3-19C732 (00040) = Overworld Map - Lower right quadrant
  • 19C876-19C8B5 (00040) = Toronko Village Spring
  • 19C8FD-19C93C (00040) = Marts & Houses
  • 19CBD7-19CC16 (00040) = Northeast Cavern - Floor 1
  • 19CC7A-19CCB9 (00040) = Northeast Cavern - Floor 2
  • 19CCFA-19CD39 (00040) = Craft Research Center
  • 19CDD5-19CE14 (00040) = Dementia's Mansion
  • 19D00E-19D04D (00040) = Tripa Antenna Tree Cave - Floor 1
  • 19D079-19D0B8 (00040) = Tripa Antenna Tree Cave - Floor 2
  • 19D0DD-19D11C (00040) = Tripa Antenna Tree Cave - Floor 3
  • 19D141-19D180 (00040) = Tripa Antenna Tree Cave - Floor 4
  • 19D1A5-19D1E4 (00040) = Tripa Antenna Tree Cave - Floor 5
  • 19D1ED-19D22C (00040) = Pepperi Mountains - Floor 1
  • 19D251-19D290 (00040) = Pepperi Mountains - Floor 2
  • 19D2DF-19D31E (00040) = Pepperi Mountains - Floor 3
  • 19D351-19D390 (00040) = Pepperi Mountains - Floor 4
  • 19D3B5-19D3F4 (00040) = Pepperi Mountains - Floor 5
  • 19D404-19D443 (00040) = Cactos Ruins - Floor 1
  • 19D46F-19D4AE (00040) = Cactos Ruins - Floor 2
  • 19D551-19D590 (00040) = Cactos Ruins - Floor 3
  • 19D68E-19D6CD (00040) = Cactos Ruins - Floor 4
  • 19D7A1-19D7E0 (00040) = Cactos Ruins - Floor 5
  • 19D96A-19D9A9 (00040) = Cactos Ruins - Floor 6
  • 19DA84-19DAC3 (00040) = Cactos Ruins - Floor 7
  • 19DB66-19DBA5 (00040) = Cactos Ruins - Floor 8
  • 19DC3A-19DC79 (00040) = Burion Ruins - Floor 1
  • 19DC90-19DCCF (00040) = Burion Ruins - Floor 2
  • 19DD56-19DD95 (00040) = Burion Ruins - Floor 3
  • 19DED9-19DF18 (00040) = Burion Ruins - Floor 4
  • 19DFF3-19E032 (00040) = Burion Ruins - Floor 5
  • 19E0F1-19E130 (00040) = Burion Ruins - Floor 6
  • 19E22E-19E26D (00040) = Burion Ruins - Floor 7
  • 19E302-19E341 (00040) = Burion Ruins - Floor 8
  • 19E423-19E462 (00040) = Burion Ruins - Floor 9
  • 19E4E9-19E528 (00040) = Human World - Main Area
  • 19E554-19E593 (00040) = Human World - Antenna Tree
  • 19E5A3-19E5E2 (00040) = Human World - Unused Buildings
  • 19E600-19E63F (00040) = Teletel/Dendel's cave
  • 19E64F-19E68E (00040) = Unused replica of Golaking's room
  • 19E69E-19E6DD (00040) = Room with second D-Shot
  • 19E6ED-19E62C (00040) = Room with Palm Sea Antenna Tree switch
  • 19E73C-19E77B (00040) = Sanaeba Research Center - Floor 1
  • 19E7D1-19E810 (00040) = Sanaeba Research Center - Basement 1
  • 19E86D-19E8AC (00040) = Sanaeba Research Center - Basement 2

Acre Data

  • 18C000-18FFFF (04000) = Sanaeba Research Center
  • 190000-193FFF (04000) = Marts & Houses, Burion Ruins: Floors 7-9, Human World, Teletel/Dendel room, unused replica of Golaking's room, D-Shot room, Palm Sea Antenna Tree switch room
  • 194000-197FFF (04000) = Burion Ruins: Floors 1-6
  • 198000-19BFFF (04000) = Cactos Ruins
  • 1A0000-1A3FFF (04000) = Overworld Map (Top-left, top-right, and bottom-left quadrants), Antenna trees (same quadrants)
  • 1A4000-1A7FFF (04000) = Overworld Map (Bottom-right quadrant), Antenna trees (Bottom-right quadrant), Toronko Village Spring, Northeast Cavern, Craft Research Center, Dementia's Mansion
  • 1A8000-1ABFFF (04000) = Toripa Antenna Tree Cave, Pepperi Mountains
Each byte represents a 16x16-pixel square. Since each acre is ten squares wide 
and eight squares tall, each acre takes up 80 (50h) bytes. To find the acre you 
wish to edit, refer to the Game Maps section to find the offsets of 
the game's maps, then find the byte of the acre you wish to change. (The game 
maps are 64 (40h) bytes long -- 8 for the length and 8 for the width. It goes
from left to right, then top to bottom.) Note this hex number down. Alternately,
you can use an emulator with a memory editor (such as VisualBoyAdvance), and go
to the area you want to edit in the game. The hex number that you'll need is 
located in 0xC903 in the RAM.

Then, open up a calculator that can support hexadecimal (Windows has one in 
scientific mode) and set it to Hex. Use this formula:

A + 50 * B
A = Beginning offset of acre data
B = Hex value of acre you're modifying

As an example, let's modify the first acre you come across in the game. This is 
located in the lower-left quadrant, so you're going to refer to the Game Maps 
section way above and see that this data starts at 19C50E.

Now, since it starts here, use a hex editor and go to this offset. Since maps 
are 8x8 long, they are 64 (40h) bytes long. You'll see that the 64 (40h) bytes
in this data are laid out like this:

 80 81 82 83 84 85 86 87 
 88 89 8A 8B 8C 8D 8E 8F 
 90 91 92 93 94 95 96 97 
 98 99 9A 9B 9C 9D 9E 9F 
 A0 A1 A2 A3 A4 A5 A6 A7 
 A8 A9 AA AB AC AD AE AF 
 B0 B1 B2 B3 B4 B5 B6 B7 
 B8 B9 BA BB BC BD BE BF

Since the starting location is located in the third column in the fifth row, we 
want to look at the third row in the fifth column in this hex string above. 
You'll see that this is 94. This is your B variable in this formula.

But what's the A variable? Simple: just look above and you'll find it. You'll 
see that for the lower-left quadrant of the Overworld map, it starts at 1A0000. 
So that's your A variable.

Since we have figured out both variables, you can use the formula like so:

1A0000 + 50 * 94

Now, plug this formula in the calculator (remember to set it to Hex or it 
will not work right!) If you did this right, you should get 1A2E40 as the 
result.

Now go back to your hex editor and go to offset $1A2E40. Since this is 80 (50h) 
bytes long, the data in this acre goes from $1A2E40-$1A2E8F. Try editing any 
byte in this range (for a complete tileset for the overworld map, go to the 
bottom of this section), save, load up your ROM (if you already have it loaded, 
load it again), and go to the starting point in the game. If you did it right, 
the acre where you start the game should be different.

This can be used to customize the game's maps to your liking!
Map tilesets

[TODO: Fix these links; most of them are broken.]

Warp Data

This tells the game where the game should take you when you enter a doorway, cave, staircase, etc.
Because this data is always located right under the corresponding Game Map data, and because these vary in length from location to location, there is a pointer table from $19C000-$19C09E which tells where the map data starts, which you can use if you need to lengthen or shorten the warp data.

  • 19C0DF-19C0E6 (00008) = ???
  • 19C127-19C151 (0002B) = ???
  • 19C192-19C32F (0019E) = Overworld Map - Upper left quadrant
  • 19C370-19C50D (0019E) = Overworld Map - Upper right quadrant
  • 19C54E-19C6F2 (001A5) = Overworld Map - Lower left quadrant
  • 19C733-19C875 (00143) = Overworld Map - Lower right quadrant
  • 19C8B6-19C8FC (00047) = Toronko Village Spring
  • 19C93D-19CBD6 (0029A) = Marts & Houses
  • 19CC17-19CC79 (00063) = Northeast Cavern - Floor 1
  • 19CCBA-19CCF9 (00040) = Northeast Cavern - Floor 2
  • 19CD3A-19CDD4 (0009B) = Craft Research Center
  • 19CE15-19D00D (001F9) = Dementia's Mansion
  • 19D04E-19D078 (0002B) = Tripa Antenna Tree Cave - Floor 1
  • 19D0B9-19D0DC (00024) = Tripa Antenna Tree Cave - Floor 2
  • 19D11D-19D140 (00024) = Tripa Antenna Tree Cave - Floor 3
  • 19D181-19D1A4 (00024) = Tripa Antenna Tree Cave - Floor 4
  • 19D1E5-19D1EC (00008) = Tripa Antenna Tree Cave - Floor 5
  • 19D22D-19D250 (00024) = Pepperi Mountains - Floor 1
  • 19D291-19D2DE (0004E) = Pepperi Mountains - Floor 2
  • 19D31F-19D350 (00032) = Pepperi Mountains - Floor 3
  • 19D391-19D3B4 (00024) = Pepperi Mountains - Floor 4
  • 19D3F5-19D403 (0000F) = Pepperi Mountains - Floor 5
  • 19D444-19D46E (0002B) = Cactos Ruins - Floor 1
  • 19D4AF-19D550 (000A2) = Cactos Ruins - Floor 2
  • 19D591-19D68D (000FD) = Cactos Ruins - Floor 3
  • 19D6CE-19D7A0 (000D3) = Cactos Ruins - Floor 4
  • 19D7E1-19D969 (00189) = Cactos Ruins - Floor 5
  • 19D9AA-19DA83 (000DA) = Cactos Ruins - Floor 6
  • 19DAC4-19DB65 (000A2) = Cactos Ruins - Floor 7
  • 19DBA6-19DC39 (00094) = Cactos Ruins - Floor 8
  • 19DC7A-19DC8F (00016) = Burion Ruins - Floor 1
  • 19DCD0-19DD55 (00086) = Burion Ruins - Floor 2
  • 19DD96-19DED8 (00143) = Burion Ruins - Floor 3
  • 19DF19-19DFF2 (000DA) = Burion Ruins - Floor 4
  • 19E033-19E0F0 (000BE) = Burion Ruins - Floor 5
  • 19E131-19E22D (000FD) = Burion Ruins - Floor 6
  • 19E26E-19E301 (00094) = Burion Ruins - Floor 7
  • 19E342-19E422 (000E1) = Burion Ruins - Floor 8
  • 19E463-19E4E8 (00086) = Burion Ruins - Floor 9
  • 19E529-19E553 (0002B) = Human World - Main Area
  • 19E594-19E5A2 (0000F) = Human World - Antenna Tree
  • 19E5E3-19E5FF (0001D) = Human World - Unused Buildings
  • 19E640-19E64E (0000F) = Dendel/Teletel room
  • 19E68F-19E69D (0000F) = Unused replica of Golaking's room
  • 19E6DE-19E6EC (0000F) = Second D-Shot room
  • 19E72D-19E73B (0000F) = Palm Sea Antenna Tree switch room
  • 19E77C-19E7D0 (00055) = Sanaeba Research Center - Floor 1
  • 19E811-19E86C (0005C) = Sanaeba Research Center - Basement 1
  • 19E8AD-19E8EC (00040) = Sanaeba Research Center - Basement 2
Format of data is seven bytes per warp and is as follows:

aa bb cc dd ee ff gg
aa    = Acre of Location of Warp
        This is defined in the Game Maps section above (right above the Warp
        Data).
        This is 0xC903 in the game's RAM.
bb    = Warp's Position on Screen
        This will determine which 16x16-pixel square on the screen you have
        to stand on to warp.
        Format
cc    = Destination map
        This will determine the place you'll warp to.
        This is 0xC904 in the game's RAM.
        Index numbers for locations can be found here.
dd    = Map Coordinate to Warp To
        This will determine where on the destination map you'll warp to.
        This byte is 0xC906 in the game's RAM.
        Format
ee    = Position on screen where you'll be when warped
        Format
ff gg = Flag?
        Unknown how this works, but many rooms use FF FF; going indoors often
        uses 00 0C; entrances to Antenna Trees differ greatly

At the very end of the warp data, there is always a byte with value FF after-
wards.

Treasure Chest Data

This tells the game everything about the treasure chests in the game for every map, including the acre that it's located in, the position on screen, the item it contains, and a unique number for each chest used for a flag.

  • 19E8ED-19E956 (0006A) = Pointer table

Every two bytes is a pointer and tells the game where to look for each acre. It is assumed to be in the same order as the map data.

  • 19E957-19EB6B (00215) = Treasure chests
Format is 4 bytes for each treasure chest, and works as follows:

aa bb cc dd

aa = Acre of treasure chest
This can be found by going to the room with the desired treasure chest and
looking up RAM address 0xC903 or looking up the Game Map data.

bb = Position on screen
First nibble is the position on the screen from the left, ranging from 0-9;
second nibble is the position on the screen from the top, ranging from 0-7. This
determines which 16x16-pixel tile the item on the screen is located. Modifying
this is useful when hacking the layout of any given map.

cc = Unique number
Each treasure chest has a unique number stored internally, which is used for a
flag. This is how the game keeps track of which treasure chests have been opened
and which have not. If two or more treasure chests are assigned the same number,
and you find one treasure chest with this number, then all other treasure chests
with this number will be considered to be opened, and you cannot get the
treasure from these chests.

dd = Item
This determines which item is in the chest.

Index numbers for each item can be found here.

At the end of the last treasure chest of the given map, the value FF is used. If
a map has no treasure chests, the treasure chest data is made up of one byte,
with value FF.

Sprite Data

  • 0E2C54-?????? = Sprite pointers (Overworld)
  • 1495FE-1495FF = Pointer to sprite in Toronko Water Source???

Assembly code

  • 000D4E-000D7C = Random number generation function
  • 003C57-?????? = Generates which four Denjuu are capable of appearing
  • 003C69-003C81 = Decides which wild Denjuu species will appear
  • 014B43-?????? = Decides whether Denjuu takes advantage of his personality trait or not
  • 0167B6-?????? = Decides whether attack hits or misses
  • 0701C6-0701D9 = Decides the level of the wild Denjuu
  • 0702A1-070302 = Decides personality of the wild Denjuu
  • 070AB6-070AC3 = Decides whether the player can escape from wild Denjuu or not
  • 0741CF-?????? = Decides whether Denjuu gives you his number or not