General

Reply
Accepted Solution

Can't deploy to xperia play

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/First' because it already exists
Created directory '/sdcard/Android/data/com.playstation.psslauncher/First/Application'
Created directory '/sdcard/Android/data/com.playstation.psslauncher/First/Application/resources'
Created directory '/sdcard/Android/data/com.playstation.psslauncher/First/Application/shaders'
Created directory '/sdcard/Android/data/com.playstation.psslauncher/First/Application/sound'
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.

Please use plain text.

Re: Can't deploy to xperia play

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

 

 

PlayStation®Mobile Dev Team
I am like you, I have no name.
Please use plain text.

Re: Can't deploy to xperia play

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.

Please use plain text.

Re: Can't deploy to xperia play

[ Edited ]

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

 

PlayStation®Mobile Dev Team
I am like you, I have no name.
Please use plain text.

Re: Can't deploy to xperia play

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.

Please use plain text.

Re: Can't deploy to xperia play

Would you like to post your drawing code please ?

 

 

Thanks

M

PlayStation®Mobile Dev Team
I am like you, I have no name.
Please use plain text.

Re: Can't deploy to xperia play

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;//*time_scale;
                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_info[sprites[loop].graphic].draw_width;
            float height = sprite_info[sprites[loop].graphic].height/sprite_info[sprites[loop].graphic].draw_height;
            
            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.

Please use plain text.

Re: Can't deploy to xperia play

Hi - any response planned for this, or is this a dead subject?

 

Cheers,

 

Robin.

Please use plain text.

Re: Can't deploy to xperia play

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

PlayStation®Mobile Dev Team
I am like you, I have no name.
Please use plain text.

Re: Can't deploy to xperia play

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.

Please use plain text.
This widget could not be displayed.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

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を一度ログアウトし、再度ログインしてください。






Recent News