Skip to content

Commit

Permalink
add ps1 vmc manager
Browse files Browse the repository at this point in the history
  • Loading branch information
bucanero committed Feb 19, 2024
1 parent b697ab6 commit 906eaf4
Show file tree
Hide file tree
Showing 18 changed files with 3,745 additions and 204 deletions.
Binary file removed data/tag_ps2.png
Binary file not shown.
Binary file added data/tag_vmc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion include/font-10x20.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// https://github.com/idispatch/raster-fonts
unsigned char console_font_10x20[] = {
static const unsigned char console_font_10x20[] = {

/*
* code=0, hex=0x00, ascii="^@"
Expand Down
4 changes: 1 addition & 3 deletions include/kirk_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ typedef struct
u8 unk5[16]; //80
} KIRK_CMD1_ECDSA_HEADER; //0x90


typedef struct
{
u8 r[0x14];
Expand Down Expand Up @@ -119,7 +118,6 @@ typedef struct
ECDSA_POINT public_key;
} KIRK_CMD13_BUFFER;


typedef struct
{
u8 enc_private[0x20]; //0
Expand Down Expand Up @@ -202,7 +200,7 @@ int kirk_CMD10(u8* inbuff, int insize);
int kirk_CMD11(u8* outbuff, u8* inbuff, int size);
int kirk_CMD14(u8* outbuff, int outsize);

int kirk_init(); //CMD 0xF?
int kirk_init(void); //CMD 0xF?

//sce-like funcs
int sceUtilsSetFuseID(u8*fuse);
Expand Down
5 changes: 3 additions & 2 deletions include/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ enum menu_screen_ids
MENU_CODE_OPTIONS, /* 10 - Code Menu (View Cheat Options) */
MENU_SAVE_DETAILS,
MENU_HEX_EDITOR,
MENU_VMC_SAVES, /* 13 - PS1 VMC Menu */
TOTAL_MENU_IDS
};

Expand Down Expand Up @@ -70,9 +71,8 @@ enum texture_index
tag_own_png_index,
tag_pce_png_index,
tag_ps1_png_index,
tag_ps2_png_index,
tag_vmc_png_index,
tag_ps3_png_index,
tag_ps4_png_index,
tag_psp_png_index,
tag_psv_png_index,
tag_warning_png_index,
Expand Down Expand Up @@ -255,6 +255,7 @@ extern void Draw_MainMenu_Ani(void);
extern void Draw_HexEditor(const hexedit_data_t* hex);
extern void Draw_HexEditor_Ani(const hexedit_data_t* hex);
int LoadMenuTexture(const char* path, int idx);
void LoadRawTexture(int idx, void* data, int width, int height);
void initMenuOptions(void);

void drawScene(void);
Expand Down
28 changes: 16 additions & 12 deletions include/saves.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@
#define PSV_ICONS_PATH_HDD "ur0:appmeta/%s"
#define PS1_SAVES_PATH_HDD APOLLO_PATH "PS1/"
#define PSP_SAVES_PATH_HDD "ux0:pspemu/" PSP_SAVES_PATH_USB

#define PS1_IMP_PATH_USB "PS1/SAVEDATA/"
#define PS2_IMP_PATH_USB "PS2/SAVEDATA/"
#define PS1_SAVES_PATH_USB "PS1/SAVEDATA/"

#define TROPHY_PATH_HDD "ur0:/user/%02x/trophy/"
#define EXPORT_PATH "savegames/EXPORT/"
#define EXPORT_ZRIF_PATH APOLLO_PATH "zrif/"

#define IMP_PS2VMC_PATH_USB USB_PATH "PS2/VMC/"
#define IMPORT_RAP_PATH_USB USB_PATH PS3_LICENSE_PATH
#define PS1VMC_PATH_USB "%s:data/PS1/VMC/"

#define ONLINE_URL "https://bucanero.github.io/apollo-saves/"
#define ONLINE_PATCH_URL "https://bucanero.github.io/apollo-patches/PSV/"
Expand Down Expand Up @@ -102,11 +99,14 @@ enum cmd_code_enum
CMD_SETUP_PLUGIN,
CMD_CONV_ISO2CSO,
CMD_CONV_CSO2ISO,
CMD_EXP_VMCSAVE,
CMD_EXP_SAVES_VMC,
CMD_EXP_ALL_SAVES_VMC,

// Import commands
CMD_IMP_KEYSTONE,
CMD_IMP_MCR2VMP0,
CMD_IMP_MCR2VMP1,
CMD_IMP_MCR2VMP,
CMD_IMP_VMCSAVE,
CMD_EXTRACT_ARCHIVE,
CMD_URL_DOWNLOAD,
CMD_NET_WEBSERVER,
Expand All @@ -123,7 +123,7 @@ enum cmd_code_enum
#define SAVE_FLAG_OWNER 2
#define SAVE_FLAG_SELECTED 4
#define SAVE_FLAG_ZIP 8
#define SAVE_FLAG_PS2 16
#define SAVE_FLAG_VMC 16
#define SAVE_FLAG_PSP 32
#define SAVE_FLAG_PSV 64
#define SAVE_FLAG_TROPHY 128
Expand All @@ -138,14 +138,15 @@ enum save_type_enum
FILE_TYPE_TRP,
FILE_TYPE_MENU,
FILE_TYPE_PSP,
FILE_TYPE_PS1,

// PS1 File Types
FILE_TYPE_ZIP,

// License Files
FILE_TYPE_RIF,
FILE_TYPE_PRX,
FILE_TYPE_ACT,
FILE_TYPE_VMC,

// ISO Files
FILE_TYPE_ISO,
Expand All @@ -157,7 +158,7 @@ enum char_flag_enum
{
CHAR_TAG_NULL,
CHAR_TAG_PS1,
CHAR_TAG_PS2,
CHAR_TAG_VMC,
CHAR_TAG_PS3,
CHAR_TAG_PSP,
CHAR_TAG_PSV,
Expand Down Expand Up @@ -222,6 +223,7 @@ list_t * ReadUserList(const char* userPath);
list_t * ReadOnlineList(const char* urlPath);
list_t * ReadBackupList(const char* userPath);
list_t * ReadTrophyList(const char* userPath);
list_t * ReadVmcList(const char* userPath);
void UnloadGameList(list_t * list);
char * readTextFile(const char * path, long* size);
int sortSaveList_Compare(const void* A, const void* B);
Expand All @@ -231,6 +233,7 @@ int ReadCodes(save_entry_t * save);
int ReadTrophies(save_entry_t * game);
int ReadOnlineSaves(save_entry_t * game);
int ReadBackupCodes(save_entry_t * bup);
int ReadVmcCodes(save_entry_t * game);

int http_init(void);
void http_end(void);
Expand Down Expand Up @@ -269,7 +272,8 @@ int orbis_UpdateSaveParams(const char* mountPath, const char* title, const char*
int read_psp_game_key(const char* fkey, uint8_t* key);
int psp_DecryptSavedata(const char* fpath, const char* fname, uint8_t* key);
int psp_EncryptSavedata(const char* fpath, const char* fname, uint8_t* key);
int psp_ResignSavedata(const char* fpath);

int vmp_resign(const char *src_vmp);
int ps1_mcr2vmp(const char* mcrfile, const char* vmp_path);
int ps1_vmp2mcr(const char* vmpfile, const char* mcr_path);
int psv_resign(const char *src_psv);
char* sjis2utf8(char* input);
2 changes: 1 addition & 1 deletion include/settings.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define APOLLO_VERSION "1.2.8" //Apollo Vita version (about menu)
#define APOLLO_VERSION "1.4.0" //Apollo Vita version (about menu)

#define MENU_TITLE_OFF 30 //Offset of menu title text from menu mini icon
#define MENU_ICON_OFF 70 //X Offset to start printing menu mini icon
Expand Down
Loading

0 comments on commit 906eaf4

Please sign in to comment.