native-platform-porting

Installation
SKILL.md

Native Platform Porting

Port software natively from a source architecture to a target platform by translating hardware-coupled logic into idiomatic host abstractions rather than emulating registers, memory maps, or coprocessor instructions.

When to Use

  • Porting legacy or console source code (e.g., Sony PlayStation PsyQ/MIPS, Nintendo, DOS, or embedded C/C++) to modern desktop OSes like Windows, Linux, or macOS.
  • Replacing hardware-level interfaces (DMA channels, custom coprocessors, memory-mapped I/O, or fixed-function pipelines) with native OS, audio, and graphics APIs (Win32, SDL, DirectX, Vulkan, OpenGL).
  • Refactoring 32-bit, fixed-memory-layout C/C++ codebases to compile cleanly on 64-bit native toolchains.
  • Preventing "stealth emulation" where an agent wraps old hardware packets or register states in an interpreter loop instead of rewriting the subsystem natively.

Steps

1. Audit Hardware Coupling and Identify Semantic Intent

Before modifying source files, catalog every direct hardware dependency and classify whether it lives in game/application logic or low-level driver code.

  • Locate inline assembly, coprocessor macros (such as PS1 GTE gte_* macros), memory-mapped register reads/writes, and proprietary SDK headers (such as libgpu.h, libgte.h, libspu.h).
  • Determine the high-level mathematical or structural intent behind low-level calls. Understanding the semantic goal prevents translating hardware workarounds literally onto the target platform.
  • Verification: Produce a dependency map listing each source hardware subsystem alongside its target native API equivalent before writing replacement code.
Installs
6
GitHub Stars
197
First Seen
Oct 26, 2026