GithubHelp home page GithubHelp logo

ps2client's Introduction

PS2Client

CI

PS2CLIENT USAGE AND INFORMATION

THE INTRODUCTION

These programs, ps2client & fsclient, are command line tools used for interacting with a ps2 system running ps2link and/or ps2netfs. It will allow you to send various commands as well as respond to requests for data. This program was written and tested under Linux, Cygwin and Mac OS X but should compile on any reasonably unixlike system.

BUILDING THE CLIENTS

Building and installing is very simple:

make clean; make install

There are some build options, however:

PREFIX=/dir

Install directory, defaults to: $PS2DEV. /bin will be automatically appended. The software will be installed to the /bin sub-directory, under PREFIX (PREFIX/bin).

These options can be used as follows:

make clean; make PREFIX=/new/path/prefix install

BUILDING WINDOWS BINARIES

For building windows binaries on Unix system, you need to setup mingw cross-compiler and win32 threads. Build command:

make -f Makefile.mingw32

BASIC CLIENT USAGE

Basic usage:

ps2client [-h hostname] [-t timeout] <command> [arguments]
fsclient [-h hostname] <command> <arguments>

[-h hostname]

The address of the remote ps2. This can be an IP or a hostname. If none is given, the environment variable $PS2HOSTNAME will be checked for a valid address. If this variable isn't set, a default of 192.168.0.10 will be used.

[-t timeout]

An idle timeout period in seconds that the client will wait before exiting. This is useful to allow a script to continue after calling ps2client to send a command to ps2link or ps2netfs.

PS2LINK COMMANDS

  • reset

Send a reset request to ps2link.

  • execiop <filename> [arguments]

Tell ps2link to load and execute a file on the IOP.

  • execee <filename> [arguments]

Tell ps2link to load and execute a file on the EE.

  • poweroff

Send a poweroff request to ps2link.

  • scrdump

Tell ps2link to dump exceptions to the screen.

  • netdump

Tell ps2link to dump execetions to the network console.

  • dumpmem <offset> <size> <filename>

Dump the contents of memory into a file.

  • startvu <vu>

Tell the specified vector unit to start operation.

  • stopvu <vu>

Tell the specified vector unit to stop operation.

  • dumpreg <type> <filename>

Dump the registers of a given type into a file.

  • gsexec <size> <filename>

Tell ps2link to load and send a file to the GS.

  • writemem <offset> <size> <filename>

Write the contents of a file into memory.

  • iopexcep

I really don't know! OH NOES!!

  • listen

Listen to the ps2link network console.

ps2client's People

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  avatar  avatar

Watchers

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

ps2client's Issues

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

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 :)

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.

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!

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.

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

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?

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.