Page 2 of 2

Re: [TUTORIAL] Setting up the PSXSDK under Cygwin

Posted: August 23rd, 2017, 1:10 am
by danhans42
Xavi92 wrote:I'm glad you finally got it working! If you have any questions regarding PSXSDK, please let me know. )
Will do. Im having problems getting my code to execute on the playstation using catflap and Caetla with the parallel port. I like using that due to the speed and it keeping the SIO port free, but I get an exception whenever I try and run anything.

My current thinking is that its the same issue you experienced with using psxserial, the address the code is being loaded into is not that from the EXE header.

Re: [TUTORIAL] Setting up the PSXSDK under Cygwin

Posted: August 25th, 2017, 3:41 pm
by Xavi92
In such case, modify PSXSDK's linker script (playstation.x), which is automatically generated by genscripts.sh and set initial memory address (0x80010000 by default) to desired position. I don't recall what memory address Psy-Q games hosted in here were using - I'll check it out when I have some time. Recompile PSXSDK and ensure you made it righr by reading the output ELF file using mipsel-unknown-readelf.

Re: [TUTORIAL] Setting up the PSXSDK under Cygwin

Posted: August 27th, 2017, 1:25 pm
by nocash
danhans42 wrote:Caetla with the parallel port. I like using that due to the speed and it keeping the SIO port free
If you want it for speed, you could also give it a try with the kernel clone & upload function in no$psx: viewtopic.php?f=76&t=1319 It should be 3x faster than the original xplorer parallel port upload (and probably also than catflap, though I've never tried that). The drawback is that no$psx supports "upload to hardware" only (no debugging on hardware).
Xavi92 wrote:Recompile PSXSDK and ensure you made it righr by reading the output ELF file using mipsel-unknown-readelf.
Good that you mention that, I wondered what kind of debug info you have in psxsdk anyways. So it's in an ELF file with dwarf2 debug info in it? I am currently working on supporting PsyQ .SYM files, and could add support for ELF, too.
More on that here: viewtopic.php?f=76&t=1318
ELF could be even easier than SYM because the no$gba code (that no$psx is based on) already supports ELF symbols & source line numbers. I would only need some psxsdk sample with source code, elf file, and binary in cue/bin or exe format (though the exe is probably also contained inside of the elf file, or isn't it?).

Re: [TUTORIAL] Setting up the PSXSDK under Cygwin

Posted: September 24th, 2017, 7:22 am
by Rooti
@danhans42 how did you compile GMP, MPFR and MPC? I think thats where my toolchain fails.
I have tried it with both windows and linux.

Re: [TUTORIAL] Setting up the PSXSDK under Cygwin

Posted: September 26th, 2017, 9:24 pm
by Shendo
If you are installing versions of gcc and binutils I listed in the first post make sure to install all mentioned packages (wget, make, mkisofs, g++, gmp, mpfr, mpfr-dev, mpc, diffutils) in cygwin.

Re: [TUTORIAL] Setting up the PSXSDK under Cygwin

Posted: September 28th, 2017, 8:50 am
by Rooti
I did install the mentioned packages, via pacman in MSYS2 (Which is based on Cygwin), also tried it in a regular cygwin, so far no success.

I tried one of the prebuilt toolchains that are up on Google Code, which worked fine for me.
I then tried to build an image with the selfbuilt compiler, and the rest of the precompiled toolchain. So I would assume, that my selfbuilt compiler is not working.

Is it possible that some of the libraries have to be recompiled for the Mips-target of the Playstation?

Re: [TUTORIAL] Setting up the PSXSDK under Cygwin

Posted: October 11th, 2017, 11:54 pm
by Xavi92
Take into account even the version of your host compiler matters when you try to compile GCC from scratch. For example, for mipsel-unknown-elf-gcc 5.2.0, I explicitely had to use x86-64 GCC 5.4.1.

Re: [TUTORIAL] Setting up the PSXSDK under Windows and Linux

Posted: February 3rd, 2019, 8:41 am
by Shendo
I updated the guide. Now for both Windows and Linux (Ubuntu) and with the latest binutils and gcc.

Re: [TUTORIAL] Setting up the PSXSDK under Windows and Linux

Posted: February 3rd, 2019, 10:41 am
by gwald
Nice one, you make it look really easy! :D

Re: [TUTORIAL] Setting up the PSXSDK under Windows and Linux

Posted: February 4th, 2019, 2:06 am
by Shendo
Thanks. Yeah, it's a pain sometimes to get everything working.

I actually also wanted to add macOS to the list but I'm having trouble compiling PSXSDK's tools for the host OS.
Compiler seems to be stricter and what would otherwise be warnings it treats as errors.
But it's OK, those errors/warnings need to be fixed.

I'd like to fix those issues myself but having no official PSXSDK repo it's a difficult task.
I contacted Tails92 back in December asking him to make an official PSXSDK repository but I didn't receive a reply.

Re: [TUTORIAL] Setting up the PSXSDK under Windows and Linux

Posted: February 4th, 2019, 8:13 am
by gwald
maybe use Xavi92's repo (the airport dev)?
https://github.com/XaviDCR92/psxsdk-20150729

Re: [TUTORIAL] Setting up the PSXSDK under Windows and Linux

Posted: February 5th, 2019, 1:46 am
by Shendo
Yes, however that repo is outdated. The newest PSXSDK is 20180115.
I could make a new repository with the current version but there are two problems with that approach.

1. It's not my project,
2. If Tails keeps updating his SDK then we will have code discrepancy.

So I would really like to have an official repository.

Re: [TUTORIAL] Setting up the PSXSDK under Windows and Linux

Posted: February 6th, 2019, 5:14 pm
by Xavi92
My repo is based on 20150729 but includes some experimental features here and there. However, there are some really interesting features I had missed from 20180115, so I might merge them into my repo so it is up to date while keeping those experimental features.

Re: [TUTORIAL] Setting up the PSXSDK under Windows and Linux

Posted: February 11th, 2019, 4:54 am
by Rooti
It seems u forgot to add the part where u actually compile the binutils and gcc

For the current version of the tutorial it should be something like:

Code: Select all

cd $BASEDIR/build/psxsdk-binutils/
../../source/binutils-2.31/configure --prefix=/usr/local/psxsdk --target=mipsel-unknown-elf --with-float=soft
make
sudo make install


cd $BASEDIR/build/psxsdk-gcc/
../../source/gcc-8.2.0/configure --disable-libada --disable-libssp --target=mipsel-unknown-elf --prefix=/usr/local/psxsdk --with-float=soft
make
sudo make install


Re: [TUTORIAL] Setting up the PSXSDK under Windows and Linux

Posted: February 11th, 2019, 1:06 pm
by Shendo
No I haven't. It's under "Download and install toolchain" section.
But you have to scroll to reveal the entire code, maybe that's throwing you off...