Woo hoo! Here's the update you all may concievably have been waiting for!
I've completely wrapped up my MIO0 experiences, and this topic can now successfully come to a close.
It turns out I multiplied by 2 a few too many times when writing the encoder. I take that out, and it works like a charm. However, in F-Zero X at least, the encoder magically doesn't compress data quite as much as Nintendo did. It's always just a few bytes larger... Not much to shake a stick at, but enough to throw off an inline offset... I'll have to find out why it does that.
No, there aren't any more speed upgrades for the decoder... I'm pretty sure it's as fast as VB can make it right now.
Here's a list of the prototypes of the codecing functions:
Code:
Function mioDecodeMIO0(InputFile As String, DataOffset, OutputFile As String) As Integer
Function mioEncodeMIO0(InputFile As String, OutputFile As String) As Integer
Function mioGetErrorString(ErrNum) As String
Function mioMemDecode(FileNum, DataOffset, Buffer() As Byte) As Integer
Function mioMemEncode(FNum, Buffer() As Byte) As Integer
The "Horrible MIO0 Encoder" has been changed to "MIO0 Codec Kit," because I made a fully-functional little tool out of it. I abbreviated it M0CK, which is kinda approperiate.
Note: The "Offset" field is 0-based and decimal.
In addition, I reformatted the documentation "MIO0.txt" into a non-typoed, color-parsed "MIO0.html"! So, basically, this post wraps up everything I've been doing since I started the topic.
Contents of the ZIP:
Within the ZIP file attatched to this post, there is a compiled Windows EXE of M0CK (which needs the Microsoft VB6 runtime, availible at their site), the latest version of the modMIO0 Visual Basic module, the newly-formatted MIO0 HTML documentation file, and a ZIP file containing the source code to M0CK.
And below is a picture of M0CK, just to let people see if it's what they want before they download it.