I am working on a Proof of Concept project to deliver interactive content onto Mobile Devices.
One of the target platforms is the PSP.
The main question/concerns after a quick examination of Open Source SDK's for the PSP; is it possible to write apps that will run from the Memory Stick, on all Firmware Versions of the PSP. It appears that Homebrew apps only run on downgraded PSPs and often require some form of hack.
The requirement is as follows:
1 - Develop an application for the PSP which will run from the Memory Stick.
2 - The application will have the following basic functionality:
a) Play back Video.
b) A certain points during the Video present the user with options, Press the Circle, Square, Triangle or Cross button.
c) Depending on the button pressed the application will either load a new Video file or jump to a specific point (chapter) in the current Video file.
d) Depending on the button pressed, a score will be maintained. At the end of the application the score will be presented to the user.
3) Details of the:
a) Location of video file
b) Chapters in the video file
c) Which Chapter will prompt users for input
d) Name of the “score” variable and text to place on the screen
will be stored in a config file.
4) Detailed instructions on how to load the SDK\IDE for developing similar applications.
5) Documentation for the application:
a) How it works
b) How to compile it
c) How to package it
6) Ideally the application should exist as a single file – the equivalent of a jar file in Java.
The following is an example of what we would like to be able to do after the application and documentation has been delivered to us:
1 – Load the development environment onto a PC
2 – Load the application that has been developed into the SDK\IDE
3 – Make changes to the code\config file
4 – Compile a new package
5 – Load the package onto a Memory Card
6 – Run the application on any PSP directly from the memory card
The following is an example of an application:
One Video File, duration = 00:01:00:00 = 60 seconds:
Chapter 1 = 00:00:00:00 to 00:00:10:00
Chapter 2 = 00:00:10:00 to 00:00:20:00
Chapter 3 = 00:00:20:00 to 00:00:30:00
Chapter 4 = 00:00:30:00 to 00:00:40:00
Chapter 5 = 00:00:40:00 to 00:00:50:00
Chapter 6 = 00:00:50:00 to 00:01:00:00
The format of the config file (if you have a better suggestion for the config file this will be adopted, ideally we’d like an xml format, but I’m not sure about xml parsers for the PSP):
variable: int score = 0;
videoAsset: videoA|res/videoA.mp4;
chapterDefinition:
videoA chapter1|start=00:00:00:00|end=00:00:10:00|next=videoA.chapter2;
videoA chapter2|start=00:00:10:00|end=00:00:20:00|next=choice|action=square= videoA.chapter3,score=score+1|action=circle= videoA.chapter4,score=score+2|exitOnPress=true|loop=videoA.chapter3;
videoA chapter3|start=00:00:20:00|end=00:00:30:00|next= videoA.chapter5;
videoA chapter4|start=00:00:30:00|end=00:00:40:00|next= videoA.chapter5;
videoA chapter5|start=00:00:40:00|end=00:00:50:00|next=choice|action=square= videoA.chapter6,score=score+3|action=circle= videoA.chapter1,score=0|exitOnPress=false|loop=true;
chapter6|start=00:00:50:00|end=00:01:00:00|next=terminate|display=”Your score = ” + score;
onload: videoA.chapter1;
An explanation of the config file:
Variables are defined as follows:
variable: <type><name>=<initial value>;
If in a single application required three variables, a string, an integer and a boolean, the following entry could be entered in the config file:
variable: int score = 0;
variable: string name = “”;
variable: boolean flag = true;
Video Assets are defined as follows:
videoAsset: <name>|<uri>;
If three video files are to be used in the application the following entry could be entered in the config file:
videoAsset: videoA|res/videoA.mp4;
videoAsset: videoB|ms:/videos/videoB.mp4;
videoAsset: videoC|res/videoC.mp4;
The video asset “videoA|res/videoA.mp4”, has the name “videoA”, and is located in the packaged (jar file) application, under the “res” folder.
The video asset “ms:/videos/videoB.mp4”, has the name “videoB”, and is located on the memory stick under the videos folder.
To define how a video file is split into chapters and the actions to take at the end\during the scene, the Chapter Definitions are defined as follows:
chapterDefinition:
<chapter name>|
start=<starting location in video file in format hh:mm:ss:ff>|
end=<ending location in video file in format hh:mm:ss:ff>|
next=<choice or chapter name or terminate>|
action=<button>=<chapter name>=<action script>|
exitOnPress=<false or true>
loop=<chapter name or true>
display=<a string>
I will explain the above in more detail later, using the example I detailed above. For now note that the <chapter name> is prefixed with the name of the video asset, for instance:
videoA.chapter4
videoB.chapter15
videoC.chapter2
If next=choice, then we can expect an “action”
If next=terminate, then end the application
If exitOnPress = true, jump to the next chapter immediately
If exitOnPress = false, jump to the next chapter after the current chapter has ended
If loop = true, if by the end of the chapter no input has been received from the user, replay the chapter
If loop = chapter name, if by the end of the chapter no input has been received from the user, load the chapter name.
The starting point of the application is defined below:
onload = <chaptername>
The following is a walkthrough of the example above:
--
--
variable: int score = 0;
Create an integer variable called score with a value of 0;
--
--
videoAsset: videoA|res/videoA.mp4;
The location name of the only video asset associated with this application is “videoA”, it is located in the “res” folder of the package containing the code.
--
--
chapterDefinition:
The following lines are the chapter definitions of the associated video files.
--
--
videoA chapter1|start=00:00:00:00|end=00:00:10:00|next=videoA.chapter2;
“chapter 1” of “videoA” starts at 0 seconds, and ends at 10 seconds.
During playback after the chapter ends, load/jump to chapter2 of videoA
--
--
videoA chapter2|start=00:00:10:00|end=00:00:20:00|next=choice|action=square= videoA.chapter3,score=score+1|action=circle= videoA.chapter4,score=score+2|exitOnPress=true|loop= videoA.chapter3;
“chapter 2” of “videoA” starts at 10 seconds, and ends at 20 seconds.
next=choice, the user can now press a button to enter input
loop = videoA.chapter3, if by the end of this chapter the user has not entered any input load chapter3 of videoA
If the user presses the square button, set to score = score +1. As “exitOnPress” is true, as soon as the square button is pressed load chapter3 of videoA.
If the user presses the circle button, set to score = score +2. As “exitOnPress” is true, as soon as the square button is pressed load chapter3 of videoA.
--
--
videoA chapter5|start=00:00:40:00|end=00:00:50:00|next=choice|action=square= videoA.chapter6,score=score+3|action=circle= videoA.chapter1,score=0|exitOnPress=false|loop=true;
“chapter 5” of “videoA” starts at 40 seconds, and ends at 50 seconds.
next=choice, the user can now press a button to enter input
loop = true, if by the end of this chapter the user has not entered any input replay the chapter
exitOnPress = false, if the user enters input (presses the square or the circle button), wait until the chapter plays out before taking the action
If the user presses the square button, set to score = score +1, and at the end of the scene load chapter3 of Video A. If the user presses the square button more then once, it is ok to continually to apply score = score + 1;
If the user presses the circle button, set to score = score +1, and at the end of the scene load chapter4 of Video A. If the user presses the circle button more then once, it is ok to continually to apply score = score + 1;
The user can press the square then the circle then the square … button, it is the final button press that will determine the next chapter to load.
--
--
chapter6|start=00:00:50:00|end=00:01:00:00|next=terminate|display=”Your score = ” + score;
“chapter 6” of “videoA” starts at 50 seconds, and ends at 1 minute.
next=terminate – at the end of this chapter, exit the application
display in the centre of the screen “Your score ” + the value of the variable “score”.
--
--
The semantics\syntax of the config file are far from perfect, however they will suffice for the Proof of Concept project. If it is possible to define the Config file in XML that would be perfect, I shall provide the XML and XSD for the config file.
The buttons that should be allowed are:
CursorUp
CursorDown
CursorLeft
CursorRight
Triangle
Circle
Cross
Square
TopLeft
TopRight
For now there is no need to code for combination buttons and double clicks etc… However the details of how to code for other buttons, combinations buttons etc… will be required.
If you require any more details regarding the requirements, please feel to contact me. The best email to contact me on is [email protected] or feel free to either respond to this post or email me on the emailed I registered with, although I can only check that email address when I’m at work.
If you can help with this requirement please supply:
Required:
1 – Brief details of other PSP developments you have carried out
2 – An estimation of the time it will take you deliver the project (broken down)
3 – Your cost (broken down)
4 – How soon you can start
Desired:
1 – References
2 – Confirmation that the requirements above will run on any PSP, or details of the potential limitations
3 – If you think it’s not possible to meet the requirements using the Open Source SDK for PSP, is it worth considering purchasing the SDK from Sony
4 – Finally is there an emulator or a way of connecting a PSP to test the application being built.
Parmy
PSP Developer required for Proof of Concept project
Sounds like a good idea. Basically some sort of interactive movie?
From a coding viewpoint it shouldn't be too hard to do. The video segments would be read into memory and played, when it hits a control point it will read from the config what has to be done (user input or an action)..
Assuming all the videos are ready to build a test app to do this I wouldn't imagine it'd take very long to develop. A couple of weeks would probably get the base functionality in place for navigating the videos. Maybe a month or two to get a fully working 'game' done.
There is however no way to run homebrew on PSPs without a loader or custom firmware. Only on 1.0 firmware is it possible to load homebrew with no extra hacks or code.
Also don't expect to be able to sell this. You can only take payment for programs or games developed using Sony's SDK (and therefore licensed by Sony), and you are not going to get the SDK.
Personally I hate XML for this type of thing, it has it's uses and config files for games is not one of them. Whoever you get to build this project I'm sure will be able to make an application to build config files with a simple GUI for your videos.
From a coding viewpoint it shouldn't be too hard to do. The video segments would be read into memory and played, when it hits a control point it will read from the config what has to be done (user input or an action)..
Assuming all the videos are ready to build a test app to do this I wouldn't imagine it'd take very long to develop. A couple of weeks would probably get the base functionality in place for navigating the videos. Maybe a month or two to get a fully working 'game' done.
There is however no way to run homebrew on PSPs without a loader or custom firmware. Only on 1.0 firmware is it possible to load homebrew with no extra hacks or code.
Also don't expect to be able to sell this. You can only take payment for programs or games developed using Sony's SDK (and therefore licensed by Sony), and you are not going to get the SDK.
Personally I hate XML for this type of thing, it has it's uses and config files for games is not one of them. Whoever you get to build this project I'm sure will be able to make an application to build config files with a simple GUI for your videos.