yashsingh1/xdaforums huggingface dataset:
[Xperia Play Android Development] yifanlu:
I never used fpse. I don't think I've said this before, but I'm using a loner phone. I have 14 days to get everything working, hence the progress. I also didn't have time to do much testing. Once the tool is ready, you guys do the comparisons.
[Xperia Play Android Development] crimsonnight:
Awesome project, excitedly waiting for the initial release! Even better when multi-disc support is added as I keep promising my mates I'll play through Final Fantasy 7

Simple name idea but going by what's been said: PSPLAY or PLAYstation/PLAYstationX/XPLAYstation (NB there might be issues with the second one ;p)
[Xperia Play Android Development] yifanlu:
I having a bit of trouble making a working apk, but it's nothing much compared to the other hoops I had to jump through.

Also, the wrapper library is released: https://github.com/yifanlu/PSXPeria-Wrapper

It's useless for most users as you would need my tool to generate a working image.
[Xperia Play Android Development] gwaine:
I agree...I think it's important to mention the Play in the app's name.
[Xperia Play Android Development] axiomjunglist:
Not to dissuade you from your work, because honestly it's freaking awesome. However, I would be prepared for anything as news of this project just broke on Engadget...

http://www.engadget.com/2011/08/09/xperia-play-spins-original-playstation-one-isos-via-emulator-hac/
[Xperia Play Android Development] Larry94:
Is there any way we could get this running on non-Playstation certified devices?
[Xperia Play Android Development] GetPatriotized:
Great, now it's out there.

btw,is there a way to combine the two,Xperia Play and PlayStation Pocket as one unified app?
[Xperia Play Android Development] yifanlu:
As much as I love getting attention, I feel like it's too early to celebrate. I am going to release the tool, but having all this attention just puts more pressure to getting it out fast. (Which I guess to some of you, is a good thing).

Anyways, I spent a hour and a half trying to figure out why the emulator is giving me "Corrupted image" with the output generated from my tool. Turns out, I forgot to escape quotes from the description string.

WTF! This is why I hate Java so much. I had a filter string function, but it processed the escape as it's own. This is how you escape a single quote to make a \' and print out in file.

private String filter(String value) {
return value.replaceAll("\\'", "\\\\\\\\'");
}
[Xperia Play Android Development] Dyelon:
There's so much hubbub about this, and it does sound great. Makes for a great headline indeed.

But I'm trying to think: what are the realistic advantages of this over FPSE, which works near perfectly for my xperia play?

1) analog sticks: it really sucks but neither FPSE nor n64oid (which needs them even more with all the great FPS's) have implemented xperia's mock sticks (and by Zeus Arena's/NOVA 2/Battlefield 2 examples, I don't even know if I want to SEE them implemented sometimes lol)

If yifanlu's crack includes analog stick support, then that would be a main reason to use it as an alternative to FPSE (for games like Medal of Honor)

2) Graphics: if screen filtering works while keeping the FPS high, then that'd look damn sexy I'd imagine.

3) MUSIC glitching: if the crack can support full music without stuttering/skipping/glitching then hot damn thatd be a fabulous upgrade. It SUCKS playing Tony Hawk with a glitched soundtrack, it sucks when final fantasy glitches during the fanfare at the end of a battle, and it sucks trying to perfect M. Bison in World Tour mode on SFA3 while the music sounds like a bit tunes track just sipped too much codeine lol

DISadvantages that seem significant: (FYI I have no clue whether or not some of these are true, this is just speculation on my part)

1) yifanly mentioned only having 1 save state....FPSE has 4 or 5? (i only use about 3 at a time)

That's a big hit. Games like Final Fantasy really benefit from being able to store so many saves. I mean, every game has instances where it helps.

2) Memory card transfer

It isn't a ps1 emulator as much as it is a ps1 game-playing program....so starting new games might be the only option unless we can transfer save states

3) Button-mapping

Is it fully customizable? Does it really matter much?

4) The separate app button thing

FPSE is cool cause you boot it right up and there's ur list of games: straight up

I'm confused as to how exactly this emulator will incorporate the games into your phone. his video showed it as a separate app button. Which means I need to make a folder with all my games. Or will it work in the "Play" program....we shall see

5) game support

