Commit Graph

34 Commits

Author SHA1 Message Date
GovanifY 132431b7c8 headers: relicense to GPL-3.0+
also update to 2024 while i'm at it
2024-07-30 17:17:13 -04:00
TheLastRar ad64d88e7b Common: Fix FreeBSD build 2024-07-17 22:15:09 +02:00
Stenzek 4e0e8cef54 Common: ARM64 compatibility 2024-06-14 17:06:45 +10:00
Stenzek d48f527d6d Common: Tidy up signal handlers
Move MacOS into its own file.
Fix assertion failure crash dumping.
2024-05-31 13:39:36 +10:00
Stenzek ecbe239c0b Common: Use Mach VM routines for memory mapping
MacOS does not support an equivalent of MAP_FIXED_NOREPLACE via mmap(),
which means that our usage for allocating PCSX2's memory map is not
thread-safe.
2024-05-30 13:39:07 +10:00
TheLastRar 63a5a15c37 Common: Provide a MAP_FIXED_NOREPLACE define for FreeBSD 2024-05-23 11:34:06 +10:00
Connor McLaughlin 92b707db99
Common: Missed MAP_FIXED -> MAP_FIXED_NOREPLACE 2024-05-22 00:05:24 +10:00
Connor McLaughlin d765f2e15c
Common: Fix Mac build 2024-05-21 23:14:47 +10:00
Stenzek e24d97bbe4 Common: Don't use MAP_FIXED on Linux
MAP_FIXED will clobber any existing memory mapping, and is not safe
to use in a multi-threaded environment. Whether we like it or not,
we are a multi-threaded environment, because Qt initializes before
we get to main(), so it's already too late to safely use MAP_FIXED
by the time we get there.

Use MAP_FIXED_NOREPLACE instead. This is how MAP_FIXED should have
behaved from the beginning.

Obviously this means you'll need Linux 4.17+ and a semi-recent libc
to use PCSX2 now. But if you're running a 6 year old unsupported
kernel, you have bigger problems.

