Debug

This is the full debugging guide for the game.

## Imitater's seed packet

* Imitater's recharge timer is at 27D4BF and is sourced from either 27D45E, 27D480, or 27D47C.
* The imitated plant is stored at memory address 27D2C0.
* Imitater's sun cost is stored at memory address 27D4BE and the value is:
	+ Sourced from 27D46D if the imitated plant costs 0 sun.
	+ Sourced from 27D47D if the imitated plant costs 25 sun.
	+ Sourced from 27D45F if the imitated plant costs 50 sun.
	+ Sourced from 27D479 if the imitated plant costs 75 sun.
	+ Sourced from 27D45D if the imitated plant costs 100 sun.
	+ Sourced from 27D47B if the imitated plant costs 125 sun.
	+ Sourced from 27D461 if the imitated plant costs 150 sun.
	+ Sourced from 27D467 if the imitated plant costs 175 sun.
	+ Sourced from 27D46B if the imitated plant costs 200 sun.
	+ Sourced from 27D4AB if the imitated plant costs 300 sun.
	+ Sourced from 27D482 if the imitated plant costs 325 sun.

## Chosen plants

* Plant #1: 27D5C1
* Plant #2: 27D5C2
* Plant #3: 27D5C3
* Plant #4: 27D5C4
* Plant #5: 27D5C5
* Plant #6: 27D5C6
* Plant #7: 27D5C7
* Plant #8: 27D5C8
* Plant #9: 27D5C9
* Plant #10: 27D5CA

## Suburban Almanac

* Current section (0 = index, 1 = plants, 2 = zombies) - 27D3CB
* Current plant - 27D3CC
* Current zombie - 27D3CD

## Dialog menu options

The dialog menu options are stored at memory address 47D4FE. The values are:

* 0x01 = TRY AGAIN, MAIN MENU
* 0x02 = BACK TO GAME, RESTART LEVEL, MAIN MENU, VIEW ALMANAC
* 0x03 = YES, NO
* 0x04 = CANCEL, OK
* 0x05 = YES, RE-PICK

## Intervals

* Peashooter (150) - 27D4CE
* Sunflower (2500) - 27D4CF
* Cherry Bomb (100) - 27D4D0
* Potato Mine (1500) - 27D4D1
* Snow Pea (150) - 27D4D2
* Chomper #1 (90) - 27D4D3
* Chomper #2 (4200) - 27D4D4
* Repeater (150) - 27D4D5
* Puff-shroom (150) - 27D4D6
* Sun-shroom #1 (2500) - 27D4D7
* Sun-shroom #2 (12000) - 27D4D8
* Fume-shroom (150) - 27D4D9
* Grave Buster (400) - 27D4DA
* Scaredy-shroom (150) - 27D4DB
* Ice-shroom (100) - 27D4DC
* Doom-shroom (100) - 27D4DD
* Threepeater (150) - 27D4DE
* Jalapeno (100) - 27D4DF
* Spikeweed (100/76) - 27D4E0
* Sea-shroom (150) - 27D4E1
* Cactus (150) - 27D4E2
* Blover (200) - 27D4E3
* Split Pea (150) - 27D4E4
* Starfruit (150) - 27D4E5
* Magnet-shroom (1500) - 27D4E6
* Cabbage-pult (300) - 27D4E7
* Kernel-pult #1 (300) - 27D4E8
* Kernel-pult #2 (40) - 27D4E9
* Coffee Bean (100) - 27D4EA
* Marigold (2500) - 27D4EB
* Melon-pult (300) - 27D4EC
* Crater (18000) - 27D4ED
* Butter (400) - 27D4EE
* Gatling Pea (150) - 27D4EF
* Twin Sunflower (2500) - 27D4F0
* Gloom-shroom (150) - 27D4F1
* Cattail (150) - 27D4F2
* Winter Melon (300) - 27D4F3
* Cob Cannon #1 (500) - 27D4F4
* Cob Cannon #2 (3000) - 27D4F5
* Imitater (200) - 27D4F6
* Pole-Vaulting Zombie (200) - 27D4F7
* Dancing Zombie (150) - 27D4F8
* Zombie Yeti (1500) - 27D4F9
* Bungee Zombie (300) - 27D4FA
* Catapult Zombie (300) - 27D4FB
* Peashooter Zombie (150) - 27D4FC
* Gatling Pea Zombie (150) - 27D4FD

## Projectiles

### Projectile values

* 01 = Pea
* 02 = Frozen pea
* 03 = Spore
* 04 = Fire pea
* 05 = Spike
* 06 = Star
* 07 = Cabbage
* 08 = Kernel
* 09 = Butter
* 0A = Melon
* 0B = Frozen melon
* 0C = Corn cob
* 0D = Fumes

### Plants

* Peashooter, Repeater, Threepeater, Split Pea, Gatling Pea, no Torchwood (0x01) - 27D4FF
* Peashooter, Repeater, Threepeater, Split Pea, Gatling Pea, with Torchwood (0x04) - 27D500
* Snow Pea, no Torchwood (0x02) - 47D501
* Snow Pea, with Torchwood (0x01) - 47D502
* Puff-shroom, Scaredy-shroom, Sea-shroom (0x03) - 47D503
* Fume-shroom, Gloom-shroom (0x0D) - 47D504
* Cactus, Cattail (0x05) - 47D505
* Starfruit (0x06) - 47D506
* Cabbage-pult (0x07) - 47D507
* Kernel-pult #1 (0x08) - 47D508
* Kernel-pult #2 (0x09) - 47D509
* Melon-pult (0x0A) - 47D50A
* Winter Melon (0x0B) - 47D50B
* Cob Cannon (0x0C) - 47D50C

## Zen Garden

### Greenhouse

* Plant #1: 47D273
* Plant #2: 47D274
* Plant #3: 47D275
* Plant #4: 47D276
* Plant #5: 47D277
* Plant #6: 47D278
* Plant #7: 47D279
* Plant #8: 47D27A
* Plant #9: 47D27B
* Plant #10: 47D27C
* Plant #11: 47D27D
* Plant #12: 47D27E
* Plant #13: 47D27F
* Plant #14: 47D280
* Plant #15: 47D281
* Plant #16: 47D282
* Plant #17: 47D283
* Plant #18: 47D284
* Plant #19: 47D285
* Plant #20: 47D287
* Plant #21: 47D288
* Plant #22: 47D289
* Plant #23: 47D28A
* Plant #24: 47D28B
* Plant #25: 47D28C
* Plant #26: 47D28D
* Plant #27: 47D28E
* Plant #28: 47D28F
* Plant #29: 47D290
* Plant #30: 47D291
* Plant #31: 47D292
* Plant #32: 47D293

## Current music

The current music is stored at memory address 47D294, which is directly after the memory addresses that store the plants in your Zen Garden.

* 0x00 = None
* 0x01 = Grasswalk
* 0x02 = Moongrains
* 0x03 = Watery Graves
* 0x04 = Rigor Mormist
* 0x05 = Graze the Roof
* 0x06 = Menus
* 0x07 = Loading
* 0x08 = Cerebrawl
* 0x09 = Ultimate Battle
* 0x0A = Loonboon
* 0x0B = Brainiac Maniac
* 0x0C = Zen Garden
* 0x0D = Unused

## Other things

* Total coins (maximum value 16,777,215, a zero is always added as the final digit) - 47D272
* Survival: Endless streak (maximum value is 214,748,364,