yifanlu has said he's used Crash 1 and Crash 3. Very popular ps1 games. But will ANY valid ps1 iso work? It's easy to speculate, but yifanlu only has so much resources and has only tested a couple games. I hope there aren't tricky restrictions.

For the record, I hope all my disadvantages prove wrong and the emulator rocks everyone's socks off. I'm just speaking my mind.
[Xperia Play Android Development] yifanlu:
I think the main reason is that Sony made the emulator, so it is pretty much perfect. They have all the hardware blueprints and everything to write an emulator, so it has to be better then a third party. Other than that, I don't see much advantage either, except that it's free and designed for the Play.

When I say "save state", I mean the thing where you can close the game anytime and when you get back, it loads that state. There are no controls for it, but since the save states are stored on the SD card, anyone can write a third party app that will monitor the folder and switch states. I may even do so if I ever have the time.

Again, I only tested the limited amount of PSX game I ripped, but they all work.
[Xperia Play Android Development] typikal82:
I'd like to say thank you
[Xperia Play Android Development] nscxp2005:
Thank you yifanlu!!!

This is awesome!! Excellent work.

I am looking forward to testing this out.

Keep up the great work.

NSCXP2005
[Xperia Play Android Development] Miles Wolf:
:D
[Xperia Play Android Development] yifanlu:
Ok, here's the first alpha development release of the tool: https://github.com/yifanlu/PSXperia

Note that:

* No class for extraction has been written yet. I have manually extracted and modified files from Crash Bandicoot and didn't document what file goes where, and etc. That is the next thing I'm doing.

* No GUI

* To use, you need the data files in the right place and the right format (again, todo), then plug in the settings in com.yifanlu.PSXperiaTool.Test.MainTest, compile, and run.

* You need the Android sdk and Java JDK installed and pointing to your PATH. Aka, you need to be able to run "aapk" and "jarsigner" from the command line.

If you do get it working, it generates an apk and a data directory. Install the apk and move the data directory to /sdcard/Android, merging with the existing one.

I'm also looking for beta testers that I can help set up the tool. To be considered you need to have the Android SDK installed and have at least a bit of Java knowledge (compiling and etc). PM me with 1) your play model, 2) your computer OS, 3) version of android installed and and custom kernel, mods, etc, 4) if you rooted or not

Oh, and I've update the first post with newer information.
[Xperia Play Android Development] arcticmedia:
link not working
[Xperia Play Android Development] yifanlu:
Oops, I changed it. https://github.com/yifanlu/PSXperia
[Xperia Play Android Development] gwaine:
Love the PSXperia name BTW
[Xperia Play Android Development] yifanlu:
In case anyone's wondering. The games do show up in the Playstation Pocket app (for R800i users) and the Xperia Play app (for R800x users). That would be your "launcher" (and it even opens up automatically when you flip the pad open).

Also, I've tested some more games on the tool and it hasn't failed me yet.
[Xperia Play Android Development] Dyelon:
hahah damn it I have no idea where to start
[Xperia Play Android Development] speedyink:
You know, I wasn't stoked for this when it started, but now I'm super stoked.
[Xperia Play Android Development] quazimojo:
Its amazing to see progress moving so quickly.

Cant wait to get a GUI app etc .

Cannot say thank you enough for all your hard work and am anxiously awaiting comments from others who are testing the current tool.
[Xperia Play Android Development] NielDK:
Yes

http://xdaforums.com/showthread.php?t=1097428
[Xperia Play Android Development] danieljamie:
I have just added £10 GBP to the bounty for this
[Xperia Play Android Development] crono141:
I have a (somewhat lame) idea for multi disk support. More of a workaround really. For FF7, for instance, why not create a separate apk for each disk? Each disk should boot on it's own, requiring only a save file on the memory card.

Or is that the crux of the problem? No unified memory card?
[Xperia Play Android Development] nscxp2005:
Crono141,

I was thinking the exact same idea as that would be the easiest way until multi disk support is implemented.
[Xperia Play Android Development] E15i:
OK, will say bay bay to my X10 then :D

****ing yeahhhhhhhhh finally some entertainment .:D:D:D:D:D:D:D:D
[Xperia Play Android Development] Jurai:
heres hoping Sony doesn't come in with a C&D demand
[Xperia Play Android Development] illuminerdi:
I'm surprised they didn't just make your PSN account usable on the device and chose to go with a completely separate market (the Android market).

