GitXplorerGitXplorer
T

MupenSharp

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
932995f3392dde42f264602d002ab9976e0f4003

bumped version

TTimeTravelPenguin committed 3 months ago
Verified
eac3c591c81f748623784cc22e846629f8480c09

added missing object instantiation

TTimeTravelPenguin committed 3 months ago
Verified
252d5658acccbd4c3dea1e92e0403231c73cb29f

fixed invalid conditional

TTimeTravelPenguin committed 3 months ago
Verified
cdac5afc77a613afff327cafe4f50732fb2440e9

updated outdated code example

TTimeTravelPenguin committed 3 months ago
Verified
29ce83996010c7bffd6b462d7764220299fec047

removed publish icon & added nuget hyperlink

TTimeTravelPenguin committed 3 months ago
Verified
fe4ec77a125e423fa2b191d3f183f90f03e9cfc8

removed due to being outdated

TTimeTravelPenguin committed 3 months ago

README

The README file for this repository.

MupenSharp

Nuget CodeFactor

MupenSharp is a .Net Standard library to interface with .m64 files for reading and writing.

This library is designed to assist in reading and writing .m64 files for the Mupen64 application. By using MupenSharp, you do not need to manually process the file's header or encoding types, as it is all maintained within this library.

For more specific information on the filetype's header layout, please refer to the TASVideos page which documents the format.

Documentation

You can view the documentation anytime here!

Overview

  • What is Mupen64?

    Mupen64 is an emulation tool designed and used for Tool-Assisted Speedrunning Nintendo 64 titles. It is largely used by the Super Mario 64 TASing community, with various application version for video playback recording and LUA plugin support.

  • What is a .m64 file?

    The .m64 file is the movie playback file which holds the inputs of a TAS. This file is made and read by Mupen64 and holds information for the game title, ROM CRC, region code, and other information to ensure a valid emulation can be played back.

  • Why make MupenSharp?

    There are several applications that exist that allow a user to edit or combine files, such as the .m64 editor built into the TAS tool STROOP, which is used by the SM64 TASing community. The goal of this library is to provide a simple interface for all future applications to manage these files.

How to use?

In order to read a .m64 file, you can do the following:

using MupenSharp.Models;
using MupenSharp.FileParsing;
using MupenSharp.Enums;

const string file = "C://path/to/file.m64";
M64 m64 = MupenV3Parser.Parse(file);

Console.WriteLine($"Author(s): {m64.Author}");
Console.WriteLine($"ROM name: {m64.RomName}");

var frameCount = 1;
foreach (var inputFrame in m64.GetControllerInputs(Controller.ControllerOne))
{
  Console.WriteLine($"Frame {frameCount++}:\t{inputFrame}");
}

An example console output would be:

Author(s): Phillip Smith
ROM name: SUPER MARIO 64

Frame 1:        (0, 0)
Frame 2:        (0, 0)
Frame 3:        (0, 0) Start
Frame 4:        (0, 0) Start
Frame 5:        (0, 0) Start
...
Frame 259:      (-10, 127)
Frame 260:      (-10, 127) B
Frame 261:      (-21, 127) R
Frame 262:      (-30, 127) R
Frame 263:      (-35, 127) R
Frame 264:      (13, 127) R, B
Frame 265:      (13, 127) R, B
Frame 266:      (13, 127) R, B