PlayStation 2: Difference between revisions
imported>DamienCassou Add a link to the Games page |
imported>GovanifY Added a dev section for crazy people doing ps2 dev in 2020 like me |
||
Line 2: | Line 2: | ||
= Emulation = | = Emulation = | ||
This | This section explains how to run Playstation 2 games on NixOS. A dedicated [[Games]] page lists games and reports on their successful execution on NixOS. | ||
== PCSX2 == | == PCSX2 == | ||
Line 15: | Line 15: | ||
You can also explore the bios file using romdirfs. | You can also explore the bios file using romdirfs. | ||
= | = Development = | ||
== Partitioning == | If you want to develop for the PlayStation 2 on NixOS you'll probably want to use the Open Source PS2SDK . | ||
The section below explains how to bootstrap the toolchain in order to have a working development environment. | |||
== Building the open source PS2SDK on NixOS == | |||
You can use the following nix-shell script to build the open source PS2SDK through [https://github.com/ps2dev/ps2toolchain ps2toolchain]. | |||
<syntaxhighlight lang="nix"> | |||
{ pkgs ? import <nixpkgs> {} }: | |||
let fhs = pkgs.buildFHSUserEnv { | |||
name = "ps2dev"; | |||
targetPkgs = pkgs: (with pkgs; [ | |||
gnumake | |||
clang | |||
clang-tools | |||
gcc | |||
wget | |||
git | |||
patch | |||
texinfo | |||
bash | |||
]); | |||
runScript = "bash"; | |||
}; | |||
in pkgs.stdenv.mkDerivation { | |||
name = "ps2dev-shell"; | |||
nativeBuildInputs = [ fhs ]; | |||
shellHook = '' | |||
# or whatever you want | |||
export PS2DEV=$HOME/ps2 | |||
mkdir -p $PS2DEV | |||
chown -R $USER: $PS2DEV | |||
# setup login env | |||
export PS2SDK=$PS2DEV/ps2sdk | |||
export PATH=$PATH:$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin:$PS2DEV/dvp/bin:$PS2SDK/bin | |||
exec ps2dev | |||
''; | |||
} | |||
</syntaxhighlight> | |||
You will have to run this shell each time you want to enter in an environment with the SDK tools available or, alternatively, re-export those environment variables in the shell of your liking: | |||
<syntaxhighlight lang="bash"> | |||
# or whatever you want | |||
export PS2DEV=$HOME/ps2 | |||
export PS2SDK=$PS2DEV/ps2sdk | |||
export PATH=$PATH:$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin:$PS2DEV/dvp/bin:$PS2SDK/bin | |||
</syntaxhighlight> | |||
= Retail = | |||
== HDD Partitioning == | |||
Playstation 2 use PFS filesystem. You could use pfsshell on PC. pfsshell's author advises you to not use it as root. | Playstation 2 use PFS filesystem. You could use pfsshell on PC. pfsshell's author advises you to not use it as root. | ||
Line 69: | Line 121: | ||
$ hdl_dump install /dev/sdb Final\ Fantasy\ X\ \(France\).iso | $ hdl_dump install /dev/sdb Final\ Fantasy\ X\ \(France\).iso | ||
= Network = | == Network == | ||
== Samba == | === Samba === | ||
works fine - example soon. | works fine - example soon. | ||
== FTP transfer == | === FTP transfer === | ||
A very slow solution ( ~ 500KB/s ). | A very slow solution ( ~ 500KB/s ). |