Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
krazynez committed Dec 28, 2024
2 parents d247241 + 7faaf26 commit 0003fc5
Show file tree
Hide file tree
Showing 15 changed files with 562 additions and 374 deletions.
440 changes: 220 additions & 220 deletions contrib/PC/MagicMemoryCreator/msipl_installer.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/compat/vita/syspatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ KernelFunctions _ktbl = { // for vita flash patcher
int (*_sctrlKernelLoadExecVSHWithApitype)(int apitype, const char * file, struct SceKernelLoadExecVSHParam * param) = NULL;
int sctrlKernelLoadExecVSHWithApitypeWithUMDemu(int apitype, const char * file, struct SceKernelLoadExecVSHParam * param)
{
if (apitype == 0x141){ // homebrew API
if (apitype == 0x141 && sctrlSEGetBootConfFileIndex() != MODE_INFERNO){ // homebrew API not using Inferno
sctrlSESetBootConfFileIndex(MODE_INFERNO); // force inferno to simulate UMD drive
sctrlSESetUmdFile(""); // empty UMD drive (makes sceUmdCheckMedium return false)
}
Expand Down
46 changes: 23 additions & 23 deletions extras/150kernel/rebootex150/crt0.S
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
.set noreorder

.section .text.vector

#include "as_reg_compat.h"

.global _start

.ent _start
_start:
# Clear bss
la $t3, __bss_start
la $t4, __bss_end
clear_bss_loop:
sltu $t5, $t3, $t4
addiu $t3, $t3, 4
bnel $t5, $0, clear_bss_loop
sw $0, -4($t3)
j _arkReboot
nop
.end _start

.set reorder
.set noreorder

.section .text.vector

#include "as_reg_compat.h"

.global _start

.ent _start
_start:
# Clear bss
la $t3, __bss_start
la $t4, __bss_end
clear_bss_loop:
sltu $t5, $t3, $t4
addiu $t3, $t3, 4
bnel $t5, $0, clear_bss_loop
sw $0, -4($t3)
j _arkReboot
nop
.end _start

.set reorder
50 changes: 25 additions & 25 deletions extras/150kernel/rebootex150/linkfile.l
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
OUTPUT_FORMAT("elf32-littlemips", "elf32-bigmips", "elf32-littlemips")
OUTPUT_ARCH(mips:allegrex)

ENTRY(_start)

SECTIONS
{
. = 0x88FC0000;
.text :
{
KEEP(*(.text.vector))
*(.text)
}
.sdata : { *(.sdata) *(.sdata.*) *(.gnu.linkonce.s.*) }
.rodata : { *(.rodata) }
.data : { *(.data*) }
. = .;
.bss (NOLOAD):
{
__bss_start = .;
*(.bss* .bss.*)
*(COMMON)
__bss_end = .;
}
}
OUTPUT_FORMAT("elf32-littlemips", "elf32-bigmips", "elf32-littlemips")
OUTPUT_ARCH(mips:allegrex)

ENTRY(_start)

SECTIONS
{
. = 0x88FC0000;
.text :
{
KEEP(*(.text.vector))
*(.text)
}
.sdata : { *(.sdata) *(.sdata.*) *(.gnu.linkonce.s.*) }
.rodata : { *(.rodata) }
.data : { *(.data*) }
. = .;
.bss (NOLOAD):
{
__bss_start = .;
*(.bss* .bss.*)
*(COMMON)
__bss_end = .;
}
}
1 change: 1 addition & 0 deletions extras/menus/arkMenu/include/entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class Entry{
static bool isTXT(const char* path);
static bool isIMG(const char* path);
static bool isMusic(const char* path);
static bool isVideo(const char* path);

static bool getSfoParam(unsigned char* sfo_buffer, int buf_size, char* param_name, unsigned char* var, int* var_size);

Expand Down
3 changes: 2 additions & 1 deletion extras/menus/arkMenu/include/multimedia/mpeg.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "entry.h"

bool mpegStart(Entry* e, int x, int y);
bool mpegPlayGamePMF(Entry* e, int x, int y);
void mpegPlayVideoFile(const char* path);

#endif
5 changes: 3 additions & 2 deletions extras/menus/arkMenu/include/multimedia/mpeg_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ typedef struct VideoThreadData

SceInt32 m_iWidth;
SceInt32 m_iHeight;
SceInt32 m_iBufferWidth;

} VideoThreadData;

Expand Down Expand Up @@ -159,8 +160,8 @@ extern bool playMPEG;
extern bool playMPEGAudio;

extern void* MPEGdataL;
extern int MPEGsize;
extern int MPEGcounter;
extern SceOff MPEGsize;
extern SceOff MPEGcounter;

extern Entry* entry;

Expand Down
10 changes: 9 additions & 1 deletion extras/menus/arkMenu/src/browser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "texteditor.h"
#include "image_viewer.h"
#include "music_player.h"
#include "mpeg.h"

#define ROOT_DIR "ms0:/" // Initial directory
#define GO_ROOT "ef0:/" // PSP Go initial directory
Expand Down Expand Up @@ -98,8 +99,10 @@ Browser::Browser(){
if (psp_model == PSP_11000 || ftp_driver == NULL){
pEntries[FTP_DIR] = NULL;
}

if (IS_VITA(ark_config) || psp_model == PSP_GO){
pEntries[UMD_DIR] = NULL;
if (!sceUmdCheckMedium())
pEntries[UMD_DIR] = NULL;
}

if (ark_config->exec_mode == PS_VITA)
Expand Down Expand Up @@ -168,6 +171,11 @@ void Browser::update(Entry* ent, bool skip_prompt){
else if (Entry::isARK(e->getPath().c_str())) {
installTheme();
}
else if (Entry::isVideo(e->getPath().c_str())){
SystemMgr::pauseDraw();
mpegPlayVideoFile(e->getPath().c_str());
SystemMgr::resumeDraw();
}
else if (e->getFileType() == FOLDER){
string full_path = e->getFullPath();
this->cwd = full_path;
Expand Down
7 changes: 6 additions & 1 deletion extras/menus/arkMenu/src/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ bool Entry::isMusic(const char* path){
return (ext == "mp3");
}

bool Entry::isVideo(const char* path){
string ext = common::getExtension(path);
return (ext == "mp4" || ext == "mpg" || ext == "mpeg" || ext == "pmf" || ext == "mps");
}

Entry::~Entry(){
}

Expand Down Expand Up @@ -299,7 +304,7 @@ bool Entry::pmfPrompt(){
bool pmfPlayback = entry->getIcon1() != NULL || entry->getSnd() != NULL;

if (pmfPlayback && !MusicPlayer::isPlaying()){
ret = mpegStart(entry, 20, 92);
ret = mpegPlayGamePMF(entry, 20, 92);
}
else{
Controller control;
Expand Down
14 changes: 12 additions & 2 deletions extras/menus/arkMenu/src/iso.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "iso.h"
#include "eboot.h"
#include <umd.h>
#include <systemctrl.h>

Expand Down Expand Up @@ -253,9 +254,18 @@ void Iso::executeVideoISO(const char* path)
}

sctrlSESetUmdFile((char*)path);
sctrlSESetBootConfFileIndex(MODE_VSHUMD);
sctrlSESetDiscType(type);
sctrlKernelExitVSH(NULL);

ARKConfig* ark_config = common::getArkConfig();
if (IS_VITA(ark_config) && !IS_VITA_ADR(ark_config)){
sctrlSESetBootConfFileIndex(MODE_INFERNO);
sctrlSESetDiscType(type|PSP_UMD_TYPE_GAME);
Eboot::executeEboot(common::getArgv()[0]);
}
else{
sctrlSESetBootConfFileIndex(MODE_VSHUMD);
sctrlKernelExitVSH(NULL);
}
}

int Iso::has_update_file(char* update_file){
Expand Down
Loading

0 comments on commit 0003fc5

Please sign in to comment.