mirror of
https://github.com/libretro/RetroArch
synced 2025-02-27 18:41:01 +00:00
[VITA] Added custom bubbles support.
This commit is contained in:
parent
7841f07e08
commit
0644190121
@ -319,6 +319,8 @@ static void frontend_psp_exec(const char *path, bool should_load_game)
|
||||
{
|
||||
#if defined(HAVE_KERNEL_PRX) || defined(IS_SALAMANDER) || defined(VITA)
|
||||
char argp[512] = {0};
|
||||
char boot_params[1024];
|
||||
char core_name[256];
|
||||
SceSize args = 0;
|
||||
|
||||
#if !defined(VITA)
|
||||
@ -338,8 +340,23 @@ static void frontend_psp_exec(const char *path, bool should_load_game)
|
||||
RARCH_LOG("Attempt to load executable: [%s].\n", path);
|
||||
#if defined(VITA)
|
||||
RARCH_LOG("Attempt to load executable: %d [%s].\n", args, argp);
|
||||
int ret = sceAppMgrLoadExec(path, args==0? NULL : (char * const*)((const char*[]){argp, 0}), NULL);
|
||||
RARCH_LOG("Attempt to load executable: [%d].\n", ret);
|
||||
#ifdef IS_SALAMANDER
|
||||
sceAppMgrGetAppParam(boot_params);
|
||||
if (strstr(boot_params,"psgm:play")) {
|
||||
char *param1 = strstr(boot_params, "¶m=")+7;
|
||||
char *param2 = strstr(boot_params, "¶m2=");
|
||||
memcpy(core_name, param1, param2 - param1);
|
||||
core_name[param2-param1] = 0;
|
||||
sprintf(argp, param2 + 8);
|
||||
int ret = sceAppMgrLoadExec(core_name, (char * const*)((const char*[]){argp, 0}), NULL);
|
||||
RARCH_LOG("Attempt to load executable: [%d].\n", ret);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
int ret = sceAppMgrLoadExec(path, args == 0 ? NULL : (char * const*)((const char*[]){argp, 0}), NULL);
|
||||
RARCH_LOG("Attempt to load executable: [%d].\n", ret);
|
||||
}
|
||||
#else
|
||||
exitspawn_kernel(path, args, argp);
|
||||
#endif
|
||||
|
34
vita/launcher/Makefile
Normal file
34
vita/launcher/Makefile
Normal file
@ -0,0 +1,34 @@
|
||||
TITLE_ID = RAXXXXXXX
|
||||
TARGET = Launcher
|
||||
OBJS = main.o
|
||||
|
||||
LIBS = -lSceAppMgr_stub
|
||||
|
||||
PREFIX = arm-vita-eabi
|
||||
CC = $(PREFIX)-gcc
|
||||
CFLAGS = -Wl,-q -Wall
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
all: builder/eboot.bin
|
||||
|
||||
%.vpk: eboot.bin
|
||||
vita-mksfoex -s TITLE_ID=$(TITLE_ID) "Launcher" param.sfo
|
||||
vita-pack-vpk -s param.sfo -b eboot.bin $@ \
|
||||
-a contents/icon0.png=sce_sys/icon0.png \
|
||||
-a contents/bg.png=sce_sys/livearea/contents/bg.png \
|
||||
-a contents/startup.png=sce_sys/livearea/contents/startup.png \
|
||||
-a contents/template.xml=sce_sys/livearea/contents/template.xml \
|
||||
-a contents/args.txt=args.txt
|
||||
|
||||
builder/eboot.bin: $(TARGET).velf
|
||||
vita-make-fself -s $< $@
|
||||
|
||||
%.velf: %.elf
|
||||
vita-elf-create $< $@
|
||||
|
||||
$(TARGET).elf: $(OBJS)
|
||||
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
|
||||
|
||||
clean:
|
||||
@rm -rf $(TARGET).vpk $(TARGET).velf $(TARGET).elf $(OBJS) \
|
||||
eboot.bin param.sfo
|
8
vita/launcher/builder/build.bat
Normal file
8
vita/launcher/builder/build.bat
Normal file
@ -0,0 +1,8 @@
|
||||
@set /p title="Insert bubble name: "
|
||||
@set /p rom="Insert rom fullpath: "
|
||||
@set /p core="Insert core fullpath: "
|
||||
@set /p id="Insert bubble title ID (9 characters [NOTE: Only UPPERCASE letters or numbers]): "
|
||||
@echo|set /p="%core%"> "contents/core.txt"
|
||||
@echo|set /p="%rom%"> "contents/rom.txt"
|
||||
vita-mksfoex -s TITLE_ID=%id% "%title%" param.sfo
|
||||
vita-pack-vpk -s param.sfo -b eboot.bin "%title%.vpk" -a contents/icon0.png=sce_sys/icon0.png -a contents/bg.png=sce_sys/livearea/contents/bg.png -a contents/startup.png=sce_sys/livearea/contents/startup.png -a contents/template.xml=sce_sys/livearea/contents/template.xml -a contents/core.txt=core.txt -a contents/rom.txt=rom.txt
|
BIN
vita/launcher/builder/vita-mksfoex.exe
Normal file
BIN
vita/launcher/builder/vita-mksfoex.exe
Normal file
Binary file not shown.
BIN
vita/launcher/builder/vita-pack-vpk.exe
Normal file
BIN
vita/launcher/builder/vita-pack-vpk.exe
Normal file
Binary file not shown.
11
vita/launcher/contents/template.xml
Normal file
11
vita/launcher/contents/template.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<livearea style="psmobile" format-ver="01.00" content-rev="1">
|
||||
<livearea-background>
|
||||
<image>bg.png</image>
|
||||
</livearea-background>
|
||||
|
||||
<gate>
|
||||
<startup-image>startup.png</startup-image>
|
||||
</gate>
|
||||
</livearea>
|
26
vita/launcher/main.c
Normal file
26
vita/launcher/main.c
Normal file
@ -0,0 +1,26 @@
|
||||
#include <vitasdk.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
char core[256], rom[256];
|
||||
memset(core, 0, 256);
|
||||
memset(rom, 0, 256);
|
||||
FILE *f = fopen("app0:core.txt", "rb");
|
||||
FILE *f2 = fopen("app0:rom.txt", "rb");
|
||||
if (f && f2) {
|
||||
fread(core, 1, 256, f);
|
||||
fread(rom, 1, 256, f2);
|
||||
fclose(f);
|
||||
fclose(f2);
|
||||
char uri[512];
|
||||
sprintf(uri, "psgm:play?titleid=%s¶m=%s¶m2=%s", "RETROVITA", core, rom);
|
||||
|
||||
sceAppMgrLaunchAppByUri(0xFFFFF, uri);
|
||||
}
|
||||
|
||||
sceKernelExitProcess(0);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user