on 30-06-2012 02:42 AM
Hi there - I've got an HTC One X and an Xperia Play - either of which I'd like to use to test out my PSM code with. When I got to Project -> Playstation Suite Device Target -> Refresh Device List... whichever one I have plugged in will show up after a fashion in the target drop down menu underneath Playstation Suite Simulator.
So far so good.
However running (with or without debug) gives me the following message and gets no further.
Installing application on device
Skipped creating directory '/sdcard/Android/data/com.playstation.psslauncher/
Created directory '/sdcard/Android/data/com.playstation.psslauncher/
Created directory '/sdcard/Android/data/com.playstation.psslauncher/
Created directory '/sdcard/Android/data/com.playstation.psslauncher/
Created directory '/sdcard/Android/data/com.playstation.psslauncher/
Failed to install application on device. Permission denied
Does anybody know how to get that permission lifted? I've enabled debugging on both devices, installed the entire android SDK, installed ADB and added it to the path (and tested it with the commandline) and attempted to install USB drivers. Stumped at the moment.
One thing - Xperia Play seems to be called Sony sa0102 under Device Manager. However both devices can be seen by PssStudio, albeit with somewhat garbled names; eg Android (43423541314A33343758)
Any advice much appreciated.
Cheers,
Robin.
Solved! Go to Solution.
on 05-07-2012 04:57 PM
Hi rjubber,
This seems like an android issue rather than a PSM issue. When you run adb.exe in the command window. Can you try adb kill-server and then adb-start server. This is assuming that if you type adb devices all the devices listed in the PSM studio show up in the command prompt.
Let me know if that works or if you need any help doing the same.
Regards
M
on 06-07-2012 02:20 PM
Hi there - cheers for the response. I've found that to get connected devices to show up in adb or the pssuite requires a few reboots of both the device and PC. When it is available, PSSuite uploads my app to my HTC One X - but trying to run it fails. PSSuite shows up containing my app and TriangleSample - the first app I tried uploading. However tapping either of them rotates the screen to landscape then gives the following message
The content cannot be started. The lisense is expired.
Do we need a license for the PSM beta? In Device Administration in Security Settings for the One X I have "Allow installation of non-market apps" selected.
Cheers,
Robin.
06-07-2012 03:15 PM - edited 06-07-2012 03:19 PM
Hi Robin,
The reason you are getting this message is because the HTC One X is not supported in the current version of the SDK(0.98). It will however, be supported in the next release of the SDK(0.99), the date of which is unconfirmed at the moment. We will update the forums once we have this information.
Have you tried deploying to the Xperia Play instead? That should be able to deploy all the samples.
Regards
M
on 06-07-2012 04:23 PM
Cheers for the info - much appreciated. Just noticed the same thing at the bottom of the device faq. :-) I have had the xperia play work on occasion - but plugging it into a USB port is very flaky. Most of the time ADB and PSM don't see it - but it works fine when it is spotted. So far I've only managed to get it running a couple of times.
Some things I've noticed -
1) It runs very slowly. The number of sprites I can draw on it at 60fps seems very low. In the tens on screen at once. Perhaps bit depth is an issue, or the naive way I'm drawing them. Also I ran in debug mode - perhaps changing to release will make a difference.
2) You have to turn off Auto Connect in MSC (Connectivity settings) and ensure USB connection mode is set to Media Transfer Mode
Hope this helps anybody else using the Xperia
Cheers,
Robin.
on 06-07-2012 05:14 PM
Would you like to post your drawing code please ?
Thanks
M
on 07-07-2012 03:23 PM
Sure.The code uses a fixed array of sprites and draws them in sequence. I'm not sorting them based on texture yet, but the performance on the xperia isn't great when just one texture is used. I'm wondering if set texture or set uniform value is an expensive operation I should only call infrequently (eg by sorting sprites based on texture into buckets)
// loop called every frame
// setup
graphics.SetShaderProgram( shader_program );
graphics.Enable( EnableMode.Blend );
graphics.SetBlendFunc( BlendFuncMode.Add, BlendFuncFactor.SrcAlpha, BlendFuncFactor.OneMinusSrcAlpha );
graphics.SetBlendFuncAlpha( BlendFuncMode.Add, BlendFuncFactor.SrcAlpha, BlendFuncFactor.OneMinusSrcAlpha );
// draw specific sprites
for( int loop = 0; loop < MAX_SPRITES; loop++ )
{
if( sprites[loop].active )
{
#region animation
switch( sprites[loop].anim_type )
{
case ANIM_INCREASE:
sprites[loop].frame+=sprites[loop].anim_amount;//
if( sprites[loop].frame >= sprites[loop].anim_max )
sprites[loop].frame = sprites[loop].frame - sprites[loop].anim_max;
break;
// other anim types snipped
case ANIM_NONE:
texcoords[0] = 0;
texcoords[1] = 0;
texcoords[2] = 0;
texcoords[3] = 1;
texcoords[4] = 1;
texcoords[5] = 0;
texcoords[6] = 1;
texcoords[7] = 1;
vertex_buffer.SetVertices( 1, texcoords );
break;
}
if( sprites[loop].anim_type != ANIM_NONE )
{
int span = sprite_info[sprites[loop].graphic].width/sprite_in
float height = sprite_info[sprites[loop].graphic].height/sprite_i
int dx,dy;
dx = (int)(sprites[loop].frame) % span;
dy = (int)(sprites[loop].frame) / span;
texcoords[0] = (float)dx/(float)span;
texcoords[1] = (float)dy/(float)height;
texcoords[2] = (float)dx/(float)span;
texcoords[3] = ((float)dy+1.0f)/height;
texcoords[4] = (float)(dx+1.0f)/(float)span;
texcoords[5] = (float)dy/(float)height;
texcoords[6] = (float)(dx+1.0f)/(float)span;
texcoords[7] = ((float)dy+1.0f)/height;
vertex_buffer.SetVertices( 1, texcoords );
}
#endregion
// texture
shader_program.SetUniformValue( 0, ref sprites[loop].trans_matrix );
graphics.SetTexture( 0, textures[ sprites[loop].graphic ] );
// colour region snipped for brevity
#region position and rotation
x = (sprites[loop].x*x_scaler) - ( (sprites[loop].width*sprites[loop].scale) / 2.0f );
y = (sprites[loop].y*y_scaler) - ( (sprites[loop].height*sprites[loop].scale) / 2.0f );
// get positions of all verteces. vertexes? virtices? corners. Get all four corners.
centre_x = (sprites[loop].x*x_scaler)/128.0f;
centre_y = (sprites[loop].y*y_scaler)/128.0f;
x1 = x / 128.0f;
y1 = y / 128.0f;
x2 = x / 128.0f;
y2 = (y / 128.0f) + ((sprites[loop].height*sprites[loop].scale)/128.0f
x3 = (x / 128.0f) + ((sprites[loop].width*sprites[loop].scale)/128.0f)
y3 = y / 128.0f;
x4 = (x / 128.0f) + ((sprites[loop].width*sprites[loop].scale)/128.0f)
y4 = (y / 128.0f) + ((sprites[loop].height*sprites[loop].scale)/128.0f
// rotate sprite if necessary. TODO: switch to matrix
if( sprites[loop].rotation != 0 )
{
Rotate_Point(ref x1, ref y1,centre_x, centre_y, sprites[loop].rotation);
Rotate_Point(ref x2, ref y2,centre_x, centre_y, sprites[loop].rotation);
Rotate_Point(ref x3, ref y3,centre_x, centre_y, sprites[loop].rotation);
Rotate_Point(ref x4, ref y4,centre_x, centre_y, sprites[loop].rotation);
}
// now set the vert.. corners.
vertices[0] = x1;
vertices[1] = y1;
vertices[2] = sprites[loop].z;
vertices[3] = x2;
vertices[4] = y2;
vertices[5] = sprites[loop].z;
vertices[6] = x3;
vertices[7] = y3;
vertices[8] = sprites[loop].z;
vertices[9] = x4;
vertices[10] = y4;
vertices[11] = sprites[loop].z;
vertex_buffer.SetVertices( 0, vertices );
#endregion
// draw
graphics.SetVertexBuffer( 0, vertex_buffer );
graphics.DrawArrays( DrawMode.TriangleStrip, 0, index_size );
}
}
Thanks for taking the time to look at this
Cheers,
Robin.
on 17-07-2012 03:02 AM
Hi - any response planned for this, or is this a dead subject?
Cheers,
Robin.
on 19-07-2012 11:51 AM
Hi Robin,
Am I correct in saying that you run that code in the for loop for the number of MAX_SPRITES ?
If so what is the value of MAX_SPRITES please?
Also are you calling drawArrays() for every sprite that you draw ?
Regards
M
on 19-07-2012 01:37 PM
Hi there mshkla04 - yup, calling that code in the loop for all sprites - max value (which is never reached in my game) is 500 or so. To optimise I'll shuffle active sprites down the list and short circuit the loop, but this is obviously a first draft. Or use a collection. However for non-active sprites the loop does nothing (if sprites[loop].active, do all that stuff otherwise don't) so as it is it shouldn't be a huge burden on the cpu as it is the only large loop in the game.
and yup, each sprite is drawn using drawArrays.
two options I'd like to look at, but don't know much about on PSM are non-drawn/degenerate triangles, so I can make a triangle strip, or possibly SpriteLists - a subject I've noticed pop up on these forums quite a bit.
The problem I seem to get on Xperia isn't so much bad frame rate but variable frame rate. Things seem to stutter, even when not much is on screen, just a few animating sprites.
Any advice you have would be much appreciated.
Cheers,
Robin.
PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.
フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと
PSM DevPortalを一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870