diff -urNp PcsxSrc-1.5/Debug.h /home/versus/PcsxSrc-1.5/Debug.h --- PcsxSrc-1.5/Debug.h Mon May 5 03:26:24 2003 +++ /home/versus/PcsxSrc-1.5/Debug.h Mon May 5 17:43:42 2008 @@ -34,7 +34,7 @@ FILE *emuLog; FILE *gteLog; #endif -//#define LOG_STDOUT +#define LOG_STDOUT //#define PAD_LOG __Log //#define GTE_LOG __Log diff -urNp PcsxSrc-1.5/Linux/Makefile /home/versus/PcsxSrc-1.5/Linux/Makefile --- PcsxSrc-1.5/Linux/Makefile Sun May 4 04:11:32 2003 +++ /home/versus/PcsxSrc-1.5/Linux/Makefile Mon May 5 17:43:41 2008 @@ -1,4 +1,4 @@ -# + # PCSX Makefile for Linux # @@ -9,13 +9,14 @@ MIN = 5 VERSION = ${MAJ}.${MIN} # Set to TRUE to compile with the old gtk1 gui -DISABLE_GTK2 = FALSE +DISABLE_GTK2 = TRUE all: pcsx CPU = ix86 -OPTIMIZE = -O2 -fomit-frame-pointer -finline-functions -ffast-math +#OPTIMIZE = -O3 -fomit-frame-pointer -finline-functions -ffast-math +OPTIMIZE = -g # -D #'PSXHW_LOG=printf' FLAGS = -D__LINUX__ -DPCSX_VERSION=\"${VERSION}\" -DPACKAGE=\"pcsx\" FLAGS+= -DENABLE_NLS @@ -44,7 +45,7 @@ ifeq (${CPU}, ix86) ifneq (${PGCC}, ) CC = ${PGCC} endif - OPTIMIZE = -O4 -fomit-frame-pointer -finline-functions -ffast-math -fno-exceptions -march=pentiumpro + #OPTIMIZE = -O4 -fomit-frame-pointer -finline-functions -ffast-math -fno-exceptions -march=pentiumpro OBJS+= ../ix86/iR3000A.o ../ix86/ix86.o FLAGS+= -D__i386__ endif @@ -58,7 +59,7 @@ endif pcsx: ${OBJS} ${CC} ${CFLAGS} ${OBJS} -o pcsx ${LIBS} - ${STRIP} pcsx +# ${STRIP} pcsx .PHONY: clean pcsx pofile diff -urNp PcsxSrc-1.5/PsxHw.c /home/versus/PcsxSrc-1.5/PsxHw.c --- PcsxSrc-1.5/PsxHw.c Mon May 5 03:26:24 2003 +++ /home/versus/PcsxSrc-1.5/PsxHw.c Mon May 5 18:02:42 2008 @@ -208,11 +208,11 @@ u32 psxHwRead32(u32 add) { return psxHu32(0x1060); #endif #ifdef PSXHW_LOG - case 0x1f801070: PSXHW_LOG("IREG 32bit read %x\n", psxHu32(0x1070)); + case 0x1f801070: PSXHW_LOG("IREG 32bit read %lx\n", psxHu32(0x1070)); return psxHu32(0x1070); #endif #ifdef PSXHW_LOG - case 0x1f801074: PSXHW_LOG("IMASK 32bit read %x\n", psxHu32(0x1074)); + case 0x1f801074: PSXHW_LOG("IMASK 32bit read %lx\n", psxHu32(0x1074)); return psxHu32(0x1074); #endif diff -urNp PcsxSrc-1.5/ix86/ix86.c /home/versus/PcsxSrc-1.5/ix86/ix86.c --- PcsxSrc-1.5/ix86/ix86.c Wed Apr 2 03:57:12 2003 +++ /home/versus/PcsxSrc-1.5/ix86/ix86.c Mon May 5 17:43:37 2008 @@ -56,22 +56,23 @@ static s32 iCpuId(s32 cmd, u32 *regs) { "pushf\n" \ "pop %%eax\n" \ "xor %%edx, %%eax\n" \ - "mov %%eax, %0" \ - : "=r"(flag) : + :: "eax"(flag) ); if (!flag) return -1; __asm__( "mov %4, %%eax\n" "cpuid\n" + /* "mov %%eax, %0\n" "mov %%ebx, %1\n" "mov %%ecx, %2\n" "mov %%edx, %3" - : "=m" (regs[0]), "=m" (regs[1]), - "=m" (regs[2]), "=m" (regs[3]) - : "m"(cmd) - : "eax", "ebx", "ecx", "edx" + */ + :: "eax" (regs[0]), "ebx" (regs[1]), + "ecx" (regs[2]), "edx" (regs[3]), + "m"(cmd) + /*: "eax", "ebx", "ecx", "edx"*/ ); return 0; diff -urNp PcsxSrc-1.5/plugins.c /home/versus/PcsxSrc-1.5/plugins.c --- PcsxSrc-1.5/plugins.c Mon May 5 03:26:24 2003 +++ /home/versus/PcsxSrc-1.5/plugins.c Mon May 5 17:43:41 2008 @@ -38,13 +38,41 @@ if (checkerr == 2) { err = SysLibError(); if (err != NULL) errval = 1; } #else #define LoadSym(dest, src, name, checkerr) \ - dest = (src) SysLoadSym(drv, name); if (checkerr == 1) CheckErr(name); \ - if (checkerr == 2) { err = SysLibError(); if (err != NULL) errval = 1; } + dest = (src) SysLoadSym(drv, name); \ + if (dest == NULL) { \ + if (checkerr == 1) { \ + CheckErr(name); \ + } \ + else if (checkerr == 2) { err = SysLibError(); if (err != NULL) errval = 1; } \ + } #endif static const char *err; static int errval; +void * +LoadSymMan(void *drv, char *name, int checkerr) +{ + void *dest = SysLoadSym(drv, name); + + if (dest == NULL) { + if (checkerr == 1) { + err = SysLibError(); + if (err != NULL) { + SysMessage(_("Error loading %s: %s"), name, err); + return NULL; + } + } + else if (checkerr == 2) { + err = SysLibError(); + if (err) + errval = 1; + } + } + + return dest; +} + void *hGPUDriver; void ConfigurePlugins(); @@ -442,6 +470,9 @@ void CALLBACK SPU__registerCallback(void #define LoadSpuSym2(dest, name) \ LoadSym(SPU_##dest, SPU##dest, name, 2); +#define LoadSpuSymV(dest, name) \ + SPU_##dest = LoadSymMan(drv, name, 1); + #define LoadSpuSym0(dest, name) \ LoadSym(SPU_##dest, SPU##dest, name, 0); \ if (SPU_##dest == NULL) SPU_##dest = (SPU##dest) SPU__##dest; @@ -461,8 +492,10 @@ int LoadSPUplugin(char *SPUdll) { SPU_configure = NULL; SysMessage (_("Could not open SPU plugin %s"), SPUdll); return -1; } + /*int err;*/ drv = hSPUDriver; - LoadSpuSym1(init, "SPUinit"); + /*LoadSpuSym1(init, "SPUinit");*/ + LoadSpuSymV(init, "SPUinit"); LoadSpuSym1(shutdown, "SPUshutdown"); LoadSpuSym1(open, "SPUopen"); LoadSpuSym1(close, "SPUclose"); @@ -648,6 +681,9 @@ long CALLBACK PAD2__keypressed() { retur #define LoadPad2Sym1(dest, name) \ LoadSym(PAD2_##dest, PAD##dest, name, 1); +#define LoadPad2SymV(dest, name) \ + PAD2_##dest = LoadSymMan(drv, name, 1); + #define LoadPad2Sym0(dest, name) \ LoadSym(PAD2_##dest, PAD##dest, name, 0); \ if (PAD2_##dest == NULL) PAD2_##dest = (PAD##dest) PAD2__##dest; @@ -664,7 +700,7 @@ int LoadPAD2plugin(char *PAD2dll) { SysMessage (_("Could Not load PAD plugin %s"), PAD2dll); return -1; } drv = hPAD2Driver; - LoadPad2Sym1(init, "PADinit"); + LoadPad2SymV(init, "PADinit"); LoadPad2Sym1(shutdown, "PADshutdown"); LoadPad2Sym1(open, "PADopen"); LoadPad2Sym1(close, "PADclose"); @@ -737,14 +773,14 @@ int LoadPlugins() { sprintf(Plugin, "%s%s", Config.PluginsDir, Config.Cdr); if (LoadCDRplugin(Plugin) == -1) return -1; - sprintf(Plugin, "%s%s", Config.PluginsDir, Config.Gpu); - if (LoadGPUplugin(Plugin) == -1) return -1; sprintf(Plugin, "%s%s", Config.PluginsDir, Config.Spu); if (LoadSPUplugin(Plugin) == -1) return -1; sprintf(Plugin, "%s%s", Config.PluginsDir, Config.Pad1); if (LoadPAD1plugin(Plugin) == -1) return -1; sprintf(Plugin, "%s%s", Config.PluginsDir, Config.Pad2); if (LoadPAD2plugin(Plugin) == -1) return -1; + sprintf(Plugin, "%s%s", Config.PluginsDir, Config.Gpu); + if (LoadGPUplugin(Plugin) == -1) return -1; if (!strcmp("Disabled", Config.Net)) Config.UseNet = 0; else {