mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 20:43:10 +00:00
Merge branch 'master' of github.com:Themaister/SSNES
This commit is contained in:
commit
3446774547
@ -50,7 +50,7 @@ else
|
||||
GL_LIBS := -lPSGL -lPSGLcgc
|
||||
endif
|
||||
|
||||
LIBS = -ldbgfont $(GL_LIBS) -lcgc -lgcm_cmd -lgcm_sys_stub -lsnes -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lpthread
|
||||
LIBS = -ldbgfont $(GL_LIBS) -lcgc -lgcm_cmd -lgcm_sys_stub -lsnes -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lpthread
|
||||
|
||||
DEFINES += -DSSNES_CONSOLE -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DPACKAGE_VERSION=\"0.9.4.1\" -DHAVE_SCREENSHOTS_BUILTIN=1 -Dmain=ssnes_main
|
||||
|
||||
@ -85,6 +85,7 @@ ifeq ($(DOWNLOAD_SHADERS),1)
|
||||
git clone git://github.com/twinaphex/common-shaders.git ps3/pkg/USRDIR/shaders
|
||||
endif
|
||||
$(MAKE_FSELF_NPDRM) $(PPU_TARGET) ps3/pkg/USRDIR/EBOOT.BIN
|
||||
$(MAKE_FSELF_NPDRM) $(PPU_TARGET) ps3/pkg/USRDIR/CORE.SELF
|
||||
$(MAKE_PACKAGE_NPDRM) ps3/pkg/package.conf ps3/pkg
|
||||
|
||||
clean:
|
||||
|
@ -15,6 +15,8 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "rom_ext.h"
|
||||
#include "../boolean.h"
|
||||
#include "../libsnes.hpp"
|
||||
@ -70,4 +72,3 @@ void ssnes_console_name_from_id(char *name, size_t size)
|
||||
name[i] = tolower(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,4 +29,3 @@ const char *ssnes_console_get_rom_ext(void);
|
||||
void ssnes_console_name_from_id(char *name, size_t size);
|
||||
|
||||
#endif
|
||||
|
||||
|
42
ps3/main.c
42
ps3/main.c
@ -26,11 +26,18 @@
|
||||
#include <sysutil/sysutil_screenshot.h>
|
||||
#include <sysutil/sysutil_common.h>
|
||||
#include <sysutil/sysutil_gamecontent.h>
|
||||
#include <sys/spu_initialize.h>
|
||||
|
||||
#include <cell/sysmodule.h>
|
||||
#include <sysutil/sysutil_common.h>
|
||||
#include <sys/process.h>
|
||||
#include <netex/net.h>
|
||||
#include <np.h>
|
||||
#include <np/drm.h>
|
||||
|
||||
#include "ps3_input.h"
|
||||
#include "ps3_video_psgl.h"
|
||||
|
||||
#include "../console/rom_ext.h"
|
||||
#include "../console/main_wrap.h"
|
||||
#include "../conf/config_file.h"
|
||||
#include "../conf/config_file_macros.h"
|
||||
@ -45,6 +52,9 @@
|
||||
|
||||
#define EMULATOR_CONTENT_DIR "SSNE10000"
|
||||
|
||||
#define NP_POOL_SIZE (128*1024)
|
||||
|
||||
static uint8_t np_pool[NP_POOL_SIZE];
|
||||
char contentInfoPath[MAX_PATH_LENGTH];
|
||||
char usrDirPath[MAX_PATH_LENGTH];
|
||||
char DEFAULT_PRESET_FILE[MAX_PATH_LENGTH];
|
||||
@ -387,6 +397,12 @@ int main(int argc, char *argv[])
|
||||
cellSysmoduleLoadModule(CELL_SYSMODULE_AVCONF_EXT);
|
||||
cellSysmoduleLoadModule(CELL_SYSMODULE_PNGDEC);
|
||||
cellSysmoduleLoadModule(CELL_SYSMODULE_JPGDEC);
|
||||
cellSysmoduleLoadModule(CELL_SYSMODULE_NET);
|
||||
cellSysmoduleLoadModule(CELL_SYSMODULE_SYSUTIL_NP);
|
||||
|
||||
sys_net_initialize_network();
|
||||
|
||||
sceNpInit(NP_POOL_SIZE, np_pool);
|
||||
|
||||
get_environment_settings(argc);
|
||||
|
||||
@ -462,9 +478,33 @@ begin_shutdown:
|
||||
|
||||
if(g_console.return_to_launcher)
|
||||
{
|
||||
/* for multiman - need to refactor this
|
||||
sys_spu_initialize(6, 0);
|
||||
sys_game_process_exitspawn2((char*)MULTIMAN_EXECUTABLE, NULL, NULL, NULL, 0, 2048,
|
||||
SYS_PROCESS_PRIMARY_STACK_SIZE_1M);
|
||||
*/
|
||||
char self_path[1024];
|
||||
snprintf(self_path, sizeof(self_path), "%s/CORE.SELF", usrDirPath);
|
||||
char spawn_data[256];
|
||||
for(unsigned int i = 0; i < sizeof(spawn_data); ++i)
|
||||
spawn_data[i] = i & 0xff;
|
||||
|
||||
char spawn_data_size[16];
|
||||
sprintf(spawn_data_size, "%d", 256);
|
||||
|
||||
const char * const spawn_argv[] = {
|
||||
spawn_data_size,
|
||||
"test argv for",
|
||||
"sceNpDrmProcessExitSpawn2()",
|
||||
NULL
|
||||
};
|
||||
|
||||
SceNpDrmKey * k_licensee = NULL;
|
||||
int ret = sceNpDrmProcessExitSpawn2(k_licensee, self_path, (const char** const)spawn_argv, NULL, (sys_addr_t)spawn_data, 256, 1000, SYS_PROCESS_PRIMARY_STACK_SIZE_1M);
|
||||
printf("ret: %x\n", ret);
|
||||
sceNpTerm();
|
||||
cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_NP);
|
||||
cellSysmoduleUnloadModule(CELL_SYSMODULE_NET);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
13
ps3/menu.c
13
ps3/menu.c
@ -1947,10 +1947,20 @@ static void ingame_menu(uint32_t menu_id)
|
||||
}
|
||||
strcpy(comment, "Press 'CROSS' to return to the ROM Browser menu.");
|
||||
break;
|
||||
case MENU_ITEM_CHANGE_LIBSNES:
|
||||
if(CTRL_CROSS(state))
|
||||
{
|
||||
g_console.return_to_launcher = true;
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EXIT;
|
||||
}
|
||||
strcpy(comment, "Press 'CROSS' to choose a different emulator core.");
|
||||
break;
|
||||
#ifdef MULTIMAN_SUPPORT
|
||||
case MENU_ITEM_RETURN_TO_MULTIMAN:
|
||||
if(CTRL_CROSS(state))
|
||||
{
|
||||
g_console.return_to_launcher = true;
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EXIT;
|
||||
}
|
||||
@ -2048,6 +2058,9 @@ static void ingame_menu(uint32_t menu_id)
|
||||
|
||||
cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_MENU)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_RETURN_TO_MENU), "Return to Menu");
|
||||
cellDbgFontDraw();
|
||||
|
||||
cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_CHANGE_LIBSNES)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_CHANGE_LIBSNES), "Change libsnes core");
|
||||
cellDbgFontDraw();
|
||||
#ifdef MULTIMAN_SUPPORT
|
||||
cellDbgFontPuts(x_position, (ypos+(ypos_increment*MENU_ITEM_RETURN_TO_MULTIMAN)), font_size, MENU_ITEM_SELECTED(MENU_ITEM_RETURN_TO_MULTIMAN), "Return to multiMAN");
|
||||
#endif
|
||||
|
@ -63,6 +63,7 @@ enum {
|
||||
MENU_ITEM_RESET,
|
||||
MENU_ITEM_RETURN_TO_GAME,
|
||||
MENU_ITEM_RETURN_TO_MENU,
|
||||
MENU_ITEM_CHANGE_LIBSNES,
|
||||
#ifdef MULTIMAN_SUPPORT
|
||||
MENU_ITEM_RETURN_TO_MULTIMAN,
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user