Commit Graph

3878 Commits

Author SHA1 Message Date
Akash b86518ef24 CDVD: Convert CDVD_SourceType into enum class
* Add a template function for underlying type conversions of enumerations
2016-12-10 12:35:57 +00:00
Akash f367fa5a98 PCSX2-WX: Fix Shutdown menu item behavior
There is already a dedicated bind event to handle the gray out of the menu item, so let's just gray it out initially and let the bind event handler do it's thing.

The previous behavior would only gray out the menu item when all the plugins are in a non-active state which didn't seem ideal as the plugins were shutdown only when closing PCSX2 (or) switching plugins.
2016-12-10 12:35:57 +00:00
Akash 259b81317d PCSX2-WX: Disable HostFs for release builds 2016-12-10 12:35:57 +00:00
Gregory Hainaut 7f64f39c05 vtune: count the number of ERET to trigger a quick exit
The purpose is to stop vtune profiling in a predictable way. It allows
to compare multiple runs.

ERET is called every syscall/interrupt return so it is proportional to
the EE program execution.
2016-12-10 11:07:35 +01:00
Gregory Hainaut b9369e7c00 pcsx2: remove the reserve feature of recompiler memory
Cons:
* requires ~180MB of physical memory (virtual memory is the same so it
  doesn't impact the 4GB limit)

From steam: 98.81% got at least 2GB of RAM. 83.62% got at least 4GB of RAM.
That being said, it might not really increase RAM requirements as OS could put the
new allocation in the swap.

Pro:
* code is much easier
* remove at least half of the signal listener
* last but not least, it is way easier for profiler/debugger
2016-12-09 09:28:19 +01:00
Gregory Hainaut 903d3595e5 pcsx2: add a --profiling cli option
Disable Framelimiter and Vsync

So you can profile real data instead of the idle time between vsync ;)
2016-12-09 09:28:19 +01:00
Gregory Hainaut 0453e5cad8 cmake: improve vtune integration
Year is included in the path so search in order 2018/2017/2016

Not ideal but at least all logic is inside the FindVtune module
2016-12-09 09:28:19 +01:00
Jonathan Li faa46bb62d gui: Fix Plugin Selector panel memory leak
SafeList is totally unsafe for non-POD objects.
2016-12-07 20:25:45 +00:00
Jonathan Li 5109687a31 gui: Remove "Restore Defaults" button tooltip on Speedhacks panel
It's incorrect, and the button is self explanatory - fixing it would
just mean having a marginally useful tooltip that would require
translating.
2016-12-07 00:46:56 +00:00
refractionpcsx2 cfb801345b Merge pull request #1681 from PCSX2/interrupt_mask_register
PCSX2-GS: Use interrupt mask register bitfields
2016-12-04 01:42:44 +00:00
Jonathan Li 56d0c51033 pcsx2:windows: Don't create console stdio menu item
It's not used on Windows and it causes Visual Studio to report a memory
issue.
2016-12-01 18:25:14 +00:00
Akash a9b63a2106 PCSX2-GS: Use interrupt mask register bitfields
Previously, the code used a lot of "bitwise AND" to get specific bitfields of the interrupt mask control register, which makes the code look a bit hacky, also it's even more hard for normal people to calculate the value when hexadecimal values are used for the bitwise operations where the register is totally binary. Instead of dealing with all those mess, let's just get the bitfield values from the already implemented nice union of the IMR register. FWIW it also makes the code more readable.
2016-12-01 16:32:27 +05:30
Gregory Hainaut 2b8a808fe3 remove trailing white space (until I run clang-format on the full code) 2016-11-29 22:59:06 +01:00
Gregory Hainaut 4c3e98754e vif JIT: increment based on sizeof(T)
Struct on x64 will be 32B so +2 instead of +1
2016-11-28 19:07:04 +01:00
Gregory Hainaut 9862e5d207 vif hash: move bucket size check in the 'add' path instead of 'find' path
More logical this way
2016-11-28 19:07:04 +01:00
Gregory Hainaut c9db1c6c4b vtune: plug PCSX2 core + add missing profiling (VU/VIF/TLB)
Doesn't fully work yet
* Unknown stack frame
* Outside any known module

