NetherSX2-Turnip
NetherSX2-Turnip needs one Sony PlayStation 2 BIOS file, any region.
- Download
ps2-0230a-20080220.bin. - Put it in the
biosfolder inside the app's own data folder.
Any file name works. The app reads what the file holds.
About this profile
Technical notes
PlayStation 2 emulator for Android, package xyz.aethersx2.tturnip, activity
xyz.aethersx2.android.EmulationActivity. The application id is the only part
of the package name that changes, which is what lets it sit beside the build
it derives from. That build is NetherSX2 v2.2n-4248, itself a patch of the
AetherSX2 v1.5-4248 package, and the library still reports itself as
NetherSX2 v2.2n-4248 (Patched). The project publishes its shim sources and
the libraries it packs, and lib/libvulkad.so, lib/libhook_impl.so and
lib/libmain_hook.so at the pinned revision are byte for byte the ones in the
v0.7 package, so the sources describe the shipped binaries. Everything below
was read from that package: lib/arm64-v8a/libemucore.so, libvulkad.so, the
dex and the assets.
ref: VulkanShim2/compile2.bat:21-64,
nethersx2-turnip v0.7 AndroidManifest.xml,
nethersx2-turnip v0.7 libemucore.so 0xe180c
The patch rewrites twenty places in the 4248 library. Three are the strings libvulkan.so, libvulkan.so.1 and the message naming them, each turned into libvulkad.so, so the Vulkan loader opens the shim instead of the system driver. Twelve turn comparisons into unconditional paths, among them the memchr scan for the twenty-two byte pattern that precedes the certificate test and two byte-wise string comparisons whose result is forced to equal, which is what lets the package be resigned under a new application id. One skips the notification built from the android_warning key. The last four move settings defaults: the renderer enum from 12 to 14, the upscale multiplier fallback from 1.0 to 2.0 with the configuration read short-circuited, the hardware download mode default, and the warning text that went with it. None of them is in a file loading path, so the file set below is that of the package it patches, read from this library rather than carried over. ref: nethersx2-turnip v0.7 libemucore.so 0x10728e, nethersx2-turnip v0.7 libemucore.so 0x83cebc-0x83cee4, nethersx2-turnip v0.7 libemucore.so 0x83b728, nethersx2-turnip v0.7 libemucore.so 0x83bb3c, nethersx2-turnip v0.7 libemucore.so 0x83cfbc, nethersx2-turnip v0.7 libemucore.so 0x80e910, nethersx2-turnip v0.7 libemucore.so 0x840ff4, nethersx2-turnip v0.7 libemucore.so 0x84130c, nethersx2-turnip v0.7 libemucore.so 0x8421a0
A BIOS image is required and boot stops without one, the application saying it needs a PS2 BIOS in the bios folder of the data directory. The data directory is getExternalFilesDir(null) with getDataDir() behind it, so it follows the application id, and the folder names under it come from the Folders section, Bios defaulting to bios. ref: nethersx2-turnip v0.7 libemucore.so 0xf70a9, nethersx2-turnip v0.7 libemucore.so 0x7ea908-0x7ea930, xyz/aethersx2/android/NativeLibrary getExternalFilesDir
Detection is by content. The scan lists the BIOS folder with a * mask, keeps
files between 4194304 and 8388608 bytes, and accepts an image whose romdir
carries a RESET entry followed by a readable ROMVER. The fifth ROMVER
character gives the zone, A for USA, C for China, E for Europe, H for Asia,
J for Japan, P for Free, T for T10K and X for Test, any other character
standing for itself. The sixth character is compared against D and the result
discarded, the acceptance flag being set outright, so development images pass.
An image named in the configuration is combined with the BIOS folder and
opened at that path when it exists, without the size filter and without the
romdir test. No name and no hash is matched anywhere. The image is read into
the 4 MB ROM region and truncated to it.
ref: aethersx2/,
aethersx2/,
aethersx2/,
aethersx2/,
nethersx2-turnip v0.7 libemucore.so 0x828d80-0x828f14,
nethersx2-turnip v0.7 libemucore.so 0x829140-0x8292f4
Companions derive from the selected image. rom1 and rom2 are appended to the
full name first, then substituted for the existing extension, so an image at
ps2-0230a-20080220.bin is followed by ps2-0230a-20080220.bin.rom1 then
ps2-0230a-20080220.rom1. The nvm and the mec are read at the substituted
extension only, and both are written with defaults when they are absent or
too short. No erom is loaded on this code line.
ref: aethersx2/,
aethersx2/,
aethersx2/,
nethersx2-turnip v0.7 libemucore.so 0x8288b0-0x828bb8
The network adapter opens eeprom.dat and flash.dat by bare name, so they
resolve against the process working directory, which the application never
sets. A compiled-in image stands in for the first and a card filled with 0xFF
for the second. DEV9hdd.raw is the default name of the empty disk image its
settings page writes. An IRX named in the configuration is read into the ROM
region at 0x3C0000 at boot. The field is empty by default and names no file
of its own.
ref: aethersx2/,
aethersx2/,
aethersx2/,
nethersx2-turnip v0.7 libemucore.so 0x7c5bec-0x7c5ca0,
nethersx2-turnip v0.7 libemucore.so 0x828bb8-0x828ca8
The Vulkan path is the reason this build exists. libemucore.so opens
libvulkad.so where the stock library opens libvulkan.so, and that shim reads
the Adreno model from the kgsl sysfs nodes, picks one of six Turnip drivers
packed beside it, creates a linker namespace over its own library directory
and loads libhook_impl.so and libmain_hook.so into it. The system
/system/lib64/libvulkan.so is then opened inside that namespace with its
soname patched, so its own driver load lands in the hook, which opens the
chosen Turnip driver instead of the vendor ICD. A driver present at
/data/local/tmp/libvulkan_freedreno.so is tested first and wins over all six.
When the namespace cannot be built the shim falls back to patching the
system library's global offset table, and that path alone loads libbase.so,
libcutils.so, libvndksupport.so and libhardware.so from the library
directory. The shim appends to vulkan_shim.log under the files folder of the
data directory.
ref: VulkanShim2/,
VulkanShim2/,
VulkanShim2/,
VulkanShim2/,
VulkanShim2/,
nethersx2-turnip v0.7 libemucore.so 0x8b473c-0x8b4768
Resources are read out of the package itself. The library has no asset manager of its own and calls back into readPackageFile, readPackageFileToString and playSoundAsync, each taking an asset-relative name, so the game database, the patch archives, the interface fonts, the shader sources every backend compiles at startup and the achievement sounds are versioned with the build and never looked for on disk. The game list draws its region flags and rating stars from the same assets. Four of the Vulkan shader sources differ from the ones the package it patches carries. Java line numbers in the file refs are jadx 1.5.1 output of classes.dex. ref: nethersx2-turnip v0.7 libemucore.so 0x8348d0, xyz/aethersx2/android/NativeLibrary readPackageFile, xyz/aethersx2/android/NativeLibrary playSoundAsync
9 files: 1 required, 8 optional. 4 have an HLE fallback. 46 more files come with the app.
In this collection: 6 in repo, 1 missing and 2 unsourceable.
Required
Section titled “Required”| File | Status |
|---|---|
ps2-0230a-20080220.bin) |
in repo |
Optional
Section titled “Optional”| File | Status |
|---|---|
ps2-0230a-20080220.rom1DVD player ROM
Source
|
in repo |
ps2-0230a-20080220.rom2Chinese ROM extension
Source
|
in repo |
ps2-0230a-20080220.nvmConsole NVRAM
Validation and source
|
in repo HLE fallback |
ps2-0230a-20080220.mecMechacon version
Validation and source
|
in repo HLE fallback |
eeprom.datDEV9 EEPROM
Source
|
in repo HLE fallback |
flash.datDEV9 SmartMedia flash image
Source
|
missing HLE fallback |
<module>.irxIOP module injected at boot
Source
|
unsourceable |
libvulkan_freedreno.soTurnip driver override
Source
|
unsourceable |
Comes with the app
Section titled “Comes with the app”| File | Hash |
|---|---|
libvulkad.soVulkan loader shim
Hashes and source
|
MD5 07a891beadc7 |
libhook_impl.soDriver load hook
Hashes and source
|
MD5 c2a10d75f7a1 |
libmain_hook.soNamespace interposer
Hashes and source
|
MD5 3ded83b3f457 |
libvulkan_freedreno_T28.soTurnip driver, default branch
Hashes and source
|
MD5 315f4b037b77 |
libvulkan_freedreno_a8xx-turnip-gen8-V31.soTurnip driver, Adreno 8xx branch
Hashes and source
|
MD5 7f6dbc9ec12c |
libvulkan_freedreno_T24.soTurnip driver, Adreno 810 branch
Hashes and source
|
MD5 e90d691859e0 |
libvulkan_freedreno_25.3.0_R6_Gmem.soTurnip driver, Adreno 710 and 720 branch
Hashes and source
|
MD5 3f1b01295ab0 |
libvulkan_freedreno_v24.1.0_R18.a6xx-Patched.soTurnip driver, SM8250 and SM7325 branch
Hashes and source
|
MD5 7af55500464d |
libvulkan_freedreno_T19.soTurnip driver, SM6125 branch
Hashes and source
|
MD5 5f953080ba9a |
libbase.soPlatform support library for the fallback path
Hashes and source
|
MD5 eae5ccb3f801 |
libcutils.soPlatform support library for the fallback path
Hashes and source
|
MD5 185cd93c21cc |
libvndksupport.soPlatform support library for the fallback path
Hashes and source
|
MD5 aa5065cca669 |
libhardware.soPlatform support library for the fallback path
Hashes and source
|
MD5 71e06a0726aa |
GameIndex.yamlGame database
Hashes and source
|
MD5 26ab10d8de93 |
cheats_ws.zipWidescreen patch archive
Hashes and source
|
MD5 cc19970629fe |
cheats_ni.zipNo-interlacing patch archive
Hashes and source
|
MD5 fb2a43dcea09 |
Roboto-Regular.ttfInterface font
Hashes and source
|
MD5 86da78cb5957 |
RobotoMono-Medium.ttfFixed-width interface font
Hashes and source
|
MD5 8ad82b1dc550 |
fa-solid-900.ttfFont Awesome icon font
Hashes and source
|
MD5 dffd9504fcb1 |
ffx_a.hFidelityFX common header
Hashes and source
|
MD5 2c539b603dcb |
ffx_cas.hFidelityFX CAS header
Hashes and source
|
MD5 f8a3d7f48ae1 |
fxaa.fxFXAA shader source
Hashes and source
|
MD5 5cdeb2963c1b |
common_header.glslOpenGL shader preamble
Hashes and source
|
MD5 1dcf4ca0cc95 |
convert.glslOpenGL format conversion shader
Hashes and source
|
MD5 c3db4fcdd142 |
present.glslOpenGL presentation shader
Hashes and source
|
MD5 afbb9a89f17e |
merge.glslOpenGL frame merge shader
Hashes and source
|
MD5 2c4d70f62928 |
interlace.glslOpenGL deinterlacing shader
Hashes and source
|
MD5 0e537dd838a7 |
shadeboost.glslOpenGL brightness and contrast shader
Hashes and source
|
MD5 3d1e2be521a6 |
cas.glslOpenGL sharpening shader
Hashes and source
|
MD5 f8a684763e24 |
tfx_vgs.glslOpenGL texture function vertex and geometry shader
Hashes and source
|
MD5 a97e9616f298 |
tfx_fs.glslOpenGL texture function fragment shader
Hashes and source
|
MD5 24e39ca8f97a |
tfx.glslVulkan texture function shader
Hashes and source
|
MD5 df60c4e6c569 |
convert.glslVulkan format conversion shader
Hashes and source
|
MD5 f3aaf5697b06 |
interlace.glslVulkan deinterlacing shader
Hashes and source
|
MD5 08bc6e44a6d8 |
cas.glslVulkan sharpening shader
Hashes and source
|
MD5 deb7394a3118 |
present.glslVulkan presentation shader
Hashes and source
|
MD5 72626d625bb9 |
merge.glslVulkan frame merge shader
Hashes and source
|
MD5 b776383d2160 |
shadeboost.glslVulkan brightness and contrast shader
Hashes and source
|
MD5 366b45b6c4e9 |
unlock.wavAchievement unlock sound
Hashes and source
|
MD5 4d035ee86f83 |
lbsubmit.wavLeaderboard submission sound
Hashes and source
|
MD5 fa6a7030a9f2 |
message.wavAchievement notification sound
Hashes and source
|
MD5 d66b0bccd743 |
placeholder.pngFallback interface texture
Hashes and source
|
MD5 8f846541ccbf |
<region>.pngGame list region flag
Source
|
- |
star-<rating>.pngGame list compatibility rating icon
Source
|
- |
faq.htmlHelp page
Hashes and source
|
MD5 c2a64e0bcc40 |
3rdparty.htmlThird party notices page
Hashes and source
|
MD5 fb4ff036f3e4 |
Next steps
Section titled “Next steps”- Get the files, for the setup in use
- Every system, and the files each one needs
- When a game does not start