Skip to content

Contributing

Aurumaker72 edited this page Feb 23, 2025 · 18 revisions

Compiling

Open the solution with your IDE of choice and build the solution.

Recommended IDEs are:

Additional context - Rider

It's recommended to disable "Use external console" (Run > Modify Run Configuration...), as it breaks spdlog's text coloring and reduces both startup and runtime performance.

Additionally, Rider users should disable ReSharper Build if it doesn't affect their workflow, as it introduces a large amount of latency to the build start.

grafik

Commit Style

Commits should, if possible, be reduced to individual work units and not contain multiple unrelated changes, barring situations where, for example, API changes require updating callsites.

The commits should be formatted as follows:

[Scope]/[Kind]: [Description]

Module

Scope can describe either a general scope, or, in most cases, the module affected by the commit, usually by filename (e.g.: view/capture/EncodingManager.cpp -> EncodingManager)

Special scopes:

  • Chore (maintenance that has to be done at regular intervals, such as README or Copyright header updates, requires Dev kind)
  • Doc (documentation, requires Dev kind)
  • Build (build system or compiler option changes, requires Dev kind)
  • CI (changes to CI workflows, requires Dev kind)
  • Arch (architectural changes, requires Dev kind)
  • Other (changes which don't fit any other category)

Kind

Kind loosely specifies the groups affected by the change. Can be:

  • Feat (a new feature or noteworthy change in functionality of an existing feature).
  • Chg (a change relevant to the user)
  • Fix (a bugfix)
  • Dev (internal change with little to no effect on users)

Example commits:

AVIEncoder/Fix: Encoder crashing on frame 32

ConfigDialog/Feat: Reset settings button

Copyright Header

Every non-library file must contain the following header:

/*
 * Copyright (c) 2025, Mupen64 maintainers, contributors, and original authors (Hacktarux, ShadowPrince, linker).
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

Program Structure

Mupen64 is currently divided into two parts: its Core, and its Windows GUI.

Core

The core implements emulation functionality and defines an API which allows it to be driven externally.

Must be platform-agnostic.

Views.Win32

The Win32 implementation of a Mupen64 GUI.

Reading and using Crashlogs

  1. Find the stacktrace
[2025-02-06 18:58:07.911] [View] [critical] Stacktrace:
[2025-02-06 18:58:07.946] [View] [critical] mupen64_119_9_avx2+0xA2AB6
[2025-02-06 18:58:07.946] [View] [critical] mupen64_119_9_avx2+0xD304A
[2025-02-06 18:58:07.950] [View] [critical] ntdll!RtlGetFullPathName_UEx+0x13F
[2025-02-06 18:58:07.950] [View] [critical] ntdll!RtlGetFullPathName_UEx+0x7B
  1. Identify the frame you want to look at
0xA2AB6
  1. Open x32dbg

  2. Open the "Go to" dialog by pressing Ctrl + G

  3. Navigate to 0x00400000 + [Your Address]

Code Style

Code formatting must, to the furthest possible extent, abide by the .clang-format file provided in the repository root.