The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
August 14, 2020, 10:13:38 pm
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Sony PSP port?
« previous next »
Pages: 1 ... 3 4 [5] 6 7 Print
Author Topic: Sony PSP port?  (Read 58714 times)
jimparis
Zebranky food
*
Offline Offline

Posts: 16



View Profile
Re: Sony PSP port?
« Reply #60 on: March 20, 2006, 07:21:28 pm »

For our thoughts on memory and load times, just read this thread.
Logged
sharkus
Zebranky food
*
Offline Offline

Posts: 15



View Profile
Re: Sony PSP port?
« Reply #61 on: March 20, 2006, 10:25:50 pm »

Just took a look throught the thread and took a look at the diffs from jimparis.

jimparis, a couple comments:

1. I seem to be getting pretty good performance running at the standard 222 mhz CPU speed (typically 46 FPS as reported in periodic console statements).  What is the "ultimate" UQM framerate?

2. While load times are definitely too long they are nowhere near the 1-2 minutes as reported in this thread.  Perhaps 0.5.0 is more efficient in how it uses content files.

3. One of the disadvantage of the cwd changes you made is that you loose some flexibility.  For example, for development I use PSPLINK and run the elf file from the host0:/ drive but content/config directories from ms0:/.

4. It looks like most of your changes should integrate nicely.  I'll try to pull in as many as possible for my next release.
Logged
jimparis
Zebranky food
*
Offline Offline

Posts: 16



View Profile
Re: Sony PSP port?
« Reply #62 on: March 20, 2006, 10:44:47 pm »

Quote
1. I seem to be getting pretty good performance running at the standard 222 mhz CPU speed (typically 46 FPS as reported in periodic console statements).  What is the "ultimate" UQM framerate?
222 MHz should be fine, and I certainly wouldn't release my version at 333 MHz, but was just doing that for testing.  I wanted to make sure threading issues weren't speed issues (the thread priorities should be correct in SDL now).  SDL graphics speed should also be faster than when I was working on it, as there has been a lot of work done on the GU acceleration since then.
Quote
2. While load times are definitely too long they are nowhere near the 1-2 minutes as reported in this thread.  Perhaps 0.5.0 is more efficient in how it uses content files.
Wouldn't surprise me.
Quote
3. One of the disadvantage of the cwd changes you made is that you loose some flexibility.  For example, for development I use PSPLINK and run the elf file from the host0:/ drive but content/config directories from ms0:/.
psplink and hostfs didn't exist when I wrote that code Smiley.  You still might be able to get around it differently, by e.g. mounting the directories to /ms0/ and /host0/ instead.  Or, at least, handle the "string:/path" format in such a way that the same code is used for Windows and PSP.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Sony PSP port?
« Reply #63 on: March 20, 2006, 11:59:17 pm »

There have been no significant changes to uio since 0.4.0, so don't expect any speedups from that.

Can you tell me something about the paths as used on the PSP? Is it just that some "string:" is prepended? What letters may occur in that string? Is it handled like DOS drives, with a concept of the "current drive"?
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
sharkus
Zebranky food
*
Offline Offline

Posts: 15



View Profile
Re: Sony PSP port?
« Reply #64 on: March 21, 2006, 01:10:14 am »

All PSP "drives" are formatted like so:

ms0:/
ms0:/
host0:/
host1:/
etc...

(The length of the drive name is variable.)

It ends up being sort of a mix between unix and win32...

The other problem is that if you access the a string like "ms0:" or "host0:" (without the "/" at the end) the PSP barfs.  This happens with the unmodified code when it walks the directory paths.  The PSP also doesn't like it if you access a path like "/ms0:/"

-Sharkus
Logged
sharkus
Zebranky food
*
Offline Offline

Posts: 15



View Profile
Re: Sony PSP port?
« Reply #65 on: March 21, 2006, 09:21:32 am »

Hmmm.  It looks like the instability is caused by not serializing SDL_FreeSurface() and SDL_CreateRGBSurface() function calls.  A crash is especially likely if the SDL_FreeSurface() routine is interrupted by a SDL_CreateRGBSurface().  Most likely this is due to critical data structures being corrupted.

Before I go and do a bunch of debugging, is this non thread-safe issue expected in UCM or should I start looking at the PSP semaphore/mutex implementation?  I looked through the UQM and did not see any obvious mutex or semaphore that would ensure these calls are serialized.

