module generation - Vita3K/Vita3K GitHub Wiki

Introduction

Modules are generated by the gen-modules tool. This tool takes the vita-headers NID database file db.yml as input, and generates:

  • "Stub" (existing but unimplemented) functions corresponding to SCE module exports
  • A header file to declare all the NIDs
  • CMake scripts to build them

Benefits

  • Bypasses a lot of manual, error-prone, tedious work
  • Follows coding style
  • Correctness: NID mappings in line with vitasdk

Shortcomings

  • Build process is more involved
  • vita-headers submodule shouldn't be updated without regenerating modules

Method

  1. Build and run gen-modules, with the current directory being src (I think, it's been a while). This will erase a bunch of stuff we want to keep.
  2. Commit it. We'll undo this commit later.
  3. Update vita-headers
  4. Run gen-modules again. These are the changes you want to keep.
  5. Interactive Rebase in git to remove the commit you made in 2.
⚠️ **GitHub.com Fallback** ⚠️