
// Fix terminating byte, drawing order, and sample size.

#define DOLPHINJR_BITMAP 0x1b380
#define DOLPHINPI_BITMAP 0x5230

#define DOLPHINCD_CELL 0xf7b84
#define DOLPHINJR_CELL 0xf31cc
#define DOLPHINPI_CELL 0x47abc

#define ECCOJR_PALETTE0_OFFSET 0xce1e6
#define ECCOPI_PALETTE0_OFFSET 0x4c7ba

// ECCO 1 PALETTE TABLE

0xa454 - RAM

0x728e8 - HOMEBAY
0x9246a - JURASSIC BEACH
0xacc86 - CITY OF FOREVER
0xbf69a - COLD WATER
0xa69da - WELCOME TO THE MACHINE

***************************************************************
*  ECCO 1 RAM ADDRESSES                                       *
***************************************************************

// 0x11b2 - Palette Swapping Function

// 0xa454 0x728e8 PALETTE ADDRESS
// 0xa588 0x73c4a PTR TO PALETTE COL ATTRIB

// 0xdb78 0x73a72 FOREGROUND
  +0x0 [WORD] WIDTH
  +0x2 [WORD] HEIGHT
  +0x4 [WORD] DOLPHIN X-POS
  +0x8 [WORD] DOLPHIN Y-POS
  +0xa [DWORD] PTR TO NAMETABLE DATA
  +0xc [DWORD] PTR TO COMPRESSED METATABLE ADDR

// 0xdc9a 0x73a82 BACKGROUND
  +0x0 [WORD] WIDTH
  +0x4 [WORD] HEIGHT
  +0x8 [DWORD] PTR TO PALETTE COL ATTRIB
  +0xc [DWORD] PTR TO NAMETABLE DATA
  +0x10 [DWORD] PTR TO COMPRESSED METATABLE ADDR

***************************************************************
*  ECCO 1 RAM ADDRESSES                                       *
***************************************************************

// 0xa454 PALETTE ADDRESS

0x728e8 - HOMEBAY + octopus (0x19)
0x9246a - JURASSIC BEACH
0xacc86 - CITY OF FOREVER
0xbf69a - COLD WATER
0xa69da - WELCOME TO THE MACHINE
0xcd576 - SONARMAP
0xcbbda - MESSAGE

***************************************************************
*  ECCO 1 NAMETABLE ATTRIBUTES                                *
***************************************************************

// 0xdb78 NAMETABLE ATTRIBUTES

0x73a72 HOMEBAY
0x73a9a UNDERCAVES
0x73ac2 THE VENTS
0x73aea THE LAGOON
0x73b12 ISLAND ZONE
0x73b3a RIDGE WATER
0x73b62 DEEPWATER
0x73b8a MEDUSA BAY
0x73bb2 OPEN OCEAN
0x73bda SELECTION SCR
0x73c02 ATTRACT MODE
0x73c2a CELEBRATION
0x93528 JURASSIC BEACH
0x93550 PTERANODON POND
0x93578 ORIGIN BEACH
0x935a0 TRILOBITE CIRCLE
0x935c8 DARK WATER
0xa6b12 WELCOME TO THE MACHINE

0xa6b3a THE TUBE
0xa6b62 RETURN TO EARTH

0xadeac DEEP CITY
0xaded4 THE MARBLE SEA
0xadefc THELIBRARY

0xadf24 CITY OF FOREVER
0xc0776 COLD WATER
0xc079e HARDWATER
0xc07c6 ICEZONE
0xca6fe THE LAST FIGHT


// ECCO 1 SPRITE TABLE

// octopus at 0x17

0x6c338 - BOLT
0x6c728 - SPLASH
0x6c9dc - VORTEX DRONE
0x6ccb4 - ORTHOCONE
0x6cde4 - BIGBLUE EYE
0x6ce18 - DOLPHIN
0x6e4a0 - GREENSHARK
0x6e6e4 - DUNKLEOSTEUS
0x6e9ac - TIGERSHARK
0x6ebcc - GLYPH
0x6ec10 - QUEENJAW
0x6ec40 - ORCA
0x6ecf0 - BLOWFISHGROW
0x6ed60 - BLOWFISH
0x6ed84 - CLAM
0x6eda0 - STINGRAY
0x6ee58 - STARS
0x6f390 - JELLYFISH
0x6f3cc - CRAB
0x6f3f4 - TELEPORTRING
0x6f5e4 - SHELL
0x6f60c - UNUSEDTURTLE
0x6f8ac - HEALTHBAR
0x6f998 - SONAR
0x6fdb0 - PTERANODON
0x6ff5c - BUBBLE
0x6ff70 - ASTERITEGLOBE
0x6ff94 - ASTERITEGLOBEALT
0x6ffb8 - ARTICSPIDER
0x70078 - ANCIENTJELLY
0x700c4 - TRILOBITE
0x701b4 - ORTHOCONEALT
0x7028c - SEAHORSE
0x7121c - SMALLEEL
0x71248 - OCTOARM
0x71c4c - LAVA

