PC-Platform: native Linux ELF lifecycle, native Windows/Linux audio/input/network/saves #34

Open
opened 2026-11-26 21:02:00 +00:00 by github-bot · 1 comment
Owner

@⁠ProhorovIlja on GitHub · 2026-11-21 23:07 UTC · original

Windows-first lifecycle through native Win32 + D3D12, Linux x86-64 ELF with Vulkan/Wayland/X11; absolutely no CPU emulator/VM/Proton as the final Linux build. Separate platform services for SDL3 window/gamepad/KBM and GameInput/Raw Input/XInput, native audio (XAudio2/WASAPI vs PipeWire/ALSA), UDP/Winsock2 vs sockets/epoll with security/NAT resilience, stable timing, HDR/VRR, safe multithreading, durable saves (journal/checksums/atomic replace/fsync/rollback). Add hardware/device hotplug tests, audio underrun metrics, packet loss/jitter simulation, crash-consistency tests and accessibility/settings per feature. Legal source and license audit for all external SDKs. Do not conflate an Xbox PE compatibility loader with a finished native Linux port.

2026-11-22 native Linux ELF Vulkan smoke verified

PR #38, dedicated Ubuntu Actions run 44960887330: an ORIGINAL Linux x86-64 ELF compiled with distro Vulkan SDK executed vkCreateInstance, vkEnumeratePhysicalDevices, vkCreateDevice, retrieved graphics VkQueue and vkDeviceWaitIdle. It passed on an Ubuntu runner using Mesa software Vulkan: device_type=4 (CPU), vendor ID 65541, so no real hardware GPU or performance proof. No Wine/Proton/CPU emulator or game files involved. See native Linux Vulkan report.

Next: create a native window/WSI swapchain, rasterize/read back/present deterministic pixels, then native audio/input/fsync saves/network. Actual native Linux game ELF build and Xbox-specific ABIs remain unimplemented.

**@⁠ProhorovIlja** on GitHub · 2026-11-21 23:07 UTC · [original](https://github.com/ProhorovIlja/NativeX-Runtime/issues/34) Windows-first lifecycle through native Win32 + D3D12, Linux x86-64 ELF with Vulkan/Wayland/X11; absolutely no CPU emulator/VM/Proton as the final Linux build. Separate platform services for SDL3 window/gamepad/KBM and GameInput/Raw Input/XInput, native audio (XAudio2/WASAPI vs PipeWire/ALSA), UDP/Winsock2 vs sockets/epoll with security/NAT resilience, stable timing, HDR/VRR, safe multithreading, durable saves (journal/checksums/atomic replace/fsync/rollback). Add hardware/device hotplug tests, audio underrun metrics, packet loss/jitter simulation, crash-consistency tests and accessibility/settings per feature. Legal source and license audit for all external SDKs. Do not conflate an Xbox PE compatibility loader with a finished native Linux port. ## 2026-11-22 native Linux ELF Vulkan smoke verified [PR #38](https://github.com/ProhorovIlja/Scarlett-Windows-Compat/pull/38), [dedicated Ubuntu Actions run 44960887330](https://github.com/ProhorovIlja/Scarlett-Windows-Compat/actions/runs/44960887330): an ORIGINAL Linux x86-64 **ELF** compiled with distro Vulkan SDK executed vkCreateInstance, vkEnumeratePhysicalDevices, vkCreateDevice, retrieved graphics VkQueue and vkDeviceWaitIdle. It passed on an Ubuntu runner using Mesa software Vulkan: `device_type=4` (CPU), vendor ID 65541, so **no real hardware GPU or performance proof**. No Wine/Proton/CPU emulator or game files involved. See [native Linux Vulkan report](https://github.com/ProhorovIlja/Scarlett-Windows-Compat/blob/main/docs/NATIVE_LINUX_VULKAN.md). Next: create a native window/WSI swapchain, rasterize/read back/present deterministic pixels, then native audio/input/fsync saves/network. Actual native Linux game ELF build and Xbox-specific ABIs remain unimplemented.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:02:00 +00:00
Author
Owner

@⁠Yoshi-233 on GitHub · 2026-11-25 02:11 UTC · original

I tested the Linux two-slot save on ext4 (Ubuntu 24.04.5, kernel 7.0.0-43-generic, SATA HDD) at b3087ce0ab191227dc9e7af37cab97a0b097bb98. A fresh process recovered the expected save in 80/80 writer interruptions. The existing native_pc_save_two_slot_corruption_recovery CTest also passed. Save implementation

Point where the writer received SIGKILL What a fresh reader observed Runs
After the first 4 KiB reached the staging file Previous generation, or NotFound on first save. The 4 KiB stage remained. 20/20
After staging-file fsync returned, before rename Same recovery result, even with a complete new generation in the staging file. 20/20
After rename returned, before directory fsync Complete new generation. 20/20
After directory fsync returned Complete new generation. 20/20

I linked the original store into a test writer using GNU ld wrappers for write, fsync and rename. The wrapper performed the real operation first and then killed only that writer. I started at generations 0, 1, 2 and 3, repeated each point five times, and compared both committed slots byte-for-byte with uninterrupted reference saves. In every case a fresh writer then committed a different 64 KiB payload, a fresh reader read it back exactly, and the staging file was gone.

This covers a process dying while the kernel and filesystem stay up. In particular, seeing the new generation after rename establishes visibility to the next process. Durability across a power loss before directory fsync remains untested.

**@⁠Yoshi-233** on GitHub · 2026-11-25 02:11 UTC · [original](https://github.com/ProhorovIlja/NativeX-Runtime/issues/34#issuecomment-7150428926) I tested the Linux two-slot save on ext4 (Ubuntu 24.04.5, kernel `7.0.0-43-generic`, SATA HDD) at `b3087ce0ab191227dc9e7af37cab97a0b097bb98`. A fresh process recovered the expected save in **80/80 writer interruptions**. The existing `native_pc_save_two_slot_corruption_recovery` CTest also passed. [Save implementation](https://github.com/ProhorovIlja/NativeX-Runtime/blob/b3087ce0ab191227dc9e7af37cab97a0b097bb98/src/native_save_slots.cpp#L154-L225) | Point where the writer received SIGKILL | What a fresh reader observed | Runs | | --- | --- | ---: | | After the first 4 KiB reached the staging file | Previous generation, or `NotFound` on first save. The 4 KiB stage remained. | 20/20 | | After staging-file `fsync` returned, before `rename` | Same recovery result, even with a complete new generation in the staging file. | 20/20 | | After `rename` returned, before directory `fsync` | Complete new generation. | 20/20 | | After directory `fsync` returned | Complete new generation. | 20/20 | I linked the original store into a test writer using GNU ld wrappers for `write`, `fsync` and `rename`. The wrapper performed the real operation first and then killed only that writer. I started at generations 0, 1, 2 and 3, repeated each point five times, and compared both committed slots byte-for-byte with uninterrupted reference saves. In every case a fresh writer then committed a different 64 KiB payload, a fresh reader read it back exactly, and the staging file was gone. This covers a process dying while the kernel and filesystem stay up. In particular, seeing the new generation after `rename` establishes visibility to the next process. Durability across a power loss before directory `fsync` remains untested.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/ProhorovIlja--NativeX-Runtime#34
No description provided.