GithubHelp home page GithubHelp logo

vita3k / vita3k Goto Github PK

View Code? Open in Web Editor NEW
3.6K 174.0 363.0 74.95 MB

Experimental PlayStation Vita emulator

Home Page: https://vita3k.org/

License: GNU General Public License v2.0

Shell 0.04% Batchfile 0.05% CMake 0.81% C++ 98.76% Makefile 0.03% GLSL 0.21% Python 0.10%
playstation vita emulator emulation psvita ps-vita cpp hacktoberfest

vita3k's Introduction

Vita3K

C/C++ CI Vita3K discord server ko-fi

Introduction

Vita3K is an experimental PlayStation Vita emulator for Windows, Linux, macOS and Android.

Compatibility

The emulator currently runs most homebrew programs. It is also able to load some commercial games.

Gallery

Persona 4 Golden by Atlus A Rose in the Twilight by Nippon Ichi Software
Persona 4 Golden screenshot A Rose in the Twilight screenshot
Alone with You by Benjamin Rivers VA-11 HALL-A by Sukeban Games
Alone with You screenshot VA-11 HALL-A screenshot
Fruit Ninja by Halfbrick Studios Jetpack Joyride by Halfbrick Studios
Fruit Ninja Screenshot Jetpack Joyride Screenshot

License

Vita3K is licensed under the GPLv2 license. This is largely dictated by external dependencies, most notably Unicorn.

Downloads

Building

Please see building.md.

Running

Look through the app list and click on the app you would like to run and click the start button.

For more detailed instructions on running/installing apps on Vita3K, please read the #info-faq channel on our Discord Server.

Bugs and issues

The project is in an early stage, so please be mindful when opening new issues. Expect crashes, glitches, low compatibility and poor performance.

Thanks

Thanks go out to the developer team and everyone who has contributed.

  • These are people like petmac, frangarcj, VelocityRa, 1whatleytay, EXtremeExploit, HolyMcDiver, HorrorTroll, IllusionMan1212, KorewaWatchful, scribam, sunho, wfscans, Macdu, bookmist, pent0 and Zangetsu38.

Supporters

Thank you to the supporters and to all those who support us on our ko-fi.

  • Among them, those who subscribed to the Nibble Tier and upper: j0hnnybrav0, Mored4u, TacoOblivion, Undeadbob and uplush

Note

The purpose of this emulator is not to enable illegal activity. You can dump games from a Vita by using NoNpDrm or FAGDec. You can get homebrew programs from VitaDB.

PlayStation, PlayStation Vita and PlayStation Network are all registered trademarks of Sony Interactive Entertainment Inc. This emulator is not related to or endorsed by Sony, or derived from confidential materials belonging to Sony.

vita3k's People

Contributors

1whatleytay avatar bookmist avatar bythos14 avatar coffeebrewer64 avatar creepnt avatar croden1999 avatar d3m3vilurr avatar dima-xd avatar extremeexploit avatar frangarcj avatar hobyst avatar huanjicanshang avatar illusionman1212 avatar khoralee avatar korewawatchful avatar macdu avatar merryhime avatar nishinji avatar pent0 avatar petmac avatar qurious-pixel avatar redpolline avatar rinnegatamante avatar saturnsky avatar scribam avatar sunho avatar totlmstr avatar velocityra avatar xerpi avatar zangetsu38 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  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

vita3k's Issues

Unload modules

Implement functions for unloading modules. These functions must deal with export and import resolving

Implement high level SceFios2User

In order to get fios2.suprx working we need a high-level implementation of:
https://wiki.henkaku.xyz/vita/SceDriverUser#SceFios2User

We have some info on headers on:
https://github.com/rpcs3/rpcs3/blob/psp2/rpcs3/Emu/PSP2/Modules/sceFios.cpp

  • sceFiosOverlayAddForProcess02
  • sceFiosOverlayGetInfoForProcess02
  • sceFiosOverlayGetList02
  • sceFiosOverlayGetRecommendedScheduler02
  • sceFiosOverlayRemoveForProcess02
  • sceFiosOverlayResolveSync02
  • sceFiosOverlayResolveWithRangeSync02
  • sceFiosOverlayThreadIsDisabled02
  • sceFiosOverlayThreadSetDisabled02

Linux build fails on the final linking