***************************************************************
*  ECCO LOCAL SPRITES                                         *
***************************************************************

0xa458 - RAM

0x738e8 - HOMEBAY
0x9346a - JURRASICBEACH
0xa6a5a - THEMACHINE 
0xccbda - MESSAGE
0xadc86 - ATLANTIS
0xc069a - HARDWATER
0xca646  -QUEEN
0xce576 - SONARMAP

***************************************************************
*  ECCO 2 PALETTE TABLE                                       *
***************************************************************

0x23b4 - SPRITE LOADER
0x11e2 - PALETTE LOADER
0xa560 - RAM

0x1e6fba - 3DLINES
0xecc1e - SEA OF GREEN
0x10afda - HOMEBAY
0x135a96 - TRELLIAS BAY
0x155936 - TUBE OF MEDUSA
0x180b4e - VORTEX FUTURE
0x18174e - VORTEX FUTURE ALT
0x19396e - DARK SEA
0x1b3f1a - VORTEX QUEEN
0x1653ca - ATLANTIS
0x1ca02e - MESSAGE


***************************************************************
*  ECCO 2 RAM ADDR                                            *
***************************************************************

// HOMEBAY EXAMPLE

// 0xa560 PALETTE ADDR
// 0xa562 0x10b85a - LEVEL SPRITE TABLE

// 0xa570 0x10ba36
 + 0x0 [DWORD] BG NTABLE 3
 + 0x4 [DWORD] BG NTABLE 2
 + 0x8 [DWORD] FG W|H
 + 0xc [DWORD] START POS X|Y
 + 0x10 [DWORD] E5FF00
 + 0x14 [DWORD] UNKNOWN*
 + 0x18 [DWORD] BG W|H
 + 0x1c [DWORD] UNKNOWN*
 + 0x20 [DWORD] BG NTABLE 1
 + 0x24 [DWORD] OBJECT NTABLE W|H*

// 0xdce0 FG WIDTH
// 0xdce2 FG HEIGHT
// 0xdcd6 0x10ba3e - FG W/H

// 0xdd04 BG NAMETABLE OFFSET
// 0xdd0a BG WIDTH
// 0xdd0c BG HEIGHT
// 0xdd00 0x10ba4e - BG W/H

// 0xdd1a MTILE TBL1 ADDR
// 0xdd36 MTILE TBL2 ADDR

***************************************************************
*  ECCO 2 PALETTE, MTILE TABLE 1 & 2                          *
***************************************************************

PROLOGUE

0x1bd84a
0x1bda5e
0x000000

SEA OF GREEN
DEEP RIDGE
THE EYE
SEA OF BIRDS
SECRET CAVE
HUNGRY ONES

0xecc1e
0xf5160
0xfb726

GLOBE HOLDER

0x106c0e 0x288 0x5
0x10701a 0x1c 0x7
0x1073e8 0x70 0x1c

HOMEBAY

0x10afda 0x880 0x11
0x118326
0x12a6b4

TRELLIASBAY

0x135a96 0x800 0x10
0x13b338
0x148b3a

TUBE OF MEDUSA

0x155936 0x500 0xa
0x157fac 0x38 0xe
0x158cda 0x40 0x10

MORAY ABYSS

0x15f74e 0x80
0x000000
0x16100e 0x14 0x5

VORTEX ARRIVED // TUNE OF MEDUSA

0x155936 0x500 0xa
0x157fac 0x38
0x158cda 0x40

ATLANTIS

0x1653ca 0x1000 0x20
0x16bcea 0x15c 0x57
0x173e02 0x400 0x100

VORTEX FUTURE palette

