Commit Graph

8473 Commits

Author SHA1 Message Date
Adrian
1a53f261f7 [Base] Increase arena chunk size
Fixed Phantom Breaker (465607DE) from crashing.
2026-03-28 21:41:26 +01:00
Adrian
d680f5a499 [Kernel] Fixed XTimer reporting resume support
Fixed Quake 4 performance issues
2026-03-28 20:46:25 +01:00
Gliniak
9b1ebffd27 [Memory] GetPhysicalAddress - Added case to assume that input address is already physical
- Restored break on Indirect Buffer failure (Hopefully it won't break anything)
2026-03-28 20:11:43 +01:00
Herman S.
9d6b27e2ad [Build] Fix MSVC compilation on ARM64 2026-03-28 12:25:15 +09:00
Herman S.
a8ef7faeae [Build/macOS] Exclude empty translation units and Vulkan/SPIR-V targets 2026-03-27 16:12:08 +09:00
Herman S.
24015ef164 [Build/Release] Convert linux release to produce an appimage
Ported from xenia-edge with minor adjustments to remove Qt deps.
2026-03-27 15:51:45 +09:00
Herman S.
02ca07484c [Build] Ensure clang/lld are pinned to the correct version 2026-03-27 14:54:15 +09:00
Adrian
e97d0a80c6 [README] Update netplay status 2026-03-27 11:17:55 +09:00
Herman S.
57c1af465a [Build/CPU] Remove #pragma pack from Export and PPCOpcodeDisasmInfo
Pack(1) causes unaligned pointer errors on ARM64 with Apple's linker.
These are static read-only tables where the ~9KB size savings from
packing is negligible. Removing the pack may also marginally improve
access speed on x86 by avoiding unaligned loads.
2026-03-27 02:44:00 +09:00
Herman S.
57c4051eca [macOS] Build infrastructure and portability fixes
Build system:
- Enable ObjC++, macOS deployment target, framework linking
- Fix AppleClang detection
- macOS platform name for output directories
- Skip Vulkan on macOS, null graphics without Vulkan dependency
- macOS SDL2 framework detection and discord-rpc macOS sources

Portability fixes:
- mach_absolute_time for macOS tick counting
- _NSGetExecutablePath for macOS
- guard MAP_FIXED_NOREPLACE, ftruncate64->ftruncate
- guard Vulkan include/usage, fix data root for all POSIX
2026-03-27 02:44:00 +09:00
Herman S.
1af96481b2 [Build/MacOS] Fix sprintf deprecation warnings
Convert to snprintf in trace_viewer and suppress in 3pp stb header.
2026-03-27 01:24:05 +09:00
Herman S.
5f04b5420d [Build/MacOS] Add SDL2 framework 2026-03-27 00:11:59 +09:00
Herman S.
824e7f4257 [Build/MacOS] Skip vulkan 2026-03-27 00:11:59 +09:00
Herman S.
8cd7f69cbc [Kernel] Fix macro collisions with macOS system headers
Rename IPPROTO_TCP/UDP/VDP enum values to XE_IPPROTO_* to avoid
collision with macOS <netinet/in.h> macros. Add #undef WAIT_ANY
guard for macOS <sys/wait.h> macro.
2026-03-27 00:11:59 +09:00
Herman S.
46613f1126 [3PP] Update disruptorplus for libc++ std::min fix 2026-03-26 23:49:21 +09:00
Herman S.
5fcb6985e7 [Build] Mark third-party includes as SYSTEM to suppress warnings
Prevents -Werror from failing on warnings in code we don't control
2026-03-26 23:49:21 +09:00
Herman S.
78600212b2 [3PP/MacOS] Fix ffmpeg and sha256 build
ffmpeg: macOS uses "_" symbol prefix (Mach-O), has no <malloc.h>,
and doesn't support .data.rel.ro sections. Add __APPLE__ guards
in ffmpeg-xenia/config.h.

sha256: macOS provides endian macros in <machine/endian.h> instead
of <endian.h>.
2026-03-26 23:49:21 +09:00
Herman S.
cf013fdc15 [Base/Posix] mapped_memory portability and correctness fixes
Replace Linux-specific fstat64/ftruncate64 with portable POSIX equivalents.
Fix mmap error check to use MAP_FAILED instead of null pointer comparison.
Remove unconditional ftruncate after mmap that could corrupt files.
Add zero-length guard.
2026-03-26 23:10:47 +09:00
Herman S.
19e9d0c2de [Base/Posix] filesystem portability and correctness fixes
Replace Linux-specific fseeko64/ftello64/ftruncate64 with portable
POSIX equivalents.
Fix pread/pwrite error handling that assigned -1 to unsigned size_t.
Implement SetAttributes via chmod instead of stubbing it out.
Fix potential overflow in Unix-to-Windows filetime conversion.
Clean up unused removeCallback.
2026-03-26 23:10:47 +09:00
Herman S.
648b2bad78 [Build/A64] Extend ARM64 architecture detection for macOS 2026-03-26 23:10:47 +09:00
Herman S.
cb12f7fa1e [Build] Generalize POSIX platform guards
Most non-Windows code paths use standard POSIX APIs (sockets, signals,
dlopen, threading) that work on any POSIX platform. Change Linux-specific
guards to !WIN32 or #else where the code is portable. Linux-specific
APIs (SIGRTMIN, Vulkan/X11, fontconfig/GTK) remain Linux-guarded.
2026-03-26 23:10:47 +09:00
Herman S.
6c20f64e0d [Build] Guard Linux-specific CMake config behind platform check
GTK3, system SDL2 (pkg-config), Linux link libraries, linker groups,
and _GLIBCXX_DEBUG were in the generic non-MSVC branch, breaking
cmake configure on non-Linux POSIX platforms.
2026-03-26 23:10:47 +09:00
Herman S.
597a0c2d1e [Xboxkrnl] Use towupper in RtlUpcaseUnicodeChar for portability
std::ctype<char16_t> is a non-standard extension that's not available
on all platforms. Neither this nor the original technically match the
Windows kernel's fixed Unicode table approach and can produce different
results based on system locale.
2026-03-26 23:10:47 +09:00
Herman S.
30fd2a5ac9 [CPU] Fix breakpoint host_address() to_hex_string portability
Cast uintptr_t to uint64_t explicitly for to_hex_string, which
has no uintptr_t overload and can be ambiguous on some platforms.
2026-03-26 23:10:47 +09:00
Wunkolo
45cf464f63 [a64] Optimize more LoadV128Const splat opportunities
Optimize `LoadV128Const` to detect even more opportunities
to use `movi`, `mvni`, and `fmov` and such for 16-bit, 32-bit
and 64-bit splats.

Update some `mov`+`dup` idioms into `LoadV128Const` as well
to catch more opportunities to optimize these const-loads when
possible.
2026-03-26 22:42:01 +09:00
Herman S.
a90f5996de [Build] Python min version -> 3.6
Remove 3.10 syntax sugar and reduce min required python version to avoid
having to do needless python upgrades on various dev systems as 3.10 is
not yet ubiquitous and building on older systems is also still a thing.
2026-03-26 21:14:04 +09:00
Herman S.
3efc88abbb [Base] Fix math.h portability: use __builtin_ffs and fix lzcnt narrowing
ffs() can collide with POSIX macro definitions on some platforms;
__builtin_ffs is the portable GCC/Clang intrinsic. log2_floor/log2_ceil
passed template types directly to lzcnt which has only uint32_t and
uint64_t overloads, causing implicit narrowing on smaller types.
2026-03-26 16:28:27 +09:00
Herman S.
0bd565eade [Build] Enable zstd ASM Huffman decoder on non-MSVC x86_64
zstd ships a hand-written huf_decompress_amd64.S that was being
disabled on all non-MSVC builds. New behavior matches zstd's own
CMakeLists which enables it on GCC/Clang x86_64 and disables it
on MSVC and non-x86 architectures.
2026-03-26 16:28:27 +09:00
Herman S.
86c7a8be79 [Build] Enable zlib-ng AVX2/AVX512 optimizations on all x86_64 platforms
PCLMULQDQ CRC folding is excluded for now due to a runtime hang on
Linux — needs further investigation. The library does runtime feature
detection so all other paths should be safe on CPUs without these extensions.
2026-03-26 16:28:27 +09:00
Herman S.
ec5bd872d5 [Build/Kernel] Guard zlib-ng x86 SIMD defines behind XE_TARGET_X86_64 2026-03-26 16:28:27 +09:00
Wunkolo
6a47370219 [a64] Fix ATOMIC_EXCHANGE swp operand order
`swp` is weird and actually writes the first operand into the
memory address into the third operand,
_and puts the old value into the second operand_.
2026-03-26 16:04:36 +09:00
Gliniak
e0fcf29d4b Revert "[CI] Trying to fix releases ordering"
This reverts commit 7928966bab.
2026-03-25 20:01:30 +01:00
Gliniak
c2a8dc419c [APP] Check for null-ptr in input_system while calling OnUsbDeviceChanged 2026-03-25 20:00:52 +01:00
Herman S.
b6ad99ee21 [A64] Add thread-safe atomics to A64Function
Also adds some bounds check to LookupFunction.

Co-Authored-By: Reality <reality@xenios.jp>
2026-03-25 15:31:26 +09:00
Herman S.
0e05b92f85 [A64] Use shifted immediate for 0x1000 add in ComputeMemoryAddress 2026-03-25 15:31:26 +09:00
Herman S.
d731a01d89 [Testing] Add tests for AND_NOT, TRUNCATE, VECTOR_COMPARE_SGE/UGE 2026-03-25 15:31:26 +09:00
Herman S.
e54a053eca [A64] Fix epilog label memory leak in ARM64 emitter 2026-03-25 15:31:26 +09:00
Wunkolo
dd3ffeb9cb [a64] Implement FEAT_LSE optimizations
Adds `platform_arm64` similar to `platform_arm64` to populate a 64-bit feature-flag value and creates a `a64_extension_mask` configuration-mask for the detection and utilization of certain arm ISA features. The first feature being `FEAT_LSE` which maps to `XBYAK_AARCH64_HWCAP_ATOMIC`.

Just like the x64 backend, implements `IsFeatureEnabled` to the emitter for checking if the host processor supports a certain subset of feature flag(s) at once.

Optimizes `OPCODE_ATOMIC_EXCHANGE`, `OPCODE_ATOMIC_COMPARE_EXCHANGE`,
and `OPCODE_RESERVED_STORE` with `FEAT_LSE` instructions.
2026-03-25 14:31:53 +09:00
Wunkolo
bf83c4e9f5 [a64] Implement OPCODE_CACHE_CONTROL store 2026-03-25 13:32:21 +09:00
Wunkolo
5b9c13b23f [a64] Implement raw clock with CNTVCT_EL0
Implements a raw clock by directly accessing the `CNTVCT_EL0` and
`CNTFRQ_EL0` registers by using `mrs` intrinsics.

Should allow for a raw-clock to work on all ARM platforms without having
to make a per-platform implementation for any further a64 platforms like
MacOS or Linux or Android and such.
2026-03-25 13:30:51 +09:00
Herman S.
680aeaf52b [A64] Fix ARM64 DWARF/SEH unwind info and add registration test 2026-03-25 12:58:44 +09:00
Herman S.
6e557abb0d [A64] Inline all vector C helpers using NEON/GPR and add some tests 2026-03-25 09:48:47 +09:00
Herman S.
ef13662234 [A64] Fix SET_NJM to update cached fpcr_vmx 2026-03-25 09:48:35 +09:00
The-Little-Wolf
c4f4412df9 [Xam/Info] - Implement GetSystemTimeAsFileTime & QueryPerformanceFrequency
- Implement QueryPerformanceFrequency, GetSystemTimeAsFileTime
- Used in Aurora and dash launch
2026-03-24 22:36:53 +01:00
Gliniak
7928966bab [CI] Trying to fix releases ordering 2026-03-24 21:53:42 +01:00
Gliniak
2fa6942853 [CI] Fixed incorrect release title (missing _<branch_name>) 2026-03-24 21:06:50 +01:00
Radosław Gliński
04346243b8 [Notes] Updated README.md with new release links 2026-03-24 20:51:05 +01:00
Gliniak
83802fbb66 [CI] Fixed tag name & removed duplicated notes on release 2026-03-24 20:18:58 +01:00
Herman S.
8911a3b7d8 [a64] Inline UNPACK_FLOAT16_2/4 using NEON fcvtl
Replace CallNativeSafe round-trips with fcvtl/fcvtl2 for half-to-float
conversion. A rev64 fixup corrects the PPC word-pair ordering. FLOAT16_2
uses ext to rotate the two source halfs into position and sets the
constant {0.0, 1.0} tail lanes. PACK_FLOAT16 kept as C helpers since
fcvtn doesn't match Xenos overflow saturation semantics.
2026-03-24 16:17:13 +09:00
Herman S.
2fe20d8d4f [A64] Inline LVL/LVR using NEON TBL instead of C helpers
Replace CallNativeSafe round-trips with inline TBL shuffles. LVL uses
a single-register TBL where out-of-range indices naturally produce
zero. LVR uses a 2-register TBL over {zeros, mem} so indices 0-15 map
to zeros and 16-31 map to memory bytes.
2026-03-24 16:17:13 +09:00