Fix compilation on linux.
This commit is contained in:
parent
496df34ee4
commit
d880179b2a
|
@ -6,3 +6,4 @@
|
|||
macosx/build
|
||||
xcuserdata
|
||||
macosx/Info.plistvers.plist
|
||||
*.kdev4
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
12
autogen.sh
12
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 "$@"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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() {
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
38
gui/Config.c
38
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", Config.Cpu);
|
||||
SetValuel("PsxType", Config.PsxType);
|
||||
SetValuel("RewindCount", Config.RewindCount);
|
||||
SetValuel("RewindInterval", Config.RewindInterval);
|
||||
SetValuel("Cpu", (long)Config.Cpu);
|
||||
SetValuel("PsxType", (long)Config.PsxType);
|
||||
//SetValue("PsxClock", Config.PsxClock);
|
||||
|
||||
SetValuel("AltSpeed1", Config.AltSpeed1);
|
||||
SetValuel("AltSpeed2", Config.AltSpeed2);
|
||||
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("HackFix", Config.HackFix);
|
||||
SetValuel("RewindCount", (long)Config.RewindCount);
|
||||
SetValuel("RewindInterval", (long)Config.RewindInterval);
|
||||
|
||||
SetValuel("AltSpeed1", (long)Config.AltSpeed1);
|
||||
SetValuel("AltSpeed2", (long)Config.AltSpeed2);
|
||||
|
||||
SetValuel("HackFix", (long)Config.HackFix);
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "draw.h"
|
||||
#include "soft.h"
|
||||
#include "texture.h"
|
||||
#include "PGXP_gpu.h"
|
||||
#include "pgxp_gpu.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// defines
|
||||
|
|
Loading…
Reference in New Issue