Potential root cause:
* Nvidia driver
* VU code as ebp is required for emulation so likely no frame
2016-11-28 19:07:04 +01:00
Gregory Hainaut 4fca5f4d88 mvu: use static array for dispatcher code
I don't understand why but standard mmap blew up Vtune
2016-11-28 19:07:04 +01:00
Jonathan Li 230b470a3c pcsx2:freebsd: Disable aio use on FreeBSD 10.3 and earlier
A FreeBSD 10.3 user (meowthink) reported to me that games were not
working properly on their system. After some investigation, it was
discovered that aio was buggy on their setup. There's also bug reports
for other applications that involve aio too.

Workaround the issue by using a normal read and disabling the use of aio
on FreeBSD 10.3 and earlier. It'll remain enabled on FreeBSD 11.0 in the
hope that the aio issue has since been fixed.
2016-11-24 19:50:07 +00:00
Vladimir Jigulin 268b4d9f9f debugger: memory view improvements
Highlight memory location referenced by current register
Allow memory window not be aligned by row size
Use radio and checks in menu
2016-11-21 10:31:34 +01:00
Gregory Hainaut 0e2ec9c2cb pcsx2 gui: reduce the padding to 2 for low cost display 2016-11-19 11:27:20 +01:00
Gregory Hainaut 4aa79df402 pcsx2 gui: increase a bit the about box
It was too crowded
2016-11-19 11:21:07 +01:00
Gregory Hainaut b251d47712 pcsx2 gui: use dynamic section sized for ee/vu cycle message
Static size is better aligned but it consumes too much space on the GUI

Besides, if a string (translation) is bigger that the static size it will be cut off.

VU/EE min sized are the same to keep a proper alignment
2016-11-19 11:21:07 +01:00
Gregory Hainaut 4ee942aba2 pcsx2 gui: use pxGetFixedFont helper instead of wxFont constructor 2016-11-19 11:19:24 +01:00
refractionpcsx2 e0cd520837 VIF: Apply stall fix to VIF0 as well. 2016-11-13 12:15:18 +00:00
Gregory Hainaut c5d727da39 CDVD: check return value of ToLong
Reported by coverity
2016-11-12 19:36:44 +01:00
Gregory Hainaut 356429d0e7 Sio: use & 0xFF instead of u8 mask
Tentative to avoid various bad coverity reports
2016-11-12 19:29:10 +01:00
Gregory Hainaut 2da6cb263d pcsx2: Gcc warning in copy constructor of BaseMessageBoxEvent
../pcsx2/gui/MessageBoxes.cpp:62:1: warning: base class ‘class pxActionEvent’ should be explicitly initialized in the copy constructor [-Wextra]
 BaseMessageBoxEvent::BaseMessageBoxEvent( const BaseMessageBoxEvent& event )
2016-11-12 18:47:11 +01:00
Gregory Hainaut 5e5b927abd gzip reader: bad find interface
Find => return int
find => return size_t (behave as STL)

Thanks to gcc for the useful warning

