Wednesday, August 11, 2021


So why does throwing the lightning bug into a pit crash the game? Long story short, the game tries to load a sprite set and fails.

Specifically, this sprite set.

For the long story, we have to get into how the sprites in this game work. Simply put, most sprites are made up of several sub-sprites. This was a way of saving space in the ROM by cutting out large transparent regions in each sprite. To illustrate, here's a crab:

If this Ussal were a single sprite, it would be 40x40 pixels, which corresponds to 800 bytes in the ROM. By separating it into the yellow, magenta, and cyan sub-sprites shown on the right (8x16, 16x32, and 16x16 pixels), this can be reduced to 768 bytes. 32 bytes per sprite is a modest amount of space to be saved, but in a game with several thousand sprites, it adds up.

Of course, once a sprite's been chopped into pieces like this, you need to include instructions for how to put those pieces together. Specifically, each subsprite has an associated list of numbers corresponding to its size (in bytes), shape, palette, and x- and y-offsets from the center of the sprite, arranged in a specific format and order that the game is programmed to parse. Let's call this "sprite data," for want of a better term.

There are unique sprites for the lightning bug falling into a pit, and they do have data detailing each sub-sprite's size, shape, offsets, and so on. However, the sprite data doesn't follow the same format as every other sprite in the game. For example, the falling bug x- and y-offsets are stored as 16-bit signed integers, but in the final format, they're 8-bit signed integers. (I suspect this is an older format that was changed to save space.) This means that when the game loads the falling bug sprites, it tries to interpret what is essentially junk data and crashes.

Anyway, having identified the problem, it's easy enough to fix it. Here are the sprites for the lightning bug falling to its doom, unseen for 20 years!

There's one other object in the game whose sprite uses the same data format as the falling bug, and it's a good one. Here it is!

It uses Takua's color palette, if that matters to you.

If you collect it, it gives you this helpful message:

It doesn't do anything else. Perhaps this was a placeholder sprite for Takua's Copper Mask?

Finally, here's a small bug fix patch that will let you throw lightning bugs off cliffs to your heart's content!

Patch (for use with the European ROM on BMP)

Pre-Patched ROM

Pre-Patched ROM with bonus MASK in the tutorial

Tuesday, August 10, 2021

Hammer Time

Happy 810NICLE Day, all! To celebrate, here's a highlight reel of weird firestaff/hammer interactions.

