Developing emulators in Playstation Suite?

Discussion in 'PS Vita - Hacking & Homebrew' started by Foshy, Apr 25, 2012.

Apr 25, 2012
  1. Foshy
    OP

    Newcomer Foshy Newbie

    Joined:
    Sep 17, 2009
    Messages:
    4
    Country:
    Switzerland
    First off, I know next to nothing about developing, so I'm not quite sure if this is even possible, it's just a thought that crossed my head.

    Now with PlayStation Suite in Open Beta and the possibility for everyone to develop homebrew games and put them on Vita, wouldn't it be also possible to create emulators? Like I said, I don't know much about developing, but think it would be feasible to make something or even port something existing to Vita, as it has been done with practically every device yet. The only problem I could see is transferring the actual ROMs to Vita, but maybe they could be included in the application itself.

    I wouldn't be surprised if something is already in development, I just haven't seen anything yet and so I thought I could post this here, maybe someone who is experienced enough in programming is willing to try it :D
     
  2. Snailface

    Member Snailface My frothing demand for 3ds homebrew is increasing

    Joined:
    Sep 20, 2010
    Messages:
    4,324
    Location:
    Engine Room with Cyan, watching him learn.
    Country:
    Antarctica
    Lots of people have considered this I'm sure. It sounds like a good idea, but you have to wonder if anyone is willing to sink a bunch of time into an emulator project knowing Sony will likely kill free (no-cost) use of PsSuite homebrew distribution at the end of the open beta period.

    However, the possibility of stable (!vhbl like) emulation with touch screen, dual analogue, and hd resolution may be enough to push a dev or two past their fear. Hopefully. :)
     
  3. sblur

    Newcomer sblur Member

    Joined:
    Aug 2, 2006
    Messages:
    32
    Country:
    There are some problems with this idea. Here are some:
    • After the end of the Open Beta, there won't be any way to distribute the software except to other people who pay the $99/year developer fee. Unlike the iPhone, Sony has confirmed that there will NOT be an AdHoc distribution method for PSSuite titles. (In contrast, on iOS a developer can authorize up to 99 devices under to run builds of their software outside of the app store. This is intended for letting people beta test.)
    • Emulators are loosely forbidden by the PSSuite EULA. They don't directly come out and say it, but there is a clause that basically says you can't make something that could be used to pirate hardware or software.
    • Sony is not allowing PSSuite Apps to be free. All apps submitted to their store will cost money, and Sony will be setting the price. (This is bullshit for me, because I started a port of my iOS game during the closed beta and now I have no intention of finishing it because I can't release it for free.)
    • The biggest problem, it's too slow to get anything playable out of it. The PSSuite code runs in a Virtual Machine, so it's like running an emulator inside of an emulator.
    There's a private video on YouTube of a Genesis emulator ported to the PSSuite. The performance is terrible. I'd estimate that it looked like about 2fps, and that was with the Z80 and sound hardware emulation disabled. The video was uploaded on 2012-04-22, but I'm pretty sure the author doesn't want it posted here.
     
  4. Foshy
    OP

    Newcomer Foshy Newbie

    Joined:
    Sep 17, 2009
    Messages:
    4
    Country:
    Switzerland
    I'm aware of the fact that distributing them would obviously be illegal, I was just wondering if it was possibile.

    That's a bit sad though. Couldn't the problem be that the emulator was poorly optimized? If not, what would be the specs of this "Virtual Machine"?
     
  5. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,712
    Country:
    United Kingdom
    sblur's knowledge on the matter undoubtedly far exceeds my own (until I wandered into this thread I was entirely unaware Sony were doing something like this) but looking back it might have been that is was a quick and dirty recompile of an existing emulator probably from a PC (I assume the PSP and vita architecture is different enough that crossporting would not have been near trivial/just a matter of tweaking the UI and function names) and on other hardware these tend to be slow (see several proof of concept emulators over the years) as they lack the speedups that tend to require low level coding (which is both hard and makes it system specific/porting difficult). However if indeed it was a virtual machine* causing the slowdown either because it is something like java or some other interpreted language (this would mean the "specs" question is not that useful) or much like the PS3 one for the linux there that restricted speeds and availability of hardware (in which case the specs question is more useful)- 99 USD a year is a near negligible expense and if that nets you full hardware access then fewer will buy your expensive SDK which is probably in the thousands (we quite often get developers asking questions with thoughts towards outfitting their teams with flash carts for that very reason) then there probably not much that can be done.

    *this also has other implications later down the line- as mentioned emulators often make use of tricks to speed up code running and virtual machines/hypervisors will tend to slap them down under the guise of security (and frankly they are not wrong as an emulator using speedup methods will look quite similar to a lot of attack techniques). A lot of people that might have made emulators for the 360 had a hard time with a variation of this and indeed one of the hacks was to add a section of unencrypted memory to use such techniques upon.

    The other side of emulation is you can run an emulator inside an emulator effecting making a slow form of unsigned code which may not be appreciated (Apple used a similar reason to shut down or restrict several emulators to a premade set in the past).
     
  6. sblur

    Newcomer sblur Member

    Joined:
    Aug 2, 2006
    Messages:
    32
    Country:
    It is not an optimization issue. There is no platform specific optimization to be done, since everything that isn't platform specific needs to be coded from scratch anyway. The PSSuite development is done all in C# (with support for VB coming at some point) and that is compiled down to bytecode to be run by the CLR runtime virtual machine on the Vita.

    The exact same bytecode produced on the compiler runs on simulator and the Vita hardware. On a PC, it will run fast because it's using JIT compilation to convert the bytecode to native machine code at runtime. But on the Vita in its current state, the runtime does not translate bytecode into native code. In other words, the Vita "Virtual Machine" works just line an emulator, parsing each instruction one by one. I don't expect Sony to ever use Just In Time compilation on the Vita for the Playstation Suite, (at least during the beta phase) because that would open a potential hole in their security model since it would require additional memory to be marked as executable at runtime. It looks like the video is public on YouTube now.
     
    1 person likes this.

Share This Page