Skip to content

Port 'From Below' NES game to C# with dotnes #378

@jonathanpeppers

Description

@jonathanpeppers

Port the open-source NES homebrew game From Below by Matt Hughson from C (cc65/neslib) to C# using dotnes.

Source repo: https://github.com/mhughson/mbh-firstnes
License: MIT
Original language: C with cc65 + neslib + nesdoug
ROM specs: NROM (mapper 0), 32KB PRG, 8KB CHR, horizontal mirroring

This is the ideal candidate for a dotnes port because:

  • It uses neslib, which dotnes is based on
  • The source is open and MIT-licensed
  • It is a real, commercially sold NES game (physical cartridges)
  • It exercises many neslib APIs: palettes, sprites, VRAM updates, pad input, music/SFX (FamiTone)

The dotnes decompiler can extract the project skeleton and CHR tile data, but the game logic (~92KB of C) needs manual/AI-assisted porting from C to C#.

Approach:

  1. Use the decompiler to generate the project scaffold and CHR data
  2. Port game/main.c and game/main.h to idiomatic dotnes C# using neslib APIs
  3. Identify any missing neslib APIs needed and add them
  4. Verify the output ROM matches the original behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions