COLI Filetype Breakdown (F-Zero GX)

All your homebrew software needs & discussion
Post Reply
User avatar
Posts: 66
Joined: Fri Feb 21, 2014 5:58 am
Location: Toronto, Canada

COLI Filetype Breakdown (F-Zero GX)

Post by StarkNebula » Sun Feb 22, 2015 11:19 pm

// WIP //

This thread is going start out being a bit of a information dump. Long story short, Panzerhandschuh and I have been tackling F-Zero GX's collision data since sometime January and have made a lot of progress, though that has stopped lately due to college. However, we've compile a lot of information, and we've both made some tools to help understand the format better. First off, I'm just going to paste links to Google Docs we've compiled:

Header Format (WIP): ... sp=sharing
COLI Header Extracts: ... =719228113 (multiple tabs)
COLI [ST01] - Collision Triangles & Quads: ... edit#gid=0
COLI [ST03] - Collision Triangles & Quads: ... 1292935836
Spline Data Structure [ST03]: ... edit#gid=0

I made a script in Processing (Java) to convert all offsets to byte, octet, word, and string formats. I'll link it to the converted output spreadsheet. If need be, I can post the script. TSV and CSV formats.

This is Panzerhandschuh's tool. Using Unity (3D), you can visually see the stage's track spline, tangents, and misc. collision, such as boost pad, heal-pit, etc.

Going to update this later with a more accurate explanation of the header format, and what we know.
FYI - CosmoCortney, we still need a RAM dump and the offsets you were editing. ;)
Last edited by StarkNebula on Mon Feb 23, 2015 2:39 am, edited 1 time in total.
Posts: 1
Joined: Sun Jan 25, 2015 1:39 am

Re: COLI Filetype Breakdown (F-Zero GX)

Post by Panzerhandschuh » Mon Feb 23, 2015 1:54 am

Here's a download to the full Unity project: ... eroTest.7z
It requires Unity 4.6+ though it might still work on older versions with some missing features.
Basically this tool just reads and displays all of the info in a coli file that we understand currently. There's also a save feature that will update the coli file with updated values changed from Unity's inspector. Currently, only track spline and object edits are saved though. I recommend reading the source code if you want to get a better understanding of the structure of coli files.

- Open the project in Unity
- Load the Scene file
- Click Main Camera in the object hierarchy and change the course number value to select a course
- If you are missing scripts on the main camera, select EditorCamera.cs, DebugHelper.cs, and CollisionParser.cs for the missing scripts
- Make all edits in Unity's edit mode (game mode only lets you look around)

Update 2/27/15: Uncommented code that loads mesh collisions and made it easier to load courses by editing a value in the inspector (requires having course files in the "Input" folder).
Update 3/1/15: Added FZObject class for loading 3D object info

Chapter 8:


Also, here's a coli excel file for course03 that's almost fully labelled using discovered patterns and offsets: ... 35B97.xlsx
Last edited by Panzerhandschuh on Sun Mar 01, 2015 10:01 pm, edited 6 times in total.
User avatar
Site Admin
Posts: 4735
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia

Re: COLI Filetype Breakdown (F-Zero GX)

Post by emu_kidid » Mon Feb 23, 2015 2:10 am

Nice work guys, maybe we'll see a SNES track in F-Zero GX at some point ;)
User avatar
Posts: 84
Joined: Sun Nov 11, 2012 9:09 pm
Location: under your bed

Re: COLI Filetype Breakdown (F-Zero GX)

Post by CosmoCortney » Sun Mar 01, 2015 11:15 pm

this is all nice :)
I've been testing out a lot of things on the console too, while the coli-data were loaded into RAM.
As discussed with StarkNebula on Twitter before, I have figured out a few things about positioning and scaling 3D objects. But there are still a few oddities about this:

I can maybe help by checking out various values when the game is running by accessing the RAM through the USB Gecko.
My Game-Hacking YouTube Channel

My Hacking Screenshots collection on FB

Separate posts will be created for each code-category so I can use the post's link for easy code sharing. So please don't wonder that there are some double posts by me.
Posts: 17
Joined: Fri Jan 09, 2015 3:09 pm

Re: COLI Filetype Breakdown (F-Zero GX)

Post by Yoshimaster96 » Sat Mar 14, 2015 8:11 pm

Well this is different from SMB! The collision and objects in SMB are located in one file, and the collision triangle format is very different. It just has an extension of .lz, not .gma.lz, not .tpl.lz, just .lz. I'm working on a converter, when I get done with it, I'll share it. Also, there are two 4 byte words, that determine the end of the header, I'm guessing, since SMB1 has an 0xA0 byte header, and SMB2 has a header longer than 0x800 bytes (!), this was used for compatibility, so they could reuse the engine (to an extent).
Post Reply