Hasty Briefsbeta

Bilingual

DotnetSnes: Library allowing to use C# to create SNES ROMs

a year ago
  • #.NET
  • #Game Development
  • #SNES
  • Allows using .NET languages to create SNES ROMs via a .NET library (DotnetSnes.Core) that abstracts SNES game functions.
  • Compiled DLLs are transpiled to C using Dotnet To C transpiler (dntc), then compiled with PvSnesLib SDK to create ROMs.
  • Limitations include minimal System type support, no dynamic allocations, and the need to minimize stack variables.
  • PVSnesLib SDK works best under Linux; Windows users should use WSL for final compilation.
  • Repository cloning requires SSH credentials due to submodule dependencies.
  • Setup involves installing dependencies (cmake, g++, dotnet-sdk-8.0), cloning, and recursive submodule initialization.
  • Hello World example demonstrates basic text display on SNES.
  • LikeMario example shows object management, tile maps, audio, and gamepad input in C#.
  • New projects require referencing DotnetSnes.Core and Dntc.Attributes, defining a Main function with [CustomFunctionName("main")], and setting up a Makefile.
  • Game assets must be included in the project directory and referenced in the Makefile.
  • A manifest.json file is needed to guide the transpiler, specifying assemblies, output directory, and methods to transpile.
  • Code referencing game content uses [AssemblyLabel("labelName")] attributes for assembly labels.