mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Merge pull request #10820 from fjtrujy/newlibWithCDVD
Adding CDFS Support
This commit is contained in:
commit
c9211aff57
2
.gitignore
vendored
2
.gitignore
vendored
@ -174,7 +174,7 @@ retroarch_switch.nso
|
||||
|
||||
# PS2
|
||||
ps2/irx/*.c
|
||||
ps2/libcdvd/lib/
|
||||
*.irx
|
||||
|
||||
# Wayland
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.c
|
||||
|
28
Makefile.ps2
28
Makefile.ps2
@ -1,17 +1,14 @@
|
||||
BUILD_FOR_PCSX2 = 0
|
||||
DEBUG = 0
|
||||
HAVE_KERNEL_PRX = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_THREADS = 0
|
||||
BIG_STACK = 0
|
||||
MUTE_WARNINGS = 1
|
||||
PS2_IP = 192.168.1.150
|
||||
|
||||
TARGET = retroarchps2.elf
|
||||
TARGET_RELEASE = retroarchps2-release.elf
|
||||
|
||||
|
||||
# Compile the IRXs first
|
||||
IRX_DIR = ps2/irx
|
||||
IRX_FILES = $(wildcard ps2/irx/*.c)
|
||||
@ -20,7 +17,7 @@ ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
RARCH_DEFINES += -DDEBUG
|
||||
else
|
||||
OPTIMIZE_LV := -O2
|
||||
OPTIMIZE_LV := -O3
|
||||
LDFLAGS := -s
|
||||
endif
|
||||
|
||||
@ -29,19 +26,17 @@ ifeq ($(MUTE_WARNINGS), 1)
|
||||
endif
|
||||
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
|
||||
INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
||||
INCDIR += -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
||||
INCDIR += -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
|
||||
GPVAL = -G0
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG
|
||||
RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
RARCH_DEFINES += -DPS2 -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI
|
||||
RARCH_DEFINES += -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L.
|
||||
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lpadx -lmtap -lmc -lhdd -lsdl -lfileXio -lz
|
||||
LIBS += -lpatches -lpoweroff
|
||||
LDFLAGS += -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ports/lib -L.
|
||||
# Lib cdvd is needed to get proper time
|
||||
LIBS += -lretro_ps2 -lpatches -lpoweroff -lgskit -ldmakit -laudsrv -lpadx -lmtap -lz -lcdvd
|
||||
|
||||
ifeq ($(BUILD_FOR_PCSX2), 1)
|
||||
RARCH_DEFINES += -DBUILD_FOR_PCSX2
|
||||
@ -55,20 +50,13 @@ ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_STACK), 1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
# All the IRX objects
|
||||
EE_OBJS += $(IRX_DIR)/freemtap_irx.o $(IRX_DIR)/freepad_irx.o $(IRX_DIR)/freesio2_irx.o $(IRX_DIR)/iomanX_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/fileXio_irx.o $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o $(IRX_DIR)/usbd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/usbhdfsd_irx.o $(IRX_DIR)/freesd_irx.o $(IRX_DIR)/audsrv_irx.o $(IRX_DIR)/poweroff_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/cdfs_irx.o
|
||||
|
||||
# Missing objecst on the PS2SDK
|
||||
EE_OBJS += ps2/compat_files/ps2_devices.o
|
||||
|
@ -22,15 +22,14 @@
|
||||
#include <sifrpc.h>
|
||||
#include <iopcontrol.h>
|
||||
#include <libpwroff.h>
|
||||
#include <libmc.h>
|
||||
#include <libmtap.h>
|
||||
#include <audsrv.h>
|
||||
#include <libpad.h>
|
||||
#include <ps2_devices.h>
|
||||
#include <ps2_irx_variables.h>
|
||||
|
||||
char eboot_path[512];
|
||||
char user_path[512];
|
||||
static char eboot_path[512];
|
||||
static char user_path[512];
|
||||
|
||||
static enum frontend_fork ps2_fork_mode = FRONTEND_FORK_NONE;
|
||||
|
||||
@ -39,9 +38,13 @@ static void create_path_names(void)
|
||||
char cwd[FILENAME_MAX];
|
||||
int bootDeviceID;
|
||||
|
||||
#if defined(BUILD_FOR_PCSX2)
|
||||
strlcpy(cwd, rootDevicePath(BOOT_DEVICE_MC0), sizeof(cwd));
|
||||
#else
|
||||
getcwd(cwd, sizeof(cwd));
|
||||
bootDeviceID=getBootDeviceID(cwd);
|
||||
strlcpy(cwd, rootDevicePath(bootDeviceID), sizeof(cwd));
|
||||
#endif
|
||||
strcat(cwd, "RETROARCH");
|
||||
|
||||
strlcpy(eboot_path, cwd, sizeof(eboot_path));
|
||||
@ -88,17 +91,6 @@ static void create_path_names(void)
|
||||
|
||||
static void poweroffCallback(void *arg)
|
||||
{
|
||||
#if 0
|
||||
/* Close all files and unmount all partitions. */
|
||||
close(fd);
|
||||
|
||||
/* If you use PFS, close all files and unmount all partitions. */
|
||||
fileXioDevctl("pfs:", PDIOC_CLOSEALL, NULL, 0, NULL, 0)
|
||||
|
||||
/* Shut down DEV9, if you used it. */
|
||||
while(fileXioDevctl("dev9x:", DDIOC_OFF, NULL, 0, NULL, 0) < 0){};
|
||||
#endif
|
||||
|
||||
printf("Shutdown!");
|
||||
poweroffShutdown();
|
||||
}
|
||||
@ -181,9 +173,8 @@ static void frontend_ps2_init(void *data)
|
||||
SifExecModuleBuffer(&freesd_irx, size_freesd_irx, 0, NULL, NULL);
|
||||
SifExecModuleBuffer(&audsrv_irx, size_audsrv_irx, 0, NULL, NULL);
|
||||
|
||||
if (mcInit(MC_TYPE_XMC)) {
|
||||
RARCH_ERR("mcInit library not initalizated\n");
|
||||
}
|
||||
/* CDVD */
|
||||
SifExecModuleBuffer(&cdfs_irx, size_cdfs_irx, 0, NULL, NULL);
|
||||
|
||||
/* Initializes audsrv library */
|
||||
if (audsrv_init()) {
|
||||
|
@ -57,6 +57,9 @@ extern unsigned int size_usbd_irx;
|
||||
extern unsigned char usbhdfsd_irx;
|
||||
extern unsigned int size_usbhdfsd_irx;
|
||||
|
||||
extern unsigned char cdfs_irx;
|
||||
extern unsigned int size_cdfs_irx;
|
||||
|
||||
extern unsigned char audsrv_irx;
|
||||
extern unsigned int size_audsrv_irx;
|
||||
|
||||
|
@ -5,8 +5,8 @@ IRX_DIR = $(PS2SDK)/iop/irx
|
||||
#IRX modules
|
||||
# IRX modules - modules have to be in IRX_DIR
|
||||
IRX_FILES += freemtap.irx freepad.irx freesio2.irx iomanX.irx fileXio.irx mcman.irx mcserv.irx usbd.irx usbhdfsd.irx
|
||||
IRX_FILES += freesd.irx audsrv.irx poweroff.irx
|
||||
IRX_C_FILES = $(IRX_FILES:.irx=_irx.c)
|
||||
IRX_FILES += freesd.irx audsrv.irx poweroff.irx cdfs.irx
|
||||
IRX_C_FILES = $(IRX_FILES:.irx=_irx.c)
|
||||
|
||||
all: irxs
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user