Vita3K Progress Report - April 2018


Preface

Lately I’ve been contributing a lot to an emulation project that was open-sourced a few months ago by its founding developer, PetMac. As the title suggests, it aims to emulate the Playstation Vita.

When it was initially released, it booted a bunch of homebrew titles and a few months later - after me and a few other developers have been working on it - it has progressed a great deal.

As is usual with such emulation projects (see Dolphin’s, RPCS3’s, Citra’s, etc), I really wanted to have regular Progress Reports. So, I took on the task of writing our first one.

It got some decent traction from /r/emulation and similar forums, which is great as it helps spread the word and potentially helps our Patreon, which would allow some of us to devote more time on it.

Anyway, that’s it for the preface - I’m posting the whole thing below or alternatively you can read it on our project’s blog here: https://vita3k.github.io/blog.html.

Introduction

Welcome to our first progress report!

This past month Vita3K has seen numerous improvements, achieving an important milestone in the development of any emulator: commercial games starting to show signs of life!

In addition, a lot of homebrews have progressed as a few important parts of the PS Vita kernel were implemented.

Major Improvements

Module Loading (#122, merged in #154)

Module loading was the final hurdle for loading commercial games. In a few words, it allows loading dynamic modules included with games, in Vita3K’s internal representation of the Vita’s memory.

Downwell, VVVVVV, Duke Nukem 3D: Megaton Edition and probably many other commercial games load and print debugging output.

It’s important to note that frangarcj was able to implement this thanks to the reversing work done by many people in the Vita homebrew scene, including but not limited to yifanlu and xyz.


Unfortunately, it will be a while before we’ll get graphical output from commercial games, since we’re still in the process of reversing the shader format of the Vita’s GPU. After that, we’ll need to translate those shaders to a host format, which is a challenge in and of itself. There are possible workarounds for this until we get to that point, but we haven’t explored them yet as games crash because of reasons unrelated to graphics.

Logs

Downwell

Kernel Synchronization Primitives (#170, #159, #157, #190)

An important part of operating system kernel, is to provide its user-mode programs ways to cooperate in a way that guarantees no race-conditions happen.

This is solved by providing synchronization primitives. Two very common examples are semaphores and mutexes. The Vita also has “lightweight” versions of those, which essentially perform faster by making some trade-offs.

The PRs above essentially implement semaphores, mutexes and lightweight mutexes. The Vita kernel supports many more types, but these are some really common ones used by nearly every game.

Fortunately, after the refactoring and improvements introduced by #170 and #190, several other sync primitives will be straightforward to implement.

Screenshots

OpenSyobon

Minicraft

Labyrinth 3D

flppy Bird

HOTA

HandyVita

milieTetris

Blockout

Katawa Shoujo

ZeldaROTH

ZeldaNSQ

GUI/Debugger (#147)

This and subsequent PRs implement a basic graphical interface using the ‘dear imgui’ immediate-mode GUI library. It adds some debugging tools that we’ll no doubt improve and expand upon as development progresses.

Booting games is still only possible by supplying them as command-line arguments, but that will change in the future.

Debugger UI

Progress Screenshots

Here’s a few other screeshots showing homebrews that either boot or are playable for the first time after this month’s work.

Flood it (#152)

Numpty Physics (#163)

ZeldaNSQ (#159)

Roadmap

Here’s a rough list of features we’re prioritizing at the moment. They will likely be explained in more detail once implemented.

Closing Words

The past month, 146 commits have been merged, with 5,212 added lines and 1,667 deletions by 9 contributors.

It’s not easy to sift through each commit/Pull Request and pick out more to show off here, but hopefully we gave a decent overview of our progress the past month.


This post was written by a developer - unless we get more people willing to help write these reports (or record/edit videos), we can’t promise they’ll be regular and more detailed, so if you’re interested, contact us on our Discord.

Perhaps more importantly, we’re always looking for new testers! Here’s our compatibility lists for homebrew and commercial games.

Thanks to IllusionMan1212 for providing the screenshots and testing.

That’s all for now, thanks for reading!