Skip to content

Instantly share code, notes, and snippets.

@Mat1az

Mat1az/ps2.md Secret

Last active June 25, 2024 08:56
Show Gist options
  • Save Mat1az/523226c92f3e3ff8489399be1319e037 to your computer and use it in GitHub Desktop.
Save Mat1az/523226c92f3e3ff8489399be1319e037 to your computer and use it in GitHub Desktop.
PS2 Homebrew Manifesto

Personal cheatsheet, workaround notes, open source homebrew apps testing, issues & image quality improvements

Commands

Format FAT32 32K Cluster Size

sudo mkfs.vfat -F 32 -s 64 /dev/sdX
sudo mkdosfs -F 32 -s 64 /dev/sdX

Get exFAT Cluster Size

sudo dumpexfat /dev/sdXX

Get USB Vendor, ProductID, Revision

sudo usb-devices

ZSO Images (Compressed)

maxcso --block=2048 --format=zso 'input.iso'

Get PNG pixel format

ffprobe -v error -show_entries stream=pix_fmt -of default=noprint_wrappers=1 input.png

List .iso content

isoinfo -i example.iso -l

Blind Navigation

Change from "RGB" to "Y Cb/Pb Cr/Pr"

  1. Start the console
  2. Wait 15 sec
  3. ↓, X
  4. Wait 2 sec
  5. ↓, ↓, ↓, X
  6. ←, X

Matrix 1.99 - Change from "VGA" to "OFF"

  1. Start the console
  2. △ + O (hold)
  3. Wait 3 sec (release)
  4. X
  5. Start

PS2 HDD Internal

Structure Size

__mbr __common __sysconf __system +OPL __.POPS
128 MB 512 MB 128 MB 128 MB 2048 MB 100 GB

OPL + POPSTARTER

Directory Structure

__.POPS __common/POPS +OPL/APPS +OPL
SLUS.XX.VCD SLUS.XX (Folder) SLUS.XX.ELF conf_apps.cfg
POPS.ELF
IOPRP252.IMG
CHEATS.TXT

conf_apps.cfg

Example Game=pfs0:/APPS/SLUS.XX.ELF

Some Bash Scripts

Generate empty folders & .ELF files for all .VCD files in the current directory (you need popstarter.elf)

#!/bin/bash

for file in *.VCD; do
  base_name="${file%.*}"
  elf_file="$base_name.elf"
  dir_name="$base_name"
  cp popstarter.elf "$elf_file"
  mkdir "$dir_name"
done

Generate config_apps.cfg from all .VCD files in the current directory

#!/bin/bash

apps_file="conf_apps.cfg"

# Remove the list file if it already exists
rm -f "$apps_file"

