AdinB::Log

Posts in this series:

  1. Tinkering My PS Vita
  2. Tinkering My PS Vita: Hello World
  3. Tinkering My PS Vita Interlude: Emulator
  4. Tinkering My PS Vita Interlude: My Workspace
  5. Tinkering With Vita: Animating Sprites

Tinkering My PS Vita Interlude: Emulator

Today I learned PSVita emulator exists. Well to be honest, I’ve already heard the news since couple of months ago, but I haven’t had chance to download and try the emulator.

Taken from its website, Vita3K is an experimental PSVita emulator. It can already run some of homebrew apps available, but commercial games arent supported. Since I’m currently learning on how to program the Vita, I’m kinda interested on using this as Vita substitution, especially in early stages of development. More informations are available at Vita3K Github repository.

Let’s get started!

Setup

The setup process is very easy. Just go to the website and scroll to downloads section. There you can download Vita3K binary specific to your OS, either Windows, OSX, or linux. After downloading the file, you are ready to go.

Running your program

To run your program, you can put your .vpk file as first parameter of the emulator. For example:

./Vita3K hello_world.vpk

After you run the command, Vita3K will install your program and run it. Then, if you execute the emulator without any parameter it will present you with list of installed programs. You can then press G to hide the GUI.

Vita3K program list

To test the emulator, I used the hello_world program I created [earlier], with a printf to see whether it actually waited for 3 seconds or not.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#include <psp2/kernel/threadmgr.h>
#include <psp2/kernel/processmgr.h>
#include "debugScreen.h"

#define printf psvDebugScreenPrintf

int main(int argc, char *argv[]) {
    psvDebugScreenInit();
    printf("Hello, world!\n");
    sceKernelDelayThread(3*1000000); // Wait for 3 seconds
    printf("Exiting...\n");
    sceKernelExitProcess(0);
    return 0;
}

Below is what it looks in the emulator. You can right click the image > View Image to see it more clearly.

It works!

Thoughts

The emulator will be very useful as debugging tool, especially for features that don’t need fancy Vita features. Also, it’s more fun to run your program in the actual device :). I have yet to discover what the limit of this emulator, but we will find out later after I’ve done some more implementations.

See you again soon!