Commit Graph

100 Commits

Author SHA1 Message Date
TheTechnician27 23fd57f641 Copyright: Change year from 2002-2024 to 2002-2025 2025-01-20 05:07:26 +01:00
Ty Lamontagne ab21d22514 Misc: wire up and refactor trace logging 2024-10-19 20:04:02 -04:00
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
lightningterror 43fb79d669 R5900: Fix the scope of the variable can be reduced warnings.
Codacy.
2024-05-10 20:00:43 +02:00
Benjamin Moir 5f7e97c27c [SAVEVERSION+] EE: Expose advanced option for extra memory 2024-05-09 13:45:06 +10:00
refractionpcsx2 b44d479921 BIOS/HLE: Improve handling of OSD params when fast booting 2024-04-23 15:03:14 +01:00
Ty Lamontagne ebf8cba6a4 Core: Remove syscon log and merge with EE logs 2024-01-04 21:10:37 +00:00
Stenzek d9abe10308 Misc: Remove explicit PCH include, switch to SPDX 2023-12-24 14:03:14 +10:00
Stenzek c8b051628f Misc: Replace likely/unlikely with C++20 equivalents 2023-12-24 14:03:14 +10:00
Stenzek bf2cdc3c9b DebugTools: Replace sprintf() with snprintf() 2023-10-02 17:37:38 +10:00
Stenzek 2ae78f6e2f Misc: Clean up the last places exceptions were used 2023-06-30 21:37:44 +10:00
Stenzek 81236209db SaveState: Remove exceptions 2023-06-30 21:37:44 +10:00
Stenzek 7c9c8e197c Common: Replace MemsetFast routines with C memset
And associated cleanup.

On most compilers these days, it'll either inline the memset with vector
fills or rep stosq, or outline with a call to memset.

I trust the compiler is probably going to make a better decision here,
than manual SSE intrinsics.

Ends up a couple of percent faster in FMV decoding.
2023-06-22 19:11:57 +10:00
Stenzek 36c27188a4 VMManager: Refactor and improve boot process
[SAVEVERSION+] VM struct changes.

 - Serial/title is now linked to disc, instead of running ELF.
 - Save states can be created during BIOS boot.
 - Patches now apply based on the executing CRC, and only after the
   entry point starts executing (fixes multi-game discs).
 - Add "Fast Forward Boot" option.
 - Split achievements download and activation, downloads occur on
   initialization, but are not activated until after the ELF loads.
 - Prevent HostFS access while in PS1 mode.
 - Remove multiple sources of truth for ELF/CRC/etc.
 - Move ELF state from global scope to VMManager.
 - Prevent game fixes and hw fixes being active while booting game.
 - Simplify game update.
 - Flush recompilers after ELF loads. No point keeping boot code around
   which gets overwritten.
2023-06-17 17:38:43 +10:00
Stenzek 5b5edc506d Misc: Warning fixes 2023-02-10 11:20:37 +00:00
Ziemas 9420615317 Implement thread listing for IOP
Abstracts away threads behind a common interface for both EE and IOP
2023-02-09 15:49:56 +00:00
Stenzek d12fa690c0 R5900: Remove exceptions 2023-01-26 11:11:36 +00:00
Ty Lamontagne a0000a8547 Debugger: Implement boot and debug
Creates a breakpoint automatically on the ELF entry point
2023-01-15 17:05:35 +00:00
Florin9doi 8fbb1e5565 BIOS: Map the entire ROM1 file to PS2 memory
EROM is part of ROM1, its exact location vary and can't be predicted
2022-10-18 10:04:52 +01: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
TellowKrinkle 738c8cb630 Core: Remove trailing whitespace from all files 2022-09-16 00:52:28 -05:00
refractionpcsx2 5fc73f87f4 OSD: Correct region2 parameter offset. 2022-09-01 23:19:16 +01:00
Connor McLaughlin 7b6a26367a R5900: Use unsigned ops for add/sub 2022-01-17 20:08:11 +01:00
TellowKrinkle f7476dfb63 Core: Replace alignment macros with alignas 2021-11-14 13:52:20 -06:00
refractionpcsx2 880107e72b BIOS/FastBoot: If OSDConfig is written, turn off HLE
Fixes #4902
Savestate bump, sorry.
2021-10-14 22:27:02 +01:00
Connor McLaughlin a8a50641f6 R5900: Fix LWL not sign extending in interpreter
This was zero extending because of the implicit promotion from
signed->unsigned, causing incorrect high bits in the GPR.

