mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Extract IRX variables
This commit is contained in:
parent
f75f8482f8
commit
4c24a17119
3
.gitignore
vendored
3
.gitignore
vendored
@ -165,6 +165,9 @@ retroarch_switch.nacp
|
||||
retroarch_switch.nro
|
||||
retroarch_switch.nso
|
||||
|
||||
# PS2
|
||||
ps2/irx/*.c
|
||||
|
||||
# Wayland
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.c
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.h
|
||||
|
32
Makefile.ps2
32
Makefile.ps2
@ -1,5 +1,5 @@
|
||||
BUILD_PRX = 0
|
||||
DEBUG = 1
|
||||
DEBUG = 0
|
||||
HAVE_KERNEL_PRX = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
@ -8,13 +8,13 @@ BIG_STACK = 0
|
||||
MUTE_WARNINGS = 0
|
||||
PS2_IP = 192.168.1.150
|
||||
|
||||
#Configuration for IRX
|
||||
EE_BIN2C = bin2c
|
||||
IRX_DIR = $(PS2SDK)/iop/irx
|
||||
|
||||
TARGET = retroarchps2.elf
|
||||
TARGET_RELEASE = retroarchps2-release.elf
|
||||
|
||||
# Compile the IRXs first
|
||||
IRX_DIR = ps2/irx
|
||||
IRX_FILES = $(wildcard ps2/irx/*.c)
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
RARCH_DEFINES += -DDEBUG
|
||||
@ -41,13 +41,6 @@ LIBDIR =
|
||||
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L.
|
||||
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lmf -lpadx -lmtap -lmc -lhdd -lsdl -lfileXio -lpatches -lpoweroff
|
||||
|
||||
#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 freesd.irx audsrv.irx poweroff.irx ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx
|
||||
IRX_C_FILES = $(IRX_FILES:.irx=_irx.c)
|
||||
IRX_OBJ = $(IRX_FILES:.irx=_irx.o)
|
||||
# Add into the EE_OBJS the irx.c files
|
||||
EE_OBJS += $(IRX_OBJ)
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
RARCH_DEFINES += -DHAVE_THREADS
|
||||
@ -67,6 +60,11 @@ 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
|
||||
|
||||
# Missing objecst on the PS2SDK
|
||||
EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o ps2/compat_files/ps2_devices.o
|
||||
|
||||
@ -82,15 +80,15 @@ EE_INCS = $(INCDIR)
|
||||
EE_BIN = $(TARGET)
|
||||
EE_GPVAL = $(GPVAL)
|
||||
|
||||
# Specific file name and output per IRX Module
|
||||
%.irx:
|
||||
$(EE_BIN2C) $(IRX_DIR)/$@ $(@:.irx=_irx.c) $(@:.irx=_irx)
|
||||
|
||||
all: irxdir $(EE_BIN)
|
||||
|
||||
all: $(IRX_FILES) $(EE_BIN)
|
||||
irxdir:
|
||||
$(MAKE) -C $(IRX_DIR)
|
||||
|
||||
clean:
|
||||
rm -f $(EE_BIN) $(EE_OBJS) $(IRX_C_FILES)
|
||||
rm -f $(EE_BIN) $(EE_OBJS)
|
||||
$(MAKE) -C $(IRX_DIR) clean
|
||||
|
||||
prepare:
|
||||
ps2client -h $(PS2_IP) reset
|
||||
|
@ -28,54 +28,7 @@
|
||||
#include <audsrv.h>
|
||||
#include <libpad.h>
|
||||
#include <ps2_devices.h>
|
||||
|
||||
|
||||
// #ifdef SOUND_ON
|
||||
#include <audsrv.h>
|
||||
extern unsigned char audsrv_irx;
|
||||
extern unsigned int size_audsrv_irx;
|
||||
extern unsigned char freesd_irx;
|
||||
extern unsigned int size_freesd_irx;
|
||||
// #endif
|
||||
|
||||
|
||||
// Input
|
||||
// #define NEW_PADMAN
|
||||
#include <libpad.h>
|
||||
#include <libmtap.h>
|
||||
extern unsigned char freesio2_irx;
|
||||
extern unsigned int size_freesio2_irx;
|
||||
extern unsigned char mcman_irx;
|
||||
extern unsigned int size_mcman_irx;
|
||||
extern unsigned char mcserv_irx;
|
||||
extern unsigned int size_mcserv_irx;
|
||||
extern unsigned char freemtap_irx;
|
||||
extern unsigned int size_freemtap_irx;
|
||||
extern unsigned char freepad_irx;
|
||||
extern unsigned int size_freepad_irx;
|
||||
|
||||
extern unsigned char poweroff_irx;
|
||||
extern unsigned int size_poweroff_irx;
|
||||
extern unsigned char iomanX_irx;
|
||||
extern unsigned int size_iomanX_irx;
|
||||
extern unsigned char fileXio_irx;
|
||||
extern unsigned int size_fileXio_irx;
|
||||
extern unsigned char ps2dev9_irx;
|
||||
extern unsigned int size_ps2dev9_irx;
|
||||
extern unsigned char ps2atad_irx;
|
||||
extern unsigned int size_ps2atad_irx;
|
||||
extern unsigned char ps2hdd_irx;
|
||||
extern unsigned int size_ps2hdd_irx;
|
||||
extern unsigned char ps2fs_irx;
|
||||
extern unsigned int size_ps2fs_irx;
|
||||
extern unsigned char usbd_irx;
|
||||
extern unsigned int size_usbd_irx;
|
||||
extern unsigned char usbhdfsd_irx;
|
||||
extern unsigned int size_usbhdfsd_irx;
|
||||
// #ifdef CDSUPPORT
|
||||
extern unsigned char cdvd_irx;
|
||||
extern unsigned int size_cdvd_irx;
|
||||
// #endif
|
||||
#include <ps2_irx_variables.h>
|
||||
|
||||
char eboot_path[512];
|
||||
char user_path[512];
|
||||
@ -227,11 +180,6 @@ 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);
|
||||
|
||||
for (i = 0; i < 3; i++) { // Taken from ulaunchelf
|
||||
sometime = 0x01000000;
|
||||
while (sometime--) asm("nop\nnop\nnop\nnop");
|
||||
}
|
||||
|
||||
if (mcInit(MC_TYPE_XMC)) {
|
||||
RARCH_ERR("mcInit library not initalizated\n");
|
||||
}
|
||||
|
@ -100,7 +100,7 @@
|
||||
#define FIO_S_ISDIR SCE_S_ISDIR
|
||||
#endif
|
||||
|
||||
#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP)
|
||||
#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP) || defined(PS2)
|
||||
#include <unistd.h> /* stat() is defined here */
|
||||
#endif
|
||||
|
||||
|
@ -19,4 +19,4 @@
|
||||
#define PRIu64 "lu"
|
||||
#define PRIuPTR "lu"
|
||||
|
||||
#endif //INTTYPES_H
|
||||
#endif /* INTTYPES_H */
|
||||
|
69
ps2/include/ps2_irx_variables.h
Normal file
69
ps2/include/ps2_irx_variables.h
Normal file
@ -0,0 +1,69 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2018 - Francisco Javier Trujillo Mata - fjtrujy
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
* * You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PS2_IRX_VARIABLES_H
|
||||
#define PS2_IRX_VARIABLES_H
|
||||
|
||||
extern unsigned char freesio2_irx;
|
||||
extern unsigned int size_freesio2_irx;
|
||||
|
||||
extern unsigned char mcman_irx;
|
||||
extern unsigned int size_mcman_irx;
|
||||
|
||||
extern unsigned char mcserv_irx;
|
||||
extern unsigned int size_mcserv_irx;
|
||||
|
||||
extern unsigned char freemtap_irx;
|
||||
extern unsigned int size_freemtap_irx;
|
||||
|
||||
extern unsigned char freepad_irx;
|
||||
extern unsigned int size_freepad_irx;
|
||||
|
||||
extern unsigned char poweroff_irx;
|
||||
extern unsigned int size_poweroff_irx;
|
||||
|
||||
extern unsigned char iomanX_irx;
|
||||
extern unsigned int size_iomanX_irx;
|
||||
|
||||
extern unsigned char fileXio_irx;
|
||||
extern unsigned int size_fileXio_irx;
|
||||
|
||||
extern unsigned char ps2dev9_irx;
|
||||
extern unsigned int size_ps2dev9_irx;
|
||||
|
||||
extern unsigned char ps2atad_irx;
|
||||
extern unsigned int size_ps2atad_irx;
|
||||
|
||||
extern unsigned char ps2hdd_irx;
|
||||
extern unsigned int size_ps2hdd_irx;
|
||||
|
||||
extern unsigned char ps2fs_irx;
|
||||
extern unsigned int size_ps2fs_irx;
|
||||
|
||||
extern unsigned char usbd_irx;
|
||||
extern unsigned int size_usbd_irx;
|
||||
|
||||
extern unsigned char usbhdfsd_irx;
|
||||
extern unsigned int size_usbhdfsd_irx;
|
||||
|
||||
extern unsigned char cdvd_irx;
|
||||
extern unsigned int size_cdvd_irx;
|
||||
|
||||
extern unsigned char audsrv_irx;
|
||||
extern unsigned int size_audsrv_irx;
|
||||
|
||||
extern unsigned char freesd_irx;
|
||||
extern unsigned int size_freesd_irx;
|
||||
|
||||
#endif /* PS2_IRX_VARIABLES_H */
|
22
ps2/irx/Makefile
Normal file
22
ps2/irx/Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
#Configuration for IRX
|
||||
EE_BIN2C = bin2c
|
||||
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)
|
||||
|
||||
# Specific file name and output per IRX Module
|
||||
%.irx:
|
||||
$(EE_BIN2C) $(IRX_DIR)/$@ $(@:.irx=_irx.c) $(@:.irx=_irx)
|
||||
|
||||
all: $(IRX_FILES)
|
||||
|
||||
clean:
|
||||
rm -f $(IRX_C_FILES)
|
||||
|
||||
#Include preferences
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal
|
Loading…
x
Reference in New Issue
Block a user