There are a few things going on here. One is that you can pick up and throw any enemy stunned by Vakama's Firestaff. You can even damage enemies by throwing them into each other! If you're skilled enough (I'm not), you could probably beat the Onu-Wahi Vatuka by stunning its rock familiars and throwing them at it. This is 100% intended, and it's a wonder that the game never tells you to do it at any point.

The second thing is that the hammer's coding does not distinguish between objects Takua can lift over his head. If it can be lifted, the hammer can smash it into rocks. Since everything you can pick up after getting the hammer (except the lightning bug) is a rock to begin with, this isn't a problem in normal gameplay... but if you use the item swapping trick from last post, you can absolutely destroy Nokama. I can only assume this behavior was not intended.

Finally: yes, you can stun the lightning bugs with the firestaff! I kinda like that the firestaff is useful outside of Onu-Wahi, though I question the logic of the spark gap Rahi being blinded by a flash of light. 

Unfortunately, throwing the bugs off a cliff causes the only game crash I know of. Why? Well, it's complicated, and gets into some other stuff unrelated to the topic at hand, so I'll save that for tomorrow's post. Watch this space!

Thursday, April 29, 2021

Sequence-Breaking Item Swapping

Dang it's been a while. Here's something that I originally wanted to put in a larger post, but I kept getting sidetracked and by now it is kind of silly to keep holding off. (Seriously, I uploaded the Youtube video half a month ago.)

In brief, if you press and hold SELECT and tap the triggers, you can rotate through 12 of the inventory items, regardless of if you've actually picked them up. (Snowballs are excluded from the rotation, for some reason.) The tricky thing about this is that, in normal gameplay, pressing SELECT opens the inventory screen. Ways to get around this include:

  • closing the inventory screen by pressing and holding SELECT, then tapping the triggers
  • pausing the game with START, holding SELECT, and leaving the pause screen with START or B
  • literally just holding SELECT and tapping the triggers during a minigame

To be clear, this is not a glitch, it's a dedicated function somebody programmed. Why Saffire saw fit to include it is a mystery. Perhaps it was a debug/testing function they never commented out? I can't say for sure.

In any case, if you've ever wanted to mess around with the key items before you're supposed to get them, this is your chance!

Friday, October 2, 2020

19th Anniversary Special, pt. 2

Welcome back to the Lego BIONICLE (GBA) 19th anniversary celebration! Presenting: the islanders of Mata Nui!

 If you're wondering why I call them islanders: it's what the game calls them.

There are a few interesting points here. First off, I mentioned last time that most of the islander sprites are renders of the final model, with its thick arms and updated feet. However, the talking animations for all 6 mask designs use the old model. The wizard (or "vuata maca tree keeper," as BS01 calls them) uses the old model exclusively, and the guard uses the new model exclusively.

Top row: idle. Bottom row: talking.

 The Hau sprite set inexplicably uses renders of the Akaku wearer for its northwest walk animation.

Next, let's take a closer look at those colors. Here's how they're ordered in the game's memory:

Unused colors are highlighted in yellow.

There are 9 islander color palettes for each of the 6 wahis and the tutorial, for a total of 63. For whatever reason (likely the limit of 16 unique palettes at a time), 8 of them were never used! Here's what they look like on the Kakama sprites:

I love the blue and orange Onu-Koronan. It's the sort of thing you'd never see after 2001.

A misconception I've seen is that islander colors in this game are randomized. They're not, but masks are. Almost every islander in the game uses one of the six masks at random and thus doesn't have a set appearance. However, there are four exceptions (not including the guards and wizards). In order of appearance:

"I'm sore all over." – Podu, 19 years ago

There is only one other named islander, Taipu. He looks nothing like he does in any other media.

You ever think about how, based on a few vague statements by Greg, this game is considered to be fully canon while the Mata Nui online game is only semi-canon? What I'm saying is, there's an argument to be made that this is canonically how Taipu looked during the events of the 2001 story.

Anyway, between this spritesheet and the one from yesterday, there is now nothing stopping you from making a Lego BIONICLE (GBA) sprite comic. Use this power responsibly. Happy birthday, video game!

Thursday, October 1, 2020

19th Anniversary Special, pt. 1

Today, October 1, 2020, is the 19th anniversary of Lego BIONICLE (GBA)'s American release! Well, supposedly. Some sources claim it came out on October 2nd. And the first known ROM dump is from September 29th. But in any case, I'm celebrating with two new posts, one today and one tomorrow. So without further ado, I present a spritesheet so large blogspot can't handle it: Takua.

Click for full size.

Frequent readers of the IMDb Trivia section might already know that Takua's sprites are renders of an older 3D model than the rest of the islanders (with some exceptions). The model in question is based on an as-yet-unseen McToran prototype, and has been found in the files of The Legend of Mata Nui. This same model was likely used as the basis for the vector graphics in Templar Studios' Mata Nui online game. Takua's cameo (as George) in Lego Backlot, also developed by Templar, uses the same model:


This prototype model has thinner arms than the final, and the two "toes" are not connected at the heel.

The Legend of Mata Nui.

Beyond that, I don't have much to say about the sheet itself. The most notable oddity is that Takua's dismount animation when he's facing north is 6 frames longer. Perhaps the rest of his dismounts used to be longer and were cut down to save space. Similarly, Takua has only one animation for using the firestaff, in which he faces southeast. The Power Pack demo footage shows him using it while facing north and west.

That's it for today... check back tomorrow for part 2!

EDIT: The Legend of Mata Nui model was extracted using LOMNTool, written by Ben Garcia of Litestone Studios. Big shoutouts to him and the rest of the team for their work.

Sunday, August 2, 2020

Unused Objects

Turns out there are a lot of unused objects in this game! I've created another UPS patch to showcase them (on the tutorial beach, like my Brakas patch.) This patch is for the European version of the ROM available at the BioMediaProject. Frankly, I recommend playing through the patch before looking at my notes here. Hopefully it's a treat.


Let's start by clarifying a few points. Objects are basically anything dynamic – boulders, NPCs, enemies, what have you. (In other words, everything that isn't in my maps.) Every object has code associated with it that defines its appearance, collision, behavior, and color palette. I will be using the word "object" to refer to the sum total of all these things and "sprite" to refer to the appearance of the object. For example, the water and cave Ussals are two separate objects that use the same sprites. (Note that this is my terminology, not the game's. The ROM does not include any file or function names used in development.)

Same sprites, different objects.

This patch doesn't contain all the unused objects in the game. There are several objects which, in their current state, cause the game to crash. Obviously, these aren't included. It is also always possible that I have overlooked something.

That said, let's talk about how the GBA handles color palettes. It supports up to 512 colors. Half of those are used for the background, and half are used for objects. The 256 colors used for objects are further broken up into 16 sets, or "palettes," of 16 colors each. The default object palettes are shown below:

Every sprite in the game has a default color palette. For example, Takua defaults to palette 1, and Madu trees default to palette 3. Of course, many objects don't use one of the default color palettes. The game handles this by replacing palettes 4 to 15 with those used by the objects in any given level. Consider the Brakas, whose sprites default to palette 1. The Brakas object specifies that a) the game should load its proper brown and gray color palette, if necessary, and b) the sprite should use whatever palette number that ends up being, not palette 1. In a hypothetical level where the only objects were Takua and a bunch of Brakases, the object color palettes would look like this:

... and the Brakas sprites would use palette 4.

I'm going into this for a few reasons. First, I wanted to explain that the number of palettes per level is limited. In order to cram everything into the tutorial, I made the Matoran all use Takua's color palette. The Matoran in this patch are not unused objects. Second, there are some unused objects that don't specify a unique palette, and I think it's important to stress that their color schemes may not be meaningful. Like Onewa here, who uses palette 12:

Does this date back to an unseen early prototype of Onewa where he looked heavily jaundiced?? Probably not, imo. It's more likely that they forgot to specify a color scheme, changed the default palette 12 sometime in development, or any number of other explanations.

Then there's this Moa, which runs around much more freely than the one used in the final game. It uses palette 11:

The Moa is a weird Rahi in that (as far as I can tell) it's built exactly the same as the Taku, the eaglets that Matau is almost fed to. The two birds do use different sprites, and this unused Rahi uses the Moa set, so I guess that's what it is. However, this palette might actually have been intended for the Taku, which uses a similar color scheme in the Nintendo Power Advance walkthrough's bestiary:

Anyway, moving on. The final version of the Hoto bug sends Takua hurtling through the air until he falls off a cliff. This unused version is much tamer and just throws fruit at him.

Conversely, this spider sends Takua flying, much like the final Hoto.

This unused switch lowers when you step on it:

Here are a few (presumably placeholder) pickups that trigger the wrong events when you collect them:

This unused pickup uses a unique sprite, which is kind of hard to parse. The going theory (thanks to The Shadow Emperor) is that it's meant to be cherries. It's also broken, but I'll leave you to find out what happens when you pick it up.

Here's our old pal, the unnamed bird rahi, swooping as it did in the demo footage. The shadows don't match up to the swooping animation, which is to be expected given that the shadow animation has twice as many frames.

The crumbling ground seen at the end of the game when Takua breaks the giant crystal in Ta-Wahi is an object too. This version uses unique sprites and breaks apart when hit with a projectile.

This Maha has a unique palette. Sadly, like most Maha color schemes, it cannot be built using actual bricks.

... and this Maha is tame! It runs around and occasionally stops to munch.

 Finally, here's a familiar-looking crab, which uses a unique color palette and is also tame:

The tame Ussal appears in screenshots of Onu-Koro in the Nintendo Power and Nintendo Power Advance walkthroughs, which suggests that it was removed late in development. (My going theory is that it was cut because it's very easy to clip inside it and impossible to get out.)

Main image: Nintendo Power 148; inset: Nintendo Power Advance 2

Here's a spritesheet, because I love this crab:

Again, here's the UPS patch that replaces a bunch of objects on the tutorial beach with those covered in this post, if you want to see them in action.

Monday, May 25, 2020

More Prerelease Sources!

I recently came across this coverage of New York Toy Fair 2001, featuring the Bionicle van, set photos, and everyone's favorite Bionicle GBA game:

Upscaled 2x. Special thanks to Peri for noticing the GBA footage.

Unfortunately, the original images weren't archived, so we'll have to make do with the thumbnails. The first one seems to show Takua in Le-Koro. It doesn't look like there are any other islanders present, but it's hard to tell? The second image appears to be of a body of water in Onu-Wahi. I don't think this image matches any map in the final game, but again, I'm not 100% sure of that. Interestingly, neither of these screenshots has a heads up display (or so I think). The third image is included because it shows the right side of the TV. Judging by the border around the game, I think this was camcorder footage of a GBA dev kit's screen, similar to the demo footage on the Power Pack.

But wait, there's more! Here's Nintendo Power Volume 146, scanned by Brickshelf user "ianc" in November 2001.

All 6 screenshots are totally new to me – I don't think they were used anywhere else! Frankly, I'm astounded that this file is still available, given Brickshelf/Maj's troubles over the years. (That said, if you own NP 146 or have access to a higher quality scan, please get in touch.)

On a similar note, both the Nintendo Power Advance and Nintendo Power walkthroughs show tame Ussal crabs in Onu-Koro, but they do not appear in the final game. In other words, Nintendo Power's copy of the game was a prerelease build. I haven't noticed anything else odd about their screenshots, but it wouldn't surprise me if something is staring me in the face.

Left: NPA 2, right: NP 148. Nintendo Power photo by Toa Nidhiki05,
who's done great work on this game's Wikipedia page.

Finally, Nintendo Power once uploaded gameplay footage of the Kofo-Jaga fight in Po-Koro. Unfortunately, the original footage wasn't archived, but the thumbnail was. I can't spot anything strange about the thumbnail, but I'm including it for completeness' sake:

Upscaled 4x.