Funnily enough, this was noted in the source, but implemented
incorrectly.
2021-09-09 09:28:03 +01:00
ty 54590a843a Misc: Pattern match to find the bios thread address 2021-07-05 03:17:10 +02:00
ty cebc531c13 Core: Implement proper %s handling for syscall 117 2021-01-17 18:06:18 +00:00
refractionpcsx2 7bcee22890 BIOS: Don't HLE OSD Parameters if BIOS has no OSD 2020-12-06 19:30:46 +00:00
refractionpcsx2 37f145f6bd BIOS/HLE: Write OSD config with memwrites instead of direct to physical
fixes crashes with Crash Twinsanity
2020-11-22 21:25:04 +00:00
refractionpcsx2 358f098b65 BIOS/HLE: Match ODS Config names to Syscalls
CDVD/NVM: Write default language/screen settings to be English, 4:3, GMT Timezone
2020-11-21 16:31:36 +00:00
refractionpcsx2 5a77ed14bf BIOSHLE: Implement GetOSDParamConfig2 for DST/24h/Format settings 2020-11-19 11:22:40 +00:00
refractionpcsx2 e8ebb7d23d BIOSHLE: Get all OSDSYS Parameters. Only use when Fast Boot is enabled 2020-11-19 11:22:40 +00:00
Chromaryu 8a16d96112 PCSX2-EE: Improve SetGSCrt logging 2019-03-01 17:09:37 +05:30
refractionpcsx2 3c5fad7ef6 Reverted shift register stuff back to how it was, my changes made no difference now and it was slightly more optimal before.
Also fixed spaces (blame PSI :P )
2018-09-04 20:45:28 +01:00
refractionpcsx2 f7fb0f686b Fixed MFSA/MTSA, of course there's a game that abuses it (Rayman 3) 2018-09-04 20:26:36 +01:00
Souzooka 7963f418c1 Add System Out as a logging source. (#2563)
* Enable logging from new source, PS2 system output

* Enable printf formatting with (up to only 7 currently)

* Fix fallthrough bug in SYSCALL switch/case

* Remove unnecessary memread32 call in sysPrintOut case
2018-08-27 13:56:48 +02:00
refractionpcsx2 69888e5ab0 EE Rec/Int: Removed micro optimisation in QFSRV/MSTAB/MSTAH. Reverted functionality to match the documentation. There were some scenarios that weren't really accounted for, like developers doing what they're told not to do. 2018-07-15 13:14:46 +01:00
Akash 984fcfda2e Counters: Update videomode enum with proper prefix
Thanks to @colepcsx2 (https://github.com/PCSX2/pcsx2/pull/1896#commitcomment-21858717) for pointing it out!

I also updated the prefix in the inferior video mode detection of GSdx, I'm not even sure why we need the videomode info on the plugin side, might be useful someday.
2017-05-11 11:23:10 +02:00
Akash 73a879caad PCSX2-Counters: Detect DVD variant videomodes
Improved the video mode detection code by also detecting the DVD variant video modes of NTSC & PAL, PSX mode actually make use of these specific variants, as well as the BIOS. Previously, I just had them as a single bios video mode due to laziness. (I know, my bad)

After further research, it seems that these DVD variant modes have their own individual VSync timing values similar to the standard NTSC & PAL video modes, dealing with those timer codes might be essential in getting timing accuracy of the PSX mode games. (I kept it to default NTSC/PAL values for now, interested people can mess with it later)

I had planned to do this before but there some were concerns that two different video modes make use of 0x73 gate in SetGsCrt, which was rather weird (how the heck could two video modes be used in a single param value?)

 0x73- DVDPAL        ( 720 x  480 @ ??.???Hz)
 0x73- DVD480P       ( 720 x  480 @ ??.???Hz)

Hence, we had decided to use the CMOD bit from SMODE1 (AKA color subcarrier frequency) to detect whether it's an analog or digital video mode and update the necessary timing values but seems like it's no longer necessary, after further discussions from some PS2 developers, we've come to the conclusion that only DVDPAL is possible via 0x73 in SetGsCrt. (So I assume the DVD480p init possibility was fake info from Blue and those other GSM guys who were reverse engineering the PS2)
2017-04-19 21:49:43 +05:30
Akash 6bc6d20a87 R5900: Add an enum class for SYSCALL
v2: Fix indentation on switch-case.
2016-08-20 23:32:31 +05:30
Akash 95d70db153 Counters: Move interlace detection code to SetGsCrt
* More accurate to PS2 behavior and avoids an useless SMODE write function, it makes sense to also move this as video mode specific colorburst detection was already moved to SetGsCrt.
2016-08-20 23:32:20 +05:30
ramapcsx2 ddc68626d8 Merge pull request #1442 from ssakash/Counters
PCSX2-Counters: Improve video mode detection
2016-07-18 19:28:24 +02:00
Akash 2ed67f6d65 EE-SYSCALL: Move messages back to dev/verbose level
These messages are not needed anymore as we'll get the video mode
information from the console messages on Counters.
2016-07-09 21:50:41 +05:30
Akash 78bf5ad88e PCSX2-Counters: Move VideoMode init code from _gsSMODEwrite to SYSCALL
* Moving the code to SYSCALL enables us to detect all the video modes properly.
* Added proper detection of VESA,HDTV,BIOS video modes.
2016-07-09 21:50:38 +05:30
Akash 72661e7c16 PCSX2-Core: Clean up some warnings on MSVC
x86emitter : Convert variable type from u8 to bool.
recVTLB: Cast "sign" to bool to prevent a warning.
R5900OpcodeImpl: Cast all the values in array to u64 instead of s64.
2016-06-30 16:49:18 +05:30
ramapcsx2 ec07571069 Revert "PCSX2-Counters: Some Changes to Video mode counter stuffs" 2016-06-09 00:44:14 +02:00
Akash f9b56bc354 EE-SYSCALL: Move messages back to dev/verbose level
Not needed anymore as we get another message from Counters for each
change in video mode. (refer previous commit)
2016-06-04 22:10:36 +05:30
Akash 1a41053c76 PCSX2-Counters: Improved video mode detection
* The detected values using the SMODE registers were for the video modes and not the region of the game, changed the variable naming to video modes to prevent any confusions.
* Fix a bug where 1080I was reported as progressive
* Convert GS_VideMode into an enum class
* Move VideoMode init code from _gsSMODEwrite to SYSCALL
* PCSX2 will now correctly report whether the video mode is NTSC/PAL/VESA/480p/576p/720p/1080i/1080p
2016-06-04 22:10:27 +05:30
Akash 3dd8574e33 EE-Syscall: print log messages even without dev/verbose checked 2016-04-06 09:22:55 +05:30