Windows CI, compatibility database, and roadmap emulation improvements #29

Closed
github-bot wants to merge 18 commits from gh-pr/29/head into gh-pr/29/base
Owner

@⁠Pouare514 on GitHub · 2026-07-17 12:31 UTC · original
main → main · +28435 −494 · 124 files · 18 commits · closed without merging

Summary

This PR implements the Windows roadmap batch for KytyPS5: continuous integration, a community compatibility database, and several functional emulator improvements (SaveData, PlayGo, import telemetry, GPU/shaders/audio).

It also adds a Windows build script (scripts/build-windows.cmd), validated locally with clang-cl, Ninja, Vulkan SDK 1.4, and Qt 6.8.2.

Changes

CI / DevOps

  • .github/workflows/ci.yml — Windows build (cmake + clang-cl + ninja), tests via ctest, launcher disabled (KYTY_BUILD_LAUNCHER=OFF)
  • .github/workflows/compat-db.yml — automatic reminder on issues labeled compatibility to contribute to compat-db/compatibility_db.json
  • .github/ISSUE_TEMPLATE/compatibility-report.yaml — structured template for compatibility reports
  • compat-db/compatibility_db.json — compatibility database skeleton
  • scripts/build-windows.cmd — configure, build (emulator + launcher + tests), install, and ctest locally

Import telemetry

  • Per-stub call counter in runtimeLinker
  • GetStubbedImportReport() / WriteStubbedImportReport() API
  • Writes _ImportReport.txt on emulator shutdown

PlayGo

  • Per-chunk state (locus)
  • Functional stubs for GetToDoList, SetToDoList, Prefetch, GetProgress

SaveData

  • Configurable save_data_folder (--save-data-folder, launcher)
  • On-disk persistence for param / icon / memory in libSaveData

GPU / Shaders

  • PM4 fallbacks: AA sample control, depth render target
  • kGsFront support (geometry Type 4) in agc.cpp
  • Fetch shader stage (GS) in the SPIR-V recompiler
  • Multi-GPU scoring (AMD / NVIDIA / Intel) in vulkanWindow.cpp
  • docs/GPU_VALIDATION.md — GPU validation notes

Audio

  • LPCM and CELP/HE-VAG decoders (stub) in ajm.cpp
  • Audio3D → SDL stereo in audio.cpp

Tests

  • enable_testing() + registration of 10 unit tests in src/CMakeLists.txt

AI disclosure

This PR was prepared with AI tooling assistance (Cursor Agent, Composer model).

Area AI role
Planning Windows setup/build plan and roadmap definition
Implementation Code generation and edits (CI, stubs, shaders, SaveData, etc.)
Machine setup Automated installation (winget, aqt, LLVM, manual submodules)
Build debugging Fixes for ExecutionModelGeometry, file.GetSize() → file.Size()
Documentation PR text, GPU_VALIDATION.md, build script

Human review: the contributor validated the push to main (8966ea4). All changes were reviewed before commit; submodules were realigned to the commits recorded in the parent repo before push.