Arch x86_64
cmake 3.10.1-2
unicorn 1.0.1-3

Updated the submodules, created a new folder, ran cmake with the ../src/ dir, and ran make -j10

[ 95%] Linking CXX static library libSceUsbSerial.a
[ 96%] Linking CXX static library libSceUlt.a
[ 96%] Linking CXX static library libSceUsbstorVStorDriver.a
[ 96%] Built target SceUsbSerial
[ 97%] Linking CXX static library libSceUsbd.a
[ 97%] Built target SceUlt
[ 97%] Built target SceUsbd
[ 97%] Built target SceUsbstorVStorDriver
[ 97%] Linking CXX static library libSceVideoExport.a
[ 97%] Built target SceVideoExport
[ 97%] Linking CXX static library libSceVoice.a
[ 97%] Linking CXX static library libSceVideodec.a
[ 97%] Built target SceVoice
[ 97%] Built target SceVideodec
[ 97%] Linking CXX static library libSceVoiceQoS.a
[ 97%] Built target SceVoiceQoS
[ 97%] Linking CXX static library libglutil.a
[ 97%] Built target glutil
Scanning dependencies of target SceGxm
[ 97%] Building CXX object emulator/modules/SceGxm/CMakeFiles/SceGxm.dir/src/SceGxm.cpp.o
[ 97%] Linking CXX static library libSceVshBridge.a
[ 97%] Built target SceVshBridge
[ 98%] Linking CXX static library libSceGxm.a
[ 98%] Built target SceGxm
Scanning dependencies of target emulator
[ 99%] Building CXX object emulator/CMakeFiles/emulator.dir/load_self.cpp.o
[ 99%] Building CXX object emulator/CMakeFiles/emulator.dir/vpk.cpp.o
[ 99%] Building CXX object emulator/CMakeFiles/emulator.dir/main.cpp.o
[ 99%] Building CXX object emulator/CMakeFiles/emulator.dir/relocation.cpp.o
[100%] Linking CXX executable Vita3K
cpu/libcpu.a(cpu.cpp.o): In function `is_thumb_mode(uc_struct*)':
cpu.cpp:(.text+0x67): undefined reference to `uc_query'
cpu/libcpu.a(cpu.cpp.o): In function `intr_hook(uc_struct*, unsigned int, void*)':
cpu.cpp:(.text+0x4df): undefined reference to `uc_reg_read'
cpu.cpp:(.text+0x53e): undefined reference to `uc_mem_read'
cpu.cpp:(.text+0x5b0): undefined reference to `uc_mem_read'
cpu/libcpu.a(cpu.cpp.o): In function `enable_vfp_fpu(uc_struct*)':
cpu.cpp:(.text+0x64a): undefined reference to `uc_reg_read'
cpu.cpp:(.text+0x695): undefined reference to `uc_reg_write'
cpu.cpp:(.text+0x6db): undefined reference to `uc_reg_write'
cpu/libcpu.a(cpu.cpp.o): In function `init_cpu(unsigned int, unsigned int, bool, std::function<void (unsigned int, unsigned int)>, MemState&)':
cpu.cpp:(.text+0x84f): undefined reference to `uc_open'
cpu.cpp:(.text+0x88b): undefined reference to `uc_close'
cpu.cpp:(.text+0x969): undefined reference to `uc_hook_add'
cpu.cpp:(.text+0x9f4): undefined reference to `uc_hook_add'
cpu.cpp:(.text+0xa58): undefined reference to `uc_reg_write'
cpu.cpp:(.text+0xade): undefined reference to `uc_mem_map_ptr'
cpu.cpp:(.text+0xb3e): undefined reference to `uc_reg_write'
cpu/libcpu.a(cpu.cpp.o): In function `run(CPUState&)':
cpu.cpp:(.text+0xc53): undefined reference to `uc_reg_read'
cpu.cpp:(.text+0xcd2): undefined reference to `uc_emu_start'
cpu/libcpu.a(cpu.cpp.o): In function `stop(CPUState&)':
cpu.cpp:(.text+0xd3e): undefined reference to `uc_emu_stop'
cpu/libcpu.a(cpu.cpp.o): In function `read_reg(CPUState&, unsigned long)':
cpu.cpp:(.text+0xde3): undefined reference to `uc_reg_read'
cpu/libcpu.a(cpu.cpp.o): In function `read_sp(CPUState&)':
cpu.cpp:(.text+0xe72): undefined reference to `uc_reg_read'
cpu/libcpu.a(cpu.cpp.o): In function `write_reg(CPUState&, unsigned long, unsigned int)':
cpu.cpp:(.text+0xf1a): undefined reference to `uc_reg_write'
cpu/libcpu.a(cpu.cpp.o): In function `write_pc(CPUState&, unsigned int)':
cpu.cpp:(.text+0xf80): undefined reference to `uc_reg_write'
collect2: error: ld returned 1 exit status
make[2]: *** [emulator/CMakeFiles/emulator.dir/build.make:323: emulator/Vita3K] Error 1
make[1]: *** [CMakeFiles/Makefile2:1038: emulator/CMakeFiles/emulator.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Option/information for porting over a memcard dump.

I in particular have no actual VPKs, but plenty of already installed games.
While V3K isn't retail ready, even the homebrew I could test is in extracted form.
Is there some sort of method or way to load up this unpacked content?
This also would prevent the need for obtaining already owned games in a not so ethical manor once the time comes, as well as allows a possibility to simply copy/paste everything, including save data.
This may be an issue too early on in the life of this emulator, though I felt I should bring it up.

Unknown partition cannot open ux0:/app//script.lua used

When Run AdrenalineBubbleManager Show In CMD Error

[04:14:50.928] [critical] open_file: Unknown partition cannot open ux0:/app//script.lua used. Report this to developers!

full Log

 [04:15:42.495] [info] SDL_main: Vita3K v0.1 90-3bfa25b
 [04:15:42.944] [warning] relocate: Unhandled relocation code 102.
 [04:15:42.944] [warning] relocate: Unhandled relocation code 102.
 [04:15:42.944] [warning] relocate: Unhandled relocation code 102.
 [04:15:42.945] [warning] relocate: Unhandled relocation code 102.
 [04:15:42.945] [warning] relocate: Unhandled relocation code 102.
 [04:15:42.961] [warning] unimplemented: >>> sceKernelCreateLwMutex <<< Unimplemented import called.
 [04:15:43.144] [warning] unimplemented: >>> sceKernelCreateMutex <<< Unimplemented import called.
 [04:15:43.147] [warning] unimplemented: >>> sceKernelLockLwMutex <<< Unimplemented import called.
 [04:15:43.194] [info] export_sceGxmCreateContext: GL_VERSION = 4.6.0 NVIDIA 388.13
 [04:15:43.195] [info] export_sceGxmCreateContext: GL_SHADING_LANGUAGE_VERSION = 4.60 NVIDIA
 [04:15:43.214] [warning] unimplemented: >>> sceGxmSetFrontStencilRef <<< Unimplemented import called.
 [04:15:43.215] [warning] unimplemented: >>> sceGxmSetFrontStencilFunc <<< Unimplemented import called.
 [04:15:43.237] [warning] unimplemented: >>> sceShellUtilInitEvents <<< Unimplemented import called.
 [04:15:43.238] [warning] unimplemented: >>> sceCtrlSetSamplingMode <<< Unimplemented import called.
 [04:15:43.239] [warning] unimplemented: >>> sceTouchSetSamplingState <<< Unimplemented import called.
 [04:15:43.239] [warning] unimplemented: >>> sceAppUtilInit <<< Unimplemented import called.
 [04:15:43.240] [warning] unimplemented: >>> sceAppUtilMusicMount <<< Unimplemented import called.
 [04:15:43.240] [warning] unimplemented: >>> sceAppUtilPhotoMount <<< Unimplemented import called.
 [04:15:43.240] [warning] unimplemented: >>> sceAppUtilSystemParamGetInt <<< Unimplemented import called.
 [04:15:43.240] [warning] unimplemented: >>> sceCommonDialogSetConfigParam <<< Unimplemented import called.
 [04:15:43.240] [warning] unimplemented: >>> vshMemoryCardGetCardInsertState <<< Unimplemented import called.
 [04:15:43.241] [error] error: >>> sceNetShowNetstat <<< returned -0X7FBEFE38
 [04:15:43.242] [warning] unimplemented: >>> sceNetCtlInit <<< Unimplemented import called.
 [04:15:43.243] [warning] unimplemented: >>> sceHttpInit <<< Unimplemented import called.
 [04:15:43.243] [warning] unimplemented: >>> sceSslInit <<< Unimplemented import called.
 [04:15:43.243] [warning] unimplemented: >>> sceHttpsDisableOption <<< Unimplemented import called.
 [04:15:43.243] [warning] unimplemented: >>> sceNetGetMacAddress <<< Unimplemented import called.
 [04:15:43.246] [warning] unimplemented: >>> sceSysmoduleLoadModuleInternalWithArg <<< Unimplemented import called.
 [04:15:43.249] [warning] unimplemented: >>> sceSysmoduleLoadModuleInternal <<< Unimplemented import called.
 [04:15:43.250] [warning] unimplemented: >>> sceKernelGetProcessId <<< Unimplemented import called.
 [04:15:43.251] [warning] unimplemented: >>> sceAppMgrAppParamGetString <<< Unimplemented import called.
 [04:15:43.252] [warning] unimplemented: >>> sceIoDevctl <<< Unimplemented import called.
 [04:15:43.253] [warning] unimplemented: >>> sceAppMgrUmount <<< Unimplemented import called.
 [04:15:43.269] [warning] unimplemented: >>> sceShellUtilLock <<< Unimplemented import called.
 [04:15:43.367] [warning] unimplemented: >>> sceMotionStartSampling <<< Unimplemented import called.
 [04:15:43.373] [warning] unimplemented: >>> sceFontNewLib <<< Unimplemented import called.
 [04:15:43.375] [warning] unimplemented: >>> sceRtcConvertUtcToLocalTime <<< Unimplemented import called.
 [04:15:43.391] [warning] unimplemented: >>> sceAppMgrAcquireBgmPort <<< Unimplemented import called.
 [04:15:43.401] [warning] unimplemented: >>> sceShellUtilUnlock <<< Unimplemented import called.
 [04:15:43.864] [critical] open_file: Unknown partition cannot open ux0:/app//script.lua used. Report this to developers!

Ability to dump scene models to obj (or other common model) format

It would be really cool to see some form of scene/model dumper for this emulator in the future after it matures enough to start running commercial games.

For a better reference, note this feature in the emulator JPCSP.

I will note that JCPSP's dumper is far from optimal compared to solutions like Ninja Ripper, though I am unsure if this is because JPCSP emulates the occlusion culling of the PSP, or if it was how it was coded in itself.

Complete unknown Module Info fields

typedef struct SceKernelModuleInfo {
        SceUInt size; //!< 0x1B8 for Vita 1.x
        SceUInt handle; //!< kernel module handle?
        SceUInt flags; //!< some bits. could be priority or whatnot
        char module_name[28];
        SceUInt unk28;
        Ptr<const void> module_start;
        SceUInt unk30;
        Ptr<const void> module_stop;
        Ptr<const void> exidxTop;
        Ptr<const void> exidxBtm;
        SceUInt unk40;
        SceUInt unk44;
        Ptr<const void> tlsInit;
        SceSize tlsInitSize;
        SceSize tlsAreaSize;
        char path[256];
        SceKernelSegmentInfo segments[4];
        SceUInt type; //!< 6 = user-mode PRX?
    } SceKernelModuleInfo;

Front end

I think the developers have mostly settled on Qt as our UI framework of choice.

Build failed this time but, worked before.

I used Git to clone the submodules using this link here "https://github.com/Vita3K/Vita3K.git",
ran the gen.bat file "I have CMake installed to path", ran the Vita3K.sln file, selected Release, Emulator & build in Visual Studios.

I've done this before & had no problems.

screenshot 143 2

Now, all I get is build failed!

screenshot 143

I would greatly appreciate your help. Thanks.

Debugger

I realize this project is still at a very early stage, but I thought that it couldn't hurt to ask for this: it would be a good idea to add at some point a debugger capable of using breakpoints, similar to the ones found in PPSSPP or PCSX2. After all, an emulator with a debugger is a tremendous asset to have for fan translation and romhacking projects to catch and fix bugs or do modifications in the code to add proper support of non-Japanese text.

GXM Texture Format support

Tracking issue for supported GXM texture formats.
Unsupported ones too many to list, let's just list the ones used by games we can boot at the moment.

  • SCE_GXM_TEXTURE_FORMAT_U8U8U8U8_ABGR
  • SCE_GXM_TEXTURE_FORMAT_U4U4U4U4_ABGR
  • SCE_GXM_TEXTURE_FORMAT_U8_R111
  • SCE_GXM_TEXTURE_FORMAT_P8_ABGR
  • SCE_GXM_TEXTURE_FORMAT_U5U6U5_RGB

VitaDoom:

  • SCE_GXM_TEXTURE_FORMAT_P8_1BGR
    From #105 (14 more formats probably supported, needs testing):

nxengine-libretro:

  • SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB

need help

anyone can explain
in more detail about how to build Vita3K on windows I do everything on the manual and I get only an empty folder build-windows
thank you in advance

Implement sceKernel* mutexes

there is many emulators and homebrow need to Implement sceKernel*

show warning unimplemented

  • sceKernelCreateLwMutex
  • sceKernelCreateMutex
  • sceKernelLockLwMutex
  • sceKernelLockMutex
  • sceKernelUnlockMutex
  • sceKernelTryLockMutex
  • sceKernelDeleteLwMutex
  • sceKernelDeleteMutex

Contributor documentation needed

Please leave a comment here if there's anything you would like some/better documentation for.

Contributed and found something confusing? Help clarify for others.

Automated regression test suite

Perhaps we can take "known good" screenshots of working homebrews, and add a command line test mode to the emulator which will take a screenshot. Then we could compare the screenshots on a CI server when the emulator is built.

Trouble with accented paths

If the rom path contains any accents the rom fails to load. Tested only on Windows.

unknown

Thanks to Zangetsu for the screenshot.

Make assertion fails, log

Currently asserts are ignored in Release mode (makes sense) which results in seeing weird behaviour/errors because of previously failed asserts that aren't present in reported logs.

A possible solution is to replace all asserts with our own assert that would do LOG_WARN_IF.

Add better filesystem abstraction layer

As I said in Discord: it's too 'anything goes' currently, in some places we use C++ api (fstream), in some others C api (fopen, etc), in some others native APIs...

In high-level terms we want a conventional fs API, that also provides this functionality:

  • Load from vpk
  • Load from directory?
  • Load from pkg
  • Load from psv
  • Load from dump? (Don't want to get stuck supporting dodgy dumps)

(made this new issue since #82's purpose has changed to be for guest fs emulation)

Correctly load sce_module/libc.suprx if it is present on vpk

Add some code to load libc.suprx before eboot.bin. This could allow us to avoid implementing SceLibc, SceLibm and SceLibstdcxx

This are the nids imported by libc. There are some UNRECOGNISED so we need to reverse them

[10:48:45.358] [info] main: Vita3K v0.1 80-8c45c4d
[10:48:46.301] [info] load_imports: Loading imports from SceLibKernel
[10:48:46.301] [debug] load_func_imports: 	NID 0xfb972f9 (sceKernelGetThreadId) at 0x3c168
[10:48:46.301] [debug] load_func_imports: 	NID 0x15e2a45d (sceKernelCallModuleExit) at 0x3c178
[10:48:46.301] [debug] load_func_imports: 	NID 0x244e76d2 (sceKernelDeleteLwMutex) at 0x3c188
[10:48:46.301] [debug] load_func_imports: 	NID 0x29482f7f (sceIoChstat) at 0x3c198
[10:48:46.302] [debug] load_func_imports: 	NID 0x37691bf8 (__stack_chk_fail) at 0x3c1a8
[10:48:46.302] [debug] load_func_imports: 	NID 0x3ac63b9a (sceKernelSignalLwCond) at 0x3c1b8
[10:48:46.302] [debug] load_func_imports: 	NID 0x46e7be7b (sceKernelLockLwMutex) at 0x3c1c8
[10:48:46.302] [debug] load_func_imports: 	NID 0x48c7eae6 (sceKernelCreateLwCond) at 0x3c1d8
[10:48:46.302] [debug] load_func_imports: 	NID 0x6d8c0f13 (UNRECOGNISED) at 0x3c1e8
[10:48:46.303] [debug] load_func_imports: 	NID 0x721f6cb3 (sceKernelDeleteLwCond) at 0x3c1f8
[10:48:46.303] [debug] load_func_imports: 	NID 0x7595d9aa (sceKernelExitProcess) at 0x3c208
[10:48:46.303] [debug] load_func_imports: 	NID 0x8cba03d5 (sceClibSnprintf) at 0x3c218
[10:48:46.303] [debug] load_func_imports: 	NID 0x91fa6614 (sceKernelUnlockLwMutex) at 0x3c228
[10:48:46.304] [debug] load_func_imports: 	NID 0x99ba173e (sceIoLseek) at 0x3c238
[10:48:46.304] [debug] load_func_imports: 	NID 0xa6a2c915 (sceKernelTryLockLwMutex) at 0x3c248
[10:48:46.304] [debug] load_func_imports: 	NID 0xb295eb61 (sceKernelGetTLSAddr) at 0x3c258
[10:48:46.304] [debug] load_func_imports: 	NID 0xbca5b623 (sceIoGetstat) at 0x3c268
[10:48:46.304] [debug] load_func_imports: 	NID 0xc5c11ee7 (sceKernelCreateThread) at 0x3c278
[10:48:46.304] [debug] load_func_imports: 	NID 0xd11a5103 (sceKernelGetModuleInfoByAddr) at 0x3c288
[10:48:46.304] [debug] load_func_imports: 	NID 0xda6ec8ef (sceKernelCreateLwMutex) at 0x3c298
[10:48:46.304] [debug] load_func_imports: 	NID 0xddb395a9 (sceKernelWaitThreadEnd) at 0x3c2a8
[10:48:46.305] [debug] load_func_imports: 	NID 0xe1878282 (sceKernelWaitLwCond) at 0x3c2b8
[10:48:46.305] [debug] load_func_imports: 	NID 0xe5241a0c (sceKernelSignalLwCondAll) at 0x3c2c8
[10:48:46.305] [debug] load_func_imports: 	NID 0xf08de149 (sceKernelStartThread) at 0x3c2d8
[10:48:46.305] [debug] load_func_imports: 	NID 0xfa26bc62 (sceClibPrintf) at 0x3c2e8
[10:48:46.305] [debug] load_var_imports: 	NID 0x93b8aa67 (__stack_chk_guard) at 0x40520
[10:48:46.305] [info] load_imports: Loading imports from SceIofilemgr
[10:48:46.305] [debug] load_func_imports: 	NID 0x34efd876 (sceIoWrite) at 0x3c2f8
[10:48:46.306] [debug] load_func_imports: 	NID 0xfdb32293 (sceIoRead) at 0x3c308
[10:48:46.306] [info] load_imports: Loading imports from SceProcessmgr
[10:48:46.306] [debug] load_func_imports: 	NID 0x39be45 (sceKernelLibcTime) at 0x3c318
[10:48:46.306] [debug] load_func_imports: 	NID 0x2be3e066 (UNRECOGNISED) at 0x3c328
[10:48:46.306] [debug] load_func_imports: 	NID 0x4b879059 (sceKernelLibcGettimeofday) at 0x3c338
[10:48:46.306] [debug] load_func_imports: 	NID 0x890bdc39 (sceKernelLibcMktime) at 0x3c348
[10:48:46.306] [debug] load_func_imports: 	NID 0x94f041ed (sceKernelLibcLocaltime_r) at 0x3c358
[10:48:46.306] [debug] load_func_imports: 	NID 0x9e45da09 (sceKernelLibcClock) at 0x3c368
[10:48:46.307] [debug] load_func_imports: 	NID 0xbca437cd (sceKernelLibcGmtime_r) at 0x3c378
[10:48:46.307] [debug] load_func_imports: 	NID 0xc1727f59 (sceKernelGetStdin) at 0x3c388
[10:48:46.307] [debug] load_func_imports: 	NID 0xe5aa625c (sceKernelGetStdout) at 0x3c398
[10:48:46.307] [debug] load_func_imports: 	NID 0xeb6e50bb (UNRECOGNISED) at 0x3c3a8
[10:48:46.307] [debug] load_func_imports: 	NID 0xfa5e3ada (sceKernelGetStderr) at 0x3c3b8
[10:48:46.307] [info] load_imports: Loading imports from SceSysmem
[10:48:46.307] [debug] load_func_imports: 	NID 0xa33b99d1 (sceKernelFindMemBlockByAddr) at 0x3c3c8
[10:48:46.307] [debug] load_func_imports: 	NID 0xa91e15ee (sceKernelFreeMemBlock) at 0x3c3d8
[10:48:46.307] [debug] load_func_imports: 	NID 0xb8ef5818 (sceKernelGetMemBlockBase) at 0x3c3e8
[10:48:46.307] [debug] load_func_imports: 	NID 0xb9d5ebde (sceKernelAllocMemBlock) at 0x3c3f8
[10:48:46.307] [info] load_imports: Loading imports from SceThreadmgr
[10:48:46.307] [debug] load_func_imports: 	NID 0x1bbde3d9 (sceKernelDeleteThread) at 0x3c408
[10:48:46.307] [debug] load_func_imports: 	NID 0x2c8ed6f0 (UNRECOGNISED) at 0x3c418
[10:48:46.308] [debug] load_func_imports: 	NID 0x4b675d05 (sceKernelDelayThread) at 0x3c428
[10:48:46.308] [info] load_imports: Loading imports from SceThreadmgrCoredumpTime
[10:48:46.308] [debug] load_func_imports: 	NID 0xc8a38e1 (sceKernelExitThread) at 0x3c438
[10:48:46.308] [info] load_imports: Loading imports from SceFios2
[10:48:46.308] [debug] load_func_imports: 	NID 0x30306f4 (sceFiosRenameSync) at 0x3c448
[10:48:46.308] [debug] load_func_imports: 	NID 0x45182328 (sceFiosFHCloseSync) at 0x3c458
[10:48:46.308] [debug] load_func_imports: 	NID 0x6e1252b8 (sceFiosFileTruncateSync) at 0x3c468
[10:48:46.308] [debug] load_func_imports: 	NID 0x76945919 (sceFiosFHReadSync) at 0x3c478
[10:48:46.308] [debug] load_func_imports: 	NID 0x984024e5 (sceFiosFHWriteSync) at 0x3c488
[10:48:46.308] [debug] load_func_imports: 	NID 0xa75f3c4a (sceFiosFHSeek) at 0x3c498
[10:48:46.308] [debug] load_func_imports: 	NID 0xaac54b44 (sceFiosDeleteSync) at 0x3c4a8
[10:48:46.308] [debug] load_func_imports: 	NID 0xb309e327 (sceFiosIsValidHandle) at 0x3c4b8
[10:48:46.308] [debug] load_func_imports: 	NID 0xb9573146 (sceFiosDirectoryDeleteSync) at 0x3c4c8
[10:48:46.308] [debug] load_func_imports: 	NID 0xe037b076 (sceFiosDirectoryCreateSync) at 0x3c4d8
[10:48:46.308] [debug] load_func_imports: 	NID 0xee681e1d (sceFiosFHOpenWithModeSync) at 0x3c4e8
[10:48:46.308] [info] load_imports: Loading imports from SceLibcParam
[10:48:46.308] [debug] load_var_imports: 	NID 0xdf084dfa (UNRECOGNISED) at 0x420a4

Develop plan?

hello, do you have a plan to develop a Android PSV emulator?

Linux build instructions

Building

Prerequisites

CMake is used to generate Visual Studio and Xcode project files. It is assumed that you have CMake installed and on your path. Other dependencies are provided as Git submodules or as prebuilt binaries.

unicorn

Linux

  1. git submodule init && git submodule update
  2. mkdir build-linux && cd build-linux
  3. cmake ../src/
  4. make

Allow compressed selfs to work

Look at segment info for compressed == 2 and then unzip the contents

typedef struct {
uint64_t offset;
uint64_t length;
uint64_t compression; // 1 = uncompressed, 2 = compressed
uint64_t encryption; // 1 = encrypted, 2 = plain
} segment_info;

Improved logging

Log to file so messages can be seen after emulator is closed.

Clock is wrong on Windows

Affected functions are sceKernelGetProcessTime* functions and sceRtcGetTick function.
This causes ticks based homebrews to stall a lot of time for nothing (that's why Network PR has issues on Windows for example).

Switch to Dynarmic ARM Recompiler

https://github.com/MerryMage/dynarmic

This would be recommended to do when possible.

Unicorn is notoriously slow compared to JIT or any other decent recompiler so switching to dynarmic would result in far better performance the will be greatly needed later on.

(Side Note: YUZU is moving away from unicorn due to performance issues too)

Fix make install

Currently, make install doesn't install the Vita3K binary. It does a couple of libraries and headers, which may conflict with the ones provided by the system package manager. For example, capstone.h is also provided by the capstone package and shouldn't be installed by Vita3K.

Do export resolving

On #122 there's code to log exports but linking is missing.

There are two approaches

  1. On module loading we fill a map with export values (library nid, function / var nid, address). On unicorn hook we search first over exports and if we found it we change assembly code to jumps directly to that address and resume.
  2. On module loading we fill a map with export values (library nid, function/var nid, address) and on module loading import resolving we generate code that jumps directly to address. We need to search over already loaded modules also.

Swizzle remapping

This will aid in supporting a lot more GXM formats. Related to #97.

The idea is to use GL_TEXTURE_SWIZZLE_A/R/G/B to set appropriate swizzle mappings for each texture format.


Related issue:

  • Fix SCE_GXM_TEXTURE_FORMAT_U8_R111 which is currently incorrectly implemented.

Async version of glReadPixels

Move glReadPixels farther on the rendering pipeline (maybe on sceGxmDisplayQueue) and do it without stopping cpu threads

Non-standard code prevents compilation under Linux

I'm slowly fixing the various errors needed to build on Linux.

Most of them are pretty simple (Forgotten imports that the other compilers let slide, mostly) but I'm stuck on this one.

Here's the message:

In file included from /home/mrtimscampi/Vita3K/src/emulator/module/include/module/module.h:21:0,
                 from /home/mrtimscampi/Vita3K/src/emulator/module/src/module.cpp:18:
/home/mrtimscampi/Vita3K/src/emulator/module/include/module/bridge_args.h:102:83: error: declaration of ‘using StackLayout = struct StackLayout<const typename StackArg<StackHead>::Type, StackType<StackTail>...>’ [-fpermissive]
     using StackLayout = StackLayout<StackType<StackHead>, StackType<StackTail>...>;
                                                                                   ^
/home/mrtimscampi/Vita3K/src/emulator/module/include/module/bridge_args.h:25:8: error: changes meaning of ‘StackLayout’ from ‘struct StackLayout<const typename StackArg<StackHead>::Type, StackType<StackTail>...>’ [-fpermissive]
 struct StackLayout {
        ^~~~~~~~~~~
make[2]: *** [emulator/module/CMakeFiles/module.dir/build.make:87: emulator/module/CMakeFiles/module.dir/src/module.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1592: emulator/module/CMakeFiles/module.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Any help in fixing this would be appreciated, as this is beyond my (limited) knowledge of C++.

From looking at some docs, I noticed we could add the -lpermissive flag to the compiler. However, the documentations discourages its use:
Downgrade some diagnostics about nonconformant code from errors to warnings. Thus, using -fpermissive will allow some nonconforming code to compile.

I'll add it momentarily to continue fixing, but it would probably be wise to fix this in the future and remove the flag.

Vita3K Build Instuctions Are Not User Friendly

Even for some one who has compiled this kind of source code before, I still found myself needing to search for some kind of guide. Even with that, I had to do some guessing, since not everything matched what I found.
It also didn't help that, even with the latest version of CMake installed, your gen.bat file only made the build-windows directory, but never ran CMake to create the Vita3K.sln file. I had to bring up CMake myself and tell it how to build the Vita3K.sln file, and I'm not sure if I got everything set correctly.

I think that you should explain the process a bit better, using step by step instructions in the future, so that as more people become aware of this project, they will be able to compile a build of it themselves, and give you meaningful feed back about it, instead of endless complaints about where to get Vita3K and how to compile it.

Here is an example of what I'm referring to:
https://github.com/citra-emu/citra/wiki/Building-For-Windows
These are the Windows build instructions for the emulator Citra. While not perfect, they are a lot easier to follow and they also provide links to all the required software, as well as, how to set it all up.

I hope all of this can be of some help to you and your project. I look forward to what comes of this in the future, and I think it's about time that the PS Vita got the attention that it deserves.
Thank you for taking the time to read this, and thank you for this new up coming emulator.

[io] Separate Drives, Partitions and Block Devices

#132's introduction of VitaPartition is an oversimplification.
It doesn't only list physical partitions, but also drives and block devices, which should probably be separately handled (and not in the same enum). It looks like sceIo* accept all those, but tests on hardware are needed for verification.

Also gr0 should be gro0, derp.

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.