PS2 Julian's various PS2 projects (Worklog)

The OSDSYS decompiled decompression code was cleaned up. I hope to create a tool soon.

For HDDOSD asset image headers, I'm going to breakpoint at the function responsible for reading the image header, and dump RAM at that point. However, I'm going to need to use Kermit for that, as other debuggers don't support OSDSYS (afaik). Since I can only find my 1394b to 4 pin cable (and not my 1394a to 4 pin cable or 1394b to 1394a adapter), I'm going to install Windows XP to an old HDD and put that in my old MacBook.

For Red Hat Linux 6.2, I got around to converting the CloneZilla files provided to me to a block device dump. I had to modify the CloneZilla scripts to support loop devices. After ocs-sr restored to the loop device, I used gparted to resize the ~40GB LVM partition to a smaller size that can fit on my 32GB CF. I then used fdisk to get the offset of where I should trim the image, and truncate to trim the image.

I plan to split off pfsshell into four more projects in order to increase common usage in other projects like pfsfuse: apa_posix, pfs_posix, iomanX_posix, and ps2sdk_posixshim. More details on that later.
 
The OSDSYS decompiled decompression code was cleaned up, and it now runs.
Code:
x = x + -y;
is different from
Code:
x = x - y;
, so be sure to fix the output of Ghidra.

I will post an updated version of ROMIMG that will support decompressing these files later on.

My SCPH-20400 arrived, so I took that apart, grabbed the IDE cable, then attached it to the CF adapter.

My Red Hat Linux 6.2 image is almost ready to be transferred to the CF card.
 
I'm curious about the cost of ordering a memory card preloaded with FMCB vs blank CD-R/DVD-Rs (and possibly repair/replace the laser) in third world countries.

If it is cheaper to use blank DVD-R (and replace the laser)...
Better place to look for exploits is the DVD Player. It would be nice to get it emulated in PCSX2 so it is easier to fuzz.
 
  • Like
Reactions: TnA
Connecting a HDD to my DTL-T:
uufxSjf.jpg

I shucked a SCPH-20400 for the cable.

OPL PADEMU and VMC are nice, since I don't have the controller/memory card port PCB attached.
 
Kirikiri graphic library (my experiments at https://github.com/uyjulian/tvpgl ) has lots of blending functions, graphic conversions, etc. written in MMX/SSE2/AVX2. If I were to port this to the PS2, these would be my options:
1. inline asm (works on old compilers... but ouch)
2. intrinsics for EE MMI and VU (needs support from the compiler)
3. auto-vectorization for EE MMI and VU (needs support from the compiler and properly written code)

This is a really useful website for Intel instructions: https://software.intel.com/sites/landingpage/IntrinsicsGuide
Has a nice layout, selectable categories, and fuzzy search.
I'd like to write something similar for EE MMI and VU.
 
The FreeDVDBoot exploit may bring some interest to the PS2.

I do have a lot of time on my hands, but sitting down for long periods of time is becoming a pain.

I've been working on this: https://github.com/uyjulian/krkrsdl2
An SDL2 port for the PS2 with hardware accelerated SDL_Renderer would be nice…

I'll see where things are at after wrapping up functionality so that the game engine can run certain projects inside a web browser…
 
Kirikiri SDL2 is mostly in a stable state; now just need to finish up documentation etc.

I'm thinking of finishing up my work on documenting OSDSYS resources, but I need to find my old notes, since it has been a while…

It seems that someone else is working on a """BIOS""" reimplementation, so I'll probably focus my efforts on IOP version 3.1.0 if I ever get around to it…

I'm probably less likely to write a FUSE layer for pfsshell as I was going to before, since multi cursor editing of Visual Studio Code works well enough for me. If there is someone willing to write the FUSE implementation layer but not familiar enough the pfsshell interface, please contact me.

I'd like to also upgrade the IOP toolchain version, but there is an optimization that breaks the loading, and I would like to find the optimization flag that breaks the loading, but this process will take a while.

My STABS to IDC converter hasn't been touched in a while, and neither has my DTL-T10000H…
 
I'm looking into a reimplementation of PS1DRV, mainly because I find GPU format translation interesting at the moment…

I'm looking into "GPU Recorder v2.0" for recording a sample of GPU output, but it seems I can't find the source code archive "recorder20src.zip"…
https://web.archive.org/web/20041204090554/http://solair.eunet.yu:80/~darkman/plugins/plugins.htm
https://web.archive.org/web/20040523180234/http://mrdario.tripod.com:80/plugins/plugins.htm
I tried e-mail. I'll see if there is a response…
 
Hey @ujulian, years ago on Assembler, here was talk of reverse engineering the $ony rpm's that are installed on the TOOL. Is this something you might be interested to add to your list?
 
Hey @ujulian, years ago on Assembler, here was talk of reverse engineering the $ony rpm's that are installed on the TOOL. Is this something you might be interested to add to your list?
You probably want to check the DTL-T thread on ObscureGamers…
 
I did some work on fixing up libmpeg from ps2sdk for the new toolchain. The progress is on the libmpeg_improvements branch of my ps2sdk fork.

I converted the YCbCr conversion code and the block related code to inline assembly. For the 857 remaining lines of assembly left, I plan to translate it to C later.

At the moment, I ran the remaining code through Ghidra's decompiler (with usage of ghidra-emotionengine extension). It converted special registers such as those related to the IPU into readable names, so that is nice. Unfortunately it doesn't convert the syscalls correctly or handle some cases of control flow, but that's to be expected anyways because it is not generated from a C compiler.
 
I did some work on handling the .iopmod section of the ELF files. I basically rewrite irxtool in Python and added a function to output to IDC file with function prototypes and names. My work is in my iopmod_parser repository.
 
I finished up the translations of the functions for libmpeg.
What is left is debugging and testing.

Since my debugging environment is not set up yet, I'll move on to reimplementing SYSCLIB, CDVDMAN, and CDVDFSV.
I did some work on SYSCLIB but never completely finished it.
For CDVDMAN and CDVDFSV, I'll probably base the framework on Open PS2 Loader.

For SYSCLIB, the API will be based on release 3.1.0 of the IOP library.
For CDVDMAN and CDVDFSV, I plan on starting out with release 1.3.4 of the IOP library, adding the features of XCDVDMAN/XCDVDFSV in 2.20 version of the PS2 ROM, then finally adding the features of version 3.10 of the DVD player.
 
It seems like most of the SCMDs for all EE<->IOP<->Mechacon are just interfaces to the Mechacon with minor changes in the structure layout/function call ABI. I think it might be useful to have autogenerated bindings for both EE/IOP sides of the IPC, and the interface from IOP to Mechacon. For now, I'll just keep the SCMDs that were already implemented in Open PS2 loader.

For SYSCLIB, I plan to import most of the functions from musl libc which is lightweight and MIT license.
For the nonstandard functions, such as the following:
look_ctype_table
get_ctype_table
prnt
atob
I plan to write my own implementation.

I took a look into the SDL2_Renderer API. It seems most of the functions use integers instead of floats, so it should be simpler to write an implementation that reduces usage of floating point functions (which are non-standard on EE).

The following functions use floating point:
SDL_RenderSetScale
SDL_RenderGetScale
SDL_RenderCopyEx
 

Similar threads

Back
Top