Skip to content

Python implementation of the N64s MIO0 compression algorithm

License

Notifications You must be signed in to change notification settings

andrelikesdogs/mio0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIO0 Python Implementation

Python implementation of the N64 compression algorithm "MIO0". Technical documentation of this was taken from hack64 with a lot of help by looking at https://github.com/queueRAM/sm64tools

Installation

pip install mio0

Quick start

from mio0 import find_mio0_indices, Endianness, decompress_mio0

# obtain rom as bytes
rom = open("SM64_US.z64", "rb").read() # "rb" => read binary results in bytes return value

# lists all mio0 segments found in rom
indices = find_mio0_indices(rom)

for segment_index in indices:
    # endianness will depend on rom used
    # - z64 = big
    # - n64 = little
    # - v64 = mixed (convert before)
    output, segment_length = decompress_mio0(rom[segment_index:], Endianness.BIG)

About

Python implementation of the N64s MIO0 compression algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published