Android can support competing marketplaces (Amazon App Store, for example) so I don't think it was a platform thing.
[Xperia Play Android Development] NeoandGeo:
I wouldn't have even cared about this or the rest of the PSX emulation scene if I could have just use my purchased PSN games on the system. They implemented it in the exact wrong way.
[Xperia Play Android Development] illuminerdi:
post deleted.
[Xperia Play Android Development] Jurai:
certainly would have been nice if you could buy the psx game on the psn store and play it on both your ps3, psp, and phone, I'm sure sony doesn't mind making people double dip though
[Xperia Play Android Development] harlzden:
First of all thanks to yifanlu (Unbeliavable work) hope it keeps the xperia play scene alive.

My question, as the internal storage of the play is pretty limited, and almost all apps default to the internal storage memory on install

i was wondering when we eventually have our own psx roms on the Play, will they be able to run from the sd card without root?

reason i ask is i DONT want to root my play and the internal storage is sooo low it barely hold 1 psx rom........ & on average the size is 500mb a Rom.

please explain how ur technique applies to my query

thanks

harlzden
[Xperia Play Android Development] yifanlu:
https://github.com/yifanlu/PSXperia

Binary: https://github.com/downloads/yifanlu/PSXperia/psxperia-beta-1.zip

First beta release. I've finished the extractor and the command line interface. It is now useable (although buggy). Once everything works, I'll coat it with a GUI.

First of all, I suggest everyone turn on verbose output with -v when running so when something goes wrong, you can send me a huge logfile.

I've listed the directions to use in the readme, but if you want some even friendly ones... Make an empty folder called "psxperia" or something copy the following files to it.

1) Copy the PSXperia tool JAR (PSXperiaTool.jar) to the folder

2) Copy the Crash bandicoot APK there too (europe, r800i: com.sony.playstation.ncea00344_1.apk; usa, r800x: com.sony.playstation.ncua94900_1.apk) found in /system/app, use adb pull

3) Copy the Crash Bandicoot data ZPAK also (access the phone's sdcard, it's under "Android/data/com.sony.playstation.ncea00344_1|ncua94900_1)

4) Now run the following to extract the apk

java -jar PSXperiaTool.jar x -v com.sony.playstation.ncea00344_1.apk NCEA00344_1_1.zpak data

(Change to the USA APK/zpak if you have it)

5) Copy your game's ISO image, let's call it game.iso

6) Run

java -jar PSXperiaTool.jar c --game-name "Game Name" --icon-file icon.png NCXA00000_1 game.iso output

Change NCXA00000_1 to an unique identifier, it's the game's title id. Something like NCUA12345_1. It doesn't matter what goes here, just for better organizing.

If you don't have icon.png, you can leave that part out and get the default android icon, or make a 170x170 PNG with the game's cover.

7) You now get a "output" folder. In there, you'll find the APK, which you will install, and a "data" folder that should be merged with the "Android/data" folder on your SD card.

Oh, and you should set your phone to allow applications from unknown sources.

Please copy the entire console output when you get an error and send it to me.

And I never done Java GUI programming before, so I'm going to learn it.
[Xperia Play Android Development] Mills00013:
yifanlu: God speed on the Java GUI. You, sir, have done amazing work. Thank you!
[Xperia Play Android Development] ashergray:
Amen to that, you are a gentleman and a scholar.
[Xperia Play Android Development] nscxp2005:
You are the master at cracking things like this.

Amazing work!!

I wish you all the best for the GUI

NSCXP2005
[Xperia Play Android Development] m3dteam:
here is the error:

[I] PSXperiaTool initialized, outputting to: output
[I] Starting build.
[I] Checking to make sure all files are there.
[D] Done checking data.
[D] Created temporary directory at, .\.psxperia.376
[I] Replacing strings.
[D] Replacing strings in XML data.
[D] Writing to temporary file: .\.psxperia.376\assets\AndroidManifest.xml.tmp
[D] Successfully cleaned up and done with string replacement.
[D] Writing to temporary file: .\.psxperia.376\assets\ZPAK\metadata.xml.tmp
[D] Successfully cleaned up and done with string replacement.
[D] Writing to temporary file: .\.psxperia.376\res\values\strings.xml.tmp
[D] Successfully cleaned up and done with string replacement.
[D] Writing to temporary file: .\.psxperia.376\ZPAK\metadata.xml.tmp
[D] Successfully cleaned up and done with string replacement.
[D] Done with string replacement.
[D] Done replacing strings.
[I] Generating PSImage.
[I] Beginning PSImage compression.
[I] Generating image TOC.
[D] Done generating PSImage
[I] Generating ZPAK.
[I] Generating zpak file from directory .\.psxperia.376\ZPAK with compression =
false
[D] Done with ZPAK creation.
[E] IO error, Java says: Unable to delete file: .\.psxperia.376\ZPAK\metadata.xm
l

