PS2 Julian's various PS2 projects (Worklog)

Personally I'd like to make new UI that can operate over network and rely heavily on existing framework/technologies like React, Qt, MPEG2 etc. Easier to add new features, easier to adjust existing features without breaking other stuff, no janky C code, no janky png recompression, no OOM, no random/UB UI state that just leads to hangs/black screen with few debug info...
 
Hi everyone
This is my first post, so please throw only soft and plushy rocks at me )))
So… I did a thing…
Nothing impressive, if to be honest, it just something that I wanted to do for a while
Here, I post some pictures, if you will be interested, I can make a proper post
Main advantage of this project (if you even call it that) is that you need zero knowledge of electronics to do it
Also it's a prototype, obviously I intend to make a proper case later
Here it goes

081pe7r6UI5FuMvvnSWqGTn3g

0fa0Bg4NNbtKLj-YCrzTdE9Og

0abaJQ7c8BHjRsuuqsV0rFQWQ


It's a portable PS2, here is some characteristics:
This is 7000 series slim, modbo5 is installed, an hdd mod (specifically it uses microSD card at the moment), and you can use usb stick if you want, OPL and all that is there obviously
Screen is iPad3 matrix (with proper OSD), I also added a Bluetooth
li-pol 4s battery, 20Ah combined (in 3.7 cells), supports 65w PD charging, last about 3-6 hours, depends of what you are playing
PSone controller case split in two parts with DS2 guts, console also has a mini port where you can plug 2nd controller through an adapter (don't know why I added it, but here you go)
Changed membrane buttons for tactile switches

I also want to highlight, that I had no intention to make it as small as possible, because for me, personally, 10"-13" screen is necessary for any kind of immersion on a portable device
Also console of this size is comfortable to hold, grip is more natural, because your hands in more natural position, but it's also personal preference

I also made like a Switch "shell" in the past, long ago (3-4 years?), before companies start to produce similar devices, and it held very well!
I completed BOTW on it, and it was perfect, although I used much more modern display there
For this iPad3 display is more appropriate I think, and it's nice and vibrant, so no regrets there
Here is what it looks like

0528l2LpKXbj7qljCPqnlybdQ


I use it till this day and can't be happier

Maybe I posted in wrong forum, but I'm sure moderators will politely [shoot me in a head] ask me to move my post in this case)))))

Also I have small question, maybe someone can help me or guide to the right place for solving such problem
so, I accidentally touched one of the controller port pins and shorted it to the ground (or between each other) while ps2 was powered on (don't ask, it's a long and not so interesting story), it turned off, but when I powered it on again, 1st controller port stopped working, 2nd works fine
maybe someone knows exactly what components I should check first, fuses, maybe resistors etc, because they are not so easy traceable, and service manual is hard for me to understand at this point (((
I checked everything I can trace, but with no luck, 8V and 3.5V are ok
thank you very much in advance!
 
Last edited:
Ok, I messed up with pictures in post above, tried for several days to correct my mistake, but I can't edit my post, can't delete it, I wrote like 10 times to support, but no one answers, so I just post links here, sorry
Here is 3 pictures from the beginning
53353713816_69c2c5afd1_o.jpg

53354039829_3a50e1e862_o.jpg

53354039844_936c1c9721_o.jpg

And this is last one
53352842142_ff3e26d733_o.jpg
 
I've been looking at various usb to memorycard or usb to controller adapter projects.

https://github.com/dezgeg/ps2-pi-pad
https://github.com/nandanhere/PiPyPS2
https://github.com/todbot/CircuitPython_PS2Controller
https://github.com/jeffqchen/PSX2USB_software
https://github.com/jeffqchen/PSX2USB_hardware
https://github.com/ShendoXT/memcarduino
https://github.com/blue212/SNAC-PSX

Basically what they all have in common is they connect 3.3v directly to 3.6v, and the 7.6v is either "provide your own power supply" (????) or connect it directly to 5v.

Was looking for either 5v to 7.6 or 3.3v to 7.6v circuit I could rip, but I guess none of the projects above have implemented that.
 
Some information about fonts used in OSDSYS and other programs based on libosd such as utility discs:

Japanese (Kanji) font: Heisei Kaku Gothic (22 or 26 px font)
Korean (Hangul) font: HYGothic-Bold (26 px font)
 
Last edited:
Notes on load base addresses…

0x80000000: EE kernel
0x80001000: RTE/TGE SBIOS
0x80030000: EELOAD patch rom
0x80074000: osdsrc (patch)
0x80075000: tlbsrc (patch)
0x80076000: srcfile (patch)
0x00080000: Minimum base address for streaming ELF files using LOADFILE
0x00081fc0: EENULL
0x00082000: EELOAD, EENULL (patch)
0x00084000: wLE/elf-loader loader.elf, ps2link, OPL ee_core
0x00088000: ps2-packer stub low
0x00100000: Default load address
0x00200000: OSDSYS unpacked load address
0x00200000: Kernel patch
0x01d00000: ps2-packer stub high
0x01ee8000: ps2link load high
0x02000000: End of memory (can't actually load stuff here)
 
Last edited:
Some things I'm working towards:
* Making it possible and simple to load and run an ELF file from a remote HTTP(S) server, like Github
* Display audio/video (??? encoding) from a remote (??? protocol) server
* USB over IP support for various peripherals, translating as necessary (e.g. MSD, HID, UASP, ps3mca)
* Figuring out how various USB Ethernet adapters work

---

I'd like to get a mock environment for libsd and gsKit/libgraph working, similar to what I did for pfsshell.
 
Last edited:
So, here's generally how ELF loading works, currently.

LoadExecPS2 with path -> Kernel syscall -> Load EELOAD into memory then jump to it -> Reset IOP -> LOADFILE on IOP streams program segments in ELF file to EE memory, and returns entrypoint as result -> ExecPS2 with address of entrypoint

In wLaunchELF and elf-loader, a custom loader similar to EELOAD is used which skips the reset IOP step. But most of the rest remain the same

The problem with this process is that in between LoadExecPS2 and ExecPS2, the error handling is limited. If something goes wrong during that process, it either hangs (black screen) or it returns to OSDSYS.
Another problem is that there is no progress indicator. So you get to stare at a black screen while it is loading (and maybe listen to the HDD or CDVD drive noises).

What I'd like to do is move the ELF loading parsing into EE library (out of EELOAD/LOADFILE) and then just have the loading stuff (what would be EELOAD's job) move stuff into place then ExecPS2 its entrypoint.
The con of this method, however, is that it requires free EE memory on loading. But most executables are compressed with ps2-packer, so this shouldn't be a problem.
 
Some things for ps2sdk planned from my end for next year...
Allow both fileio and filexio to use fdmap at the same time (e.g. pipe stdin/stdout/stderr through either of fileio or EE SIO (if you really like slowness) and other files through filexio)
Make both network stacks use fdmap, allowing both to be linked into same binary at same time. So they can be switched between by IOP reboot, load modules and EE enablement
elf to irx related
Shared object loader

Other stuff:
CDVDMAN/CDVDFSV implementation and libcdvd improvements to match
libipu implementation, and fix libmpeg to use it
libmpeg portability
BDM RPC between IOP and EE (to support iomanX on EE)
BDM portability
iomanX on EE
Port filesystem drivers to EE
 
Last edited:
At the moment, SIF command implementation is not multi thread safe. This means that libcurl multi cannot operate correctly (e.g. when using "select" function).
This will require some improvements and additions to SIF to function correctly.
 
In ioman/iomanX, "ctime" is when a file was created.

However, in POSIX, "ctime" is when a file was changed e.g. its inode was updated.

---

clang-tidy has a lot of checks, but I disabled some to surface the useful information.
Here is the parameter for that:

-checks=\*,-llvmlibc-restrict-system-libc-headers,-readability-function-cognitive-complexity,-cppcoreguidelines-init-variables,-readability-identifier-length,-clang-analyzer-security.insecureAPI.\*,-\*-braces-around-statements,-cert-err33-c,-\*-magic-numbers,-altera-unroll-loops,-altera-id-dependent-backward-branch,-altera-struct-pack-align,-hicpp-signed-bitwise,-bugprone-easily-swappable-parameters,-concurrency-mt-unsafe,-bugprone-suspicious-realloc-usage,-readability-avoid-unconditional-preprocessor-if,-cppcoreguidelines-avoid-non-const-global-variables,-misc-no-recursion
 
Last edited:
For raw EE binaries (like EELOAD and the MBR binary on HDD), they usually start out with clearing out the bss area. In this case, addresses of the start of the bss area and the end of the bss area are needed.
I can figure out the load address by subtracting size of payload and start of bss area (both of which are rounded up by 128 byte alignment).

Note that this does not hold true for EE KERNEL binary.
 
ioprp300 -> ioprp300x notable changes
cdvdfsv
cdvdman
fileio
ioman
sifman

Rest is just version number bump 3000 -> 3009

ioprp300 -> ioprp310 notable changes
cdvdfsv
cdvdman
sifman

Rest is just version number bump 3000 -> 3100

ioprp310 -> ioprp310a (20070208) notable changes
-cdvdman
-cdvdfsv
+daemon
eesync (dummyirx)
+eesync2
fileio
+mcman
+sio2man

ioprp310 -> t10000-rel310/oldrom symmetric difference
appload
boardinf
clearspu
deci1
deci1dr1
deci1drp
deci2
deci2drp
deci2drs
deci2file
deci2hsyn
deci2kprt
deci2load
dmacman
excepman
heaplib
igreeting
intrmani
intrmanp
reboot
romdrv
secrman
sifinit
sio2man
ssbusc
thmon
thperf
timemanp
udnl
vblank
 
How to get disassembler working on Wine on Ubuntu:

* winetricks corefonts
* Install from python-3.9.5-amd64.exe
* cp ~/.wine/drive_c/windows/system32/msvcp140{,d}.dll && cp ~/.wine/drive_c/windows/system32/ucrtbase{,d}.dll && cp ~/.wine/drive_c/windows/system32/vcruntime140{,d}.dll
* https://gist.github.com/S-trace/e20785d5ea286e0a3fbdc1e5115f9719 (tip: nop in x86 is 0x90)

After doing those steps, works nicely and my scripts also work without modifications
 

Similar threads

Back
Top