Coder Social home page Coder Social logo

ps2client's Introduction

ps2dev

GitHub Workflow StatusGitHub Workflow StatusDocker Pulls

Main PS2 Repo for building the whole PS2 Development environment in your local machine.

This program will automatically build and install the whole compiler and other tools used in the creation of homebrew software for the Sony PlayStation® 2 videogame system.

What these scripts do

These scripts download (git clone) and install:

Requirements

  1. Install gcc/clang, make, cmake, patch, git, texinfo, flex, bison, gettext, wget, gsl, gmp, zlib, mpfr and mpc if you don't have those packages.
  • Ubuntu
sudo apt -y install gcc g++ make cmake patch git texinfo flex bison gettext libgsl-dev libgmp3-dev libmpfr-dev libmpc-dev zlib1g-dev
  • Fedora/CentOS
sudo dnf -y install gcc make cmake patch git texinfo flex bison gettext gmp-devel mpfr-devel libmpc-devel zlib-devel
  • Alpine
apk add build-base cmake git texinfo flex bison gettext gmp-dev mpfr-dev mpc1-dev zlib-dev
  1. Optional. If you are upgrading from the previous version of the PS2DEV environment, it is highly recommended to remove the content of the PS2DEV folder before upgrade. This is a necessary step after the major toolchain upgrade.
sudo rm -rf $PS2DEV
  1. Ensure that you have enough permissions for managing PS2DEV location (which defaults to /usr/local/ps2dev, but you can use a different path). PS2DEV location MUST NOT have spaces or special characters in its path! PS2DEV should be an absolute path. On Unix systems, if the command mkdir -p $PS2DEV fails for you, you can set access for the current user by running commands:
export PS2DEV=/usr/local/ps2dev
sudo mkdir -p $PS2DEV
sudo chown -R $USER: $PS2DEV
  1. Add this to your login script (example: ~/.bash_profile) Note: Ensure that you have full access to the PS2DEV path. You can change the PS2DEV path with the following requirements: only use absolute paths, don't use spaces, only use Latin characters.
export PS2DEV=/usr/local/ps2dev
export PS2SDK=$PS2DEV/ps2sdk
export GSKIT=$PS2DEV/gsKit
export PATH=$PATH:$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin:$PS2DEV/dvp/bin:$PS2SDK/bin
  1. Run build-all.sh
./build-all.sh

Docker generation

This repo also uses CI/CD to create a docker image called ps2dev/ps2dev:latest per change. This is useful if you're a developer that wants to create/port an application to the PS2. You can compile your project using this docker image.

Extra steps

If you want, you can JUST install the extra dependencies ps2client and ps2-packer. To achieve this, execute the following:

./build-extra.sh

macOS

If you download the pre-built macOS binaries and get a security error such as "ps2client" cannot be opened because the developer cannot be verified., you can remove the quarantine attribute by running:

xattr -dr com.apple.quarantine path/to/prebuilt/ps2toolchain

Thanks

ps2client's People

Contributors

akuhak avatar fjtrujy avatar mlafeldt avatar mlaux avatar oopo avatar rickgaiser avatar sl1pkn07 avatar sp193 avatar uyjulian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ps2client's Issues

Crashes with segfault if hostname is invalid

If you run ps2client with a PS2HOSTNAME that looks like an IP address, but actually has a letter in it, ps2client will segfault.

Nov 18 13:20:57 x13al kernel: ps2client[256502]: segfault at 18 ip 000055abcf5a1857 sp 00007ffc0acaaaf0 error 4 in ps2client[55abcf5a1000+3000] likely on CPU 4 (core 2, socket 0)
Nov 18 13:20:57 x13al kernel: Code: 00 00 00 53 66 c1 c6 08 b8 02 00 00 00 89 d3 48 83 ec 10 66 89 74 24 02 66 89 04 24 e8 42 f9 ff ff 31 d2 89 de bf 02 00 00 00 <48> 8b 40 18 48 8b 00 8b 00 89 44 24 04 e8 17 fa ff ff 85 c0 78 23

