2 An open source PlayStation 4 SDK for writing userland applications which can be run with the [PS4-playground](https://github.com/CTurt/PS4-playground).
4 ## Building and installing
5 You will need [LLVM](http://llvm.org/releases/) version 3.7 or later for compiling, and `binutils` for linking (from [MinGW](http://www.mingw.org/) if you are on Windows).
7 Clone this repository locally, or download and extract a ZIP of the repository [here](https://github.com/CTurt/PS4-SDK/archive/master.zip).
9 Then create an environment variable called, `PS4SDK` which points to the base directory of the repository, using the Unix path style; for example:
11 /C/Users/Chris/Documents/GitHub/PS4-SDK
13 Build the libraries by running `make` on the `libPS4` and `libusbfatfs` directories.
15 Finally, you can build examples by running `make` on them.
18 At the moment, it is primarily focused on system calls.
20 However, using function pointers and the `RESOLVE` macro, we can call functions from other modules. For example, [the socket functions](https://github.com/CTurt/PS4-SDK/blob/master/source/network.c) from `libSceNet.sprx`.
23 Whilst the SDK isn't capable of most basic functionality yet, such as displaying graphics, or receiving controller input, there are workarounds: rendering to an HTML5 canvas, and using third party USB controllers, or a DS/PSP wirelessly for example.
25 The SDK is currently in a state where projects like an FTP server, [a mini Pong game](https://github.com/CTurt/PS4-Pong), or [GameBoy emulator](https://github.com/CTurt/Cinoop) could be developed.
28 `hello` - Load `libc` module and perform `getpid` system call
30 `sockets` - Send a message over a TCP socket
32 `modules` - Load and dump a module
34 `threads` - Create and wait for a thread to increment a variable
36 `canvas` - Render to an HTML5 canvas
38 `camera` - Initialise the PlayStation Camera and capture 10 frames
40 `pad` - Read controller input (not finished)
42 `jit` - Setting up JIT shared memory
45 `directories` - List the contents of a directory
47 `files` - Read a file's size, and its contents
50 `list_devices` - List information about all USB devices connected
52 `storage` - Read raw image from a USB flash drive
54 `usbfatfs` - Read files from USB formatted with FAT