How does the commercial roms start?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Actarus
Posts: 33
Joined: Mon May 19, 2008 12:54 am
Contact:

How does the commercial roms start?

Post by Actarus »

Hi all

Im working on my emulator and Im loading a commercial rom. In the file ISO I found 2 binary file BOOT.BIN and EBOOT.BIN. What are they?
Waht my emulator must load?

Thanks all for answers.
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

EBOOT.BIN is what the PSP starts. It is decrypted first with KIRK, then launched.

BOOT.BIN is a devkit version of the game. It may be older, contain different code, use a different environment, or, in the worst case, be nulled out. (At some point Sony had started nulling out the BOOT.BINs of several games, around 3.0 FW if i recall correctly, but quite a few games I have bought since still have it)

If you want to do emulation, you will have to decrypt the EBOOT.BIN on a PSP, and then run it as a usermode PRX on your emulator. Using the BOOT.BIN is generally not a good idea, for the reasons mentionned above.
User avatar
Actarus
Posts: 33
Joined: Mon May 19, 2008 12:54 am
Contact:

Post by Actarus »

decrypt? how?
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

With the PSP cryptography engine, the inner workings of which are not known, apart from the almost certainty that the algorithm used is a combination of AES, SHA1 and CBC.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

just my two cents: how about a small client-server application embedded in emulator that pass encrypted data to PSP over USB connection and gets back it decrypted? first time emulator should use a real PSP to do the job this way, while subsequent ones it could rely on cached data, allowing even to treat PSP as a sort of UMD drive....if i correctly understand this has to be done for each file containing executable code, not just eboot....however the amount of data to pass forth and back is small relatively to that of media related data.
Warning of the "piracy-detected" alarm certainly sounding in someone's mind here around....until today PSP emulation was seen as a way to easily debug homebrews without having to swap files or even turning on PSP. Workaround of signed data could be seen as an attempt to promote piracy.
(Final note: i do not share this last point...if i buy something then i'm free to use it any way i want: let me use my PSP games on my dishwasher if i've fun doing it)
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

I was wondering if such a tool already exists. I'm interested since I'll need it for a future PSP emulator. It shouldn't be a problem if you need a PSP to do so : extracting and uncrypting binaries from a game. If someone wants to run his/her (bought) game on a PC, he/she would simply need to run this tool on his/her PSP and retrieve the extracted binaries and data for his/her PSP emulator.

The question is : does this tool already exist ?
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

BTW, I'm curious to know which language you use to code SAM.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

yep....don't remember the name but it exist: i was just suggesting to integrate it in the emulator itself to avoid bothering to move files around
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

i think jasonuk prxdecrypter decrypts eboot.bin
jas0nuk
Posts: 137
Joined: Thu Apr 27, 2006 8:00 am

Post by jas0nuk »

As moonlight said, my "PRXdecrypter" tool will decrypt EBOOT.BIN (and a bunch of other filetypes you'll never be interested in)

Here's the latest binary, since all the current public releases have an annoying bug:
http://www.sendspace.com/file/p5x2nj

Create "enc" folder on the root of your memory stick, put your EBOOT.BIN in there, run the app, follow instructions, and the file will be replaced with a decrypted version.
User avatar
Actarus
Posts: 33
Joined: Mon May 19, 2008 12:54 am
Contact:

Post by Actarus »

OMG what it happens? How can i decrypt the eboot.bin in my emulator?
Where is the source code. OMG again I cant understand.

* * * EDIT * _ * i can release the source code of my emulator if you want.
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

thx jas0nuk
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

@Actarus, then you are not ready to create a emulator
Image
Upgrade your PSP
jas0nuk
Posts: 137
Joined: Thu Apr 27, 2006 8:00 am

Post by jas0nuk »

Actarus, it has already been explained -_-
The PSP decrypts binaries using KIRK which appears to be quite a complicated mask rom. I doubt it will ever be emulated, so you'll have to decrypt EBOOT.BIN files on a PSP before you try and run them in an emualtor.
User avatar
Actarus
Posts: 33
Joined: Mon May 19, 2008 12:54 am
Contact:

Post by Actarus »

cool :( i must
whistler
Posts: 39
Joined: Tue Mar 04, 2008 7:08 am

Post by whistler »

Pirata Nervo wrote:@Actarus, then you are not ready to create a emulator
what you going on about? he's done a good job so far

http://actarus.runhost.net/
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

Actarus wrote:* * * EDIT * _ * i can release the source code of my emulator if you want.
sure ^_^, i'm very curious about your own approacha bout PSP emulation.

so far, there are 4 (incomplete) PSP emulators :

potemkin from ector (C++)
pspplayer from noxa (C#)
pspemulator from soywiz (D)

and yours still unknown to me. :)
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

@whistler, I meant an emulator which decrypts the EBOOT.BIN because he does not understand how it is decrypted and it has already been explained.
I believe he has made a good job but going into UMD emulation is even more hard
Image
Upgrade your PSP
User avatar
Actarus
Posts: 33
Joined: Mon May 19, 2008 12:54 am
Contact:

Post by Actarus »

yes umd emulation is very hard. I must have 2 pc for debug, now i must purchase.
cloudhunter
Posts: 86
Joined: Thu Aug 17, 2006 3:27 am

Post by cloudhunter »

Can't you debug without a second PC? :/ Seems a bit senseless.

Cloudy
:)
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

i think jasonuk prxdecrypter decrypts eboot.bin
Create "enc" folder on the root of your memory stick,...
Don't think i explained that well...
I remember i saw jas0nuk's decrypter, but i also remember of someone else's app (probably using same core code) sending data forth and back over USB for decryption without having to bother moving files around...
So i meant to embed "client code" in PC-side emulator while a "decryption service" is running on PSP...the whole process is done on the fly and noone can shout "to the pirate!".

PS: it would be very nice to see a good emulator, but the fact is (similarly when we speak of project Utopia) PSP hardware is _NOT_ well known at the moment...let's take VME for instance...it seems a sort of embedded FPGA but no one has succeded in investigating it afaik....Hope someone can deny me.
Post Reply