0x180b4e 0xc80 0x19
0x187332 0x8c 0x11
0x1890b2 0x400 0x120

LUNAR BAY/DARK SEA

0x19396e
0x19cb00
0x1a63ee

VORTEX QUEEN

0x1b3f1a 0x160 0x2
0x1b42f0 0x88 0x22
0x1b597e 0xbc 0x2f

BIG WATER

0x1d7a92 0x80 0x1
0x1d83ac 0x30 0xc
0x1d8f06 0x18 0x6

TMACHINE

0x1dbfbe 0x80 0x1
0x1dd056 0x38 0xe
0x000000

MESSAGE

0x1ca02e
0
0


***************************************************************
*  ECCO 2 PALETTE INDEXES                                     *
***************************************************************

// 0xa7d2 - Palette Indexes
// 0x1152b2 - HOMEBAY
// + 0x11 [BYTE][BYTE] H-POS PALETTE-INDEX  

0xed8ea - SEA OF GREEN
0xee8f2 - DEEP RIDGE
0xf02cc - THE EYE
0xf22c6 - SEA OF BIRDS
0xf29aa - SECRET CAVE
0xf2fcc - THE HUNGRY ONES
0xf4ba2 - CONVERGENCE
0x106efc - THE GLOBE HOLDER
0x10bafe - SELECTION SCR
0x10bd14 - TWO TIDES
0x10cefa - THE LOST ORCAS
0x10f850 - VENTS OF MEDUSA
0x110c32 - FOUR ISLANDS
0x112f3a - MAZE OF STONE
0x1152b2 - HOMEBAY
0x115e10 - SEA OF DARKNESS
0x116b76 - CRYSTAL SPRINGS
0x117388 - FAULT ZONE
0x117d72 - THE GATEWAY
0x13643c - TRELLIAS BAY
0x137aa8 - SKYWAY
0x138798 - ASTERITE's CAVE
0x1394b0 - EAGLES BAY
0x13a1f6 - FIN TO FEATHER
0x13aa4e - SKYLANDS
0x156136  -TUBE OF MEDUSA
0x156748 - VORTEX ARRIVED
0x1567ac - AQUATUBEWAY
0x156d20 - SKYTIDES
0x1609e6 - MORAY ABYSS
0x160ca2 - ASTERITE'S HOME
0x160e56 - EPILOGUE
0x16653a - ATLANTIS
0x168650 - FISH CITY
0x1696b8 - CITY OF FOREVER
0x181cca - BLACK CLOUDS
0x183df4 - VORTEX FUTURE
0x1864ee - GRAVITORBOX
0x195b8a - LUNAR BAY
0x19703c - DARK SEA
0x199da8 - NEW MACHINE
0x19af9c - INSIDE
0x19b710 - INTER
0x19bddc - INNUENDO
0x19c488 - TRANS
0x1b41e8 - VORTEX QUEEN
0x1d7c72 - BIG WATER
0x1d810a - THE POD
0x1dcfa6 - TMACHINE
0x10cefa - PROLOGUE LOST ORCAS
0x1152b2 - MESSAGE HOMEBAY

***************************************************************
*  ECCO 2 NAMETABLE PROPERTIES                                *
***************************************************************

// 0xa570 - RAM

0xed7d2 - SEA OF GREEN
0xed7fa - DEEP RIDGE
0xed822 - THE EYE
0xed84a - SEA OF BIRDS
0xed872 - SECRET CAVE
0xed89a - THE HUNGRY ONES
0xed8c2 - CONVERGENCE
0x106ed4 - THE GLOBE HOLDER
0x10b946 - SELECTION SCR
0x10b96e - TWO TIDES
0x10b996 - THE LOST ORCAS
0x10b9be - VENTS OF MEDUSA
0x10b9e6 - FOUR ISLANDS
0x10ba0e - MAZE OF STONE
0x10ba36 - HOMEBAY 
0x10ba5e - SEA OF DARKNESS
0x10ba86 - CRYSTAL SPRINGS
0x10baae - FAULT ZONE
0x10bad6 - THE GATEWAY
0x13634c - TRELLIAS BAY
0x136374 - SKYWAY
0x13639c - ASTERITE'S CAVE
0x1363c4 - EAGLES BAY
0x1363ec - FIN TO FEATHER
0x136414 - SKYLANDS
0x156096 - TUBE OF MEDUSA
0x1560be - VORTEX ARRIVED
0x1560e6 - AQUATUBEWAY
0x15610e - SKYTIDES
0x16096e - MORAY ABYSS
0x160996 - ASTERITE's HOME
0x1609be - EPILOGUE
0x1664c2 - ATLANTIS
0x1664ea - FISH CITY
0x166512 - CITY OF FOREVER
0x181c52 - BLACK CLOUDS
0x181c7a - VORTEXFUTURE
0x181ca2 - GRAVITORBOX
0x195a72 - LUNAR BAY
0x195a9a - DARK SEA
0x195ac2 - NEW MACHINE
0x195aea - INSIDE
0x195b12 - INTER
0x195b3a - INNUENDO
0x195b62 - TRANS
0x1b41c0 - VORTEX QUEEN
0x1d7c22 - BIG WATER
0x1d7c4a - THE POD
0x1dcf7e - TMACHINE
0x1bd9c8 - PROLOGUE
0x10ba36 - MESSAGE HOMEBAY