**@⁠Pouare514** on GitHub · 2026-07-17 12:31 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/29) `main` → `main` · +28435 −494 · 124 files · 18 commits · closed without merging ## Summary This PR implements the Windows roadmap batch for KytyPS5: continuous integration, a community compatibility database, and several functional emulator improvements (SaveData, PlayGo, import telemetry, GPU/shaders/audio). It also adds a Windows build script (`scripts/build-windows.cmd`), validated locally with clang-cl, Ninja, Vulkan SDK 1.4, and Qt 6.8.2. ## Changes ### CI / DevOps - **`.github/workflows/ci.yml`** — Windows build (cmake + clang-cl + ninja), tests via `ctest`, launcher disabled (`KYTY_BUILD_LAUNCHER=OFF`) - **`.github/workflows/compat-db.yml`** — automatic reminder on issues labeled `compatibility` to contribute to `compat-db/compatibility_db.json` - **`.github/ISSUE_TEMPLATE/compatibility-report.yaml`** — structured template for compatibility reports - **`compat-db/compatibility_db.json`** — compatibility database skeleton - **`scripts/build-windows.cmd`** — configure, build (emulator + launcher + tests), install, and `ctest` locally ### Import telemetry - Per-stub call counter in `runtimeLinker` - `GetStubbedImportReport()` / `WriteStubbedImportReport()` API - Writes `_ImportReport.txt` on emulator shutdown ### PlayGo - Per-chunk state (locus) - Functional stubs for `GetToDoList`, `SetToDoList`, `Prefetch`, `GetProgress` ### SaveData - Configurable `save_data_folder` (`--save-data-folder`, launcher) - On-disk persistence for param / icon / memory in `libSaveData` ### GPU / Shaders - PM4 fallbacks: AA sample control, depth render target - `kGsFront` support (geometry Type 4) in `agc.cpp` - **Fetch** shader stage (GS) in the SPIR-V recompiler - Multi-GPU scoring (AMD / NVIDIA / Intel) in `vulkanWindow.cpp` - **`docs/GPU_VALIDATION.md`** — GPU validation notes ### Audio - LPCM and CELP/HE-VAG decoders (stub) in `ajm.cpp` - Audio3D → SDL stereo in `audio.cpp` ### Tests - `enable_testing()` + registration of 10 unit tests in `src/CMakeLists.txt` ## AI disclosure This PR was prepared with **AI tooling** assistance (Cursor Agent, Composer model). | Area | AI role | |------|---------| | Planning | Windows setup/build plan and roadmap definition | | Implementation | Code generation and edits (CI, stubs, shaders, SaveData, etc.) | | Machine setup | Automated installation (winget, aqt, LLVM, manual submodules) | | Build debugging | Fixes for `ExecutionModelGeometry`, `file.GetSize()` → `file.Size()` | | Documentation | PR text, `GPU_VALIDATION.md`, build script | **Human review**: the contributor validated the push to `main` (`8966ea4`). All changes were reviewed before commit; submodules were realigned to the commits recorded in the parent repo before push.
Wire up GitHub Actions, compatibility reporting, SaveData persistence, PlayGo stubs, import telemetry, GPU/shader/audio enhancements, and a Windows build script.
- Updated .gitignore to include additional build artifacts and IDE-specific files.
- Changed build directory references from `_Build` to `build` in README.md, CI workflow, VSCode launch configurations, and build script for clarity and uniformity.
- Implement automatic disabling of Medal Vulkan layers in Windows to prevent startup crashes.
- Update README.md with detailed troubleshooting steps for Vulkan layer issues, including registry cleanup instructions.
- Refactor Vulkan descriptor handling to support push constant ranges more effectively across graphics and compute pipelines.
- Improve error logging for C++ exceptions related to Medal hooks.
- Adjust main loop exit conditions to provide clearer logging on initialization failures.
- Introduce logging for fatal Windows exceptions, including stack buffer overrun and heap corruption.
- Update exception handling to differentiate between C++ exceptions and fatal unhandled exceptions.
- Enhance README.md with troubleshooting steps for diagnosing game closure issues related to exceptions.
- Implement crash diagnostics installation in the main application for better error handling.
- Update README.md to include new troubleshooting steps for hybrid laptop GPU configurations and clarify logging outputs for fatal exceptions.
- Modify logging to output Vulkan selected device information to both console and logs for improved visibility.
- Enhance CI workflow to dynamically set and verify Vulkan SDK installation, ensuring the correct version is used.
- Update README.md to clarify Vulkan SDK path requirements and configuration steps for users.
- Modify CMakeLists.txt to improve library search paths for Vulkan SDK, enhancing compatibility across different environments.
- Update .gitignore to exclude additional local IDE files and build logs, improving project cleanliness.
- Modify CI workflow to include RDNA2 ISA coverage report generation and shader recompiler tests, enhancing testing coverage.
- Refactor shader recompiler to support new opcodes and improve memory operation handling, including atomic operations and image loading.
- Introduce new functions for decoding flat memory and vector operations, expanding shader capabilities.
- Update README.md with new instructions for shader recompiler usage and troubleshooting.
- Introduce `PushConstantVulkanRangeSize` function to calculate aligned Vulkan range sizes for push constants, ensuring proper memory alignment.
- Update shader recompiler to utilize the new function for push constant size handling in pipeline layouts.
- Add unit tests for push constant range alignment to validate the new functionality and ensure correct behavior across various scenarios.
- Refactor memory management functions in the kernel to improve clarity and maintainability.
- Update README.md to clarify automatic Vulkan layer disabling for third-party applications, including detailed boot log information.
- Refactor Vulkan layer disabling functions to support a broader range of known layers, improving compatibility with various overlays and capture tools.
- Introduce logging for fatal exceptions and security failures, enhancing diagnostics for crashes and errors.
- Add new debug configurations for the kyty_emulator in Visual Studio Code, facilitating easier debugging of specific games.
- Implement boot tracing for memory operations and GPU readiness checks, improving debugging capabilities in graphics processing.
- Refactor texture cache refresh logic to include additional parameters for better control during video output processing.
- Introduce functions to retrieve and synchronize flexible memory size, improving memory management consistency.
- Update `Run` function to set flexible memory size based on configuration or default values.
- Implement `SynthesizeProgramProcParam` to dynamically generate process parameters for programs, ensuring proper memory allocation and protection.
- Enhance memory quota management during allocation and deallocation in the `FlexibleMemory` class.
- Add new constants and structures for better handling of process parameters and memory configurations.
- Introduce ApplyMemoryRegionsFromProcParam to manage flexible memory regions based on process parameters.
- Update SynthesizeProgramProcParam to utilize the new function for improved memory management.
- Enhance logging for flexible memory allocation and program parameters, providing detailed insights into memory usage.
- Implement checks for application heap API availability and adjust memory allocation strategies accordingly.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:09:20 +00:00
github-bot closed this pull request 2026-11-26 09:09:20 +00:00
Author
Owner