I will get you the log in a sec, but could you make the tool so it doesn't crash if it cannot delete the tmp files, I can do it myself

Thanks for your great work

EDIT: the log file is too big for posting 13MB, but here is the important part about it (the end):

[V] Image bytes read: 637622272
[V] Done splitting image.
[V] Compressing part.
[V] Compressed PSImage bytes written: 366294356
[V] Done compressing part.
[I] Generating image TOC.
[D] Done generating PSImage
[I] Generating ZPAK.
[I] Generating zpak file from directory .\.psxperia.649\ZPAK with compression = false
[V] CRC32 of .\.psxperia.649\ZPAK\data\image.ps is 3109271911
[V] Adding file .\.psxperia.649\ZPAK\data\image.ps
[V] CRC32 of .\.psxperia.649\ZPAK\data\ps1_rom.bin is 88827526
[V] Adding file .\.psxperia.649\ZPAK\data\ps1_rom.bin
[V] CRC32 of .\.psxperia.649\ZPAK\metadata.xml is 2764822986
[V] Adding file .\.psxperia.649\ZPAK\metadata.xml
[D] Done with ZPAK creation.
[E] IO error, Java says: Unable to delete file: .\.psxperia.649\ZPAK\metadata.xml

EDIT2: I was thinking, may be you should have try and catch in PSXperiaTool.java at line 160 around: FileUtils.deleteDirectory(zpakDirectory); or just commont it all out
[Xperia Play Android Development] Mills00013:
I has a success with Tony Hawk's Pro Skater 2. The whole process took me three tries. The first try seemed like java ran out of memory. So I closed everything. The second time was a random java exception. Third time it worked just perfect. Output moved to SD card and APK was installed. Game starts and runs just fine. There is quite a bit of screen tearing on the characters being generated, but the rest of the level and surrounding areas look great. The music is perfect and the sound is right on. This may or may not be currently uploading to my mediafire account....

Also, for anyone that might ask this in the future, I used a .img file instead of .iso and it worked.
[Xperia Play Android Development] yifanlu:
What OS are you running? And it NEEDs to delete that file, or the package won't work. Are you admin? Did you run the script as admin?

Also, if you can, redownload the JAR, as I've updated it to print out the Java stack trace.
[Xperia Play Android Development] Mills00013:
Obviously not the person you're addressing, but just some input: when I copied over my stuff from the phone I had to chmod 777 all of it to get the permissions right. That could be one of the issues. Also, I ran mine in Arch Linux and absolutely did not use root to perform the task.
[Xperia Play Android Development] m3dteam:
I am running windows XP, and yes I am the admin,

I tried to do it in both cmd, and cygwin

The weird thing is that I can delete them myself just fine
[Xperia Play Android Development] aDigitalPhantom:
i am getting the same error about deleting metadata.xml

i am using windows 7 x64 ultimate, java from java.com it is 6u26 and have uac turned off
[Xperia Play Android Development] Laberkopf:
Generating PSImage.

Beginning PSImage compression.

[E] IO error, Java says: temp.dat (Too many open files)

java.io.FileNotFoundException: temp.dat (Too many open files)

at java.io.FileOutputStream.open(Native Method)

at java.io.FileOutputStream.<init>(FileOutputStream.java:194)

at java.io.FileOutputStream.<init>(FileOutputStream.java:84)

at com.yifanlu.PSXperiaTool.PSImageCreate.splitPart(PSImageCreate.java:54)

at com.yifanlu.PSXperiaTool.PSImageCreate.compress(PSImageCreate.java:46)

at com.yifanlu.PSXperiaTool.PSXperiaTool.generateImage(PSXperiaTool.java:146)