+ a cast to avoid an useless warning
2016-11-12 18:41:07 +01:00
Gregory Hainaut a7e76438b2 iop: use const on some variables
Avoid coverity warning
2016-11-12 18:26:28 +01:00
Gregory Hainaut 056ecb1c39 pcsx2: add some cast to fix gcc (int vs uint) warning
I'm pretty sure that .RMSK (which is an u32:31) warnings are false positives
2016-11-12 17:36:40 +01:00
Gregory Hainaut 63c825d0e0 pcsx2: check return value of std functions
Avoid noisy gcc warnings
2016-11-12 17:36:06 +01:00
refractionpcsx2 1053234507 VIF: Fix some stalls getting stuck in situations, fixes #1658
Gif FIFO: Improve reliability a little bit, especially when MFIFO is in use.
2016-11-12 12:36:04 +00:00
Gregory Hainaut cf739d2493 Merge pull request #1655 from PCSX2/greg/git-rev-title
pcsx2 gui: use git desribe as version name
2016-11-08 23:42:15 +01:00
Gregory Hainaut 18f677d530 oups miss one minus 2016-11-08 23:11:12 +01:00
Gregory Hainaut f6c27c2abf pcsx2: use ASCII minus 2016-11-08 23:09:20 +01:00
Gregory Hainaut 5596f69c0e pcsx2 gui: use git desribe as version name
Shorter than date and give all the useful info

Require windows test

close #1043
2016-11-08 22:44:39 +01:00
Gregory Hainaut 784f549339 pcsx2: always probe the ctrl/shift/alt key state
Event handling becomes messy when you press in the app but release outside of it (due to desktop change)

close #477
2016-11-08 22:42:42 +01:00
Gregory Hainaut 6c3a4c6927 iop bios: fix gcc warnings
* return value of function can't be const
* use unique_ptr
2016-11-08 21:53:27 +01:00
Pseudonym b3b1f3ac68 IOP: Convert most IOP memory access in the IRX HLE and debugging module to
safe access through iopMem* functions.
2016-11-08 19:08:51 +00:00
Pseudonym 809684e9de IOP: PSX bios console output filtering of repeated and empty lines. 2016-11-07 10:09:12 +00:00
Gregory Hainaut 253bd1aea3 linux compilation fix of previous iop change 2016-11-05 15:44:57 +01:00
refractionpcsx2 49b80a4916 Merge pull request #1383 from PCSX2/prafullpcsx2-eecache
EE-Int: Minor EE Cache changes
2016-11-05 13:30:31 +00:00
Pseudonym 8259b29896 IOP: PSX bios console output 2016-11-05 12:14:01 +00:00
Akash f1c4b7d5df PSX-mode: Detect video mode via colorburst
Previously the video mode was initialized using the info fetched from SetGsCrt Syscall though unfortunately, it doesn't seem to work with PSX games as they don't use the SetGsCrt syscall. At such cases, we get the video mode info from the SMODE2 colorburst to properly maintain the timing as per the video mode. Might help some cases on PSX games where PAL/NTSC video mode was improperly set to a wrong limit instead of it's actual vertical frequency limit.
2016-11-05 10:29:29 +01:00
refractionpcsx2 ae57b960c2 Vif-Rec: Initialise IsAligned for VifUnpackSSE_Simple. Should fix the valgrind reported issue (no compatibility changes expected) 2016-11-04 22:31:07 +00:00
Gregory Hainaut c9974b65c4 iop: remove kernelTTYFileDescrWrite debug function
Recommended by pseudo

Main issue is a buffer underflow when strlen(...) < 2
2nd issue is code is called based on hardcoded address of a single bios.
2016-11-01 13:41:54 +01:00
Gregory Hainaut 270d7191ce sio: increase buffer to avoid overflow
memcardWrite will use "sio.buf[data + 5] = mcd->term;" and data is 8 bits

Reported by coverity
2016-11-01 13:41:03 +01:00
Pseudonym 1f44c4be2f SPU2-X: PSX games should be able to read ENDX correctly now, which is
important functionality for many sound engines.
Fixed two other obvious errors in the psx compatibility merge, probably
inconsequential.
2016-10-20 04:17:03 +01:00
Pseudonym a415d59e2f Remove use of integer constants for iop events that I missed in the
previous commit (thank you @turtleli, I was mentally filtering this line
of code).
Fixes #1618
2016-10-13 16:30:05 +01:00
Pseudonym 733fd79f46 Removed internal iop event enum assignments which just confuse readers and
traces of an old hack.
2016-10-11 18:53:23 +01:00