@⁠Pouare514 on GitHub · 2026-07-17 13:19 UTC · original

Nb: added RDNA 2 Instruction Set Architecture Reference Guide.md which is why the aditions seem so bigs, its only documentations

**@⁠Pouare514** on GitHub · 2026-07-17 13:19 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/29#issuecomment-5003693631) Nb: added RDNA 2 Instruction Set Architecture Reference Guide.md which is why the aditions seem so bigs, its only documentations
Author
Owner

@⁠Pouare514 on GitHub · 2026-07-17 17:06 UTC · original

Enhance Vulkan shader recompiler and CI workflow for improved functionality

  • Update .gitignore to exclude additional local IDE files and build logs, improving project cleanliness.
  • Modify CI workflow to include RDNA2 ISA coverage report generation and shader recompiler tests, enhancing testing coverage.
  • Refactor shader recompiler to support new opcodes and improve memory operation handling, including atomic operations and image loading.
  • Introduce new functions for decoding flat memory and vector operations, expanding shader capabilities.
  • Update README.md with new instructions for shader recompiler usage and troubleshooting.
**@⁠Pouare514** on GitHub · 2026-07-17 17:06 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/29#issuecomment-5005616458) Enhance Vulkan shader recompiler and CI workflow for improved functionality - Update .gitignore to exclude additional local IDE files and build logs, improving project cleanliness. - Modify CI workflow to include RDNA2 ISA coverage report generation and shader recompiler tests, enhancing testing coverage. - Refactor shader recompiler to support new opcodes and improve memory operation handling, including atomic operations and image loading. - Introduce new functions for decoding flat memory and vector operations, expanding shader capabilities. - Update README.md with new instructions for shader recompiler usage and troubleshooting.
Author
Owner

@⁠Pouare514 on GitHub · 2026-07-17 20:27 UTC · original

Refactor flexible memory management and enhance program parameter synthesis

  • Introduce functions to retrieve and synchronize flexible memory size, improving memory management consistency.
  • Update Run function to set flexible memory size based on configuration or default values.
  • Implement SynthesizeProgramProcParam to dynamically generate process parameters for programs, ensuring proper memory allocation and protection.
  • Enhance memory quota management during allocation and deallocation in the FlexibleMemory class.
  • Add new constants and structures for better handling of process parameters and memory configurations.
**@⁠Pouare514** on GitHub · 2026-07-17 20:27 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/29#issuecomment-5007205311) Refactor flexible memory management and enhance program parameter synthesis - Introduce functions to retrieve and synchronize flexible memory size, improving memory management consistency. - Update `Run` function to set flexible memory size based on configuration or default values. - Implement `SynthesizeProgramProcParam` to dynamically generate process parameters for programs, ensuring proper memory allocation and protection. - Enhance memory quota management during allocation and deallocation in the `FlexibleMemory` class. - Add new constants and structures for better handling of process parameters and memory configurations.
Author
Owner

@⁠Nmzik on GitHub · 2026-07-17 20:45 UTC · original

Nb: added RDNA 2 Instruction Set Architecture Reference Guide.md which is why the aditions seem so bigs, its only documentations

Honestly, I’m not sure whether it’s legal or whether we can store it directly in the repo

**@⁠Nmzik** on GitHub · 2026-07-17 20:45 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/29#issuecomment-5007325003) > Nb: added RDNA 2 Instruction Set Architecture Reference Guide.md which is why the aditions seem so bigs, its only documentations Honestly, I’m not sure whether it’s legal or whether we can store it directly in the repo
Author
Owner

