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 height*width 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

Values Description
00 None, or Default
01 Star Piece
02 Dynablade 1 / Floria
03 Grape Garden
04 Battle?
05 Boss Battle 1
06 Boss Battle 2 (RPG)
07 King Dedede
08 Dynablade 4
09 Victory!
0A Victory! (Short Version)
0B Dynablade 3 / Cavios
0C Death
0D Dynablade 2
0E Game over
0F Green Greens
10 Float Islands
11 Bubbly Clouds
12 Spring Breeze Ending
13 Choose Your Weapon
14 Invincibility
15 Title Screen
16 Game Select
17 Guide / Help
18 Birds Chirping?
19 Dynablade Map
1A Dynablade Ending
1B Wind (?)
1C Twinkle Effect?
1D Milky Way Wishes Map
1E Milky Way Wishes Level End
1F Gourmet Race Win
20 Drum Roll
21 Drum Roll End
22 Gourmet Race Loss
23 Gourmet Race Level 1 / 3
24 Gourmet Race Level 2
25 Gourmet Race Intro
26 Gourmet Race Title Screen
27 Night Sounds / Wind?
28 Later Treasure Hunting
29 Begin Treasure Hunting
2A Save Room
2B Great Cave Offensive Title / End
2C Mine Cart Ride
2D Battle With Marx
2E Milky Way Wishes End
2F Space Sound Effects (?)
30 the Arena Title Screen
31 Arena Battle
32 Taking over the Halberd (Revenge of the Metaknight)
33 Halberd 2 (Revenge of the Metaknight)
34 Battle With Metaknight
35 Halberd Escape
36 Revenge of the Metaknight Opening
37 Dynablade 5
38 Revenge of the Metaknight Map Screen
39 Revenge of the Metaknight Title Screen
3A Heart of Nova
3B Game over Screen?
3C Milky Way Wishes Opening
3D Megaton Punch
3E Samurai Kirby
3F Revenge of the Metaknight End
40 Milky Way Wishes Level End
41 Kirby Sleeps
42 - FF Nothing, 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"):

