There is no palette in F-Zero X, to my knowledge. All images I've seen used in the game (and I believe I've looked through them ALL) are either 16-bit RGBA or 8-Bit alpha greyscale. Here's the utility module I made for my project. The particular procedure you want is called LoadTextureMIO0. In there, "Dest" is the pointer to a UserControl I made to easily implement OpenGL in my programming.
I've attatched the module to this post.
Lesse here... I've constructed that utility to extract textures directly from the ROM, so you'll need the F-Zero X ROM in Z64 (non byte-swapped) format. I've not yet implemented support for V64 yet. Then, use these offsets (remember that Visual Basic starts at 1 instead of 0) to locate the track textures:
Code:
&H235131 'Mute City
&H239A81 'Port Town
&H23EC51 'Big Blue
&H243D91 'Sand Ocean
&H24A271 'Devil's Forest
&H2507F1 'White Land
&H255101 'Sector
&H259601 'Red Canyon
&H25F361 'Fire Field
&H266C21 'Silence
&H26D781 'Ending
That is... File offset &H235131 in Visual Basic corresponds to 0x235130 in C++.
So, to extract all track textures for any given track set (locale, venue, world, etc.) where in this example, Mute City is used:
Code:
Dim FBuff() As Byte
Open "F-Zero X.n64" For Binary Access Read As #1
mioMemDecode 1, &H235131, FBuff()
Close #1
For I = 0 To 6: LoadTextureMIO0 FBuff, CDbl(4096) * I + 1, 64, 32, I, True, Form1.GLComet1: Next
LoadTextureMIO0 FBuff, CDbl(4096) * 7 + 1, 64, 32, 7, True, Form1.GLComet1
For I = 8 To 10: LoadTextureMIO0 FBuff, CDbl(4096) * I + 1, 64, 32, I, True, Form1.GLComet1: Next
And GLComet1 is that UserControl for OpenGL that I made.
__________
Also in that module:
The CCSpline procedure takes an array of doubles and interpolates them into a Closed Cubic Spline, which is (I believe) the same way the tracks are connected in the game itself. It takes the array PIn() and makes an interpolated loop which is stored in POut(). You would need to call this 3 times, one for the X coordinates, and once for Y and once for Z.
The FloatF() and IntF() functions accept 4- and 2-byte values and converts them from Big-Endian to memory, which Visual Basic stores as Little-Endian. Because they're Big-Endian in the ROM, I needed to make a compensation for my project. I have not yet written functions that take a value in memory and convert them to Big-Endian, however.
__________
I know this is more than you need, but this is a working example of how the textures can be loaded from MIO0 and converted into bitmaps, which in this instance are used in OpenGL.