summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStelios Tsampas <loathingkernel@gmail.com>2017-07-10 16:14:43 +0300
committerStelios Tsampas <loathingkernel@gmail.com>2017-07-16 21:20:53 +0300
commitd880179b2a3aacae96bb4771a3c9e227ca6d5818 (patch)
tree96730dce1e5afeef992abc6ae6884577c8ebf53c
parent496df34ee4e3861c6e9b0ee8256d575622447563 (diff)
downloadpcsxr-d880179b2a3aacae96bb4771a3c9e227ca6d5818.tar.gz
Fix compilation on linux.
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am4
-rwxr-xr-xautogen.sh12
-rw-r--r--configure.ac1
-rwxr-xr-xgui/ConfDlg.c3
-rwxr-xr-xgui/ConfDlg.h1
-rwxr-xr-xgui/Config.c38
-rwxr-xr-xgui/GtkGui.c5
-rwxr-xr-xgui/MemcardDlg.c10
-rw-r--r--libpcsxcore/Makefile.am20
-rwxr-xr-xlibpcsxcore/cdriso.c6
-rw-r--r--libpcsxcore/pgxp_gte.h3
-rwxr-xr-xplugins/peopsxgl/Makefile.am16
-rwxr-xr-xplugins/peopsxgl/gpu.c2
-rwxr-xr-xplugins/peopsxgl/prim.c2
15 files changed, 90 insertions, 34 deletions
diff --git a/.gitignore b/.gitignore
index acc22675..bde255d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
macosx/build
xcuserdata
macosx/Info.plistvers.plist
+*.kdev4
diff --git a/Makefile.am b/Makefile.am
index 1873a6bc..29a4af60 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
+ACLOCAL_AMFLAGS = -I m4
+
SUBDIRS = data
SUBDIRS += doc
SUBDIRS += pixmaps
@@ -6,7 +8,7 @@ SUBDIRS += libpcsxcore
SUBDIRS += gui
SUBDIRS += plugins/dfinput
SUBDIRS += plugins/dfsound
-SUBDIRS += plugins/dfxvideo
+SUBDIRS += plugins/dfxvideo
SUBDIRS += plugins/dfcdrom
SUBDIRS += plugins/dfnet
diff --git a/autogen.sh b/autogen.sh
index dd659717..ea9f1a52 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,13 +3,13 @@
# Additional options go to configure.
echo "Rebuilding ./configure with autoreconf..."
-if [ ! -d "include" ]; then
- mkdir "include"
-fi
-autoreconf -f -i
+for dir in include m4; do
+ if [ ! -d "$dir" ]; then
+ mkdir "$dir"
+ fi
+done
+autoreconf -f -i .
if [ $? -ne 0 ]; then
echo "autoreconf failed"
exit $?
fi
-
-./configure --enable-maintainer-mode "$@"
diff --git a/configure.ac b/configure.ac
index 13087c1c..1aff4c41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
AC_INIT([pcsxr], [1.9.95])
+AC_CONFIG_MACRO_DIRS([m4])
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
AM_INIT_AUTOMAKE(foreign)
diff --git a/gui/ConfDlg.c b/gui/ConfDlg.c
index d71326c7..25c107eb 100755
--- a/gui/ConfDlg.c
+++ b/gui/ConfDlg.c
@@ -1032,3 +1032,6 @@ void OnConf_Cpu() {
g_signal_connect_data(G_OBJECT(CpuDlg), "response",
G_CALLBACK(OnCpu_Clicked), builder, (GClosureNotify)g_object_unref, G_CONNECT_AFTER);
}
+
+void OnConf_Pgxp() {
+}
diff --git a/gui/ConfDlg.h b/gui/ConfDlg.h
index ef1c0203..b8b9d4e6 100755
--- a/gui/ConfDlg.h
+++ b/gui/ConfDlg.h
@@ -28,6 +28,7 @@ void OnConf_Sound();
void OnConf_CdRom();
void OnConf_Pad();
void OnConf_Cpu();
+void OnConf_Pgxp();
void OnConf_Net();
void OnConf_Sio1();
diff --git a/gui/Config.c b/gui/Config.c
index 25e2e54b..4988757d 100755
--- a/gui/Config.c
+++ b/gui/Config.c
@@ -142,10 +142,20 @@ int LoadConfig(PcsxConfig *Conf) {
Config.VSyncWA = GetValueb(data, "VSyncWA");
Config.NoMemcard = GetValueb(data, "NoMemcard");
Config.Widescreen = GetValueb(data, "Widescreen");
+ Config.PerGameMcd = GetValueb(data, "PerGameMcd");
+ Config.MemHack = GetValuel(data, "MemHack");
+ Config.OverClock = GetValueb(data, "OverClock");
Config.Cpu = GetValuel(data, "Cpu");
Config.PsxType = GetValuel(data, "PsxType");
- Config.RewindCount = GetValuel(data, "RewindCount");
+ //GetValue(data, "PsxClock", &(Config.PsxClock));
+
+ Config.PGXP_GTE = GetValueb(data, "PGXP_GTE");
+ Config.PGXP_Cache = GetValueb(data, "PGXP_Cache");
+ Config.PGXP_Texture = GetValueb(data, "PGXP_Texture");
+ Config.PGXP_Mode = GetValuel(data, "PGXP_Mode");
+
+ Config.RewindCount = GetValuel(data, "RewindCount");
Config.RewindInterval = GetValuel(data, "RewindInterval");
Config.AltSpeed1 = GetValuel(data, "AltSpeed1");
@@ -191,7 +201,7 @@ void SaveConfig() {
SetValueb("SioIrq", Config.SioIrq);
SetValueb("Mdec", Config.Mdec);
SetValueb("PsxAuto", Config.PsxAuto);
- SetValuel("Cdda", Config.Cdda);
+ SetValuel("Cdda", (long)Config.Cdda);
SetValueb("SlowBoot",Config.SlowBoot);
SetValueb("Dbg", Config.Debug);
SetValueb("PsxOut", Config.PsxOut);
@@ -200,16 +210,26 @@ void SaveConfig() {
SetValueb("VSyncWA", Config.VSyncWA);
SetValueb("NoMemcard", Config.NoMemcard);
SetValueb("Widescreen", Config.Widescreen);
+ SetValueb("PerGameMcd", Config.PerGameMcd);
+ SetValuel("MemHack", (long)Config.MemHack);
+ SetValueb("OverClock", Config.OverClock);
+
+ SetValuel("Cpu", (long)Config.Cpu);
+ SetValuel("PsxType", (long)Config.PsxType);
+ //SetValue("PsxClock", Config.PsxClock);
+
+ SetValueb("PGXP_GTE", Config.PGXP_GTE);
+ SetValueb("PGXP_Cache", Config.PGXP_Cache);
+ SetValueb("PGXP_Texture", Config.PGXP_Texture);
+ SetValuel("PGXP_Mode", (long)Config.PGXP_Mode);
- SetValuel("Cpu", Config.Cpu);
- SetValuel("PsxType", Config.PsxType);
- SetValuel("RewindCount", Config.RewindCount);
- SetValuel("RewindInterval", Config.RewindInterval);
+ SetValuel("RewindCount", (long)Config.RewindCount);
+ SetValuel("RewindInterval", (long)Config.RewindInterval);
- SetValuel("AltSpeed1", Config.AltSpeed1);
- SetValuel("AltSpeed2", Config.AltSpeed2);
+ SetValuel("AltSpeed1", (long)Config.AltSpeed1);
+ SetValuel("AltSpeed2", (long)Config.AltSpeed2);
- SetValuel("HackFix", Config.HackFix);
+ SetValuel("HackFix", (long)Config.HackFix);
fclose(f);
}
diff --git a/gui/GtkGui.c b/gui/GtkGui.c
index 3185e51a..17f1422f 100755
--- a/gui/GtkGui.c
+++ b/gui/GtkGui.c
@@ -462,8 +462,9 @@ void StartGui() {
G_CALLBACK(OnConf_Sio1), NULL, NULL, G_CONNECT_AFTER);
#endif
widget = GTK_WIDGET(gtk_builder_get_object(builder, "cpu1"));
- g_signal_connect_data(G_OBJECT(widget), "activate",
- G_CALLBACK(OnConf_Cpu), NULL, NULL, G_CONNECT_AFTER);
+ g_signal_connect_data(G_OBJECT(widget), "activate", G_CALLBACK(OnConf_Cpu), NULL, NULL, G_CONNECT_AFTER);
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "pgxp1"));
+ g_signal_connect_data(G_OBJECT(widget), "activate", G_CALLBACK(OnConf_Pgxp), NULL, NULL, G_CONNECT_AFTER);
widget = GTK_WIDGET(gtk_builder_get_object(builder, "memory_cards1"));
g_signal_connect_data(G_OBJECT(widget), "activate",
G_CALLBACK(OnConf_Mcds), NULL, NULL, G_CONNECT_AFTER);
diff --git a/gui/MemcardDlg.c b/gui/MemcardDlg.c
index b777126e..b9f2dab0 100755
--- a/gui/MemcardDlg.c
+++ b/gui/MemcardDlg.c
@@ -441,7 +441,7 @@ static int GetFreeMemcardSlot(gint target_card, gint count, u8* blocks) {
return -1;
}
-void CopyMemcardData(char *from, char *to, gint srci, gint dsti,
+void CopyMemcardData(gint dstmcd, char *from, char *to, gint srci, gint dsti,
gchar *str, const u16 linkindex) {
u16* linkptr;
u8* checksumptr;
@@ -463,11 +463,11 @@ void CopyMemcardData(char *from, char *to, gint srci, gint dsti,
//printf("link = %i %i\n", dsti, linkindex);
}
- SaveMcd((char *)str, to, dsti * 128, 128);
+ SaveMcd(dstmcd, (char *)str, to, dsti * 128, 128);
// data
memcpy(to + dsti * 1024 * 8, from + srci * 1024 * 8, 1024 * 8);
- SaveMcd((char *)str, to, dsti * 1024 * 8, 1024 * 8);
+ SaveMcd(dstmcd, (char *)str, to, dsti * 1024 * 8, 1024 * 8);
//printf("data = %s\n", from + (srci+1) * 128);
}
@@ -548,7 +548,7 @@ static void OnMcd_CopyTo(GtkWidget *widget, gpointer user_data) {
for (j=0; srctbl[j] > 0; j++) {
// last parameter specifies link index (next block)
- CopyMemcardData(source, destination,
+ CopyMemcardData(dstmcd, source, destination,
srctbl[j], dsttbl[j], str, dsttbl[j+1]-1);
//printf("count = %i, indices=(%x,%x) jindex=%i\n", count, srctbl[j], dsttbl[j], j);
}
@@ -620,7 +620,7 @@ static void OnMemcardDelete(GtkWidget *widget, gpointer user_data) {
}
*ptr = xorsum;
- SaveMcd((char *)filename, data, i * 128, 128);
+ SaveMcd(memcard, (char *)filename, data, i * 128, 128);
// Check links
i = GETLINKFORBLOCK(data, i); //0...15 index when ++i at top of loop
diff --git a/libpcsxcore/Makefile.am b/libpcsxcore/Makefile.am
index b67700e4..f46d2df8 100644
--- a/libpcsxcore/Makefile.am
+++ b/libpcsxcore/Makefile.am
@@ -54,7 +54,17 @@ libpcsxcore_a_SOURCES = \
socket.c \
socket.h \
ppf.c \
- ppf.h
+ ppf.h \
+ pgxp_cpu.c \
+ pgxp_cpu.h \
+ pgxp_debug.c \
+ pgxp_debug.h \
+ pgxp_gte.c \
+ pgxp_gte.h \
+ pgxp_mem.c \
+ pgxp_mem.h \
+ pgxp_value.c \
+ pgxp_value.h
if ARCH_X86_64
libpcsxcore_a_SOURCES += \
@@ -66,14 +76,16 @@ libpcsxcore_a_SOURCES += \
ix86_64/ix86_fpu.c \
ix86_64/ix86_3dnow.c \
ix86_64/ix86_mmx.c \
- ix86_64/ix86_sse.c
-else
+ ix86_64/ix86_sse.c \
+ ix86_64/iPGXP.h
+else
if ARCH_X86
libpcsxcore_a_SOURCES += \
ix86/iGte.h \
ix86/iR3000A.c \
ix86/ix86.c \
- ix86/ix86.h
+ ix86/ix86.h \
+ ix86/iPGXP.h
endif
endif
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c
index af4205cf..268f1030 100755
--- a/libpcsxcore/cdriso.c
+++ b/libpcsxcore/cdriso.c
@@ -88,6 +88,8 @@ static struct {
} *compr_img;
int (*cdimg_read_func)(FILE *f, unsigned int base, void *dest, int sector);
+static int cdread_normal(FILE *f, unsigned int base, void *dest, int sector);
+static int cdread_ecm_decode(FILE *f, unsigned int base, void *dest, int sector);
char* CALLBACK CDR__getDriveLetter(void);
long CALLBACK CDR__configure(void);
@@ -1301,7 +1303,7 @@ static int cdread_sub_mixed(FILE *f, unsigned int base, void *dest, int sector)
return ret;
}
-static int uncompress2(void *out, unsigned long *out_size, void *in, unsigned long in_size)
+static int uncompress2_internal(void *out, unsigned long *out_size, void *in, unsigned long in_size)
{
static z_stream z;
int ret = 0;
@@ -1380,7 +1382,7 @@ static int cdread_compressed(FILE *f, unsigned int base, void *dest, int sector)
if (is_compressed) {
cdbuffer_size_expect = sizeof(compr_img->buff_raw[0]) << compr_img->block_shift;
cdbuffer_size = cdbuffer_size_expect;
- ret = uncompress2(compr_img->buff_raw[0], &cdbuffer_size, compr_img->buff_compressed, size);
+ ret = uncompress2_internal(compr_img->buff_raw[0], &cdbuffer_size, compr_img->buff_compressed, size);
if (ret != 0) {
SysPrintf("uncompress failed with %d for block %d, sector %d\n",
ret, block, sector);
diff --git a/libpcsxcore/pgxp_gte.h b/libpcsxcore/pgxp_gte.h
index cc38ade1..de607c99 100644
--- a/libpcsxcore/pgxp_gte.h
+++ b/libpcsxcore/pgxp_gte.h
@@ -60,5 +60,8 @@ void PGXP_GTE_SWC2(u32 instr, u32 rtVal, u32 addr); // copy GTE reg to memory
#ifndef max
# define max(a, b) ((a) > (b) ? (a) : (b))
#endif
+#ifndef min
+# define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
#endif /* _PGXP_GTE_H_ */
diff --git a/plugins/peopsxgl/Makefile.am b/plugins/peopsxgl/Makefile.am
index 3c8f7250..9bcd6bea 100755
--- a/plugins/peopsxgl/Makefile.am
+++ b/plugins/peopsxgl/Makefile.am
@@ -9,9 +9,19 @@ libdir = @libdir@/games/psemu/
lib_LTLIBRARIES = libpeopsxgl.la
-libpeopsxgl_la_SOURCES = cfg.c cfg.h draw.c draw.h fps.c fps.h gl_ext.h \
- gpu.c gpu.h key.c key.h menu.c menu.h prim.c prim.h soft.c soft.h \
- texture.c texture.h gte_accuracy.c gte_accuracy.h
+libpeopsxgl_la_SOURCES = \
+ cfg.c cfg.h \
+ draw.c draw.h \
+ fps.c fps.h \
+ gl_ext.h \
+ gpu.c gpu.h \
+ key.c key.h \
+ menu.c menu.h \
+ prim.c prim.h \
+ soft.c soft.h \
+ texture.c texture.h \
+ gte_accuracy.c gte_accuracy.h \
+ pgxp_gpu.c pgxp_gpu.h
libpeopsxgl_la_LDFLAGS = -module -avoid-version
libpeopsxgl_la_LIBADD = -lX11 -lXxf86vm -lGL -lm
diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c
index 99ef36ba..c19dd2b6 100755
--- a/plugins/peopsxgl/gpu.c
+++ b/plugins/peopsxgl/gpu.c
@@ -48,7 +48,7 @@ static int iOldMode=0;
#include "fps.h"
#include "key.h"
#include "gte_accuracy.h"
-#include "PGXP_gpu.h"
+#include "pgxp_gpu.h"
#ifdef _WINDOWS
#include "resource.h"
#include "ssave.h"
diff --git a/plugins/peopsxgl/prim.c b/plugins/peopsxgl/prim.c
index b2aad92b..1af588f0 100755
--- a/plugins/peopsxgl/prim.c
+++ b/plugins/peopsxgl/prim.c
@@ -25,7 +25,7 @@
#include "draw.h"
#include "soft.h"
#include "texture.h"
-#include "PGXP_gpu.h"
+#include "pgxp_gpu.h"
////////////////////////////////////////////////////////////////////////
// defines