OsuWineMemReader 1.0.1

dotnet add package OsuWineMemReader --version 1.0.1
                    
NuGet\Install-Package OsuWineMemReader -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OsuWineMemReader" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OsuWineMemReader" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="OsuWineMemReader" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OsuWineMemReader --version 1.0.1
                    
#r "nuget: OsuWineMemReader, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OsuWineMemReader@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OsuWineMemReader&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=OsuWineMemReader&version=1.0.1
                    
Install as a Cake Tool

OsuWineMemReader


OsuWineMemReader is a library for reading the memory of the osu! process running in a Wine environment, reading the current selected beatmap path.

It was built to be used in a .NET application, more specifically MapWizard, but I decided to make it a standalone library so it can be used in other projects as well.

It was also heavily inspired by hwsmm's osumem implementation, used in cosutrainer.

Note: This library relies on the process_vm_readv function, which can not be available in all Linux distributions. Furthermore, the user running the application must be the same as the user running the osu! process in Wine to it work without issues. If you are using a different user, you will need to run the application with sudo or change the permissions of the osu! process.


Requirements

  • .NET 9.0
  • Wine environment configured with osu! installed (check osu-winello, if you need help with that).
  • osu! needs to be running with dotnet 4.5 or higher.

Installation

To install the library, add a reference to the OsuWineMemReader project in your .NET project.

NuGet Package

You can install the library via NuGet Package Manager Console:

dotnet add package OsuWineMemReader

Usage

Example Usage

using OsuWineMemReader;

class Program
{
    static void Main()
    {
        bool running = true;
        string? result;
        var options = new OsuMemoryOptions
        {
            WriteToFile = true,
            FilePath = "/path/to/output/file",
            RunOnce = false // if set to true OsuMemory will run in a loop until stopped (running is set to false)
        };
        
        OsuMemory.StartBeatmapPathReading(ref running, out result, options);

        if (result != null)
        {
            Console.WriteLine($"Beatmap path: {result}");
        }
    }
}

Options

  • WriteToFile: Indicates whether the beatmap path should be written to a file.
  • FilePath: Path to the file where the beatmap path will be written.
  • RunOnce: Indicates whether the reading should be executed only once.

Contribution

  1. Fork the repository.
  2. Create a branch for your feature (git checkout -b feature/new-feature).
  3. Commit your changes (git commit -am \Add new feature``).
  4. Push to the branch (git push origin feature/new-feature).
  5. Create a new Pull Request.

References

This project relied on the heavy lifting of the following projects:

License

This project is licensed under the terms of the MIT license. See the LICENSE file for more details.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 265 4/6/2025
1.0.0 155 4/6/2025