Here's the log (I have found a very consistent failure).  Every time I've seen it crash it seems to fail when transitioning from one screen or another (in this case from the trader character back to the navigation screen).  I believe this is when UQM is handling off from one thread to another, so perhaps there is some overlap when both threads are making SDL calls (bad)?

-Sharkus

Code:

ms0:/psp/game/uqm/>
ms0:/psp/game/uqm/>
ms0:/psp/game/uqm/>
ms0:/psp/game/uqm/>
ms0:/psp/game/uqm/>
ms0:/psp/game/uqm/>
ms0:/psp/game/uqm/> SDL_CreateRGBSurface() enter ...surf done
SDL_CreateRGBSurface() enter ...surf done
SDL_CreateRGBSurface() enter ...surf doSDL_FreeSurface() enter ... free leave
ne
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
ne
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
SDL_FreeSurface() enter ... free leave
Thread 'Starcon2Main' blocking on semaphore 'Clock'
Thread 'Starcon2Main' awakens, released from semaphore 'Clock'
SDL_FreeSurface() enter ... SDL_CreateRGBSurface() enter ...surf done
SDL_CreateRGBSurface() enter ...surf done
SoundDecoder_Decode(): looping ipanims/space.ogg
Thread 'game clock' blocking on semaphore 'Clock'
Thread 'game clock' awakens, released from semaphore 'Clock'
« Last Edit: March 21, 2006, 09:59:29 am by sharkus » Logged
sharkus
Zebranky food
*
Offline Offline

Posts: 15



View Profile
Re: Sony PSP port?
« Reply #66 on: March 21, 2006, 10:00:20 am »

Doh! Might have been barking up the wrong tree.  I hacked a mutex in the SDL code to serial the calls to these two functions and the crash still happens.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Sony PSP port?
« Reply #67 on: March 21, 2006, 12:23:23 pm »

Hmmm.  It looks like the instability is caused by not serializing SDL_FreeSurface() and SDL_CreateRGBSurface() function calls.
Serializing?
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: Sony PSP port?
« Reply #68 on: March 21, 2006, 12:29:38 pm »

Hmmm.  It looks like the instability is caused by not serializing SDL_FreeSurface() and SDL_CreateRGBSurface() function calls.
Serializing?
Serialising as in "forcing to run one at a time sequentially; ensuring mutual exclusion", not "converting an object into a byte stream for storage or transmission".
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
sharkus
Zebranky food
*
Offline Offline

Posts: 15



View Profile
Re: Sony PSP port?
« Reply #69 on: March 22, 2006, 01:33:25 am »

FYI: I just verified with the PSPSDK folks that the PSP malloc and free functions are not thread-safe at this point so reentrant calls to SDL are bound to fail right now.  This probably explains where the instability is coming from...
Logged
thomas_fogh
Zebranky food
*
Offline Offline

Posts: 1



View Profile
Re: Sony PSP port?
« Reply #70 on: April 18, 2006, 05:22:21 pm »

Hi guys,
Need any help with the port? How do I get your code?
Logged
jimparis
Zebranky food
*
Offline Offline

Posts: 16



View Profile
Re: Sony PSP port?
« Reply #71 on: April 18, 2006, 07:58:06 pm »

See earlier posts, they describe how to get both ports
Logged
Daveman
Zebranky food
*
Offline Offline

Posts: 2



View Profile
Re: Sony PSP port?
« Reply #72 on: January 23, 2008, 09:58:46 pm »

Is this Project still active? Sharkus if it is i am willing to join your team and help your port.
Logged
Fedor
Zebranky food
*
Offline Offline

Posts: 3



View Profile
Re: Sony PSP port?
« Reply #73 on: February 03, 2008, 11:33:55 am »

I've ported 0.6.2 to psp. There is still some problems with hangs and performans in melee and planet landing.... Sound, keyboasrd, video is working fine. Any ideas how to speed the things up? I am not C guru, so, any help is welcome.
Logged
Fedor
Zebranky food
*
Offline Offline

Posts: 3



View Profile
Re: Sony PSP port?
« Reply #74 on: February 03, 2008, 06:47:08 pm »

ok.. after some playing with dependencies i managed to compile 6.0.2 in eclipse. Wink))) got  half mega smaller executable, no slow downs anymore. Wink)))

I am playong for an hour now.. so far so good Wink))) i am happy Wink
Logged
Pages: 1 ... 3 4 [5] 6 7 Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!