mirror of
https://github.com/libretro/RetroArch
synced 2024-12-28 09:29:16 +00:00
(VITA) Initial Salamander
This commit is contained in:
parent
b2c9db523a
commit
c2cf515189
82
Makefile.vita.salamander
Normal file
82
Makefile.vita.salamander
Normal file
@ -0,0 +1,82 @@
|
||||
HAVE_FILE_LOGGER = 0
|
||||
DEBUG = 0
|
||||
|
||||
TARGET = retroarchvita_salamander
|
||||
TITLE_ID = RETROVITA
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
OPTIMIZE_LV := -O2
|
||||
endif
|
||||
|
||||
PREFIX = arm-vita-eabi
|
||||
CC = $(PREFIX)-gcc
|
||||
|
||||
INCDIR = libretro-common/include
|
||||
CFLAGS = -Wl,-q $(OPTIMIZE_LV) -I$(INCDIR) -std=gnu99 -mfloat-abi=hard -ffast-math -fsingle-precision-constant -mword-relocations
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES = -DVITA -DIS_SALAMANDER -DRARCH_CONSOLE
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS =
|
||||
LIBS = -lSceKernel_stub -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceAudio_stub -lSceFiber_stub\
|
||||
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \
|
||||
-lSceMotion_stub -lSceAppMgr_stub -lfreetype -lpng -lm -lc
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
OBJS = frontend/frontend_salamander.o \
|
||||
frontend/frontend_driver.o \
|
||||
frontend/drivers/platform_psp.o \
|
||||
frontend/drivers/platform_null.o \
|
||||
libretro-common/file/file_path.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/file/retro_stat.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
|
||||
all: $(TARGET).vpk
|
||||
|
||||
%.vpk: eboot.bin
|
||||
vita-mksfoex -s TITLE_ID=$(TITLE_ID) "$(TARGET)" param.sfo
|
||||
vita-pack-vpk -s param.sfo -b eboot.bin $@
|
||||
|
||||
eboot.bin: $(TARGET).velf
|
||||
vita-make-fself $< $@
|
||||
|
||||
%.velf: %.elf
|
||||
vita-elf-create $< $@
|
||||
|
||||
$(TARGET).elf: $(OBJS)
|
||||
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
|
||||
|
||||
%.o: %.png
|
||||
$(PREFIX)-ld -r -b binary -o $@ $^
|
||||
|
||||
clean:
|
||||
@rm -rf $(TARGET).vpk $(TARGET).velf $(TARGET).elf $(OBJS) \
|
||||
eboot.bin param.sfo
|
||||
|
||||
vpksend: $(TARGET).vpk
|
||||
curl -T $(TARGET).vpk ftp://$(PSVITAIP):1337/ux0:/
|
||||
@echo "Sent."
|
||||
|
||||
PSVITAIP = 192.168.1.15
|
||||
|
||||
send: eboot.bin
|
||||
curl -T eboot.bin ftp://$(PSVITAIP):1337/ux0:/app/$(TITLE_ID)/
|
||||
@echo "Sent."
|
@ -22,7 +22,7 @@
|
||||
#include <psp2/moduleinfo.h>
|
||||
#include <psp2/power.h>
|
||||
#include <psp2/sysmodule.h>
|
||||
int scePowerSetArmClockFrequency(int freq);
|
||||
#include <psp2/appmgr.h>
|
||||
#else
|
||||
#include <pspkernel.h>
|
||||
#include <pspdebug.h>
|
||||
@ -101,8 +101,8 @@ static void frontend_psp_get_environment_settings(int *argc, char *argv[],
|
||||
/* bundle data*/
|
||||
fill_pathname_join(g_defaults.dir.assets, "app0:/",
|
||||
"assets", sizeof(g_defaults.dir.assets));
|
||||
fill_pathname_join(g_defaults.dir.core, g_defaults.dir.port,
|
||||
"cores", sizeof(g_defaults.dir.core));
|
||||
fill_pathname_join(g_defaults.dir.core, "app0:/",
|
||||
"", sizeof(g_defaults.dir.core));
|
||||
fill_pathname_join(g_defaults.dir.core_info, g_defaults.dir.core,
|
||||
"info", sizeof(g_defaults.dir.core_info));
|
||||
/* user data*/
|
||||
@ -178,12 +178,13 @@ static void frontend_psp_get_environment_settings(int *argc, char *argv[],
|
||||
path_mkdir(g_defaults.dir.sram);
|
||||
path_mkdir(g_defaults.dir.system);
|
||||
|
||||
|
||||
|
||||
#ifndef IS_SALAMANDER
|
||||
#ifdef VITA
|
||||
params = (struct rarch_main_wrap*)params_data;
|
||||
params->verbose = true;
|
||||
#endif
|
||||
|
||||
#ifndef IS_SALAMANDER
|
||||
if (!string_is_empty(argv[1]))
|
||||
{
|
||||
static char path[PATH_MAX_LENGTH];
|
||||
@ -231,7 +232,8 @@ static void frontend_psp_shutdown(bool unused)
|
||||
{
|
||||
(void)unused;
|
||||
#ifdef VITA
|
||||
sceKernelExitProcess(0);
|
||||
//sceKernelExitProcess(0);
|
||||
return;
|
||||
#else
|
||||
sceKernelExitGame();
|
||||
#endif
|
||||
@ -296,7 +298,7 @@ static void frontend_psp_init(void *data)
|
||||
|
||||
static void frontend_psp_exec(const char *path, bool should_load_game)
|
||||
{
|
||||
#if defined(HAVE_KERNEL_PRX) || defined(IS_SALAMANDER)
|
||||
#if defined(HAVE_KERNEL_PRX) || defined(IS_SALAMANDER) || defined(VITA)
|
||||
char *fullpath = NULL;
|
||||
char argp[512] = {0};
|
||||
SceSize args = 0;
|
||||
@ -316,9 +318,11 @@ static void frontend_psp_exec(const char *path, bool should_load_game)
|
||||
#endif
|
||||
|
||||
RARCH_LOG("Attempt to load executable: [%s].\n", path);
|
||||
|
||||
#if defined(VITA)
|
||||
sceAppMgrLoadExec(path, NULL, NULL);
|
||||
#else
|
||||
exitspawn_kernel(path, args, argp);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ bool frontend_driver_get_core_extension(char *s, size_t len)
|
||||
strlcpy(s, "pbp", len);
|
||||
return true;
|
||||
#elif defined(VITA)
|
||||
strlcpy(s, "velf", len);
|
||||
strlcpy(s, "self|bin", len);
|
||||
return true;
|
||||
#elif defined(_XBOX1)
|
||||
strlcpy(s, "xbe", len);
|
||||
@ -168,7 +168,7 @@ bool frontend_driver_get_salamander_basename(char *s, size_t len)
|
||||
strlcpy(s, "EBOOT.PBP", len);
|
||||
return true;
|
||||
#elif defined(VITA)
|
||||
strlcpy(s, "default.velf", len);
|
||||
strlcpy(s, "eboot.bin", len);
|
||||
return true;
|
||||
#elif defined(_XBOX1)
|
||||
strlcpy(s, "default.xbe", len);
|
||||
|
Loading…
Reference in New Issue
Block a user