Fixes "random" startup crashes.
2024-05-21 22:44:00 +10:00
Stenzek 7bc5427908 Qt: Fix remove game directory button being enabled w/o selection 2024-05-07 12:41:03 +10:00
Stenzek 9752a037be HostSys: Simplify page fault handler installation
And include whether it was a write or a read access.
2024-05-07 12:41:03 +10:00
Stenzek 59d29b3648 Common: Rename General to HostSys
Actually fits what it's doing.
2023-12-27 13:55:35 +10:00
Stenzek 308f8c5112 x86emitter: Abstract MXCSR into a general FPControlRegister type 2023-12-27 13:55:35 +10:00
Stenzek d9abe10308 Misc: Remove explicit PCH include, switch to SPDX 2023-12-24 14:03:14 +10:00
Stenzek dc859ca0a6 Misc: Simplify assertion macros 2023-12-24 14:03:14 +10:00
Stenzek c16836e7c0 Misc: Drop stat compatibility calls 2023-09-05 12:32:23 +10:00
Stenzek eae29bb1f2 Common: Make __pagesize unsigned 2023-07-23 21:52:36 +10:00
Stenzek 2b4c7d12b6 Common: Merge MathUtils.h into BitUtils.h 2023-07-23 21:52:36 +10:00
Stenzek 3c408de5c9 Build: Disable exceptions in the compiler 2023-06-30 21:37:44 +10:00
Stenzek 5805142fd7 CrashHandler: Print backtrace on Linux 2023-03-20 15:46:32 +00:00
Ganael Laplanche c5330cf166
Common: FreeBSD fixes. (#8163)
* Fix SIGSEGV handler on FreeBSD

* Fix config dir location on FreeBSD
2023-02-16 09:30:18 +01:00
Stenzek 4cf041f6cb Common: Move VirtualMemory related functionality to core
Also rewrites page fault handling to not use EventSource junk.
2023-01-26 11:11:36 +00:00
Stenzek 43afeb205f Common: Get rid of pxTrap()
wx rubbish, no longer needed
2022-12-25 14:47:05 +01:00
lightningterror 5c104f8e1d common linux: Fix Wunused-variable warning. 2022-11-19 19:28:52 +01:00
Connor McLaughlin 1ccddb92d4 EE Rec/IOP Rec: Rewrite large portions
- Add fastmem
 - Add delay slot swapping
 - Add COP2 sync elision
 - Add block analysis and use analysis
 - Add GPR register caching and renaming
2022-11-19 04:59:10 +00:00
Ganael Laplanche aa59547af7 build: Fix build on FreeBSD
- ftruncate64() does not exist on FreeBSD
- add missing environ(7) declaration
2022-10-28 13:25:49 +02:00
Ganael Laplanche 67f1cd4e15 Fix shm_open(3) call on FreeBSD
On FreeBSD, shm_open(3) requires name to start with a '/', else EINVAL
is returned.

See: https://www.freebsd.org/cgi/man.cgi?shm_open
2022-10-28 13:25:49 +02:00
Connor McLaughlin 00bcb4cf02 System: Revamp memory allocation
Guest memory is now mapped into a shared memory/file mapping, for use
with fastmem.

64-bit and 128-bit arguments are passed by register/value instead of by
reference/address.

LDL/LDR/SDL/SDR now use 64-bit GPRs instead of SSE.
2022-10-14 22:24:42 +01:00
Master Builder a26b91291c Common/Linux/LnxHostSys: Fixed compatibility issues with FreeBSD, made error
handling more explicit
2022-05-26 00:28:44 +02:00
Connor McLaughlin 893b3c629d Everything: Remove a **lot** of wx, and px nonsense
- common has no wx left except for Path.
 - pcsx2core only has it in a few places (memory cards and path related
   stuff).
2022-05-22 13:58:56 +01:00
Connor McLaughlin 65e956a01c Misc: Replace use of Threading::Mutex with std::mutex in core code 2022-05-09 16:06:33 +01:00
Kojin 13dfceff48
Common: reformat (#4720)
* common: format AlignedMalloc.cpp

* common: format AppTrait.h

* common: format Assertions.h

* common: format CheckedStaticBox

* common: format Console

* common: format Dependencies.h

* common: format EmbeddedImage

* common: format EventSource

* common: format Exceptions

* common: format FastFormatString.cpp

* common: format General.h

* common: format InitInterface

* common: format MathUtils.h

* common: format MemsetFast/MemcpyFast

* common: format Mutex.cpp

* common: format PageFaultSource.h

* common: format Path.h

* common: format PathUtils.cpp

* common: format Pcsx2Types.h

* common: format Perf

* common: format PersistentThread.h

* common: format RwMutex

* common: format SafeArray

* common: format ScopedAlloc.h

* common: format ScopedPtrMT.h

* common: format Semaphore.cpp

* common: format StringHelpers

* common: format ThreadTools.cpp

* common: format Threading.h

* common: format ThreadingDialogs

* common: format ThreadingInternal.h

* common: format TraceLog.h

* common: format VirtualMemory.cpp

* common: format pxCheckBox

* common: format pxEvents.h

* common: format pxForwardDefs.h

* common: format pxRadioPanel

* common: format pxStaticText

* common: format pxStreams

* common: format pxTranslate.cpp

* common: format pxWindowTextWriter.cpp

* common: format wxAppWithHelpers

* common: format wxBaseTools.h

* common: format wxGuiTools

* common: format wxHelpers.cpp

* common: format Darwin directory

* common: format Linux directory

* common: format Windows directory

* common: format LnxCpuDetect.cpp

* common: format WinCpuDetect.cpp

* common: format bmi.cpp

* common: format cpudetect.cpp

* common: format cpu_detect_internal.h

* common: format fpu.cpp

* common: format groups.cpp

* common: format instructions.h

* common: format internal.h

* common: format jmp.cpp

* common: format legacy.cpp

* common: format legacy_instructions.h

* common: format legacy_internal.h

* common: format movs.cpp

* common: format simd.cpp

* common: format tools.h

* common: format x86emitter.cpp

* common: format x86types.h

* common: format bmi.h

* common: format dwshift.h

* common: format group1.h group2.h group3.h

* common: format incdec.h

* common: format jmpcall.h

* common: format movs.h

* common: format simd_arithmetic.h

* common: format simd_comparisons.h

* common: format simd_helpers.h

* common: format simd_moremovs.h

* common: format simd_shufflepack.h

* common: format simd_templated_helpers.h

* common: format test.h
2021-09-06 14:28:26 -04:00
kojin 0717bf788a common: fix cmake on linux/macos 2021-09-04 18:28:07 -04:00
kojin 8fdaaa2eab common: reorganize 2021-09-04 18:28:07 -04:00