Skip to content

ISO Driver

JoseAaronLopezGarcia edited this page Jul 26, 2024 · 19 revisions

ARK-4 does not require any form of ISO Driver configuration, there are only two ISO Drivers available (Inferno 2 and Sony's NP9660) which the CFW will automatically choose from depending on the format used.

There are largely three types of formats: PBP, ISO and CSO, plus many alternatives/derivatives of CSO.

For the PBP format, which is the Official Sony Format, the Original Sony NP9660 driver is used. For all other unofficial formats, Inferno 2 is used.

The Inferno 2 ISO driver is an evolution of the Inferno Driver found, among others, in the PRO CFW, for which ARK itself is an evolution of.

Before ARK-4, several different versions of the Inferno driver were created for different purposes, lets look at all of them, and try to add a versioning system to them, so we can have an idea of the evolution of this driver. We will start with PRO-C, which we will call Inferno 1.

  • Inferno 1: the original Inferno driver as seen in PRO-C. It includes the block offset cache speedup hack that greatly improved speed with CSO format in comparison to traditional drivers such as M33 Driver. It also included an overall cache that could use the extra RAM on PSP slims to improve speed, this is knwon as Inferno Cache, though it had conflicts with the Force Extra RAM patch.
  • Inferno 1V: the original Inferno driver port for PROVITA, used up to ARK-3. It was a stripped down version of the one in PRO-C, minus the Inferno Cache since the Vita lacked the PSP Slim's extra RAM.
  • Inferno 1S: an experimental Inferno 1V fork that added support for Splitted ISO files (SSO), it was meant to improve the experience of transfering ISO files via FTP, it was scrapped and never used but source code can still be found in the original ARK-1 repository under the name inferno.new.
  • Inferno 1D: a port of Inferno 1 to the ME CFW with added support for the DAX file format.
  • Inferno 1.5: available in PRO-C2, 1.5 is one of the greatest updates to a PSP ISO Driver ever made. Thanks to the research of developer Codestation, we were able to figure out a new speedup hack that proved to be the biggest one yet. It uses the fact that whenever a game requests data, the compressed data is always going to be smaller than the requested data, thus the buffer given by the game can be used to read all the compressed data at once and process each block in place, thus hugely reducing the amount of IO calls to satisfy the data request (which for an ISO is only one IO call). During this research, Codestation also developed a lightweight version of CSO called ZSO, which is structurally identical to a CSO file but data is compressed using the LZ4 instead of the standard DEFLATE algorithm, which offers the fastest decompression speed available.
  • Inferno 1.5V: a stripped down version of the newly updated Inferno 1.5 ported over to Adrenaline. It gets rid of Inferno Cache as it was considered unnecessary on PS Vita, and also removes support for ZSO format, while maintaining the speedup hacks for CSO.

Now that we've covered the evolution of the Inferno Driver over the years, we can focus on all the changes done to it in ARK-4 that justifies it being called Inferno 2.

  • Dynamic Patching: all static offset patching done to the isofs library has been replaced with dynamic patching algorithms. This makes Inferno capable of working on a wide variety of configurations, including the original PSP, unmodified PS Vita Emulator, Adrenaline-patched PS Vita Emulator and PSP Toolkits such as testkits and devkits.
  • Emulation of Empty UMD Drive: on older versions of Inferno, as well as other ISO Drivers, it was never intended for the driver to run without an ISO file to be mounted, thus several bugs existed that caused malfunction when the driver was used without an ISO file specified, this prevented emulation of an empty UMD drive, which was needed on PS Vita to run certain homebrew that checked for a UMD. The main bug was in the implementation of the function sceUmdCheckMedium, a boolean function used to check if a UMD is inserted in the drive, on ISO driver this function was hardcoded to always return true, except if an ISO driver is not specified, then it was hardcoded to wait in an infinite loop until one is (which never happens). The solution used by eCFW such as ARK (up to ARK-3) and TN-CEF (including Adrenaline) was to include a small dummy fake.cso file to mount when no ISO file is speficied. On the new Inferno 2 driver, among other things, this function has been corrected to behave exactly like the original, simply returning False if no ISO has been specified, thus allowing the ISO driver to simulate an empty UMD driver by loading it without an ISO file specified.
  • Completely revamped Compressed ISO Reader: the CSO driver available with the original Inferno was heavily hardcoded to work only with CSO and only with the PSP. The entire reader was completely re-written from scratch with much much less and lighter code, much more portability (it has been ported to PC, PS2/OPL and Wii/Nintendont) as well as a much more generic and configurable structure, allowing for easily adding support for other formats without changing the core reader.
  • Improved Compressed ISO Read Speeds: not only is the algorithm written with efficiency in mind, it also implements a more aggressive form of the speedup hacks seen on Inferno 1.5.
  • Support for other compressed formats: the new reader was also made to be easily configurable and expandable to support other formats, having been given support for not only CSO and ZSO as seen on Inferno 1.5, but also adds support for DAX as seen on ME's Inferno update as well as early SE/OE CFW, as well as the rarely seen before JSO and CSOv2 formats.
  • Improved Inferno Cache compatibility: issues between Inferno Cache and Force Extra RAM has been resolved, including being able to use it with PRO Online, as well as allowing the use of Inferno Cache on PS Vita and PSP 1K. The Cache size is no longer configurable, but it adjusts automatically depending on device/configuration, while also allowing for enough free space for other features or plugins.
Clone this wiki locally