Coder Social home page Coder Social logo

xerpi / vita2hos Goto Github PK

View Code? Open in Web Editor NEW
1.1K 66.0 31.0 3.89 MB

[WIP] PlayStation Vita to Horizon OS (Nintendo Switch OS) translation layer

Home Page: https://discord.gg/Z9kAsBqkbx

License: GNU General Public License v2.0

C 93.87% C++ 4.11% CMake 2.02%

vita2hos's Introduction

vita2hos

A PlayStation Vita to Horizon OS (Nintendo Switch OS) translation layer (not an emulator)

How does it work?

PlayStation Vita (ARMv7 CPU) executables can be run natively on Nintendo Switch ARMv8 CPU in 32-bit execution mode.

When loading a PlayStation Vita executable, vita2hos redirects the module imports of said executable to jump to routines that implement the same behavior, by using native Horizon OS services, like the one exposed by the original PlayStation Vita OS modules.

How can I use it?

Running it on a real console

  1. Copy vita2hos.nsp to your microSD card (i.e. to: atmosphere/vita2hos.nsp)

  2. Create atmosphere/config/override_config.ini and add the following lines to it:

    [hbl_config]
    override_any_app=true
    override_any_app_key=R
    override_any_app_address_space=32_bit
    ; adjust the path according to the location of your file
    path=atmosphere/vita2hos.nsp
    • Note: As long as this file exists you won't be able to use the homebrew menu and instead will always run vita2hos.

      A quick workaround would be to rename the file and restart your Switch. Unfortunately override_config.ini doesn't allow multiple path entries which is why it has to be done this way.

  3. Copy a PlayStation Vita executable (.velf or .self/eboot.bin) to sd:/vita2hos/executable

  4. Boot (or reboot) your Switch and start any game while holding down R

    • Attempting to use vita2hos via applet mode (album button) will currently result in a fatal error and wouldn't be recommended anyway.
  5. Enjoy!

Running it on yuzu

  1. Copy a PlayStation Vita executable (.velf or .self/eboot.bin) to sd:/vita2hos/executable (FileOpen yuzu Foldersdmc/)
  2. Run vita2hos.nsp
  3. Enjoy!

Running it on Ryujinx

  1. Copy a PlayStation Vita executable (.velf or .self/eboot.bin) to sd:/vita2hos/executable (FileOpen Ryujinx Foldersdcard/)
  2. Disable PPTC (OptionsSettingsSystem → Unselect Enable PPTC (Profiled Persistent Translation Cache))
  3. Run vita2hos.nsp
  4. Enjoy!

Building

  1. mkdir build && cd build
  2. Two options:
     a. arm-none-eabi-cmake ..
     b. cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$DEVKITPRO/cmake/devkitARM.cmake ..
  3. make (or ninja if configured with -G Ninja)
  4. vita2hos.nsp will be generated

I recommend passing -DCMAKE_COLOR_DIAGNOSTICS:BOOL=TRUE, especially when using Ninja.

Project status, compatibility and supported features

This is still in very early stages and therefore it can only run very simple CPU-rendered PlayStation Vita homebrews.

There is very initial 3D graphics support (it can run vitasdk's GXM triangle and cube samples by hardcoding vita2hos's GLSL shaders to match the Cg shaders the samples use).

Special Thanks

A few noteworthy teams/projects who've helped along the way are:

Also special thanks to @PixelyIon and @SciresM for their help, and to all the testers, especially @TSRBerry.

Disclaimer

  • Nintendo Switch is a trademark of Nintendo Co., Ltd
  • PlayStation Vita is a trademark of Sony Interactive Entertainment

vita2hos's People

Contributors

tsrberry avatar xerpi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vita2hos's Issues

download problem

Can you provide the download link for vita2hos.nsp, thank you

visver hos2vita

Given the techniques used doing this, would it be crazy to see it done the other way around?

clock speeds wise, they may overlap but not exactly close even in ram size 🤔

Is this similar in principle to Proton?

I understand that vita2hos is not emulation since both the switch and vita have compatible underlying microarchitectures. Would you say vita2hos and Proton work the same way in principle?

[Suggestion] Vita2Hos Discord Server

A discord server for this project would make it easier for you to share changes and talk to people who are using this and want to show issues with it.

just a suggestion i don't expect you to do it just thought it would be cool to be able to talk to others who like this project

VPK support ?

Hello, I tried for hours to change a VPK file into a Velf ou Self but nothing where good, so do you have tutorial to switch from VPK to a valid file or just a support for all VPK files

Suggestion: Wrappers

As the title indicates, a pretty useful way of testing software compatibility an different options inside the compatibility layer that vita2hos is, it would be easier to implement wrappers like wine does on macOS or Linux, contain the Vita app inside a custom configured self contained NSP or NRO whose configs would be totally user configurable, that would also help to test compatibility in a per app basis…

Issue building, missing "libnx32/switch32_rules"

root@7c0b94cf994d:/downloads/Downloads/vita2hos# make Makefile:10: /opt/devkitpro/libnx32/switch32_rules: No such file or directory make: *** No rule to make target '/opt/devkitpro/libnx32/switch32_rules'. Stop.

From the official devkita64 image.

[Proposition] Vita games on homescreen

When it supports at least GPU stuff, make it that it shows Vita software on the HOS Home Screen, with all original icon0, it would make it look really good

Name suggestion: 'VINE'

This project reminds me of the windows-to-linux translation layer WINE. Since this is for the Vita, I'd like to suggest 'VINE' as a potential name.

Congrats!!

I'm legitimately shocked that the Switch homebrew scene has come this far. Shut down the internet!!!! /s

But, as a proud owner of a Switch and of a Vita, who knows, this someday may give me the PS TV I've been wanting (lol).

I'm very excited to see what happens with this--thank you very much for your hard work.

Hopefully this brings more eyes to the amazingness of the Vita!!

Vita means life, and thank you SO MUCH for the new life you've given it. :)

What does this mean for Android?

Vita emulation on Android has been nonexistent, outside of a few scam emulators. I was wondering, since modern Android CPUs share a lot of similarities with the Switch CPU (the existence of Skyline proves this), if an approach like this could potentially get Vita code running on Android. Skyline would likely be helpful for this, either as reference or as some form of wrapper (although that would make it perform sub-optimally, no?). Of course, I'm just speaking theoretically here. Thanks!

[alpha v0.2] does not find `/vita2hos/test.elf`

Hello its good to see that new version was just released. I have a problem with this new version where I cannot enter the menu after launching it. I have no problem with the previous version but this time I cannot enter the menu. Thanks in advice!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.