Difference between revisions of "Kirby's Adventure:RAM map"

From Data Crystal
Jump to: navigation, search
m
(Map Data Format: Note about screen amount)
Line 52: Line 52:
  
 
== Map Data Format ==
 
== Map Data Format ==
After the tileset data is decoded, the map data is decompressed (no decoding necessary)
+
After the tileset data is decoded, the map data is decompressed to <tt>67EE - 74C7 (0CDA)</tt> (no decoding necessary)
  
* <tt>67EE - 74C7 (0CDA)</tt> = decompressed map output
+
NOTE: Maps can have 1-16 different screens, and screens can be duplicated in the map screen order
** <tt>67EE - 68C7 (00DA)</tt> = header
+
 
*** <tt>67EE</tt> = map width
+
* <tt>67EE - 68C7 (00DA)</tt> = header
*** <tt>67EF</tt> = map height
+
** <tt>67EE</tt> = map width
*** <tt>67F0</tt> = PPU background banks (see [[Kirby's Adventure:ROM map#Map.2FEnemy.2FTileset Data|ROM 0x0B428]])
+
** <tt>67EF</tt> = map height
*** <tt>67F1</tt> = PPU background palettes (see [[Kirby's Adventure:ROM map#Background Palettes|Background Palettes]])
+
** <tt>67F0</tt> = PPU background banks (see [[Kirby's Adventure:ROM map#Map.2FEnemy.2FTileset Data|ROM 0x0B428]])
*** <tt>67F2</tt> = PPU sprite banks
+
** <tt>67F1</tt> = PPU background palettes (see [[Kirby's Adventure:ROM map#Background Palettes|Background Palettes]])
*** <tt>67F3</tt> = PPU sprite palettes (see [[Kirby's Adventure:ROM map#Misc|ROM 0x24E65]])
+
** <tt>67F2</tt> = PPU sprite banks
*** <tt>67F4</tt> = music
+
** <tt>67F3</tt> = PPU sprite palettes (see [[Kirby's Adventure:ROM map#Misc|ROM 0x24E65]])
*** <tt>67F5</tt> = background animation delay (00 = off)
+
** <tt>67F4</tt> = music
*** <tt>67F6 - 68C7 (0010)</tt> = map screen order (from top, by rows)
+
** <tt>67F5</tt> = background animation delay (00 = off)
** <tt>68C8 - 6987 (00C0)</tt> = map screen 1
+
** <tt>67F6 - 68C7 (0010)</tt> = map screen order (from top, by rows)
** <tt>6988 - 6A47 (00C0)</tt> = map screen 2
+
* <tt>68C8 - 6987 (00C0)</tt> = map screen 1
** <tt>6A48 - 6B07 (00C0)</tt> = map screen 3
+
* <tt>6988 - 6A47 (00C0)</tt> = map screen 2
** <tt>6B08 - 6BC7 (00C0)</tt> = map screen 4
+
* <tt>6A48 - 6B07 (00C0)</tt> = map screen 3
** <tt>6BC8 - 6C87 (00C0)</tt> = map screen 5
+
* <tt>6B08 - 6BC7 (00C0)</tt> = map screen 4
** <tt>6C88 - 6D47 (00C0)</tt> = map screen 6
+
* <tt>6BC8 - 6C87 (00C0)</tt> = map screen 5
** <tt>6D48 - 6E07 (00C0)</tt> = map screen 7
+
* <tt>6C88 - 6D47 (00C0)</tt> = map screen 6
** <tt>6E08 - 6EC7 (00C0)</tt> = map screen 8
+
* <tt>6D48 - 6E07 (00C0)</tt> = map screen 7
** <tt>6EC8 - 6F87 (00C0)</tt> = map screen 9
+
* <tt>6E08 - 6EC7 (00C0)</tt> = map screen 8
** <tt>6F88 - 7047 (00C0)</tt> = map screen 10
+
* <tt>6EC8 - 6F87 (00C0)</tt> = map screen 9
** <tt>7048 - 7107 (00C0)</tt> = map screen 11
+
* <tt>6F88 - 7047 (00C0)</tt> = map screen 10
** <tt>7108 - 71C7 (00C0)</tt> = map screen 12
+
* <tt>7048 - 7107 (00C0)</tt> = map screen 11
** <tt>71C8 - 7287 (00C0)</tt> = map screen 13
+
* <tt>7108 - 71C7 (00C0)</tt> = map screen 12
** <tt>7288 - 7347 (00C0)</tt> = map screen 14
+
* <tt>71C8 - 7287 (00C0)</tt> = map screen 13
** <tt>7348 - 7407 (00C0)</tt> = map screen 15
+
* <tt>7288 - 7347 (00C0)</tt> = map screen 14
** <tt>7408 - 74C7 (00C0)</tt> = map screen 16
+
* <tt>7348 - 7407 (00C0)</tt> = map screen 15
 +
* <tt>7408 - 74C7 (00C0)</tt> = map screen 16

Revision as of 10:31, 8 May 2007

  • 0042 = PPU sprite banks 0-1
  • 0043 = PPU sprite banks 2-3
  • 0044 = PPU background bank 0
  • 0045 = PPU background bank 1
  • 0046 = PPU background bank 2
  • 0047 = PPU background bank 3
  • 0593 - 0595 (0003) = score (1 per 10 points)
  • 0596 = health (max) (count by 8)
  • 0597 = health (current) (count by 8)
  • 0598 = power (for mike, crash, light)
    • only used for display, except mike
  • 0599 = lives
    • max of 63 (99 decimal)
  • 059D = lives display
    • 00 = lives only
    • 01 = power & lives
    • 02-FF = [GLITCH]
  • 05E2 = power of eaten enemy
  • 05E3 = current power (see Notes)
    • NOTE: bytes for actually being able to use power are VERY COMPLICATED (627F 6291 62A3 / 62D9 62EB 62FD)
  • 058C = background graphics cycle - current
  • 058D = background graphics cycle - countdown
  • 058E = background graphics cycle - type
  • 62C7 = kirby state (see Notes)

Tileset Data Format

Tileset data is decompressed to 67EE - 6D2D (0540), then decoded to 7A00 - 7FFF (0600)

Original format:

  • 67EE - 6BED (0400) = tileset - sets of PPU tiles (4 bytes per full tile)
  • 6BEE - 6C2D (0040) = tileset - palettes (2 bits per tile)
  • 6C2E - 6D2D (0100) = tileset - attributes

Decoded format:

  • 7A00 - 7AFF (0100) = tileset - top-left PPU tile
  • 7B00 - 7BFF (0100) = tileset - top-right PPU tile
  • 7C00 - 7CFF (0100) = tileset - bottom-left PPU tile
  • 7D00 - 7DFF (0100) = tileset - bottom-right PPU tile
  • 7E00 - 7EFF (0100) = tileset - palette
  • 7F00 - 7FFF (0100) = tileset - attribute (see Notes)

Map Data Format

After the tileset data is decoded, the map data is decompressed to 67EE - 74C7 (0CDA) (no decoding necessary)

NOTE: Maps can have 1-16 different screens, and screens can be duplicated in the map screen order

  • 67EE - 68C7 (00DA) = header
    • 67EE = map width
    • 67EF = map height
    • 67F0 = PPU background banks (see ROM 0x0B428)
    • 67F1 = PPU background palettes (see Background Palettes)
    • 67F2 = PPU sprite banks
    • 67F3 = PPU sprite palettes (see ROM 0x24E65)
    • 67F4 = music
    • 67F5 = background animation delay (00 = off)
    • 67F6 - 68C7 (0010) = map screen order (from top, by rows)
  • 68C8 - 6987 (00C0) = map screen 1
  • 6988 - 6A47 (00C0) = map screen 2
  • 6A48 - 6B07 (00C0) = map screen 3
  • 6B08 - 6BC7 (00C0) = map screen 4
  • 6BC8 - 6C87 (00C0) = map screen 5
  • 6C88 - 6D47 (00C0) = map screen 6
  • 6D48 - 6E07 (00C0) = map screen 7
  • 6E08 - 6EC7 (00C0) = map screen 8
  • 6EC8 - 6F87 (00C0) = map screen 9
  • 6F88 - 7047 (00C0) = map screen 10
  • 7048 - 7107 (00C0) = map screen 11
  • 7108 - 71C7 (00C0) = map screen 12
  • 71C8 - 7287 (00C0) = map screen 13
  • 7288 - 7347 (00C0) = map screen 14
  • 7348 - 7407 (00C0) = map screen 15
  • 7408 - 74C7 (00C0) = map screen 16