Value Description
00 Blank
01 Waddle Dee
02 Waddle Doo
03 Sir Kibble
04 Sleeping Enemy
05 Crash Bomb
06 Mushroom
07 Waddle Dee Boss?
08 ???
09 Ninja
0A Flying Enemy
0B Jet Enemy
0C Fire Enemy
0D Gordo
0E Gim (Yoyo Enemy)
0F Wheel Enemy
10 Bomb Enemy
11 Flower
12 Knuckle Joe
13 Poppy Bros. (Unarmed)
14 Dog-Type Enemy
15 Cannon
16 Sweeping Enemy (?)
17 Hopping Enemy (?)
18 Scarfy
19 Blank (?)
1A Bird-Type Enemy
1B Flying Chicken (?)
1C Hopping Enemy (?)
1D ???
1E Another Hopping Enemy (?)
1F ???
20 Blade Knight
21 Weird Thing That Explodes?
22 Unswallowable Cutter Enemy (from Revenge of the Metaknight)
23 Unswallowable Jet/Axe Enemy (from Revenge of the Metaknight)
24 Unswallowable Pitchfork Enemy (from Revenge of the Metaknight)
25 Unswallowable Ball & Chain Enemy (from Revenge of the Metaknight)
26 Birdon (Wing Enemy)
27 Plasma Wisp
28 Rocky (Stone Enemy)
29 Chilly (Ice Enemy)
2A Simirror (Mirror Enemy)
2B Mike Enemy
2C T.A.C. (Copy Enemy)
2D Unknown
2E Movable Cannon
2F Floating Beam/Laser Enemy
30 Star-Chucking Enemy
31 Swinging Enemy (?)
32 Swinging Waddle Doo (?)
33 Parasol (by Itself)
34 Parasol Waddle Dee
35 Parasol Waddle Doo
36 Parasol Cannon (?)
37 Bomb (?)
38 Another Bomb (?)
39 Unknown (Fish ?)
3A Same As 39 (?)
3B Yet Another Bomb (?)
3C Fighter Mini-Boss
3D Nothing (?)
3E Smoke, then Nothing (?)
3F Blank (?)
40 Blank (?)
41 Same As 3C (?)
42 Karate Man Mini-Boss
43 Poppy Bros. Sr. Mini-Boss
44 Chef Kawasaki
45 Frosty
46 Bonkers
47 Bugzzy
48 - 4F Blank (?)
50 Whispy Woods (?)
51 Lololo & Lalala
52 Kracko Mini-Boss
53 Kracko (Boss)
54 King Dedede
55 Dynablade
56 Fatty Whale
57 Unknown
58 Wham Bam Rock
59 Halberd Reactor
5A Metaknight
5B Escaping Metaknight
5C Twin Woods
5D Rpg Battle 1
5E Halberd Cannon
5F Heavy Lobster + Horizontal Auto Scroll
60 Heart of Nova
61 ???
62 Nothing?
63 Nothing?
64 Star? (Not a Warp Star)
65 - 67 Blank (?)
68 Poppy Bros. Sr., Fighter Mini-Boss, Karate Man
69 Chef Kawasaki, Bonkers, Bugzzy
6A Floating Hotdog then SFX (?)
6B Healing Candy, Reappears
6C Healing Hotdog, Reappears
6D Waddle Dee (?)
6E Waddle Doo, Always Moving Left + Doesn't Attack
6F Blank (?)
70 Rotating Thing (?)
71 ???
72 Door Star Sprites (?)
73 Star That Finishes Level (?)
74 Blank (?)
75 Warp Star
76 Getting off Warp Star
77 Vertical Autoscroll
78 Trolley
79 Cannon That Kirby Can Shoot out of (Fuse) (?)
7A Cannon That Shoots You up
7B Flag (?)
7C Thing That Pushes You Forward (?)
7D Spring (?)
7E Blank (?)
7F Blank (?)
80 1-Up
81 Invincibility Lolipop
82 Maxim Tomato
83 Healing Hotdog
84 Healing Candy
85 Healing Juice
86 Random (Hotdog, Candy, or Juice) That Reappears
87 Nothing?
88 Falling 1-Up
89 Falling Invincibility Lolipop
8A Falling Maxim Tomato
8B Falling Healing Hotdog
8C Falling Healing Candy
8D Falling Healing Juice
8E Nothing?
8F Falling Maxim Tomato That Reappears
90 Ability Selector (Default Beam)
91 Ability Selector (Default Cutter)
92 Random Ability Selector
93 Blank (?)
94 Ability Selector (Default Beam) That Does Not Reappear
95 Ability Selector (Default Cutter) That Does Not Reappear
96 - 98 ???
99 Fuse Plunger
9A Freezes Game if You Touch?
9B - 9D Same As 9a
9E Same As 9a, Only With Switch SFX?
9F Switch That Vanishes when Hit
A0 Dynablade End of Level Cannon
A1 Blank (?)
A2 Blank (?)
A3 Green Greens Intro?
A4 Float Islands Intro?
A5 Bubbly Clouds Intro?
A6 Mt. Dedede Intro?
A7 Blank (?)
A8 Special Warp Star (Milky Way Wishes)
A9 Nothing (?)
AA Upward Current (?)
AB Nothing (?)
AC Fade-In (?)
AD - AF Blank (?)

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 Bits Information Example
000 Output next length+1 bytes (uncompressed) 01 00 FF outputs 00 FF
001 Output next byte length+1 times 23 01 outputs 01 01 01
010 Output next word length+1 times 41 02 03 outputs 02 03 02 03
011 Output a increasing sequence consisting length+1 bytes 62 03 outputs 03 04 05
100 Outputs a backref of length+1 bytes starting from offset next byte+1 81 00 output whatever word is on offset 00
101 Outputs 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
110 Is like 100 with backward seek and a word offset C1 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.