Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

EarthBound/Palette Memory

From Data Crystal
Jump to navigation Jump to search

This is a sub-page of EarthBound.

$7E43D0: Map palette average red

Average red value in all non-zero colors in the current map palette. Computed by subroutine at $C00391. Used for comparisons between map palettes in order to adjust sprite palettes.

$7E43D2: Map palette average green

Average green value in all non-zero colors in the current map palette. Computed by subroutine at $C00391. Used for comparisons between map palettes in order to adjust sprite palettes.

$7E43D4: Map palette average blue

Average blue value in all non-zero colors in the current map palette. Computed by subroutine at $C00391. Used for comparisons between map palettes in order to adjust sprite palettes.

$7E43D6: Onett average red

Average red value in all non-zero colors in the Onett daytime palette. Always #$008A in unmodified EarthBound. Computed by subroutine at $C005E7. Used for comparisons between map palettes in order to adjust sprite palettes.

Note: EarthBound is rather wasteful by loading this palette and computing this average on every sector graphics load. It is all based on constant ROM data, so the developers could have just hardcoded the result.

$7E43D8: Onett average green

Average green value in all non-zero colors in the Onett daytime palette. Always #$0096 in unmodified EarthBound. Computed by subroutine at $C005E7. Used for comparisons between map palettes in order to adjust sprite palettes.

Note: EarthBound is rather wasteful by loading this palette and computing this average on every sector graphics load. It is all based on constant ROM data, so the developers could have just hardcoded the result.

$7E43DA: Onett average blue

Average blue value in all non-zero colors in the Onett daytime palette. Always #$0074 in unmodified EarthBound. Computed by subroutine at $C005E7. Used for comparisons between map palettes in order to adjust sprite palettes.

Note: EarthBound is rather wasteful by loading this palette and computing this average on every sector graphics load. It is all based on constant ROM data, so the developers could have just hardcoded the result.

$7E445C: Animation palette remaining frames

If the current map palette is animated, stores the number of remaining frames for the current animation palette. Upon reaching zero, the next animation palette is loaded from Decompressed Map Animation Palettes, and the remaining frames value is set from Map Animation Palette Frame Durations.

$7E445E: Map animation palette number

If the current map palette is animated, stores the current animation palette number, that is the current index into Map Animation Palette Frame Durations and Decompressed Map Animation Palettes.

$7E4460-$7E4471: Map animation palette frame durations

If the current map palette is animated, contains a table of the number of frames each animation palette will be active before loading the next. 2-byte entries for each of up to 8 animation palettes, followed by at least 1 zero entry, for a total of 9 entries.

Indexed by the Map Animation Palette Number: duration_pointer = #$7E4460 + animation_palette_number * #2.

$7E4474: Animation palette active flag

If the current map palette is animated, contains #$0001. Otherwise contains #$0000.

$7e4476-$7E4635: Unknown copy of map/sprite palettes

$7E99CD (8-bit): Current window "flavor"

Identifier for the current "flavor" (palette) for dialog windows.

Values

  • #$01 "Plain"
  • #$02 "Mint"
  • #$03 "Strawberry"
  • #$04 "Banana"
  • #$05 "Peanut"

$7EB800-$7EBDFF: Decompressed map animation palettes

If the current map palette is animated, contains the animation palettes decompressed from an entry in the Palette Animation Table. Up to 8 animation palettes, each containing 6 subpalettes at 16 colors each for a total of 0xC0 bytes per animation palette, just like normal non-animated map palettes.

Indexed by the Map Animation Palette Number: animation_palette_pointer = #$7EB800 + animation_palette_number * #$C0. These pointers are precomputed in the Decompressed Map Animation Palette Pointer Table.