mirror of https://github.com/PCSX2/pcsx2.git
Fix a bunch of compilation errors in Linux. (It still doesn't compile, but I wanted to commit these before more changes are made...)
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@461 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
a946fad125
commit
26dfd9846c
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
# Convenience script for obtaining plugins,
|
||||
# Use at your own risk. Assumes that it is being run in the plugins directory.
|
||||
|
||||
#Running this script should do the following:
|
||||
#1) Check to see if the 6 needed plugin folders exist in the current directory.
|
||||
#2) If they aren't. create a temp directory, download the plugins to it from
|
||||
# the official pcsx2 svn, move them into the plugin directory, and then delete
|
||||
# the temp directory.
|
||||
|
||||
#3) Check for copies of certain plugins in the current directory, and copy them to
|
||||
# the right place if they exist, assuming that they are modified copies of those plugins.
|
||||
|
||||
cd plugins
|
||||
sh fetch.sh
|
||||
cd ..
|
|
@ -74,9 +74,9 @@
|
|||
#include <stdlib.h> // posix_memalign()
|
||||
|
||||
// Definitions added Feb 16, 2006 by efp
|
||||
//#ifndef __declspec
|
||||
//#define __declspec(x)
|
||||
//#endif
|
||||
#ifndef __declspec
|
||||
#define __declspec(x)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "Common.h"
|
||||
|
||||
#include "zlib.h"
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "PS2ETypes.h"
|
||||
#include "PS2Etypes.h"
|
||||
|
||||
#include "iR5900AritImm.h"
|
||||
#include "iR5900Arit.h"
|
||||
|
|
|
@ -17,7 +17,7 @@ COP0.c Hw.h Plugins.h PsxInterpreter.c SPR.h VUops.h
|
|||
COP0.h Interpreter.c PS2Edefs.h PsxMem.c System.h \
|
||||
Counters.c InterTables.c PS2Etypes.h PsxMem.h Vif.c \
|
||||
Counters.h InterTables.h PsxBios2.h PsxSio2.c VifDma.c \
|
||||
Decode_XA.c Mdec.c PsxBios.c PsxSio2.h VifDma.h Cache.c \
|
||||
Decode_XA.c Mdec.c PsxBios.c PsxSio2.h VifDma.h Cache.c vtlb.cpp\
|
||||
xmlpatchloader.cpp
|
||||
|
||||
if RECBUILD
|
||||
|
|
|
@ -53,6 +53,9 @@ BIOS
|
|||
#include <malloc.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef PCSX2_VIRTUAL_MEM
|
||||
#include <vector>
|
||||
#endif
|
||||
#include "Common.h"
|
||||
|
||||
#ifdef PCSX2_NORECBUILD
|
||||
|
@ -74,6 +77,9 @@ BIOS
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef __LINUX__
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
extern u32 maxrecmem;
|
||||
extern int rdram_devices, rdram_sdevid;
|
||||
|
||||
|
@ -87,11 +93,8 @@ int MemMode = 0; // 0 is Kernel Mode, 1 is Supervisor Mode, 2 is User Mode
|
|||
u16 ba0R16(u32 mem) {
|
||||
//MEM_LOG("ba00000 Memory read16 address %x\n", mem);
|
||||
|
||||
#ifdef PCSX2_VIRTUAL_MEM
|
||||
|
||||
if (mem == 0x1a000006) {
|
||||
#else
|
||||
if (mem == 0x1a000006) {
|
||||
#endif
|
||||
static int ba6;
|
||||
ba6++;
|
||||
if (ba6 == 3) ba6 = 0;
|
||||
|
@ -2121,9 +2124,8 @@ void memWrite128(u32 mem, const u64 *value) {
|
|||
cpuTlbMissW(mem, cpuRegs.branch);
|
||||
}
|
||||
|
||||
#else
|
||||
#else //VIRTUAL_MEM
|
||||
u32 psMPWC[(0x02000000/32)>>12];
|
||||
#include <vector>
|
||||
std::vector<u32> psMPWVA[0x02000000>>12];
|
||||
|
||||
u8 *psM; //32mb Main Ram
|
||||
|
@ -2720,10 +2722,10 @@ int memReset() {
|
|||
VirtualProtect(PS2MEM_ROM2, 0x00080000, PAGE_READWRITE, &OldProtect);
|
||||
VirtualProtect(PS2MEM_EROM, 0x001C0000, PAGE_READWRITE, &OldProtect);
|
||||
#else
|
||||
mprotect(PS2EMEM_ROM, 0x00400000, PROT_READ|PROT_WRITE);
|
||||
mprotect(PS2EMEM_ROM1, 0x00400000, PROT_READ|PROT_WRITE);
|
||||
mprotect(PS2EMEM_ROM2, 0x00800000, PROT_READ|PROT_WRITE);
|
||||
mprotect(PS2EMEM_EROM, 0x001C0000, PROT_READ|PROT_WRITE);
|
||||
mprotect(PS2EMEM_ROM, 0x00400000, PROT_READ|PROT_WRITE);
|
||||
mprotect(PS2EMEM_ROM1, 0x00400000, PROT_READ|PROT_WRITE);
|
||||
mprotect(PS2EMEM_ROM2, 0x00800000, PROT_READ|PROT_WRITE);
|
||||
mprotect(PS2EMEM_EROM, 0x001C0000, PROT_READ|PROT_WRITE);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -2755,10 +2757,10 @@ int memReset() {
|
|||
VirtualProtect(PS2MEM_ROM2, 0x00080000, PAGE_READONLY, &OldProtect);
|
||||
VirtualProtect(PS2MEM_EROM, 0x001C0000, PAGE_READONLY, &OldProtect);
|
||||
#else
|
||||
mprotect(PS2EMEM_ROM, 0x00400000, PROT_READ);
|
||||
mprotect(PS2EMEM_ROM1, 0x00400000, PROT_READ);
|
||||
mprotect(PS2EMEM_ROM2, 0x00800000, PROT_READ);
|
||||
mprotect(PS2EMEM_EROM, 0x001C0000, PROT_READ);
|
||||
mprotect(PS2EMEM_ROM, 0x00400000, PROT_READ);
|
||||
mprotect(PS2EMEM_ROM1, 0x00400000, PROT_READ);
|
||||
mprotect(PS2EMEM_ROM2, 0x00800000, PROT_READ);
|
||||
mprotect(PS2EMEM_EROM, 0x001C0000, PROT_READ);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -2778,7 +2780,6 @@ void memSetUserMode() {
|
|||
}
|
||||
|
||||
#ifndef PCSX2_VIRTUAL_MEM
|
||||
|
||||
int mmap_GetRamPageInfo(void* ptr)
|
||||
{
|
||||
u32 offset=((u8*)ptr-psM);
|
||||
|
@ -2789,8 +2790,12 @@ int mmap_GetRamPageInfo(void* ptr)
|
|||
}
|
||||
void mmap_MarkCountedRamPage(void* ptr,u32 vaddr)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
DWORD old;
|
||||
VirtualProtect(ptr,1,PAGE_READONLY,&old);
|
||||
#else
|
||||
mprotect(ptr, 1, PROT_READ);
|
||||
#endif
|
||||
|
||||
u32 offset=((u8*)ptr-psM);
|
||||
offset>>=12;
|
||||
|
@ -2810,9 +2815,15 @@ void mmap_ResetBlockTracking()
|
|||
{
|
||||
psMPWVA[i].clear();
|
||||
}
|
||||
#ifdef _WIN32
|
||||
DWORD old;
|
||||
VirtualProtect(psM,0x02000000,PAGE_READWRITE,&old);
|
||||
#else
|
||||
mprotect(psM,0x02000000, PROT_READ|PROT_WRITE);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
int SysPageFaultExceptionFilter(EXCEPTION_POINTERS* eps)
|
||||
{
|
||||
struct _EXCEPTION_RECORD* ExceptionRecord = eps->ExceptionRecord;
|
||||
|
@ -2843,4 +2854,5 @@ int SysPageFaultExceptionFilter(EXCEPTION_POINTERS* eps)
|
|||
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
}
|
||||
#endif
|
||||
#endif
|
|
@ -195,7 +195,9 @@ void recMemWrite32();
|
|||
void recMemWrite64();
|
||||
void recMemWrite128();
|
||||
|
||||
#ifdef _WIN32
|
||||
int SysPageFaultExceptionFilter(EXCEPTION_POINTERS* eps);
|
||||
#endif
|
||||
|
||||
#ifndef PCSX2_VIRTUAL_MEM
|
||||
#include "vtlb.h"
|
||||
|
|
|
@ -271,6 +271,8 @@ void * memcpy_amd_(void *dest, const void *src, size_t n);
|
|||
#else
|
||||
// for now disable linux fast memcpy
|
||||
#define memcpy_fast memcpy
|
||||
#define memcpy_raz_ memcpy
|
||||
#define memcpy_raz_u memcpy
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,10 @@ typedef union _LARGE_INTEGER
|
|||
#endif
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
#define PCSX2_ALIGNED(alig,x) __declspec(align(alig)) x
|
||||
#define PCSX2_ALIGNED16(x) __declspec(align(16)) x
|
||||
#else
|
||||
#define PCSX2_ALIGNED(alig,x) x __attribute((aligned(alig)))
|
||||
#define PCSX2_ALIGNED16(x) x __attribute((aligned(16)))
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _SAMPLPROF_H_
|
||||
#define _SAMPLPROF_H_
|
||||
|
||||
#include "common.h"
|
||||
#include "Common.h"
|
||||
|
||||
// The profiler does not have a Linux version yet.
|
||||
// So for now we turn it into duds for non-Win32 platforms.
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
#
|
||||
|
||||
#Normal
|
||||
#export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --prefix `pwd`"
|
||||
|
||||
echo ---------------
|
||||
echo Building Pcsx2
|
||||
echo ---------------
|
||||
|
|
|
@ -37,8 +37,8 @@ fi
|
|||
|
||||
WARNING_FLAGS="-Wall -Wno-format -Wno-unused-value"
|
||||
#Pcsx2 now crashes if --fomit-frame-pointer is enabled and MTGS is off
|
||||
NORMAL_FLAGS=" -pipe -O3 -fno-omit-frame-pointer"
|
||||
DEBUG_FLAGS+="${WARNING_FLAGS} "
|
||||
NORMAL_FLAGS=" -pipe -O3 -fno-omit-frame-pointer -msse "
|
||||
DEBUG_FLAGS+=" -msse ${WARNING_FLAGS} "
|
||||
|
||||
dnl Check for debug build
|
||||
AC_MSG_CHECKING(debug build)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "Common.h"
|
||||
#include "vtlb.h"
|
||||
#include <..\..\x86\ix86\ix86.h>
|
||||
#include "x86/ix86/ix86.h"
|
||||
|
||||
#define verify(x) {if (!(x)) { (*(u8*)0)=3; }}
|
||||
|
||||
|
|
|
@ -53,6 +53,11 @@ extern void iDumpVU1Registers();
|
|||
extern char* disVU1MicroUF(u32 code, u32 pc);
|
||||
extern char* disVU1MicroLF(u32 code, u32 pc);
|
||||
|
||||
#ifdef __LINUX__
|
||||
#undef max
|
||||
#undef min
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
|
|
@ -2812,10 +2812,18 @@ void badespfn() {
|
|||
|
||||
void __fastcall dyna_block_discard(u32 start,u32 sz)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
__asm push ebp;
|
||||
#else
|
||||
__asm__("push %ebp\n");
|
||||
#endif
|
||||
SysPrintf("dyna_block_discard %08X , count %d\n",start,sz);
|
||||
Cpu->Clear(start,sz);
|
||||
#ifdef _MSC_VER
|
||||
__asm pop ebp;
|
||||
#else
|
||||
__asm__("pop %ebp\n");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
void recRecompile( u32 startpc )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
# Convenience script for obtaining plugins,
|
||||
# Use at your own risk. Assumes that it is being run in the plugin directory.
|
||||
# Use at your own risk. Assumes that it is being run in the plugins directory.
|
||||
|
||||
#Running this script should do the following:
|
||||
#1) Check to see if the 6 needed plugin folders exist in the current directory.
|
||||
|
|
Loading…
Reference in New Issue