I’ve been on a small break and plan on spending alot of time on the project in a few weeks. In the mean time I thought I’d work on something I could make some quick progress on. This would be the texture files used by the game. The file extension used is MIA and nothing appears to come up from google searches so this may be a proprietary format. The textures used in the console games around the time Tokyo Xtreme Racer Zero and 3 use a different format (which looks like a variation of the textures used on Tokyo Xtreme Racer 2 on the dreamcast so would be simple to manage also). For the PC game Genki appear to have opted for another texture format in 32bit colour. The files are essentially a cabinet file that contain multiple textures. Each car has their own, the course has its own and various menus and the stickers have their own.
I took a look at the file in Hex Editor Neo (highly recommended by the way) and saw what looked like ARGB values, texture name, size and format. However the entries in the texture data didn’t match the pixel count. The entries contained ARGB and another byte value. I suspected that it could be some sort of RLE and that If I calculated these values it would total the pixel count of the texture. So parsed the file and got the total. It didn’t quite match. However a single entry had a byte value of 0. Which made sense. 255 would be 256 pixels. So recalculated and the pixel count matched.
I quickly mocked up an app to set pixels on a picture box and the texture appeared albeit upside down. So it draws bottom to top. With a quick adjustment to the code I had the texture displaying as expected:
This would export the textures but I’d like to be able to add/replace textures some day. So rewrote the code in C# and added support for replacing and adding textures.
I’ve tested adding a texture to the sticker.mia and setting the sticker value in game to the new sticker and it displayed just fine. It’s coded to use Stickera_%03d and Stickerb_%03d so already supported additional textures without any further work. The models and game code reference the texture name. Which makes things easier.
I’ve uploaded my MIA manager project to github https://github.com/tofuman0/mia-manager
On a side note when looking at the textures I found menus that had options to select your server, start position on the map, the type of course you wanted to join. However I’ve been told by a player that used to play the game that this wasn’t an option on the live servers. So it could either be that Genki had this planned or that they went in a different direction and just left the menus there. There are old textures of how the UI used to look still in the texture files so it could be either. There is also a blank license plate with characters in the texture files so maybe they also planned to enable the player to change their license plate. I could potentially enable the player to do this with my server or worst case the player could just replace the texture in their files so that it appears for them only.