***************************************************************
*  ECCO 2 SPRITE TABLE                                        *
***************************************************************

0xec9f8 - VORTEXLARVAE
0xecb60 - DOLPHINFALL

0x1dfcbc - STARS
0x1e0248 - DOLPHIN
0x1e1828 - CRAB
0x1e1850 - JELLYFISH
0x1e18c0 - BLOWFISHGROW
0x1e1930 - BLOWFISH
0x1e1954 - SPLASH
0x1e1c08 - HEALTHBAR
0x1e1e14 - GLYPH
0x1e1e7c - TELEPORTRING
0x1e206c - SONAR
0x1e2484 - SMALLEEL
0x1e24b0 - VORTEX DRONE
0x1e2788 - OCTOARM
0x1e318c - SEATURLE
0x1e3474 - SAVEGLYPH
0x1e3500 - ????
0x1e3570 - FUTURE PLANT
0x1e359c - BLUESHARK
0x1e3e84 - ORCA
0x1e3f34 - COMPASS
0x1e3f54 - MAGICARMTAIL
0x1e3fc4 - MAGICARMTAILALT
0x1e4114 - VORTEX PLANT HYBRID
0x1e4130 - LIGHTNING
0x1e4288 - MOON
0x1e42cc - BABY ORCA
0x1e4858 - ASTERITE GLOBE BLUE
0x1e4884 - METASPHERE
0x1e48b0 - FISSION PARTICLE
0x1e491c - VORTEX HYBRID
0x1e54e8 - DUST PARTICLES
0x1e5764 - MAGICARMHEAD
0x1e5778 - FUTURE WORM
0x1e58b8 - VORTEX QUEEN TONGUE
0x1e59c4 - SPIDERCRAB
0x1e5a08 - MULLUSK
0x1e5a88 - ALPHABIT
0x1e5c24 - SEAGULL
0x1e5d24 - STARFISH SHELL
0x1e5d8c - HOLE
0x1e5e88 - 3DPLANT
0x1e5ec8 - SHIELDCRAB
0x1e5f24 - STINGRAY
0x1e5fdc - SLUDGE
0x1e603c - METALSPHERE
0x1e6084 - EAGLE
0x1e6154 - PEARL
0x1e6188 - 3DSONAR
0x1e6220 - AMOEBA
0x1e63c8 - TRELLIA
0x1e6588 - 3DEAGLE
0x1e6604 - 3DSEAWEED
0x1e6c00 - 3DDOLPHIN
0x1e6d58 - VORTEXJELLY
0x1e6dd8 - 3DJELLY
0x1e6ea8 - 3DMULLUSK
0x1e6f00 - BALLTRAP
0x1e6f2c - MULLUSKALT

***************************************************************
*  ECCO 2 LOCAL SPRITE TABLE                                  *
***************************************************************

0xa562 - RAM

0x10b85a - HOMEBAY
0x1b4078 - VORTEX QUEEN
0x136296 - TRELLIASBAY
0x155e84 - TUBEOFMEDUSA
0x194316 - DARKSEA
0x181b4e - VORTEXFUTURE
0xed69e - SEAOFGREEN
0x106e96 - GLOBEHOLDER
0x1663ca - ATLANTIS
0x15f7ce - MORAY ABYSS
0x1bd8ca - PROLOGUE
0x1ca0ae - MESSAGE