SNES Development
Kirby Super Star

Kirby Super Star

Also known as Hoshi no Kirby Super Deluxe and Kirby’s Fun Pak. The information below is from the US version of the game, however it works for all versions of the game.

Pointer Table

Bank FF (PC `3F0000-3FFFFF`) is a table of pointer tables (If you can call it like that) For example, `FF:0000 points to the 1st entry of the Room Pointer Table ($FF:009A)

$FF:0002 points to the GFX and (Level) Palette pointer table. $FF:000C points to the level Pointer table $FF:0022 is the Level Pointer Table containing $3C entries. $FF:009A is the beginning of the Room Pointer Table

Section Format

At the beginning of each Section, there will be a relative Pointer to the next Section (The Repeating 04 00 FF FF Pattern is an example of this) It is skipped by adding the first word to the Current Address (Beware, that the SNES is Little-Endian! The low byte comes first)

Room Height/Width

After you’ve gotten the Room Address, note it down somewhere and add $3A to the address - that will skip over the room header(s). Then Skip 6 Sections (See last chapter) and add 2 to the address. This will lead to two words. The first one is the width, the second one is height. Two bytes after it, the level data begins.

Level Data

The level data has a simple format: first heightwidth low bytes, then the high bytes and then the sprite data. It is compressed the same way as other games from HAL Laboratories (See below)

Music / Misc. Headers

An example music header is this one for the first room in Green Greens, starting at $3020EF:

00 00 0F 00 01 01 13 01 00 00 00 00 00 00 00 00 00

$00    00 
$01    00 
$02    0F    Changing this changes the song that will play in that room.
$03    00 
$04    01 
$05    01 
$06    13    This seems to be the background scroll rate for the room. 
             Experiment with different values for different effects. 
             Changing this value to 99 makes the background not scroll at all.
$07    01 
$08    00    Changing this value will make sprites darker?
$09    00    Changing this will horizontally shift the background left or right.
$0A    00    Changing this will vertically shift the background up or down.
$0B    00 
$0C    00    Changing this value to 76 will make Kirby enter the room on a 
             warp star for the main entrance.
$0D    00 
$0E    00 
$0F    00 
$10    00

Most music headers have this same exact format, only with some different values and 0F changed to something else (obviously). By looking for this type of data in the ROM, you will be able to find data for other rooms (which are in a messed up order). By remembering the music that a certain room plays, you will be able to find data for that room by looking for the music header and the matching byte below.

Music Values

ValuesDescription
00None, or Default
01Star Piece
02Dynablade 1 / Floria
03Grape Garden
04Battle?
05Boss Battle 1
06Boss Battle 2 (RPG)
07King Dedede
08Dynablade 4
09Victory!
0AVictory! (Short Version)
0BDynablade 3 / Cavios
0CDeath
0DDynablade 2
0EGame over
0FGreen Greens
10Float Islands
11Bubbly Clouds
12Spring Breeze Ending
13Choose Your Weapon
14Invincibility
15Title Screen
16Game Select
17Guide / Help
18Birds Chirping?
19Dynablade Map
1ADynablade Ending
1BWind (?)
1CTwinkle Effect?
1DMilky Way Wishes Map
1EMilky Way Wishes Level End
1FGourmet Race Win
20Drum Roll
21Drum Roll End
22Gourmet Race Loss
23Gourmet Race Level 1 / 3
24Gourmet Race Level 2
25Gourmet Race Intro
26Gourmet Race Title Screen
27Night Sounds / Wind?
28Later Treasure Hunting
29Begin Treasure Hunting
2ASave Room
2BGreat Cave Offensive Title / End
2CMine Cart Ride
2DBattle With Marx
2EMilky Way Wishes End
2FSpace Sound Effects (?)
30the Arena Title Screen
31Arena Battle
32Taking over the Halberd (Revenge of the Metaknight)
33Halberd 2 (Revenge of the Metaknight)
34Battle With Metaknight
35Halberd Escape
36Revenge of the Metaknight Opening
37Dynablade 5
38Revenge of the Metaknight Map Screen
39Revenge of the Metaknight Title Screen
3AHeart of Nova
3BGame over Screen?
3CMilky Way Wishes Opening
3DMegaton Punch
3ESamurai Kirby
3FRevenge of the Metaknight End
40Milky Way Wishes Level End
41Kirby Sleeps
42 - FFNothing, or Default

Level Graphics Header

An example of a level graphics header is from the first room in Green Greens, starting at $302105, slightly down from the music header. Each room in the game has its own music and graphics headers.

01 AA 08 6A 6A EA 00 2B 40 40 C9 09 0D 0E 00 00 00 00 00 55 4E 57 15 03

08 6A 6A EA          - This is the room's level object gfx and palette. 
                       Level objects are things such as floors, blocks, etc. 
                       Note that changing these values may also change the 
                       object itself, not just the graphics / palette. 
                       There are several different sets of objects in the game. 
                       To change this to the objects from another level, 
                       find that level's graphics header and just copy the values over.
2B 40 40 C9 09 0D 0E - This is the background gfx and palette. 
                       Note that some of the 00 bytes beyond this may also affect it; 
                       I'm not 100% certain. 
                       To change this to the background from another level, 
                       find that level's graphics header and just copy the values over.
4E 57 15 03          - This is the sprite gfx. Different values let other sprites be shown correctly.
                       To be able to properly use enemies from another level,
                       find that level's graphics header and just copy the values over. 
                       Note that you do not have to copy all four values over;
                       you can use values from several different levels. Experiment.

Most levels should work in this way, having the music header first and the graphics header slightly below. You’ll be able to find it by seeing two repeating values side by side (ie. 6A 6A like the example above). Below the graphics header is the actual level data. I don’t know the level data format yet, but sprite data works exactly like I will describe below in most cases. Sprite data is also often near the end of the level data.

Some sprite data is stored in the following format:

AA BB CC DD EE FF

AA - This value can be 00, or a multiple of 10. 
     For some other sprites this can be a different value. 
     This determines the sprite's behavior, or in some cases, 
     what the sprite gives you (for ability selectors, 
     this value determines the ability). 
     Most sprites have different behaviors so it would be 
     long and pointless to list them all here.
BB - The sprite value itself, a partial chart will come later. 
     Note that most sprites will look corrupted unless you load 
     the proper GFX set.
CC - The horizontal position of the sprite on the screen.
DD - The screen number of the sprite in the given area. 
     Changing this to a valid value will move the sprite to 
     that screen (ie. if the value is 02 then it's on screen 2, 
     change it to 01 and it will be on screen 1).
EE - Vertical position of the sprite on the screen.
FF - The vertical screen number. This works the opposite; 
     01 would be the top screen, 02 the next, and so on. 
     Note that this only works in levels with vertical screens, 
     changing this value in other levels may have undesirable effects.

Here is an example piece of enemy data at hex address $302238:

00 1A 2D 02 74 00

This is from the very first room in Green Greens, in the Spring Breeze game. It is for that flying bird thing (1A).

Sprite values (partial list, some missing, all values were tested with the example above “00 1A 2D 02 74 00”):

ValueDescription
00Blank
01Waddle Dee
02Waddle Doo
03Sir Kibble
04Sleeping Enemy
05Crash Bomb
06Mushroom
07Waddle Dee Boss?
08???
09Ninja
0AFlying Enemy
0BJet Enemy
0CFire Enemy
0DGordo
0EGim (Yoyo Enemy)
0FWheel Enemy
10Bomb Enemy
11Flower
12Knuckle Joe
13Poppy Bros. (Unarmed)
14Dog-Type Enemy
15Cannon
16Sweeping Enemy (?)
17Hopping Enemy (?)
18Scarfy
19Blank (?)
1ABird-Type Enemy
1BFlying Chicken (?)
1CHopping Enemy (?)
1D???
1EAnother Hopping Enemy (?)
1F???
20Blade Knight
21Weird Thing That Explodes?
22Unswallowable Cutter Enemy (from Revenge of the Metaknight)
23Unswallowable Jet/Axe Enemy (from Revenge of the Metaknight)
24Unswallowable Pitchfork Enemy (from Revenge of the Metaknight)
25Unswallowable Ball & Chain Enemy (from Revenge of the Metaknight)
26Birdon (Wing Enemy)
27Plasma Wisp
28Rocky (Stone Enemy)
29Chilly (Ice Enemy)
2ASimirror (Mirror Enemy)
2BMike Enemy
2CT.A.C. (Copy Enemy)
2DUnknown
2EMovable Cannon
2FFloating Beam/Laser Enemy
30Star-Chucking Enemy
31Swinging Enemy (?)
32Swinging Waddle Doo (?)
33Parasol (by Itself)
34Parasol Waddle Dee
35Parasol Waddle Doo
36Parasol Cannon (?)
37Bomb (?)
38Another Bomb (?)
39Unknown (Fish ?)
3ASame As 39 (?)
3BYet Another Bomb (?)
3CFighter Mini-Boss
3DNothing (?)
3ESmoke, then Nothing (?)
3FBlank (?)
40Blank (?)
41Same As 3C (?)
42Karate Man Mini-Boss
43Poppy Bros. Sr. Mini-Boss
44Chef Kawasaki
45Frosty
46Bonkers
47Bugzzy
48 - 4FBlank (?)
50Whispy Woods (?)
51Lololo & Lalala
52Kracko Mini-Boss
53Kracko (Boss)
54King Dedede
55Dynablade
56Fatty Whale
57Unknown
58Wham Bam Rock
59Halberd Reactor
5AMetaknight
5BEscaping Metaknight
5CTwin Woods
5DRpg Battle 1
5EHalberd Cannon
5FHeavy Lobster + Horizontal Auto Scroll
60Heart of Nova
61???
62Nothing?
63Nothing?
64Star? (Not a Warp Star)
65 - 67Blank (?)
68Poppy Bros. Sr., Fighter Mini-Boss, Karate Man
69Chef Kawasaki, Bonkers, Bugzzy
6AFloating Hotdog then SFX (?)
6BHealing Candy, Reappears
6CHealing Hotdog, Reappears
6DWaddle Dee (?)
6EWaddle Doo, Always Moving Left + Doesn’t Attack
6FBlank (?)
70Rotating Thing (?)
71???
72Door Star Sprites (?)
73Star That Finishes Level (?)
74Blank (?)
75Warp Star
76Getting off Warp Star
77Vertical Autoscroll
78Trolley
79Cannon That Kirby Can Shoot out of (Fuse) (?)
7ACannon That Shoots You up
7BFlag (?)
7CThing That Pushes You Forward (?)
7DSpring (?)
7EBlank (?)
7FBlank (?)
801-Up
81Invincibility Lolipop
82Maxim Tomato
83Healing Hotdog
84Healing Candy
85Healing Juice
86Random (Hotdog, Candy, or Juice) That Reappears
87Nothing?
88Falling 1-Up
89Falling Invincibility Lolipop
8AFalling Maxim Tomato
8BFalling Healing Hotdog
8CFalling Healing Candy
8DFalling Healing Juice
8ENothing?
8FFalling Maxim Tomato That Reappears
90Ability Selector (Default Beam)
91Ability Selector (Default Cutter)
92Random Ability Selector
93Blank (?)
94Ability Selector (Default Beam) That Does Not Reappear
95Ability Selector (Default Cutter) That Does Not Reappear
96 - 98???
99Fuse Plunger
9AFreezes Game if You Touch?
9B - 9DSame As 9a
9ESame As 9a, Only With Switch SFX?
9FSwitch That Vanishes when Hit
A0Dynablade End of Level Cannon
A1Blank (?)
A2Blank (?)
A3Green Greens Intro?
A4Float Islands Intro?
A5Bubbly Clouds Intro?
A6Mt. Dedede Intro?
A7Blank (?)
A8Special Warp Star (Milky Way Wishes)
A9Nothing (?)
AAUpward Current (?)
ABNothing (?)
ACFade-In (?)
AD - AFBlank (?)

I never went beyond this but I assume that there are either no more sprites, or only a few.

Sprite Palette Header

This is an example from the first room in Green Greens, it starts at $30211E (right after the Music / Misc. header):

99 01 01 01 01 01 99

All of the 01 values edit certain sprite palettes; best of all you must experiment to see what will change what. Note that some palettes look really ugly on some sprites. Most levels in the game have this same pattern, only with different values instead of 01 01 01 01 01.

Main Entrance and Door Exits

This is for the first room in Green Greens, and this will show you how to edit the main entrance and the door on the second screen. This starts at $302125. All levels should have this same format. Door exits are a bit screwed up because the game uses some sort of a “relative pointer” system, so you have to be sure to edit all doors in all rooms that you edit to go to valid levels if you edit a door to go to a different room than originally supposed to.

2B 00 2A 00 18 00 02 00 80 01 78 00 9C 00 6C 00 03 00 00

2B 00 2A 00 - This is the main level entrance data. 
              2B is Kirby's horizontal (x) position on the screen, 
              00 is the horizontal screen number he starts on, 
              2A is Kirby's vertical (y) position on the screen, and 
              00 is the vertical screen number he starts in (if any).
00 18 00 02 00 80 01 78 00 9C 00 6C 00 03 00 00
            - This is the data for the door on the second screen. 
              Note that this is on a level with only one door; 
              levels with multiple doors will have some of this same 
              string repeated several times, only with different values.
02          - The number of the room that the door leads to.
00          - If the room you want to go to is past FF (there are over 255), 
              then set this value to 01 and restart the value before this 
              from 00 and go up from there.
80 01 78 00 - This determines where the door trigger will be. 
              In order for a door to work you must have a door tile object, 
              and the appropriate trigger on it. 
              80 is the x-position of the door,
              01 the horizontal screen number, 
              78 the y-position of the door, and 
              00 the vertical screen number.
9C 00 6C 00 - This works exactly like the 80 01 78 00 data above, 
              only this data determines where on the screen you will 
              end up when you switch rooms through the door.

Almost directly below the entrances / exits is the level data itself. However, most of it uses compressions, some of which I will explain below.

Compressions

Level data in this game is compressed. The compression is the same as other games developed by HAL laboratory. it can be (de)compressed using exhal Thanks to Vagla for cracking the 0x, 2x, 8x, and E4 compressions. This is the original document. 0x[string of length x+1] = Uncompressed Blocks

This applies to an 0x value that you will often see after another type of compression. Basically, this tells the game how many blocks after this value will be uncompressed. Example:

09 18 0C 0C C3 C3 07 C3 C4 C7 07
09 Tells how many uncompressed blocks are coming x+1.
   The other values would be the uncompressed blocks.

2xid = RLE of length x+1 with id id.
       Simple enough, the x+1 tells the game how many of that block to make,
       and id is the value of the block used. Example:
2E 00
2E tells how many blocks are coming x+1. 
00 value is the value to use for the block.

4xid1id2
Draw the next two blocks back to back, then repeat x times. Example:
41 C8 C9
41 is the 4x value, this tells the game how many times to repeat 
   the next two blocks after drawing them once, with x.
C8 and C9
   These are the id values. They should both be different.
The game would translate the 41 C8 C9 string into blocks like this:
C8 C9 C8 C9 in a row

6xid = String of length x+1, starts at id value and adds 1 for each value x times.
       Pretty much self-explanatory. Example:
62 8C would make:
8C 8D 8E in a row

8x??l1 = LZ of length x+1 taking blocks from location l1+1 (?).
         ?? unknown (affects blocks that are copied, maybe an extra length byte)
         Not much to explain here, this basically "Copies and Pastes" data from 
         another part of the game's data, thus saving space.

E4xxid = RLE of length xx+1 with id id?
         This is basically the same as 2xid above, only you can use two-digit values.

This is the new Document (Created by darklink):

Every “command” byte is split into 3 command bits and 5 length bits.

Here is a small table of the commands and what they do:

Command BitsInformationExample
000Output next length+1 bytes (uncompressed)01 00 FF outputs 00 FF
001Output next byte length+1 times23 01 outputs 01 01 01
010Output next word length+1 times41 02 03 outputs 02 03 02 03
011Output a increasing sequence consisting length+1 bytes62 03 outputs 03 04 05
100Outputs a backref of length+1 bytes starting from offset next byte+181 00 output whatever word is on offset 00
101Outputs a backref of length+1 bytes starting from offset next word+1. note that every byte is flipped. (flip(0x80)==0x01)A1 00 00 will output a flipped word, which is located on offset 00
110Is like 100 with backward seek and a word offsetC1 00 01 will output when at offset 00 00 the word AB CD is, CD AB

Note: 111 may not be used. However other games by HAL Laboratories CAN do the same as 100 Also, the backref offsets are for DECOMPRESSED stuff. Note it has some discrepancies. This may be because the old doc is 4 years old, or I am just really wrong.

Misc. ROM Map Information

$302171 & $3021C1 - Part of Green Greens 1st room level data
$302974 - Float Islands 1st room music byte (in the music header, default value is 10, used to locate this room’s data)
$30828B - Maxim Tomato in the 2nd room in Green Greens (used to locate this room’s data)
$30DB33 & $30DB2F - Green Greens intro bytes?
$3020F3 - 1st room in Green Greens, change value to 02 for border, and 00 for a black background?
$308294 - Milky Way Wishes “Ninja Room” music byte (used to locate this room’s data)
$302156 to $302159 - Green Greens level-type header?
$377D17 - Part of some TSA data, check first room in Green Greens for changes
$302157 - Does this determine the number of horizontal screens in the first room in Green Greens? When I changed the value to other random values, the level data was messed up and the level seemed to be shorter, so… There’s a few bytes before and after this that might have something to do with the room type data I’ve been trying to find.

These bytes are from the graphics header for the 1st room in Green Greens (from the example graphic header above):
$302107 - Ground GFX byte
$302108 & $302109 - Ground palette
$30210A - Ground type modifier
$30210C & $30210F - Background modifier
$30210D & $30210E - Background palette
$302119 to $30211C - Sprite GFX modifiers

Information discovered by Proto K.