Commit Graph

128 Commits

Author SHA1 Message Date
Jonathan Li c64e8f944e cdvdgigaherz: Fix printf sign mismatch warnings
Fixes warning C6340: printf sign mismatch

Only remaining warnings for cdvdGigaherz (using level 4 warning
settings) are:
C6258: TerminateThread does not allow proper thread clean up
C4201: nonstandard extension used: nameless struct/union (from the
lo/hi u128 struct in common/include/Pcsx2Types.h)
2016-09-20 01:24:23 +01:00
Jonathan Li 57d029f34a cdvdgigaherz: Use INT_PTR for dialog handler return type
BOOL is not the correct return type (though it works for 32-bit).
2016-09-20 01:23:47 +01:00
Jonathan Li 0ca36e8943 cdvdgigaherz: Fix value truncation warnings
Fixes warning C4244: conversion to smaller data type, possible loss of
data.
2016-09-20 00:47:15 +01: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 60da39712c cdvdgigaherz: Remove unused code/macros/variables/etc
The SPTI code is unused, and it's simpler to just use the Windows
ioctls/API if they work (only raw disk sector reading is an issue and
the SPTI workaround is already in place).
2016-09-19 19:50:55 +01:00
Jonathan Li 15fbd6fbf4 cdvdgigaherz: Remove ISO file reader (#1569)
It doesn't support dual layer ISO images, and the ini has to be edited
manually so it loads an ISO image ("$" has to be prepended to the ISO
path as well). The PCSX2 internal ISO file reader is probably better in
most/all aspects and I don't think it's worth copying the logic from
PCSX2 into the plugin.
2016-09-18 18:38:21 +02:00
Jonathan Li d540dbec79 cdvdgigaherz: Fix event handle memory leak
Also bump the version to 0.10.0.
2016-09-08 23:46:05 +01:00
Jonathan Li 303996818c cdvdgigaherz: Delete duplicate PlainIso file 2016-09-08 23:14:26 +01:00
Jonathan Li 3d8be787a2 cdvdgigaherz: Use SPTI to read raw CD sectors
IOCTL_CDROM_RAW_READ apparently does not work for some read modes on
some optical drives, which makes some CD-ROM games unplayable from the
disc.

Work around the issue by using SPTI to retrieve the raw sector data. The
old reading method has been retained in case SPTI cannot be used (if the
device could not be opened with write access).
2016-09-02 00:58:38 +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 e25e8bc580 plugins: Tidy/standardise VS projects
Combine all the different configurations together so the project files
are more generic and maintainable.

Also standardise the layout so all the project files will be similar and
all have the same standard elements (even if empty).

Add 64-bit configurations.

Additional specifics:
spu2-x: FLOAT_SAMPLES preprocessor definition removed since it's unused.
2016-07-19 23:25:12 +01:00
Akash d69f2b6cc5 cdvdGigaherz: Clean up warnings on MSVC
SectorConverters: convert variables to u8.
2016-07-02 23:38:02 +05:30
Jonathan Li b20433c0be windows: Remove user.props references from all projects
find . -name *.vcxproj -exec sed -i -e '/user.props/d' {} \;

Microsoft recommends against using .user files. From
https://msdn.microsoft.com/en-us/library/669zx6zc.aspx :
"The best practice is to delete the reference to them in Property
Manager to ensure that your projects operate independently of any
per-user, per-computer settings. This is important to ensure correct
behaviour in a SCC (source code control) environment."

If you cannot compile SPU2-X after this commit (since that still relies
on the old DirectX SDK), you'll need to fix your build environment.
2016-05-29 12:21:52 +01:00
Jonathan Li 7f3f6e96d8 cdvdgigaherz: Use Windows SDK headers
The rosddk headers are no longer necessary and have been removed.
2016-03-29 23:51:17 +01:00
Jonathan Li a487aaf952 Merge pull request #1232 from turtleli/nonxp-toolkit
windows: Switch to Non-XP compatible toolkits
2016-03-16 20:34:27 +00:00
Jonathan Li bfbc6de7b5 cdvdgigaherz: Fix Dual layer DVD layer 1 read
ReadFile reports that the DVD is reading from the end of file when
attempting to read any layer 1 sectors.

Use the FSCTL_ALLOW_EXTENDED_DASD_IO ioctl to prevent the file system
driver from carrying out boundary checks.
2016-03-16 17:55:27 +00:00
Jonathan Li 2213564977 cdvdgigaherz: Fix TOC creation
cdvdgigaherz only determines whether there is no disc, a CD, a single
layer DVD or dual layer DVD in the drive. It does not detect whether a
CD/DVD is a PS2 CD/DVD or not.

Fix the missing TOCs.
2016-03-16 17:55:26 +00:00
Jonathan Li 9e2f309e30 cdvdgigaherz: Fix incorrect dual-layer DVD track info
Single-session DVDs only have 1 track, regardless of whether the DVD is
single or dual layered.
2016-03-16 17:55:19 +00:00
Jonathan Li 643db78cc4 cdvdgigaherz: Fix last resort DVD size calculations
The calculated size values were off by one for single layer DVDs, off by
two for dual layer PTP DVDs, and just wrong for OTP DVDs.

Usually the IOCTL_DISK_GET_LENGTH_INFO ioctl will have succeeded already.
2016-03-15 23:20:06 +00:00
Jonathan Li 41986f4307 cdvdgigaherz: Remove unneeded IOCTL_DVD_READ_STRUCTURE ioctls
Only 1 IOCTL_DVD_READ_STRUCTURE ioctl call is necessary for determining
the DVD media type and layer break address. All the necessary
information is already present in the layer 0 physical descriptor.
2016-03-15 23:19:10 +00:00
Jonathan Li 7292955600 cdvdgigaherz: Fix sector address endian issue
The sector addresses returned when reading the layer information from a
DVD are big-endian. Convert the addresses to little endian.
2016-03-15 17:34:36 +00:00
Jonathan Li 5db0d682b8 cdvdgigaherz: Fix detection typo 2016-03-15 17:34:35 +00:00
Jonathan Li d07076b9d4 cdvdgigaherz: Dual layer DVD type/layer 1 start LSN fixes
For dual layer DVDs, CDVDgetDualInfo() should return the first layer 1
LSN, not the last layer 0 LSN, which is what GetLayerBreakAddress()
returns. This matches what the internal ISO reader returns.

Also, PTP DVDs should return a value of 1 for the media type, not 2.

Finally, adjust the CDVDgetDualInfo() return value so PCSX2 correctly
recognises dual layer DVDs.
2016-03-15 17:28:43 +00:00
Jonathan Li b516c1001a windows: Set _WIN32_WINNT to 0x0600 (Windows Vista) 2016-03-13 13:41:16 +00:00
Jonathan Li 9ed9b2d8cd windows: Switch to DefaultPlatformToolset aka non-XP toolsets
Basically I ran
find . -name "*.vcxproj" -exec sed -i -e 's/_xp//' {} \;

This will likely break XP, but it paves the way on Windows for a PCSX2
that does not require the DirectX redistributables to be installed for
Windows 8, 8.1 and 10 users. Windows Vista and 7 users will still require
the DirectX redistributable files for XInput and XAudio, though PCSX2
should still be capable of running if a user does not actually use either
of them.
2016-03-13 12:04:28 +00:00
Miguel A. Colón Vélez a1de0614d7 Remove vs2012 files.
It does not support several things from C99/C++11 that are
used in the project.
2015-08-18 01:15:51 -04:00
Miguel A. Colón Vélez 277217353e Rename files. 2015-08-18 00:44:35 -04:00
Miguel A. Colón Vélez 1fe5aceded Enable round-tripping.
- Remove ToolsVersion
- Use $(DefaultPlatformToolset)_xp until XP support is dropped.
Note: opencl had no XP support and was not enabled in VS2012.
2015-08-18 00:44:19 -04:00
Miguel A. Colón Vélez 6462393aaf Introduce end-of-line normalization
Signed-off-by: Gregory Hainaut <gregory.hainaut@gmail.com>
2015-08-04 23:52:48 +02:00
Gregory Hainaut ba5b367ae8 drop support of Visual Studio 2010
* Severals PR uses C++11 features
* 2015 will soon be released
* Win 10 will soon be released

Time to upgrade
2015-06-04 08:55:22 +02:00
Lioncash b2d8e7137f cdvdGigaherz: Remove an unnecessary macro define 2014-08-14 20:07:10 -04:00
Ryan Houdek 3d37a6ce27 Removes the usage of __LINUX__ define
This is defined and set it a ton of different places.
It's checked in a whole lot more
Instead just use __linux__ like a real project should
2014-08-03 13:20:36 -05:00
Lioncash 54c21b30c9 cdvdGigaherz: Fix the seek function in FileStream.
Prior to this, it would have ignored any kind of reference position.
2014-07-15 17:28:13 -04:00
Lioncash c2e96a081f cdvdGigaherz: Use booleans instead of ints to represent conditionals in CDVD.cpp 2014-07-15 17:06:49 -04:00
Lioncash 1fa95de554 cdvdGigaherz: Simplify the loops within readLine and readLineW 2014-07-14 22:58:49 -04:00
Lioncash d648227e3d cdvdGigaherz: Get rid of a magic constant in TocStuff 2014-07-14 16:11:51 -04:00
Lioncash 3d0094b611 cdvdGigaherz: Fix some minor tab/space mismatches in TocStuff 2014-07-14 16:11:01 -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
gigaherz 1fb3de2960 cdvdGigaherz: Change the order in which the different reading modes are attempted. Seems to fix some CD-Rom games. While at it, renamed a rude variable with a better name. ;P 2014-05-16 22:36:16 +02:00
Gregory Hainaut c2b78c6fdf license: again not yet perfect but much better
Remove old tsvn of zzogl
Add various header
add "is in public domain" for license in public domain so Debian's script catch it
2014-04-13 10:41:24 +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
gigaherz f7c1b6e060 Git-based versioning. 2014-03-25 13:31:36 +01:00
gigaherz 888f0a27da Remove vs2008 project files, since they have become outdated, and complicated to maintain.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5902 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-15 18:24:06 +00:00
gigaherz 01daa0b6fd Change the vs2012 project files to use the v110_xp platform toolset, and the vs2013 project files to use the v120_xp platform toolset, so that the resulting executables can be run in Windows XP/2003.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5822 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-24 15:30:34 +00:00
gigaherz 4173080028 Because vs2012==vs11 and vs2013==vs12, which is extremely confusing, I renamed the project files to use the full year as the name.
Also fixed some project references to the right filenames.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5764 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-11-27 16:53:36 +00:00
gigaherz 74378ce378 Created vs2013 files based on the vs2012 code, and fixed a small incompatibility between vs2013 and pthreads.
Removed some missing headers from the vs2010 and vs2012 project files that were causing vs to always claim the projects were out of date.
Also removed some other entries for c/cpp files that were disabled but also missing (I did not search exhaustively).


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5763 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-11-27 16:44:32 +00:00
gabest11 ddaa892726 Removed ATL/MFC dependencies from every project, the free version of visual studio does not have those. It compiles with vs2012 express now, will fix others later, in case they are broken.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5692 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-01 21:28:58 +00:00
gigaherz 31f685c490 [VS2012] For some reason when I made the conversion I totally forgot to copy these, and I didn't notice that until yesterday.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5403 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-09-05 18:04:09 +00:00
gigaherz a21c85266c Make PCSX2 compile with Visual Studio 2012 (3/3): Upgrade the project files and fix a few project names. Update the .sln to point to the right project files.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5384 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-19 19:54:12 +00:00
gigaherz 027b7a8b98 Make PCSX2 compile with Visual Studio 2012 (2/3): Copy project files and solution from their vs2010 originals. Not updated yet!
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5383 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-19 19:45:56 +00:00
sudonim1 22c1b30ed6 Fixed inconsistent newlines / added as many svn:eol-style=native properties as I could without killing myself.
Please set up auto-props in your svn client.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4488 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-25 05:06:49 +00:00
sudonim1 7d75a5a53b Missed some SPU2-X and all zzogl code in the last commit.
Fixed assumption that all paths received from pcsx2 end in the path separator.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4484 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-25 01:09:18 +00:00
gigaherz c46f8ae224 Undo some changes that shouldn't have been commited.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4217 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-01-15 23:55:38 +00:00
gigaherz 8bb14a6c0a I misscalculated some coords in the previous commit.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4216 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-01-15 23:51:50 +00:00
gregory.hainaut 84d94276e1 [copyright]
* Add missing copyright according issue 792
* Miss few files from the previous commit ^^


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3429 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-08 16:40:44 +00:00
ramapcsx2 1d534c7481 Same fix for cdvdGigaherz as the last rev + workaround for ZeroGS so it also works in default Vista/Win7 installs.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3006 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-15 01:15:41 +00:00
ramapcsx2 7e8c22b4f5 Committing "blood's" work on building PCSX2 and plugins under msvc 2010.
Changes: Fixed all compile errors in VS 2010. Added support for new w32pthreads.v4. Fixed all MSB8012 warnings. Fixed LNK419 warnings with /DELAYLOAD. Fixed issues when compiling Devel before Release. Added GSdx Devel target. Minor cleanups.

Thanks a bunch, blood :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2930 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-30 19:46:43 +00: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 e170324d51 Oh I inadvertently commited some changes to cdvdGigaherz, but I missed a file. I'm not even sure the state that code was in, so it could just be plain broken, need to check it later.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2852 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-14 22:25:32 +00:00
gigaherz 954847fca4 Initial work on vs2010 project files for PCSX2 and plugins.
The *null projects don't build, and neither do ZZOgl or ZeroSPU2.
Pcsx2 project has some issues with Resources' custom build steps not being run.
Only Debug target tested.
Needs work before it's usable.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2843 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-14 19:44:04 +00:00
Jake.Stine 9f41fc4793 (Most Plugins) Updated plugins to obey PCSX2's ini folder requests. This will fix problems with plugins failing to save settings on Vista/Win7 due to lack of Admin rights, and also ensures all the plugin inis show up where you would expect them to.
Fixed a couple UI bugs: FirstTime Wizard display bug and the "Configure..." button in the plugin control panel grays out when it should.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2361 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-19 18:30:56 +00:00
gigaherz 3c54e2ba75 WIP work towards adding support for non-trivial image files (multitrack cue+bin, ccd, nrg, ...).
This is only refactoring, there shouldn't be any behavior change.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2157 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-08 02:45:09 +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
Jake.Stine 8ba39b71de SPU2-X: Fix CDDA playback, which got broken a few revs back; and remove regression test code (ReadInput is pretty well confirmed to be good now, anything still broken is because of something else).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1951 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-04 08:47:43 +00:00
Jake.Stine 638740b53d Win32 build system:
* Re-enabled function-level linking in the shared properties sheets (applies to debug and devel builds, and is ignored in release builds).  Can't remember why it got disabled in the first place, but whatever errors it was causing seem to be gone now.
 * Removed the wxWidgets 2.9/3.0 copy of wxScopedPtr (wx/scopedptr.h), since we have a new superior implementation of our own.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1949 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-03 16:51:27 +00:00
gigaherz d386ce0ac6 Just a tiny cosmetic change in the plugin name string.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1946 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-01 15:24:28 +00:00
gigaherz bdb20ebe29 Unbreak Debug too.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1945 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-01 15:21:09 +00:00
gigaherz 4f19b1036d Fix error on release build.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1944 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-01 15:04:48 +00:00
gigaherz 0672d6c00b Remove custom settings from the vcproj which were already globally defined in the vsprops.
Fix a silly bug too, and silence a warning.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1943 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-01 15:01:15 +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
gigaherz 985dd97aad Whoops missed 2 files.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1941 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-01 14:21:00 +00:00
gigaherz c440e41859 Undo my little mess. Fix it next commit
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1940 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-01 14:20:18 +00:00
gigaherz b6a19e6b2c Bring in cdvdGigaherz (step 1).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1939 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-01 13:40:22 +00:00