@⁠Pouare514 on GitHub · 2026-07-17 20:51 UTC · original · edited 2026-07-17 20:54 UTC

i mean it's public documentation ? if not sure you can delete it but i see no reason why it coudnt be in here tbh

**@⁠Pouare514** on GitHub · 2026-07-17 20:51 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/29#issuecomment-5007368032) · edited 2026-07-17 20:54 UTC i mean it's public documentation ? if not sure you can delete it but i see no reason why it coudnt be in here tbh
Author
Owner

@⁠Pouare514 on GitHub · 2026-07-17 20:53 UTC · original

Add ApplyMemoryRegionsFromProcParam function and enhance memory logging

  • Introduce ApplyMemoryRegionsFromProcParam to manage flexible memory regions based on process parameters.
  • Update SynthesizeProgramProcParam to utilize the new function for improved memory management.
  • Enhance logging for flexible memory allocation and program parameters, providing detailed insights into memory usage.
  • Implement checks for application heap API availability and adjust memory allocation strategies accordingly.
**@⁠Pouare514** on GitHub · 2026-07-17 20:53 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/29#issuecomment-5007384195) Add ApplyMemoryRegionsFromProcParam function and enhance memory logging - Introduce ApplyMemoryRegionsFromProcParam to manage flexible memory regions based on process parameters. - Update SynthesizeProgramProcParam to utilize the new function for improved memory management. - Enhance logging for flexible memory allocation and program parameters, providing detailed insights into memory usage. - Implement checks for application heap API availability and adjust memory allocation strategies accordingly.
Author
Owner

@⁠Nmzik on GitHub · 2026-07-17 20:55 UTC · original

i mean it's public documentation ?

Yes, it's public but:
image

**@⁠Nmzik** on GitHub · 2026-07-17 20:55 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/29#issuecomment-5007395648) > i mean it's public documentation ? Yes, it's public **but**: <img width="545" height="296" alt="image" src="https://github.com/user-attachments/assets/a050b9e0-5dfb-44a4-9c3e-7d475db64b17" />
Author
Owner

@⁠Pouare514 on GitHub · 2026-07-17 20:56 UTC · original

i mean it's public documentation ?

Yes, it's public but: image

thruke then

**@⁠Pouare514** on GitHub · 2026-07-17 20:56 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/29#issuecomment-5007404378) > > i mean it's public documentation ? > > Yes, it's public **but**: <img alt="image" width="545" height="296" src="https://private-user-images.githubusercontent.com/691945/623435141-a050b9e0-5dfb-44a4-9c3e-7d475db64b17.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODQzMjIwMTUsIm5iZiI6MTc4NDMyMTcxNSwicGF0aCI6Ii82OTE5NDUvNjIzNDM1MTQxLWEwNTBiOWUwLTVkZmItNDRhNC05YzNlLTdkNDc1ZGI2NGIxNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcxN1QyMDU1MTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iMTc3NGJkMjk5ODBiOGNlMDExNTM1MDY1MDMyMjJkYzI0Y2ViOTVjNzdiNzMwZGJlZmRlOWE1ZDc4NTFlNGQ5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.vyvO69CN_SIrBftPafTW3HHcv8JU2pNuD-EN71gfALc"> thruke then
Author
Owner

@⁠Nmzik on GitHub · 2026-07-17 20:56 UTC · original · edited 2026-07-17 21:00 UTC

@⁠Pouare514 Thanks for the commits! In the future, please try to split your contributions into smaller, separate pull requests. It’s very difficult to review and merge everything when it’s submitted as one huge commit.

**@⁠Nmzik** on GitHub · 2026-07-17 20:56 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/29#issuecomment-5007405725) · edited 2026-07-17 21:00 UTC @⁠Pouare514 Thanks for the commits! In the future, please try to split your contributions into smaller, separate pull requests. It’s very difficult to review and merge everything when it’s submitted as one huge commit.
Author
Owner

@⁠Pouare514 on GitHub · 2026-07-17 21:00 UTC · original

@⁠Pouare514 Thanks for the commits! In the future, please try to split your contributions into smaller, separate commits. It’s very difficult to review and merge everything when it’s submitted as one huge commit.

on it

**@⁠Pouare514** on GitHub · 2026-07-17 21:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/29#issuecomment-5007434138) > @⁠Pouare514 Thanks for the commits! In the future, please try to split your contributions into smaller, separate commits. It’s very difficult to review and merge everything when it’s submitted as one huge commit. on it

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.