for file in *.VCD; do
  base_name="${file}"
  game_name=${base_name%.*}
  game_name=${game_name##*.}
  echo "$game_name=pfs0:/APPS/$base_name" >> "$apps_file"
done

Transfer / Speed Analysis

PlayStation 2 (PS2) IOP

I/O Value
Memory
ModelRAM
DTL-T100008 MB
^SCPH-7500x4 MB SDRAM
Any Other2 MB EDO DRAM
Transfer 37.5 MHz * 4 = ~150 MB/s

Max Transfer Speed

Controller Theoretical Speed
SSBUS ~150 MB/s ??
InterfaceP. Speed
HDD ATA (ATA-4)~66 MB/s
PCMCIA?
Ethernet (100Mbit) ~12.5 MB/s
InterfaceP. Speed
SMB?
UDPBD?
DVD
InterfaceP. Speed
x2 CD-ROM?
4x DVD-ROM~5.28 MB/s
BDM ~7 MB/s
InterfaceP. Speed
MX4SIO~2.0 MB/s
USB 1.1~1.5 MB/s
iLink?

PlayStation 2 (PS2) Multimedia

PS2 FMV (MPEG-2) 640x480 30fps: 3-5 MB/s

PS2 Dev - Setup

Caution

Don't ever bother with the ps2-toolchain AUR; it's totally broken. Prefer to use Docker; it's quicker and easier.

Port Status

PORT SERVICE
18193/tcp ps2link
21/tcp ftp
18195/tcp netfs

1. Prepare your PS2

Install ps2link

  1. Get the latest ps2link.
  2. Put it as:
    • /BOOT/BOOT.ELF + Modbo(Boot Mode=DEV1)
    • or
    • PS2BBL (LK_AUTO_E1 = mc?:/APPS/PS2LINK.ELF) + Modbo(Boot Mode=DEV1) <- recommended

2. Prepare your Docker

yay -S docker
sudo systemctl start docker
docker pull ps2dev/ps2dev:latest

Docker Settings

  1. Open a terminal and run a Docker container
docker run -it ps2dev/ps2dev
apk add bash build-base git nano make mpc mpc1 mpfr4 python3 py3-pip gmp wget zip
  1. Don't close the Docker container. Open another terminal, get the CONTAINER ID, and commit
docker ps
docker commit {CONTAINER ID} ps2dev/ps2dev
  1. Close it now with
exit

3. How to Compile

docker run -it --rm -v "$PWD:/src" -w /src ps2dev/ps2dev make

4. How to Execute

PS2Client Set-Up

yay -S ps2client-git
sudo firewall-cmd --add-port=18193/tcp

PS2Client Commands

ps2client -h {PS2_IP} execee host:example.elf
ps2client -h {PS2_IP} execee host:example.elf listen
ps2client -h {PS2_IP} reset
ps2client -h {PS2_IP} poweroff

MX4SIO

Diagrams

MSD Module PS2 Memory Bridge
3v3 miso
cs mosi
--- ---
mosi gnd <--
clk 3v3 |
miso cs |
gnd clk |
cd <--

A5-V11

Get installed packages

grep -H Installed-Size: /usr/lib/opkg/info/*.control | sed 's,^.*/\([^/]\+\)\.control:Installed-Size: *\(.*\),\2\t\1,' | sort -n

Wireless Setup

Connect to your home's wifi as client (WWAN)

LAN Interface

copy/save mac address, set-up as DHCP Client

PS2TOHDMI Adapters

PS2 TO HDMI CXSM (2019-11-11) PS2 TO HDMI (2018-06-25)
imgonline-com-ua-resize-tSLxcg7QoOct imgonline-com-ua-resize-Ioua0SF2aC3Z

PS2 USB Compatibility - Good & Fake

USB Legend Icon
USB Info + F3 Tests OK
I forgot to check for any issues
F3 Tests Failed, Bad/Fake, Don't buy
sudo f3probe --destructive --time-ops /dev/sdX

Caution

Initially, all seem perfect (H2testw, F3). The main problem isn't fake capacity but "ghost memory" and a very short lifespan. Don't trust my ✅ 100%. The ❌ appeared after approximately five fills, and game inconsistency was always present.

Status Store/Date Seller/Listing USB Info F3 Probe Logo/Size Note
AliE.
jun, 2024
1102716777
1005006567375744
Pending Usable:
485.00 MB
Announced:
485.00 MB
Module:
512.00 MB
Cloudisk
512MB
I bought x5 of these Micro SD cards.
AliE.
jun, 2023
5875812
1005004719322721
Vendor=058f
ProdID=6387
Rev=01.00
Usable:
0.00 Byte
Announced:
117.19 GB
Module:
128.00 GB
Microdrive
128GB
I bought x5 of these. Most can be filled but "stop working" after a short time. They now throw I/O errors when connected or disconnect when filled.
AliE.
oct, 2022
2393021
32776798154
Lost Lost Microdrive
64GB
I bought x5 of these.
AliE.
mar, 2022
910618004
1005001862551935
Pending Usable:
0.00 Byte
Announced:
58.59 GB
Module:
64.00 GB
KRY
64GB
I bought x5 of these Micro SD cards. Inconsistent F3 tests: After some use, 1 passed, 1 failed, and the others were not tested. Game tests were always inconsistent.
AliE.
dic, 2021
4988196
1005003152142788
Pending Pending JASTER
64GB
I bought x1 of these. It freezes at the FMCB logo when formatted in FAT32. exFAT/NTFS is OK.
AliE.
sep, 2021
1771214
32852039059
Lost Lost CeaMere
64GB
I bought x5 of these Micro SD cards. The included card reader stopped working quickly, so I had to buy a HQ one. However, the issue might have been with the SD cards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment