Skip to content

Commit

Permalink
fixed 150 support again;
Browse files Browse the repository at this point in the history
now both OE and 150 works like a charm;
updated release notes for slim version

[git-p4: depot-paths = "//tbl/": change = 643]
  • Loading branch information
erique committed Jul 8, 2008
1 parent c8bc1d4 commit 5e7a77a
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 10 deletions.
54 changes: 48 additions & 6 deletions Code/Tests/MutaliskViewer/TimelinePlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,10 @@ bool start_atrac(SceUID mod);
#include "intro.h"
#ifdef PSP_OE
PSP_MODULE_INFO("Suicide Barbie", PSP_MODULE_USER/*prx needs to be in userland*/, 1, 1);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER | PSP_THREAD_ATTR_VFPU);
#else
PSP_MODULE_INFO("Suicide Barbie", PSP_MODULE_KERNEL, 1, 1);
/*this is not entirely correct; we want USER+VFPU but we can't be in userland if we want to load kernel modules.
on the other hand this disables quitting but we can live with this for now (150 binaries are already released so.. :) */
PSP_MAIN_THREAD_ATTR(0/*PSP_THREAD_ATTR_USER | PSP_THREAD_ATTR_VFPU*/);
PSP_MODULE_INFO("Suicide Barbie", PSP_MODULE_KERNEL/*150 needs kernel to load prxs*/, 1, 1);
#endif
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER | PSP_THREAD_ATTR_VFPU);
PSP_HEAP_SIZE_KB(5);

static unsigned int __attribute__((aligned(16))) list[2][262144/2];
Expand Down Expand Up @@ -477,7 +474,52 @@ int main(int argc, char* argv[])
return 0;
}

SceUID load_atrac();
#ifndef PSP_OE
/*
This is a somewhat ugly but very effective way to enable loading of kernel flash modules under SDK 150.
First load_prxs_early() is called, before anything else is called. It creates load_prxs_thread() that
goes to sleep, waiting for start_load to turn true. When load_prxs() is called (from main()) it will
signal to the thread to start loading the PRXs (by setting start_load to true) and then go to sleep,
waiting for atrac_mod to become valid.
*/
volatile SceUID atrac_mod = ~0ul;
volatile bool start_load = false;

extern "C"
{
int load_prxs_thread(SceSize args, void *argp)
{
while(!start_load)
sceKernelDelayThread(8000);
atrac_mod = load_atrac();
sceKernelExitDeleteThread(0);
return 0;/*we'll never reach here..*/
}
}

__attribute__ ((constructor))
void load_prxs_early()
{
SceUID loadth = sceKernelCreateThread("load_prxs", load_prxs_thread, 0x20, 0x10000, 0, NULL);
if (loadth >= 0)
sceKernelStartThread(loadth, 0, 0);
}
#endif

SceUID load_prxs()
{
#ifdef PSP_OE
return load_atrac();
#else
start_load = true;
while(atrac_mod < 0)
sceKernelDelayThread(8000);
return atrac_mod;
#endif
}

SceUID load_atrac()
{
int firmware = sceKernelDevkitVersion();

Expand Down Expand Up @@ -523,7 +565,7 @@ SceUID load_prxs()
bool start_atrac(SceUID mod)
{
{
std::string at3name = gPathPrefix + "music/suicidebarbie_bpv.at3";
std::string at3name = gPathPrefix + "music/suicidebarbie.at3";

if (mod >= 0)
{
Expand Down
9 changes: 5 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
o Suicide Barbie by The Black Lotus
PlayStation(r) Portable(tm) demo

o 'polished' party version released June 27th, 2007.
o OE/M33 'slim' version released July 8th, 2008.
'polished' party version released June 27th, 2007.
original production released at Breakpoint 2007.


Expand Down Expand Up @@ -65,11 +66,11 @@ o random blah
o how to run production

copy the contents of the archive to the ms0:/PSP/GAME/ folder.
run production from xmb. if you're using 3xx OE firmware copy
files to ms0:/PSP/GAME150/ instead.
run production from xmb. you need an OE/M33 firmware to watch
this version (no need for 150 kernel).

this production has been tested and confirmed working under
firmware 1.00, 1.50 and 3.40 OE-A.
firmware 3.90 M33-3 and 4.01 M33-2 (both slim)


o tech stuff
Expand Down

0 comments on commit 5e7a77a

Please sign in to comment.