Compiling with DEBUG=1 gets:

(gdb) run
Starting program: /home/nroach44/media/code/psx/ps2client/bin/ps2client execee host:bin/PS2LINK.ELF
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7dba6c0 (LWP 257251)]

Thread 1 "ps2client" received signal SIGSEGV, Segmentation fault.
network_connect (hostname=0x55555555c180 <hostname> "1.1.l.1", port=18193, type=1) at src/network.c:35
35	  sockaddr.sin_addr = *(struct in_addr *)gethostbyname(hostname)->h_addr;

It is not apparent to the user why ps2client crashes, as it just dies.

Pass arguments to the commands not working

Hello,
After reading the documentation several times, I have tried to pass arguments using the ps2client application, but I couldn't make it work.

Documentation says:

execee <filename> [arguments]
 - Tell ps2link to load and execute a file on the EE.

I'm trying something as:

$ ps2client -h 192.168.1.150 execee host:hello.elf hello world

And the implementation of this hello.elf is:

int main(int argc, char *argv[])
{
   int i;
   
   for (i = 0; i < argc; ++i) {
        printf("Argument #%d is %s\n", i, argv[i]);
    }

  printf("Hello, world!\n);

   return 0;
}

The output that I receive is:

loadelf: fname host:hello.elf secname all
Input ELF format filename = host:hello.elf
0 00100000 000082b8 .
Loaded, host:hello.elf
start address 0x1000d8
gp address 00000000
Hello, world!

Am I using properly the command? or is it just that this is not working?

PD: I have the example that I have used here: https://github.com/fjtrujy/ps2-toolchain-tests/blob/master/PS2Client/main.c

Thanks

ps2client doesn't seem to write anything on command console

Not sure if it's a problem of my setup or a problem of the program itself...

but I can't catch any printf with ps2client...

tested listen with in-game debug OPL (latest beta) and nothing

execee works too but no printf at all on console

any idea?

ps2link and ps2netfs port numbers and type (UDP/TCP)

Hi, would you be able to post details of the port numbers required for ps2link and ps2netfs and their types (UDP/TCP)?
I have a raspberrypi sitting between my network and PS2 and need to do some port translations.
Thank you :)

Compilation failed

Hello!
While building a ps2toolchain i see an a error:

src/ps2link.c: In function ‘ps2link_connect’:
src/ps2link.c:50:44: warning: passing argument 1 to restrict-qualified parameter aliases with argument 4 [-Wrestrict]
   if (console_socket > 0) { pthread_create(&console_thread_id, NULL, ps2link_thread_console, (void *)&console_thread_id); }
                                            ^~~~~~~~~~~~~~~~~~                                ~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ps2link.c:56:44: warning: passing argument 1 to restrict-qualified parameter aliases with argument 4 [-Wrestrict]
   if (request_socket > 0) { pthread_create(&request_thread_id, NULL, ps2link_thread_request, (void *)&request_thread_id); }
                        

Seems like a building problem on a newer host system toolchain. I have a Debian Buster with GCC version 8.3 installed from repository.

What i can make with this? Thanks!

Having little trouble compiling ps2client.

I'm trying to compile ps2client but hit a bit of a snag.

src/ps2link.c: In function 'ps2link_request_getstat': src/ps2link.c:632:12: warning: implicit declaration of function 'ps2link_response_getstat'; did you mean 'ps2link_request_getstat'? [-Wimplicit-function-declaration] return ps2link_response_getstat(ret, mode, 0, stats.st_size, ctime, atime, mtime, 0); ^~~~~~~~~~~~~~~~~~~~~~~~ ps2link_request_getstat

I'm using gcc version 8.3.0

Incorrect documentation on make install destination directory

doc/readme.txt claims that make install destination directory defaults to $PS2DEV/bin. However, Makefile suggests that it defaults to $PS2DEV.

It also seems to append /bin itself, while doc/readme.txt suggests that the user should append it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.