mirror of https://github.com/PCSX2/pcsx2.git
clean (some) gdb warning: round 1
* use svnrev.h on linux too * replace sprintf_s with snprintf (hope it still compile on Windows) * init integer with 0 instead of NULL * various int -> u32/uint32/uint on for loop index * remove a couple of unused variable * init few variable * disable unused warning results git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5683 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
ca1edbf2cb
commit
3c7167be50
|
@ -98,10 +98,15 @@ include(BuildParameters)
|
||||||
include(SearchForStuff)
|
include(SearchForStuff)
|
||||||
include(SelectPcsx2Plugins)
|
include(SelectPcsx2Plugins)
|
||||||
|
|
||||||
|
# Must be done after SearchForStuff
|
||||||
|
write_svnrev_h()
|
||||||
|
|
||||||
# add additional project-wide include directories
|
# add additional project-wide include directories
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/common/include
|
include_directories(${PROJECT_SOURCE_DIR}/common/include
|
||||||
${PROJECT_SOURCE_DIR}/common/include/Utilities
|
${PROJECT_SOURCE_DIR}/common/include/Utilities
|
||||||
${PROJECT_SOURCE_DIR}/common/include/x86emitter
|
${PROJECT_SOURCE_DIR}/common/include/x86emitter
|
||||||
|
# File generated by Cmake
|
||||||
|
${CMAKE_BINARY_DIR}/common/include
|
||||||
# WORKAROUND Some issue with multiarch on Debian/Ubuntu
|
# WORKAROUND Some issue with multiarch on Debian/Ubuntu
|
||||||
/usr/include/i386-linux-gnu
|
/usr/include/i386-linux-gnu
|
||||||
)
|
)
|
||||||
|
|
|
@ -93,7 +93,7 @@ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Set some default compiler flags
|
# Set some default compiler flags
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
set(DEFAULT_WARNINGS "-Wno-write-strings -Wno-format -Wno-unused-parameter -Wno-unused-value -Wstrict-aliasing -Wno-unused-function -Wno-attributes")
|
set(DEFAULT_WARNINGS "-Wno-write-strings -Wno-format -Wno-unused-parameter -Wno-unused-value -Wstrict-aliasing -Wno-unused-function -Wno-attributes -Wno-unused-result")
|
||||||
set(DEFAULT_GCC_FLAG "-m32 -msse -msse2 -march=i686 -pthread ${DEFAULT_WARNINGS}")
|
set(DEFAULT_GCC_FLAG "-m32 -msse -msse2 -march=i686 -pthread ${DEFAULT_WARNINGS}")
|
||||||
set(DEFAULT_CPP_FLAG "${DEFAULT_GCC_FLAG} -Wno-invalid-offsetof")
|
set(DEFAULT_CPP_FLAG "${DEFAULT_GCC_FLAG} -Wno-invalid-offsetof")
|
||||||
|
|
||||||
|
|
|
@ -36,3 +36,17 @@ function(detectOperatingSystem)
|
||||||
set(Windows TRUE PARENT_SCOPE)
|
set(Windows TRUE PARENT_SCOPE)
|
||||||
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||||
endfunction(detectOperatingSystem)
|
endfunction(detectOperatingSystem)
|
||||||
|
|
||||||
|
function(write_svnrev_h)
|
||||||
|
# you must have both svn client executable and a source that contains svn metadata
|
||||||
|
if(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
|
||||||
|
# execute subversion
|
||||||
|
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} tmpvar)
|
||||||
|
|
||||||
|
# write svnrev.h
|
||||||
|
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h "#define SVN_REV ${tmpvar_WC_REVISION} \n#define SVN_MODS 0")
|
||||||
|
else()
|
||||||
|
# write svnrev.h
|
||||||
|
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h "#define SVN_REV 0 \n#define SVN_MODS 0")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
|
@ -12,7 +12,6 @@ set(CommonFlags
|
||||||
# Disable this optimization for the moment
|
# Disable this optimization for the moment
|
||||||
-fno-omit-frame-pointer
|
-fno-omit-frame-pointer
|
||||||
# END GCC-4.6
|
# END GCC-4.6
|
||||||
-DLINUX_PRINT_SVN_NUMBER
|
|
||||||
-pthread
|
-pthread
|
||||||
-fvisibility=hidden
|
-fvisibility=hidden
|
||||||
-fno-guess-branch-probability
|
-fno-guess-branch-probability
|
||||||
|
@ -102,18 +101,6 @@ if(PACKAGE_MODE)
|
||||||
set(Output pcsx2)
|
set(Output pcsx2)
|
||||||
endif(PACKAGE_MODE)
|
endif(PACKAGE_MODE)
|
||||||
|
|
||||||
# you must have both svn client executable and a source that contains svn metadata
|
|
||||||
if(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
|
|
||||||
# execute subversion
|
|
||||||
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} tmpvar)
|
|
||||||
|
|
||||||
# write svnrev.h
|
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV ${tmpvar_WC_REVISION} \n#define SVN_MODS 0")
|
|
||||||
else(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
|
|
||||||
# write svnrev.h
|
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV 0 \n#define SVN_MODS 0")
|
|
||||||
endif(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
|
|
||||||
|
|
||||||
# Main pcsx2 source
|
# Main pcsx2 source
|
||||||
set(pcsx2Sources
|
set(pcsx2Sources
|
||||||
Cache.cpp
|
Cache.cpp
|
||||||
|
@ -649,7 +636,6 @@ endif(MacOSX)
|
||||||
include_directories(.
|
include_directories(.
|
||||||
gui
|
gui
|
||||||
x86
|
x86
|
||||||
${CMAKE_BINARY_DIR}/pcsx2
|
|
||||||
${CMAKE_BINARY_DIR}/pcsx2/gui
|
${CMAKE_BINARY_DIR}/pcsx2/gui
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -748,7 +748,7 @@ void eeMemoryReserve::Reset()
|
||||||
// Dynarec versions of VUs
|
// Dynarec versions of VUs
|
||||||
vu0_micro_mem = vtlb_RegisterHandlerTempl1(vuMicro,0);
|
vu0_micro_mem = vtlb_RegisterHandlerTempl1(vuMicro,0);
|
||||||
vu1_micro_mem = vtlb_RegisterHandlerTempl1(vuMicro,1);
|
vu1_micro_mem = vtlb_RegisterHandlerTempl1(vuMicro,1);
|
||||||
vu1_data_mem = (1||THREAD_VU1) ? vtlb_RegisterHandlerTempl1(vuData,1) : NULL;
|
vu1_data_mem = (1||THREAD_VU1) ? vtlb_RegisterHandlerTempl1(vuData,1) : 0;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// IOP's "secret" Hardware Register mapping, accessible from the EE (and meant for use
|
// IOP's "secret" Hardware Register mapping, accessible from the EE (and meant for use
|
||||||
|
|
|
@ -26,9 +26,7 @@
|
||||||
#include "Utilities/ScopedPtr.h"
|
#include "Utilities/ScopedPtr.h"
|
||||||
#include "Utilities/pxStreams.h"
|
#include "Utilities/pxStreams.h"
|
||||||
|
|
||||||
#if _MSC_VER || defined(LINUX_PRINT_SVN_NUMBER)
|
#include "svnrev.h"
|
||||||
# include "svnrev.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SysPluginBindings SysPlugins;
|
SysPluginBindings SysPlugins;
|
||||||
|
|
||||||
|
|
|
@ -92,16 +92,6 @@ typedef FnType_Void* Fnptr_Void;
|
||||||
// Compiler/OS specific macros and defines
|
// Compiler/OS specific macros and defines
|
||||||
// --------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Linux isn't set up for svn version numbers yet.
|
|
||||||
#if defined(__LINUX__) && !defined(LINUX_PRINT_SVN_NUMBER)
|
|
||||||
#if !defined(SVN_REV)
|
|
||||||
# define SVN_REV 0
|
|
||||||
#endif
|
|
||||||
#if !defined(SVN_MODS)
|
|
||||||
# define SVN_MODS 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
|
||||||
# define strnicmp _strnicmp
|
# define strnicmp _strnicmp
|
||||||
|
|
|
@ -150,9 +150,7 @@ void SysOutOfMemory_EmergencyResponse(uptr blocksize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if _MSC_VER || defined(LINUX_PRINT_SVN_NUMBER)
|
#include "svnrev.h"
|
||||||
# include "svnrev.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const Pcsx2Config EmuConfig;
|
const Pcsx2Config EmuConfig;
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,7 @@
|
||||||
|
|
||||||
#include <wx/iconbndl.h>
|
#include <wx/iconbndl.h>
|
||||||
|
|
||||||
#if _MSC_VER || defined(LINUX_PRINT_SVN_NUMBER)
|
#include "svnrev.h"
|
||||||
# include "svnrev.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
wxMenu* MainEmuFrame::MakeStatesSubMenu( int baseid, int loadBackupId ) const
|
wxMenu* MainEmuFrame::MakeStatesSubMenu( int baseid, int loadBackupId ) const
|
||||||
|
|
|
@ -29,9 +29,7 @@ struct Component_FileMcd;
|
||||||
#include "System.h"
|
#include "System.h"
|
||||||
#include "AppConfig.h"
|
#include "AppConfig.h"
|
||||||
|
|
||||||
#if _MSC_VER || defined(LINUX_PRINT_SVN_NUMBER)
|
#include "svnrev.h"
|
||||||
# include "svnrev.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <wx/ffile.h>
|
#include <wx/ffile.h>
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BaseBlocks() :
|
BaseBlocks() :
|
||||||
recompiler( NULL )
|
recompiler(0)
|
||||||
, blocks(0)
|
, blocks(0)
|
||||||
{
|
{
|
||||||
blocks.reserve(0x4000);
|
blocks.reserve(0x4000);
|
||||||
|
|
|
@ -322,7 +322,7 @@ EXPORT_C_(s32) CDVDgetTOC(void* toc)
|
||||||
|
|
||||||
if (layer1start != -2 && iso->blocks >= 0x300000)
|
if (layer1start != -2 && iso->blocks >= 0x300000)
|
||||||
{
|
{
|
||||||
int off = iso->blockofs;
|
//int off = iso->blockofs;
|
||||||
|
|
||||||
// dual sided
|
// dual sided
|
||||||
tocBuff[ 0] = 0x24;
|
tocBuff[ 0] = 0x24;
|
||||||
|
|
|
@ -16,9 +16,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "CDVD.h"
|
#include "CDVD.h"
|
||||||
#ifdef _MSC_VER
|
#include "svnrev.h"
|
||||||
# include "svnrev.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static char libraryName[256];
|
static char libraryName[256];
|
||||||
|
|
||||||
|
@ -28,12 +26,8 @@ const unsigned char build = 6;
|
||||||
|
|
||||||
EXPORT_C_(char*) PS2EgetLibName()
|
EXPORT_C_(char*) PS2EgetLibName()
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
snprintf( libraryName, 255, "CDVDnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||||
sprintf_s( libraryName, "CDVDnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
|
||||||
return libraryName;
|
return libraryName;
|
||||||
#else
|
|
||||||
return "CDVDnull Driver";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(u32) PS2EgetLibType()
|
EXPORT_C_(u32) PS2EgetLibType()
|
||||||
|
|
|
@ -21,9 +21,7 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#include "FW.h"
|
#include "FW.h"
|
||||||
#ifdef _MSC_VER
|
#include "svnrev.h"
|
||||||
# include "svnrev.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const u8 version = PS2E_FW_VERSION;
|
const u8 version = PS2E_FW_VERSION;
|
||||||
const u8 revision = 0;
|
const u8 revision = 0;
|
||||||
|
@ -65,12 +63,8 @@ EXPORT_C_(u32) PS2EgetLibType()
|
||||||
|
|
||||||
EXPORT_C_(char*) PS2EgetLibName()
|
EXPORT_C_(char*) PS2EgetLibName()
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
snprintf( libraryName, 255, "FWnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||||
sprintf_s( libraryName, "FWnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
|
||||||
return libraryName;
|
return libraryName;
|
||||||
#else
|
|
||||||
return "FWnull Driver";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
||||||
|
@ -131,7 +125,6 @@ void PHYWrite()
|
||||||
void PHYRead()
|
void PHYRead()
|
||||||
{
|
{
|
||||||
u8 reg = (PHYACC >> 24) & 0xf;
|
u8 reg = (PHYACC >> 24) & 0xf;
|
||||||
u8 data = (PHYACC >> 16) & 0xff;
|
|
||||||
|
|
||||||
PHYACC &= ~0x80000000;
|
PHYACC &= ~0x80000000;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ GPUState::GPUState()
|
||||||
{
|
{
|
||||||
memset(m_status, 0, sizeof(m_status));
|
memset(m_status, 0, sizeof(m_status));
|
||||||
|
|
||||||
for(int i = 0; i < countof(m_fpGPUStatusCommandHandlers); i++)
|
for(uint32 i = 0; i < countof(m_fpGPUStatusCommandHandlers); i++)
|
||||||
{
|
{
|
||||||
m_fpGPUStatusCommandHandlers[i] = &GPUState::SCH_Null;
|
m_fpGPUStatusCommandHandlers[i] = &GPUState::SCH_Null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,9 @@ static int s_renderer = -1;
|
||||||
static bool s_framelimit = true;
|
static bool s_framelimit = true;
|
||||||
static bool s_vsync = false;
|
static bool s_vsync = false;
|
||||||
static bool s_exclusive = true;
|
static bool s_exclusive = true;
|
||||||
|
#ifdef _WINDOWS
|
||||||
static bool s_isgsopen2 = false; // boolean to remove some stuff from the config panel in new PCSX2's/
|
static bool s_isgsopen2 = false; // boolean to remove some stuff from the config panel in new PCSX2's/
|
||||||
|
#endif
|
||||||
|
|
||||||
EXPORT_C_(uint32) PS2EgetLibType()
|
EXPORT_C_(uint32) PS2EgetLibType()
|
||||||
{
|
{
|
||||||
|
@ -439,7 +441,7 @@ EXPORT_C_(int) GSopen(void** dsp, char* title, int mt)
|
||||||
XCloseDisplay(display);
|
XCloseDisplay(display);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int renderer;
|
int renderer = 0;
|
||||||
|
|
||||||
// Legacy GUI expects to acquire vsync from the configuration files.
|
// Legacy GUI expects to acquire vsync from the configuration files.
|
||||||
|
|
||||||
|
@ -1456,8 +1458,6 @@ EXPORT_C GSReplay(char* lpszCmdLine, int renderer)
|
||||||
|
|
||||||
fread(regs, 0x2000, 1, fp);
|
fread(regs, 0x2000, 1, fp);
|
||||||
|
|
||||||
long start = ftell(fp);
|
|
||||||
|
|
||||||
GSvsync(1);
|
GSvsync(1);
|
||||||
|
|
||||||
struct Packet {uint8 type, param; uint32 size, addr; vector<uint8> buff;};
|
struct Packet {uint8 type, param; uint32 size, addr; vector<uint8> buff;};
|
||||||
|
|
|
@ -531,7 +531,7 @@ CRC::Game CRC::Lookup(uint32 crc)
|
||||||
printf( "GSdx: CrcHacksExclusions: %s\n", exclusions.c_str() );
|
printf( "GSdx: CrcHacksExclusions: %s\n", exclusions.c_str() );
|
||||||
|
|
||||||
int crcDups = 0;
|
int crcDups = 0;
|
||||||
for(int i = 0; i < countof(m_games); i++)
|
for(uint32 i = 0; i < countof(m_games); i++)
|
||||||
{
|
{
|
||||||
if( !IsCrcExcluded( exclusions, m_games[i].crc ) ){
|
if( !IsCrcExcluded( exclusions, m_games[i].crc ) ){
|
||||||
if(m_map[m_games[i].crc]){
|
if(m_map[m_games[i].crc]){
|
||||||
|
|
|
@ -226,7 +226,7 @@ void GSDevice::Merge(GSTexture* st[2], GSVector4* sr, GSVector4* dr, const GSVec
|
||||||
{
|
{
|
||||||
GSTexture* tex[2] = {NULL, NULL};
|
GSTexture* tex[2] = {NULL, NULL};
|
||||||
|
|
||||||
for(int i = 0; i < countof(tex); i++)
|
for(uint32 i = 0; i < countof(tex); i++)
|
||||||
{
|
{
|
||||||
if(st[i] != NULL)
|
if(st[i] != NULL)
|
||||||
{
|
{
|
||||||
|
@ -236,7 +236,7 @@ void GSDevice::Merge(GSTexture* st[2], GSVector4* sr, GSVector4* dr, const GSVec
|
||||||
|
|
||||||
DoMerge(tex, sr, m_merge, dr, slbg, mmod, c);
|
DoMerge(tex, sr, m_merge, dr, slbg, mmod, c);
|
||||||
|
|
||||||
for(int i = 0; i < countof(tex); i++)
|
for(uint32 i = 0; i < countof(tex); i++)
|
||||||
{
|
{
|
||||||
if(tex[i] != st[i])
|
if(tex[i] != st[i])
|
||||||
{
|
{
|
||||||
|
|
|
@ -116,89 +116,89 @@ GSLocalMemory::GSLocalMemory()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(rowOffset32); x++)
|
for(uint32 x = 0; x < countof(rowOffset32); x++)
|
||||||
{
|
{
|
||||||
rowOffset32[x] = (int)PixelAddress32(x & 0x7ff, 0, 0, 32) - (int)PixelAddress32(0, 0, 0, 32);
|
rowOffset32[x] = (int)PixelAddress32(x & 0x7ff, 0, 0, 32) - (int)PixelAddress32(0, 0, 0, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(rowOffset32Z); x++)
|
for(uint32 x = 0; x < countof(rowOffset32Z); x++)
|
||||||
{
|
{
|
||||||
rowOffset32Z[x] = (int)PixelAddress32Z(x & 0x7ff, 0, 0, 32) - (int)PixelAddress32Z(0, 0, 0, 32);
|
rowOffset32Z[x] = (int)PixelAddress32Z(x & 0x7ff, 0, 0, 32) - (int)PixelAddress32Z(0, 0, 0, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(rowOffset16); x++)
|
for(uint32 x = 0; x < countof(rowOffset16); x++)
|
||||||
{
|
{
|
||||||
rowOffset16[x] = (int)PixelAddress16(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16(0, 0, 0, 32);
|
rowOffset16[x] = (int)PixelAddress16(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16(0, 0, 0, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(rowOffset16S); x++)
|
for(uint32 x = 0; x < countof(rowOffset16S); x++)
|
||||||
{
|
{
|
||||||
rowOffset16S[x] = (int)PixelAddress16S(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16S(0, 0, 0, 32);
|
rowOffset16S[x] = (int)PixelAddress16S(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16S(0, 0, 0, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(rowOffset16Z); x++)
|
for(uint32 x = 0; x < countof(rowOffset16Z); x++)
|
||||||
{
|
{
|
||||||
rowOffset16Z[x] = (int)PixelAddress16Z(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16Z(0, 0, 0, 32);
|
rowOffset16Z[x] = (int)PixelAddress16Z(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16Z(0, 0, 0, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(rowOffset16SZ); x++)
|
for(uint32 x = 0; x < countof(rowOffset16SZ); x++)
|
||||||
{
|
{
|
||||||
rowOffset16SZ[x] = (int)PixelAddress16SZ(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16SZ(0, 0, 0, 32);
|
rowOffset16SZ[x] = (int)PixelAddress16SZ(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16SZ(0, 0, 0, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(rowOffset8[0]); x++)
|
for(uint32 x = 0; x < countof(rowOffset8[0]); x++)
|
||||||
{
|
{
|
||||||
rowOffset8[0][x] = (int)PixelAddress8(x & 0x7ff, 0, 0, 32) - (int)PixelAddress8(0, 0, 0, 32);
|
rowOffset8[0][x] = (int)PixelAddress8(x & 0x7ff, 0, 0, 32) - (int)PixelAddress8(0, 0, 0, 32);
|
||||||
rowOffset8[1][x] = (int)PixelAddress8(x & 0x7ff, 2, 0, 32) - (int)PixelAddress8(0, 2, 0, 32);
|
rowOffset8[1][x] = (int)PixelAddress8(x & 0x7ff, 2, 0, 32) - (int)PixelAddress8(0, 2, 0, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(rowOffset4[0]); x++)
|
for(uint32 x = 0; x < countof(rowOffset4[0]); x++)
|
||||||
{
|
{
|
||||||
rowOffset4[0][x] = (int)PixelAddress4(x & 0x7ff, 0, 0, 32) - (int)PixelAddress4(0, 0, 0, 32);
|
rowOffset4[0][x] = (int)PixelAddress4(x & 0x7ff, 0, 0, 32) - (int)PixelAddress4(0, 0, 0, 32);
|
||||||
rowOffset4[1][x] = (int)PixelAddress4(x & 0x7ff, 2, 0, 32) - (int)PixelAddress4(0, 2, 0, 32);
|
rowOffset4[1][x] = (int)PixelAddress4(x & 0x7ff, 2, 0, 32) - (int)PixelAddress4(0, 2, 0, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(blockOffset32); x++)
|
for(uint32 x = 0; x < countof(blockOffset32); x++)
|
||||||
{
|
{
|
||||||
blockOffset32[x] = (short)((int)BlockNumber32(x << 3, 0, 0, 32) - (int)BlockNumber32(0, 0, 0, 32));
|
blockOffset32[x] = (short)((int)BlockNumber32(x << 3, 0, 0, 32) - (int)BlockNumber32(0, 0, 0, 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(blockOffset32Z); x++)
|
for(uint32 x = 0; x < countof(blockOffset32Z); x++)
|
||||||
{
|
{
|
||||||
blockOffset32Z[x] = (short)((int)BlockNumber32Z(x << 3, 0, 0, 32) - (int)BlockNumber32Z(0, 0, 0, 32));
|
blockOffset32Z[x] = (short)((int)BlockNumber32Z(x << 3, 0, 0, 32) - (int)BlockNumber32Z(0, 0, 0, 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(blockOffset16); x++)
|
for(uint32 x = 0; x < countof(blockOffset16); x++)
|
||||||
{
|
{
|
||||||
blockOffset16[x] = (short)((int)BlockNumber16(x << 3, 0, 0, 32) - (int)BlockNumber16(0, 0, 0, 32));
|
blockOffset16[x] = (short)((int)BlockNumber16(x << 3, 0, 0, 32) - (int)BlockNumber16(0, 0, 0, 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(blockOffset16S); x++)
|
for(uint32 x = 0; x < countof(blockOffset16S); x++)
|
||||||
{
|
{
|
||||||
blockOffset16S[x] = (short)((int)BlockNumber16S(x << 3, 0, 0, 32) - (int)BlockNumber16S(0, 0, 0, 32));
|
blockOffset16S[x] = (short)((int)BlockNumber16S(x << 3, 0, 0, 32) - (int)BlockNumber16S(0, 0, 0, 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(blockOffset16Z); x++)
|
for(uint32 x = 0; x < countof(blockOffset16Z); x++)
|
||||||
{
|
{
|
||||||
blockOffset16Z[x] = (short)((int)BlockNumber16Z(x << 3, 0, 0, 32) - (int)BlockNumber16Z(0, 0, 0, 32));
|
blockOffset16Z[x] = (short)((int)BlockNumber16Z(x << 3, 0, 0, 32) - (int)BlockNumber16Z(0, 0, 0, 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(blockOffset16SZ); x++)
|
for(uint32 x = 0; x < countof(blockOffset16SZ); x++)
|
||||||
{
|
{
|
||||||
blockOffset16SZ[x] = (short)((int)BlockNumber16SZ(x << 3, 0, 0, 32) - (int)BlockNumber16SZ(0, 0, 0, 32));
|
blockOffset16SZ[x] = (short)((int)BlockNumber16SZ(x << 3, 0, 0, 32) - (int)BlockNumber16SZ(0, 0, 0, 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(blockOffset8); x++)
|
for(uint32 x = 0; x < countof(blockOffset8); x++)
|
||||||
{
|
{
|
||||||
blockOffset8[x] = (short)((int)BlockNumber8(x << 3, 0, 0, 32) - (int)BlockNumber8(0, 0, 0, 32));
|
blockOffset8[x] = (short)((int)BlockNumber8(x << 3, 0, 0, 32) - (int)BlockNumber8(0, 0, 0, 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int x = 0; x < countof(blockOffset4); x++)
|
for(uint32 x = 0; x < countof(blockOffset4); x++)
|
||||||
{
|
{
|
||||||
blockOffset4[x] = (short)((int)BlockNumber4(x << 3, 0, 0, 32) - (int)BlockNumber4(0, 0, 0, 32));
|
blockOffset4[x] = (short)((int)BlockNumber4(x << 3, 0, 0, 32) - (int)BlockNumber4(0, 0, 0, 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < countof(m_psm); i++)
|
for(uint32 i = 0; i < countof(m_psm); i++)
|
||||||
{
|
{
|
||||||
m_psm[i].pa = &GSLocalMemory::PixelAddress32;
|
m_psm[i].pa = &GSLocalMemory::PixelAddress32;
|
||||||
m_psm[i].bn = &GSLocalMemory::BlockNumber32;
|
m_psm[i].bn = &GSLocalMemory::BlockNumber32;
|
||||||
|
@ -408,7 +408,7 @@ GSLocalMemory::GSLocalMemory()
|
||||||
m_psm[PSM_PSMT8].pal = m_psm[PSM_PSMT8H].pal = 256;
|
m_psm[PSM_PSMT8].pal = m_psm[PSM_PSMT8H].pal = 256;
|
||||||
m_psm[PSM_PSMT4].pal = m_psm[PSM_PSMT4HL].pal = m_psm[PSM_PSMT4HH].pal = 16;
|
m_psm[PSM_PSMT4].pal = m_psm[PSM_PSMT4HL].pal = m_psm[PSM_PSMT4HH].pal = 16;
|
||||||
|
|
||||||
for(int i = 0; i < countof(m_psm); i++) m_psm[i].fmt = 3;
|
for(uint32 i = 0; i < countof(m_psm); i++) m_psm[i].fmt = 3;
|
||||||
m_psm[PSM_PSMCT32].fmt = m_psm[PSM_PSMZ32].fmt = 0;
|
m_psm[PSM_PSMCT32].fmt = m_psm[PSM_PSMZ32].fmt = 0;
|
||||||
m_psm[PSM_PSMCT24].fmt = m_psm[PSM_PSMZ24].fmt = 1;
|
m_psm[PSM_PSMCT24].fmt = m_psm[PSM_PSMZ24].fmt = 1;
|
||||||
m_psm[PSM_PSMCT16].fmt = m_psm[PSM_PSMZ16].fmt = 2;
|
m_psm[PSM_PSMCT16].fmt = m_psm[PSM_PSMZ16].fmt = 2;
|
||||||
|
|
|
@ -58,7 +58,7 @@ void GSPerfMon::Update()
|
||||||
{
|
{
|
||||||
if(m_count > 0)
|
if(m_count > 0)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < countof(m_counters); i++)
|
for(uint32 i = 0; i < countof(m_counters); i++)
|
||||||
{
|
{
|
||||||
m_stats[i] = m_counters[i] / m_count;
|
m_stats[i] = m_counters[i] / m_count;
|
||||||
}
|
}
|
||||||
|
|
|
@ -554,7 +554,6 @@ bool GSRendererHW::OI_GodOfWar2(GSTexture* rt, GSTexture* ds, GSTextureCache::So
|
||||||
bool GSRendererHW::OI_SimpsonsGame(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t)
|
bool GSRendererHW::OI_SimpsonsGame(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t)
|
||||||
{
|
{
|
||||||
uint32 FBP = m_context->FRAME.Block();
|
uint32 FBP = m_context->FRAME.Block();
|
||||||
uint32 FBW = m_context->FRAME.FBW;
|
|
||||||
uint32 FPSM = m_context->FRAME.PSM;
|
uint32 FPSM = m_context->FRAME.PSM;
|
||||||
|
|
||||||
if((FBP == 0x01500 || FBP == 0x01800) && FPSM == PSM_PSMZ24) //0x1800 pal, 0x1500 ntsc
|
if((FBP == 0x01500 || FBP == 0x01800) && FPSM == PSM_PSMZ24) //0x1800 pal, 0x1500 ntsc
|
||||||
|
@ -636,7 +635,6 @@ bool GSRendererHW::OI_SpidermanWoS(GSTexture* rt, GSTexture* ds, GSTextureCache:
|
||||||
bool GSRendererHW::OI_TyTasmanianTiger(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t)
|
bool GSRendererHW::OI_TyTasmanianTiger(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t)
|
||||||
{
|
{
|
||||||
uint32 FBP = m_context->FRAME.Block();
|
uint32 FBP = m_context->FRAME.Block();
|
||||||
uint32 FBW = m_context->FRAME.FBW;
|
|
||||||
uint32 FPSM = m_context->FRAME.PSM;
|
uint32 FPSM = m_context->FRAME.PSM;
|
||||||
|
|
||||||
if((FBP == 0x02800 || FBP == 0x02BC0) && FPSM == PSM_PSMCT24) //0x2800 pal, 0x2bc0 ntsc
|
if((FBP == 0x02800 || FBP == 0x02BC0) && FPSM == PSM_PSMCT24) //0x2800 pal, 0x2bc0 ntsc
|
||||||
|
|
|
@ -178,7 +178,7 @@ void GSRendererOGL::SetupIA()
|
||||||
|
|
||||||
dev->IASetIndexBuffer(m_index.buff, m_index.tail);
|
dev->IASetIndexBuffer(m_index.buff, m_index.tail);
|
||||||
|
|
||||||
GLenum t;
|
GLenum t = 0;
|
||||||
|
|
||||||
switch(m_vt.m_primclass)
|
switch(m_vt.m_primclass)
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,7 +64,7 @@ GSRendererSW::~GSRendererSW()
|
||||||
{
|
{
|
||||||
delete m_tc;
|
delete m_tc;
|
||||||
|
|
||||||
for(int i = 0; i < countof(m_texture); i++)
|
for(uint32 i = 0; i < countof(m_texture); i++)
|
||||||
{
|
{
|
||||||
delete m_texture[i];
|
delete m_texture[i];
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,7 @@ void GSRendererSW::VSync(int field)
|
||||||
|
|
||||||
void GSRendererSW::ResetDevice()
|
void GSRendererSW::ResetDevice()
|
||||||
{
|
{
|
||||||
for(int i = 0; i < countof(m_texture); i++)
|
for(uint32 i = 0; i < countof(m_texture); i++)
|
||||||
{
|
{
|
||||||
delete m_texture[i];
|
delete m_texture[i];
|
||||||
|
|
||||||
|
@ -445,7 +445,7 @@ void GSRendererSW::Draw()
|
||||||
{
|
{
|
||||||
int n = GSUtil::GetVertexCount(PRIM->PRIM);
|
int n = GSUtil::GetVertexCount(PRIM->PRIM);
|
||||||
|
|
||||||
for(int i = 0, j = 0; i < m_index.tail; i += n, j++)
|
for(uint32 i = 0, j = 0; i < m_index.tail; i += n, j++)
|
||||||
{
|
{
|
||||||
for(int k = 0; k < n; k++)
|
for(int k = 0; k < n; k++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1177,7 +1177,7 @@ void GSTextureCache::SourceMap::Add(Source* s, const GIFRegTEX0& TEX0, const GSO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < countof(m_pages); i++)
|
for(uint32 i = 0; i < countof(m_pages); i++)
|
||||||
{
|
{
|
||||||
if(uint32 p = m_pages[i])
|
if(uint32 p = m_pages[i])
|
||||||
{
|
{
|
||||||
|
|
|
@ -192,8 +192,8 @@ bool GSTextureOGL::Update(const GSVector4i& r, const void* data, int pitch)
|
||||||
EnableUnit(4);
|
EnableUnit(4);
|
||||||
|
|
||||||
// pitch is in byte wherease GL_UNPACK_ROW_LENGTH is in pixel
|
// pitch is in byte wherease GL_UNPACK_ROW_LENGTH is in pixel
|
||||||
GLenum format;
|
GLenum format = GL_RGBA;
|
||||||
GLenum type;
|
GLenum type = GL_UNSIGNED_BYTE;
|
||||||
switch (m_format) {
|
switch (m_format) {
|
||||||
case GL_RGBA8:
|
case GL_RGBA8:
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||||
|
|
|
@ -18,9 +18,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
#ifdef _MSC_VER
|
#include "svnrev.h"
|
||||||
# include "svnrev.h"
|
|
||||||
#endif
|
|
||||||
#include "Pad.h"
|
#include "Pad.h"
|
||||||
|
|
||||||
const u8 version = PS2E_PAD_VERSION;
|
const u8 version = PS2E_PAD_VERSION;
|
||||||
|
@ -43,13 +41,8 @@ EXPORT_C_(u32) PS2EgetLibType()
|
||||||
|
|
||||||
EXPORT_C_(char*) PS2EgetLibName()
|
EXPORT_C_(char*) PS2EgetLibName()
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
snprintf( libraryName, 255, "Padnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||||
sprintf_s( libraryName, "Padnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
|
||||||
return libraryName;
|
return libraryName;
|
||||||
#else
|
|
||||||
return "Padnull Driver";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
||||||
|
|
|
@ -16,9 +16,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
#ifdef _MSC_VER
|
#include "svnrev.h"
|
||||||
# include "svnrev.h"
|
|
||||||
#endif
|
|
||||||
#include "USB.h"
|
#include "USB.h"
|
||||||
string s_strIniPath="inis";
|
string s_strIniPath="inis";
|
||||||
string s_strLogPath="logs";
|
string s_strLogPath="logs";
|
||||||
|
@ -59,12 +57,8 @@ EXPORT_C_(u32) PS2EgetLibType()
|
||||||
|
|
||||||
EXPORT_C_(char*) PS2EgetLibName()
|
EXPORT_C_(char*) PS2EgetLibName()
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
snprintf( libraryName, 255, "USBnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||||
sprintf_s( libraryName, "USBnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
|
||||||
return libraryName;
|
return libraryName;
|
||||||
#else
|
|
||||||
return "USBnull Driver";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
||||||
|
|
|
@ -31,9 +31,7 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#include "DEV9.h"
|
#include "DEV9.h"
|
||||||
#ifdef _MSC_VER
|
#include "svnrev.h"
|
||||||
# include "svnrev.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const unsigned char version = PS2E_DEV9_VERSION;
|
const unsigned char version = PS2E_DEV9_VERSION;
|
||||||
const unsigned char revision = 0;
|
const unsigned char revision = 0;
|
||||||
|
@ -76,12 +74,8 @@ EXPORT_C_(u32) PS2EgetLibType()
|
||||||
|
|
||||||
EXPORT_C_(char*) PS2EgetLibName()
|
EXPORT_C_(char*) PS2EgetLibName()
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
snprintf( libraryName, 255, "DEV9null Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||||
sprintf_s( libraryName, "DEV9null Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
|
||||||
return libraryName;
|
return libraryName;
|
||||||
#else
|
|
||||||
return "DEV9null Driver";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
||||||
|
|
|
@ -412,8 +412,8 @@ void joy_changed(GtkComboBox *box, gpointer user_data)
|
||||||
// 3 : use new joy with fresh key binding
|
// 3 : use new joy with fresh key binding
|
||||||
|
|
||||||
// unassign every joystick with this pad
|
// unassign every joystick with this pad
|
||||||
for (int i = 0; i < 2; ++i)
|
for (u32 i = 0; i < 2; ++i)
|
||||||
if (joyid == conf->get_joyid(i)) conf->set_joyid(i, -1);
|
if (joyid == (int)conf->get_joyid(i)) conf->set_joyid(i, -1);
|
||||||
|
|
||||||
conf->set_joyid(current_pad, joyid);
|
conf->set_joyid(current_pad, joyid);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,12 +26,10 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include "onepad.h"
|
#include "onepad.h"
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#else
|
|
||||||
#include "svnrev.h"
|
#include "svnrev.h"
|
||||||
|
|
||||||
|
#ifdef __LINUX__
|
||||||
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PADconf* conf;
|
PADconf* conf;
|
||||||
|
@ -133,48 +131,27 @@ static int padVibF[2][4];
|
||||||
|
|
||||||
static void InitLibraryName()
|
static void InitLibraryName()
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef PUBLIC
|
||||||
# ifdef PUBLIC
|
|
||||||
|
|
||||||
// Public Release!
|
// Public Release!
|
||||||
// Output a simplified string that's just our name:
|
// Output a simplified string that's just our name:
|
||||||
|
|
||||||
strcpy(libraryName, "OnePAD");
|
strcpy(libraryName, "OnePAD");
|
||||||
|
|
||||||
# elif defined( SVN_REV_UNKNOWN )
|
#else
|
||||||
|
|
||||||
// Unknown revision.
|
|
||||||
// Output a name that includes devbuild status but not
|
|
||||||
// subversion revision tags:
|
|
||||||
|
|
||||||
strcpy(libraryName, "OnePAD"
|
|
||||||
# ifdef PCSX2_DEBUG
|
|
||||||
"-Debug"
|
|
||||||
# endif
|
|
||||||
);
|
|
||||||
# else
|
|
||||||
|
|
||||||
// Use TortoiseSVN's SubWCRev utility's output
|
// Use TortoiseSVN's SubWCRev utility's output
|
||||||
// to label the specific revision:
|
// to label the specific revision:
|
||||||
|
|
||||||
sprintf_s(libraryName, "OnePAD r%d%s"
|
snprintf(libraryName, 255, "OnePAD r%d%s"
|
||||||
# ifdef PCSX2_DEBUG
|
# ifdef PCSX2_DEBUG
|
||||||
"-Debug"
|
"-Debug"
|
||||||
# else
|
# else
|
||||||
"-Dev"
|
"-Dev"
|
||||||
# endif
|
# endif
|
||||||
, SVN_REV,
|
, SVN_REV,
|
||||||
SVN_MODS ? "m" : ""
|
SVN_MODS ? "m" : ""
|
||||||
);
|
);
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
// I'll fix up SVN support later. --arcum42
|
|
||||||
|
|
||||||
strcpy(libraryName, "OnePAD"
|
|
||||||
# ifdef PCSX2_DEBUG
|
|
||||||
"-Debug"
|
|
||||||
# endif
|
|
||||||
);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -561,7 +561,7 @@ static __forceinline StereoOut32 MixVoice( uint coreidx, uint voiceidx )
|
||||||
{
|
{
|
||||||
UpdatePitch( coreidx, voiceidx );
|
UpdatePitch( coreidx, voiceidx );
|
||||||
|
|
||||||
s32 Value;
|
s32 Value = 0;
|
||||||
|
|
||||||
if( vc.Noise )
|
if( vc.Noise )
|
||||||
Value = GetNoiseValues( thiscore, voiceidx );
|
Value = GetNoiseValues( thiscore, voiceidx );
|
||||||
|
@ -619,8 +619,8 @@ static __forceinline StereoOut32 MixVoice( uint coreidx, uint voiceidx )
|
||||||
// Continue processing voice, even if it's "off". Or else we miss interrupts! (Fatal Frame engine died because of this.)
|
// Continue processing voice, even if it's "off". Or else we miss interrupts! (Fatal Frame engine died because of this.)
|
||||||
if (NEVER_SKIP_VOICES
|
if (NEVER_SKIP_VOICES
|
||||||
|| (*GetMemPtr(vc.NextA & 0xFFFF8) >> 8 & 3) != 3 || vc.LoopStartA != (vc.NextA & ~7) // not in a tight loop
|
|| (*GetMemPtr(vc.NextA & 0xFFFF8) >> 8 & 3) != 3 || vc.LoopStartA != (vc.NextA & ~7) // not in a tight loop
|
||||||
|| Cores[0].IRQEnable && (Cores[0].IRQA & ~7) == vc.LoopStartA // or should be interrupting regularly
|
|| (Cores[0].IRQEnable && (Cores[0].IRQA & ~7) == vc.LoopStartA) // or should be interrupting regularly
|
||||||
|| Cores[1].IRQEnable && (Cores[1].IRQA & ~7) == vc.LoopStartA
|
|| (Cores[1].IRQEnable && (Cores[1].IRQA & ~7) == vc.LoopStartA)
|
||||||
|| !(thiscore.Regs.ENDX & 1 << voiceidx)) // or isn't currently flagged as having passed the endpoint
|
|| !(thiscore.Regs.ENDX & 1 << voiceidx)) // or isn't currently flagged as having passed the endpoint
|
||||||
{
|
{
|
||||||
UpdatePitch(coreidx, voiceidx);
|
UpdatePitch(coreidx, voiceidx);
|
||||||
|
|
|
@ -20,10 +20,7 @@
|
||||||
#include "Dma.h"
|
#include "Dma.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#include "svnrev.h"
|
||||||
# include "svnrev.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// PCSX2 expects ASNI, not unicode, so this MUST always be char...
|
// PCSX2 expects ASNI, not unicode, so this MUST always be char...
|
||||||
static char libraryName[256];
|
static char libraryName[256];
|
||||||
|
@ -87,7 +84,7 @@ static void InitLibraryName()
|
||||||
// Use TortoiseSVN's SubWCRev utility's output
|
// Use TortoiseSVN's SubWCRev utility's output
|
||||||
// to label the specific revision:
|
// to label the specific revision:
|
||||||
|
|
||||||
sprintf_s( libraryName, "SPU2-X r%d%s"
|
snprintf( libraryName, 255, "SPU2-X r%d%s"
|
||||||
#ifdef DEBUG_FAST
|
#ifdef DEBUG_FAST
|
||||||
"-Debug"
|
"-Debug"
|
||||||
#elif defined( PCSX2_DEBUG )
|
#elif defined( PCSX2_DEBUG )
|
||||||
|
@ -105,7 +102,7 @@ static void InitLibraryName()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool cpu_detected = false;
|
//static bool cpu_detected = false;
|
||||||
|
|
||||||
static bool CheckSSE()
|
static bool CheckSSE()
|
||||||
{
|
{
|
||||||
|
@ -519,8 +516,6 @@ EXPORT_C_(void) SPU2setClockPtr(u32 *ptr)
|
||||||
cyclePtr = ptr;
|
cyclePtr = ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool numpad_plus = false, numpad_plus_old = false;
|
|
||||||
|
|
||||||
#ifdef DEBUG_KEYS
|
#ifdef DEBUG_KEYS
|
||||||
static u32 lastTicks;
|
static u32 lastTicks;
|
||||||
static bool lState[6];
|
static bool lState[6];
|
||||||
|
|
|
@ -134,7 +134,7 @@ StereoOut32 V_Core::ReadInput()
|
||||||
|
|
||||||
InputPosRead++;
|
InputPosRead++;
|
||||||
|
|
||||||
if (AutoDMACtrl & Index + 1 && (InputPosRead == 0x100 || InputPosRead == 0x200))
|
if (AutoDMACtrl & (Index + 1) && (InputPosRead == 0x100 || InputPosRead == 0x200))
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_NEW_IOPDMA_SPU2
|
#ifdef ENABLE_NEW_IOPDMA_SPU2
|
||||||
// WARNING: Assumes this to be in the same thread as the dmas
|
// WARNING: Assumes this to be in the same thread as the dmas
|
||||||
|
|
|
@ -178,7 +178,6 @@ public:
|
||||||
void* infoPtr = NULL;
|
void* infoPtr = NULL;
|
||||||
|
|
||||||
const PaDeviceInfo * devinfo = Pa_GetDeviceInfo(deviceIndex);
|
const PaDeviceInfo * devinfo = Pa_GetDeviceInfo(deviceIndex);
|
||||||
const PaHostApiInfo * apiinfo = Pa_GetHostApiInfo(devinfo->hostApi);
|
|
||||||
|
|
||||||
int speakers;
|
int speakers;
|
||||||
switch(numSpeakers) // speakers = (numSpeakers + 1) *2; ?
|
switch(numSpeakers) // speakers = (numSpeakers + 1) *2; ?
|
||||||
|
|
|
@ -426,8 +426,6 @@ static void CvtPacketToInt( StereoOut32* srcdest, uint size )
|
||||||
|
|
||||||
void SndBuffer::timeStretchWrite()
|
void SndBuffer::timeStretchWrite()
|
||||||
{
|
{
|
||||||
bool progress = false;
|
|
||||||
|
|
||||||
// data prediction helps keep the tempo adjustments more accurate.
|
// data prediction helps keep the tempo adjustments more accurate.
|
||||||
// The timestretcher returns packets in belated "clump" form.
|
// The timestretcher returns packets in belated "clump" form.
|
||||||
// Meaning that most of the time we'll get nothing back, and then
|
// Meaning that most of the time we'll get nothing back, and then
|
||||||
|
@ -448,7 +446,6 @@ void SndBuffer::timeStretchWrite()
|
||||||
|
|
||||||
CvtPacketToInt( sndTempBuffer, tempProgress );
|
CvtPacketToInt( sndTempBuffer, tempProgress );
|
||||||
_WriteSamples( sndTempBuffer, tempProgress );
|
_WriteSamples( sndTempBuffer, tempProgress );
|
||||||
progress = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SPU2X_USE_OLD_STRETCHER
|
#ifdef SPU2X_USE_OLD_STRETCHER
|
||||||
|
|
|
@ -185,7 +185,7 @@ EXPORT_C_(void) GSsetGameCRC(int crc, int options)
|
||||||
|
|
||||||
if (CRCValueChanged && (crc != 0))
|
if (CRCValueChanged && (crc != 0))
|
||||||
{
|
{
|
||||||
for (int i = 0; i < GAME_INFO_INDEX; i++)
|
for (u32 i = 0; i < GAME_INFO_INDEX; i++)
|
||||||
{
|
{
|
||||||
if (crc_game_list[i].crc == crc)
|
if (crc_game_list[i].crc == crc)
|
||||||
{
|
{
|
||||||
|
@ -680,8 +680,6 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
|
||||||
|
|
||||||
fread(regs, 0x2000, 1, fp);
|
fread(regs, 0x2000, 1, fp);
|
||||||
|
|
||||||
long start = ftell(fp);
|
|
||||||
|
|
||||||
GSvsync(1);
|
GSvsync(1);
|
||||||
|
|
||||||
list<Packet*> packets;
|
list<Packet*> packets;
|
||||||
|
@ -769,7 +767,7 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
|
||||||
switch(p->param)
|
switch(p->param)
|
||||||
{
|
{
|
||||||
//case 0: GSgifTransfer1((u32*)&p->buff[0], p->addr); break;
|
//case 0: GSgifTransfer1((u32*)&p->buff[0], p->addr); break;
|
||||||
case 0: _GSgifTransfer<0>(&p->buff[0], p->real_size); break;
|
case 0: _GSgifTransfer<0>((u32*)&p->buff[0], p->real_size); break;
|
||||||
case 1: GSgifTransfer2((u32*)&p->buff[0], p->real_size); break;
|
case 1: GSgifTransfer2((u32*)&p->buff[0], p->real_size); break;
|
||||||
case 2: GSgifTransfer3((u32*)&p->buff[0], p->real_size); break;
|
case 2: GSgifTransfer3((u32*)&p->buff[0], p->real_size); break;
|
||||||
case 3: GSgifTransfer((u32*)&p->buff[0], p->real_size); break;
|
case 3: GSgifTransfer((u32*)&p->buff[0], p->real_size); break;
|
||||||
|
|
|
@ -243,7 +243,7 @@ CMemoryTarget* CMemoryTargetMngr::SearchExistTarget(int start, int end, int clut
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CMemoryTarget* CMemoryTargetMngr::ClearedTargetsSearch(int fmt, int widthmult, int channels, int height)
|
CMemoryTarget* CMemoryTargetMngr::ClearedTargetsSearch(u32 fmt, int widthmult, int channels, int height)
|
||||||
{
|
{
|
||||||
CMemoryTarget* targ = NULL;
|
CMemoryTarget* targ = NULL;
|
||||||
|
|
||||||
|
|
|
@ -832,7 +832,7 @@ inline void AfterRendererAutoresetTargets()
|
||||||
|
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
|
||||||
for (int i = 0; i < ArraySize(s_nResolveCounts); ++i) total += s_nResolveCounts[i];
|
for (u32 i = 0; i < ArraySize(s_nResolveCounts); ++i) total += s_nResolveCounts[i];
|
||||||
|
|
||||||
if (total / ArraySize(s_nResolveCounts) > 3)
|
if (total / ArraySize(s_nResolveCounts) > 3)
|
||||||
{
|
{
|
||||||
|
|
|
@ -566,7 +566,7 @@ bool ZZCreate(int _width, int _height)
|
||||||
|
|
||||||
if (!vb_buffer_allocated) {
|
if (!vb_buffer_allocated) {
|
||||||
glGenBuffers((GLsizei)ArraySize(g_vboBuffers), g_vboBuffers);
|
glGenBuffers((GLsizei)ArraySize(g_vboBuffers), g_vboBuffers);
|
||||||
for (int i = 0; i < ArraySize(g_vboBuffers); ++i)
|
for (u32 i = 0; i < ArraySize(g_vboBuffers); ++i)
|
||||||
{
|
{
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, g_vboBuffers[i]);
|
glBindBuffer(GL_ARRAY_BUFFER, g_vboBuffers[i]);
|
||||||
glBufferData(GL_ARRAY_BUFFER, 0x100*sizeof(VertexGPU), NULL, GL_STREAM_DRAW);
|
glBufferData(GL_ARRAY_BUFFER, 0x100*sizeof(VertexGPU), NULL, GL_STREAM_DRAW);
|
||||||
|
@ -809,7 +809,7 @@ void ZZDestroy()
|
||||||
|
|
||||||
if (pvs != NULL)
|
if (pvs != NULL)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ArraySize(pvs); ++i)
|
for (u32 i = 0; i < ArraySize(pvs); ++i)
|
||||||
{
|
{
|
||||||
SAFE_RELEASE_PROG(pvs[i]);
|
SAFE_RELEASE_PROG(pvs[i]);
|
||||||
}
|
}
|
||||||
|
@ -817,7 +817,7 @@ void ZZDestroy()
|
||||||
|
|
||||||
if (ppsRegular != NULL)
|
if (ppsRegular != NULL)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ArraySize(ppsRegular); ++i)
|
for (u32 i = 0; i < ArraySize(ppsRegular); ++i)
|
||||||
{
|
{
|
||||||
SAFE_RELEASE_PROG(ppsRegular[i].prog);
|
SAFE_RELEASE_PROG(ppsRegular[i].prog);
|
||||||
}
|
}
|
||||||
|
@ -825,7 +825,7 @@ void ZZDestroy()
|
||||||
|
|
||||||
if (ppsTexture != NULL)
|
if (ppsTexture != NULL)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ArraySize(ppsTexture); ++i)
|
for (u32 i = 0; i < ArraySize(ppsTexture); ++i)
|
||||||
{
|
{
|
||||||
SAFE_RELEASE_PROG(ppsTexture[i].prog);
|
SAFE_RELEASE_PROG(ppsTexture[i].prog);
|
||||||
}
|
}
|
||||||
|
|
|
@ -328,7 +328,7 @@ class CMemoryTargetMngr
|
||||||
|
|
||||||
CMemoryTarget* GetMemoryTarget(const tex0Info& tex0, int forcevalidate); // pcbp is pointer to start of clut
|
CMemoryTarget* GetMemoryTarget(const tex0Info& tex0, int forcevalidate); // pcbp is pointer to start of clut
|
||||||
CMemoryTarget* SearchExistTarget(int start, int end, int clutsize, const tex0Info& tex0, int forcevalidate);
|
CMemoryTarget* SearchExistTarget(int start, int end, int clutsize, const tex0Info& tex0, int forcevalidate);
|
||||||
CMemoryTarget* ClearedTargetsSearch(int fmt, int widthmult, int channels, int height);
|
CMemoryTarget* ClearedTargetsSearch(u32 fmt, int widthmult, int channels, int height);
|
||||||
int CompareTarget(list<CMemoryTarget>::iterator& it, const tex0Info& tex0, int clutsize);
|
int CompareTarget(list<CMemoryTarget>::iterator& it, const tex0Info& tex0, int clutsize);
|
||||||
|
|
||||||
void Destroy(); // destroy all targs
|
void Destroy(); // destroy all targs
|
||||||
|
|
Loading…
Reference in New Issue