GitXplorerGitXplorer
T

MupenSharp

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
67efaa53e09436b236239978c135076d7b6f3de2

updated deps

TTimeTravelPenguin committed 3 months ago
Verified
864c71eb2f96761d1dc68fa7a7fc1e416aa72d84

removed unnecessary deps

TTimeTravelPenguin committed 3 months ago
Unverified
fe463c4177d38f0c2825de4d5d857bc6ebb4770d

Major refactor

TTimeTravelPenguin committed 3 years ago
Unverified
bb4b23e45b9952827dda024153b81ed910a2c56b

Deleted

TTimeTravelPenguin committed 3 years ago
Unverified
eae1047aa488585c69bf80f7115e68c919e90137

Removed DocFx

TTimeTravelPenguin committed 3 years ago
Verified
4bdce7f60fd442c64a338b819f007aba83b2e0ff

Update README.md

TTimeTravelPenguin committed 3 years 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