at com.yifanlu.PSXperiaTool.PSXperiaTool.startBuild(PSXperiaTool.java:56)

at com.yifanlu.PSXperiaTool.Interface.CommandLine.doConvertImage(CommandLine.java:158)

at com.yifanlu.PSXperiaTool.Interface.CommandLine.main(CommandLine.java:57)

Edit: Nevermind. Fixed it myself
[Xperia Play Android Development] gwaine:
Laberkopf...how did you fix it?
[Xperia Play Android Development] Laberkopf:
Im using linux btw

I know security and stuff but i just su'ed to root ran ulimit -n 8192 and then ran the jar also as root

Edit: Damned error parsing the apk :/
[Xperia Play Android Development] Mills00013:
Everybody calm the fsck down. I got this.
[Xperia Play Android Development] NeoandGeo:
Exciting, exciting exciting. Best month for Android ever!
[Xperia Play Android Development] icebear8:
Soo do I HAVE to have crash on my phone for when this is in its final stage? Because I deleted it off my phone...... is there a way to re downlod the game?
[Xperia Play Android Development] muhski:
I also got the "java says cannot delete file..." error...

Any soution for this?

I'm on win7 32bit as admin...
[Xperia Play Android Development] yifanlu:
I see alot of people getting the cannot delete file error, but nobody's posting a stack trace. Is it not giving you a stack trace? Again, it would help me ALOT of you post the log/console output whenever you get an error, even if it's reported by someone else already.
[Xperia Play Android Development] Laberkopf:
And my apks are corrupted :/ Again error parsing the Apk
[Xperia Play Android Development] Nhialor:
good man, keep it up!
[Xperia Play Android Development] muhski:
Is there a log-file or an easy way to copy the output from the command.exe?

Here is the log:

L:\java>java -jar PSXperiaTool.jar c --game-name "Chrono Cross1" NCEA0815_1 Chro

no1.iso output

PSXperiaTool initialized, outputting to: output

Starting build.

Checking to make sure all files are there.

[D] Done checking data.

[D] Created temporary directory at, .\.psxperia.610

Replacing strings.

[D] Replacing strings in XML data.

[D] Writing to temporary file: .\.psxperia.610\assets\AndroidManifest.xml.tmp

[D] Successfully cleaned up and done with string replacement.

[D] Writing to temporary file: .\.psxperia.610\assets\ZPAK\metadata.xml.tmp

[D] Successfully cleaned up and done with string replacement.

[D] Writing to temporary file: .\.psxperia.610\res\values\strings.xml.tmp

[D] Successfully cleaned up and done with string replacement.

[D] Writing to temporary file: .\.psxperia.610\ZPAK\metadata.xml.tmp

[D] Successfully cleaned up and done with string replacement.

[D] Done with string replacement.

[D] Done replacing strings.

Generating PSImage.

Beginning PSImage compression.

Generating image TOC.

[D] Done generating PSImage

Generating ZPAK.

Generating zpak file from directory .\.psxperia.610\ZPAK with compression =

false

[D] Done with ZPAK creation.

[E] IO error, Java says: Unable to delete file: .\.psxperia.610\ZPAK\metadata.xm

l
[Xperia Play Android Development] aDigitalPhantom:
add ">log.txt" to command you wont see output from the command because it is being written to file, also it wont look right in windows notepad but will in notepad++

here is my log.txt
[Xperia Play Android Development] Nhialor:
upload it to pastbin makes it much easier for everyone else
[Xperia Play Android Development] muhski:
@yifanlu:

this is what your "new" jar-file adds to the command-prompt at the end:

java.io.IOException: Unable to delete file: .\.psxperia.373\ZPAK\metadata.xml

at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1643)

at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1268)

at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1200)

at com.yifanlu.PSXperiaTool.PSXperiaTool.generateImage(PSXperiaTool.java

:159)

at com.yifanlu.PSXperiaTool.PSXperiaTool.startBuild(PSXperiaTool.java:56

)

at com.yifanlu.PSXperiaTool.Interface.CommandLine.doConvertImage(Command

Line.java:158)

at com.yifanlu.PSXperiaTool.Interface.CommandLine.main(CommandLine.java:

57)
[Xperia Play Android Development] nscxp2005:
yifanlu,

Do the PSX images have to be in ISO format or can they be in BIN or IMG?

Thanks

NSCXP2005