Jonathan Li
3919a32dc3
cdvdgigaherz: Avoid race condition by reading from cache/disk
...
Instead of reading from a buffer shared by multiple threads, just read
the correct data from the cache or disk instead.
2016-11-22 21:26:41 +01:00
Jonathan Li
a34942c882
cdvdgigaherz: Only update cache if the read succeeds
2016-11-22 21:26:41 +01:00
Jonathan Li
bb25ce1c6a
cdvdgigaherz: Add cache entry check function
...
Useful when you don't actually want the cached data.
2016-11-22 21:26:41 +01:00
Jonathan Li
23f48e07ed
cdvdgigaherz: Change signs
...
Avoid some unnecessary casting.
2016-11-22 21:26:41 +01:00
Jonathan Li
ae0577bc16
cdvdgigaherz: Fix write-strings warnings
...
Too bad I can't change PS2Edef.h to use a const char*.
Also remove SVN_MOD ifdef from version string.
2016-11-07 00:08:23 +00:00
Jonathan Li
cccf216dbb
cdvdgigaherz: Use C++11 threads instead of Win32 threads
2016-11-07 00:08:23 +00:00
Jonathan Li
f8f79788e4
cdvdgigaherz: Use condition variables for event waiting
...
Also use atomics for thread exit variables.
2016-11-07 00:08:23 +00:00
Jonathan Li
f678ff8cfd
cdvdgigaherz: Replace critical section with mutex
2016-11-07 00:08:23 +00:00
Jonathan Li
9c440ab6b7
cdvdgigaherz: Use bool return for ReadSectors*
...
More readable.
2016-11-07 00:08:23 +00:00
Jonathan Li
1834b7d0f9
cdvdgigaherz: Get disc info when disc is first ready
...
Also set the disc speed at the correct time - CDROM SET SPEED only stays
in effect till the disc is removed.
Also fix a memleak in CDVDopen when the drive cannot be accessed.
2016-11-07 00:08:23 +00:00
Jonathan Li
327515366f
cdvdgigaherz: Don't calculate the track length
...
Not really necessary.
Also fix 2 off-by-ones.
2016-11-07 00:08:23 +00:00
Jonathan Li
fb3580efa1
cdvdgigaherz: Remove unneeded code
2016-10-26 17:30:16 +01:00
Clang Format
604d3bac3c
clang format: set SpacesBeforeTrailingComments to 1
2016-10-16 21:42:31 +02:00
Jonathan Li
a61aa8ff0b
cdvdgigaherz: Remove unreachable return
...
Fixes warning C4702: unreachable code
2016-09-20 00:46:33 +01:00
Clang Format
2967d5d3f1
cdvdgigaherz: Reformat with clang-format
2016-09-19 19:53:00 +01:00
Jonathan Li
5d6f9a316a
cdvdgigaherz: Use null for event/thread handle init
...
CreateEvent and CreateThread return NULL on failure, not
INVALID_HANDLE_VALUE. This should have been done in
0477e03965
, I didn't check thoroughly
enough.
2016-08-08 22:34:58 +01:00
Jonathan Li
0477e03965
cdvdgigaherz: Fix CreateEvent/CreateThread return value checks
...
CreateEvent and CreateThread return NULL on failure, not
INVALID_HANDLE_VALUE.
Spotted using Visual Studio Code Analysis Tools (Warning C6387)
2016-08-05 00:30:25 +01:00
Jonathan Li
a8286e7458
cdvdgigaherz: Remove unused variables
2016-08-04 23:46:26 +01:00
Jonathan Li
5db0d682b8
cdvdgigaherz: Fix detection typo
2016-03-15 17:34:35 +00:00
Lioncash
c2e96a081f
cdvdGigaherz: Use booleans instead of ints to represent conditionals in CDVD.cpp
2014-07-15 17:06:49 -04:00
ramapcsx2
53e2824937
cdvdGigaherz: Some improvements to smooth out the "experience" when playing from CDs. A keepalive thread polls the drive every 30 seconds to prevent it from spinning down. When the plugin starts, it now tries to limit the spindle speed so it is less noisy and doesn't wear out as much (32x speed for CD games, 8x speed for DVD games).
...
Version bump to 0.9.
2014-05-26 14:28:56 +02:00
Gregory Hainaut
86895cbf45
pcsx2 license: add missing nice header on various files
...
Remains 3 files that I don't know the source
pcsx2/windows/DwmSetup.cpp: *No copyright* UNKNOWN
pcsx2/windows/SamplProf.cpp: *No copyright* UNKNOWN
pcsx2/windows/VCprojects/IopSif.cpp: *No copyright* UNKNOWN
Remains 1 files in common that I don't know the source
common/include/comptr.h: *No copyright* UNKNOWN
Remains too much files in plugins that I don't know the source :(
2014-04-11 09:18:30 +02:00
sudonim1
4457fe40fc
Removed all trailing whitespace in *.c *.cpp *.h because it irritates me.
...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2897 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-25 00:31:27 +00:00
sudonim1
a05e9c62be
Set svn:eol-style=native on all *.c *.cpp *.h
...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2894 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-24 21:37:39 +00:00
gigaherz
909714d08e
Since pcsx2 itself can now identify the specific disk type based on the base media type, cdvdGigaherz does not need to replicate the same work anymore.
...
This means cdvdGigaherz builds will no longer work on older versions of pcsx2 from before I integrated the detection code into the emu.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2155 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-08 01:42:27 +00:00
Jake.Stine
f64876203a
cdvdGigaherz:
...
* Plugged up some various thread sync issues with the sector cache (caused problems mainly on startup.init and during disc change detection)
* Added a thread sleep to the ReadThread when the dvd tray is empty or open (speedup).
* Replaced a thread sleep with an Event when waiting on pending events (speedup).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2007 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-14 23:17:41 +00:00
gigaherz
7dde0087ad
Properly add the project stuff so it "fits" with the build system used on all the other plugins.
...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1942 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-01 14:21:40 +00:00