📜 ⬆️ ⬇️

How I made friends with the PlayStation 2 and the PlayStation Portable (spoiler - combined into one emulator)

Hello readers. Last year I published my hobby project Red Omega PS2 emulator . The idea was to adapt the control of the original PCSX2 emulator for games on Surface Pro via the Touch Screen.

The original PCSX2 code of the emulator was rewritten in the form of a DLL module, loaded into C # code with a graphical interface on WPF. The project turned out to be workable and successful - Final Fantasy X and Final Fantasy XII went "with a bang." But six months ago, I came across a link to Valkyria Chronicles 4 on Steam. I bought the first Valkyria Chronicles on a disk and “came in”, but there is a question - where is the second and third!?! The answer was found quickly - these sequels were released only on game consoles. The most affordable version turned out to be for PlayStation Portable - via the PPSSPP emulator. It’s not bad on a smartphone, but on Surface Pro I didn’t like touch controls. Yes, and switch from Omega Red to PPSSPP, and back is not a hunt. And then there was a "crazy" idea - to rewrite the original PPSSPP code in the form of a DLL module !!! And turn Omega Red into a PLATFORM for PlayStation 2 and PlayStation Portable !!!


Easy to say, but much more difficult to do. The original PPSSPP emulator is developed as an Open Source project and is available in the form of a complete code for studying and modifying. The code is interesting and can be run on a variety of graphics APIs: OpenGL, DirectX9, DirectX11, Vulkan. In addition, it has a built-in GUI. But the PPSSPP architecture is clearer than that of the PCSX2 - more modularity and dependencies are simplified. The main key to the realization of my idea was the ability to load the game disc and save it in the form of an argument for the program. The solution is elementary - to rewrite the input EXE function in the EXPORTED DLL function. Of course, there will be problems with creating a second “window”, redirecting the output of the graphical renderer to the WPF graphics context, connecting the touch code, etc. etc., but I already solved all this when I rewrote the code for PCSX2 - there are already workable templates.
')
What is the result - the solution works! It was possible to combine two such different emulators into one solution with seamless switching between games for different emulators. The result can be assessed in the video:


In addition, I would like to mention the following changes, compared with the first release of the Red Omega PS2 emulator :

1. Changed the color scheme - in the comments indicated the inconvenience of the interface colors - red. Strange inconvenience - but I decided to add an inverted “Blue” gamut:

image

2. Tessellation - a DirectX 11 “Tessellation” function has been added for PCSX2 games - this function allows you to increase the number of polygons for models:

image

Tessellation is selected from the “Rendering schema” option:

image

DEFAULT

image

TESSELLATED

image

DEFAULT

image

TESSELLATED

image

3. FXAA - for the games on PCSX2, the “Enable FXAA” function has been added to delete “Steps” along the boundaries of polygons - the solution does not work perfectly, but it works:

image

4. Quick save - save the state of the emulator with one command:

image

5. Volume control:

image

Currently the program is available at the link: Omega Red and is presented on GitHub: OmegaRed

Source: https://habr.com/ru/post/445022/


All Articles