Giter Club home page Giter Club logo

mipsel-ecoff-toolchain's Introduction

mipsel-ecoff-toolchain

A cross compiler toolchain for the Sony Playstation Net Yaroze. The Net Yaroze SDK (included) uses the mipsel-ecoff target which has long since been considered obselete in GCC and therefore requires a much older version of GCC. Compiling these older versions of Binutils/GCC is achieved by using a modern version of GCC to compile an intermediate version of GCC that allows stepping backwards to the desired version (e.g. GCC v8.2.1 -> GCC v3.3.4 -> GCC v2.95.2). The final cross compiler is then able to cross compile the defunct combination of 32-bit MIPS (LE) and the ECOFF file object format used with the Net Yaroze SDK.

Building

If a PREFIX isn't given, it simply defaults to $PWD/yaroze.

./mipsel-ecoff-toolchain PREFIX=$PWD/yaroze

This will make folders during the build process: {build,sources,stamps}. These can be cleaned up also using make clean.

Originally, I was building this toolchain in a docker container, but ultimately found it not necessary on the OSes I was working with (Ubuntu and Arch Linux). However, others have had success building this toolchain on a different OS/platform using docker. For example, docker-yaroze has compiled Net Yaroze executables successfully on macOS. I'm unfamiliar with the docker environment on Windows, but the capability to run linux containers should be roughly the same (probably through WSL). In any case, it's worth giving a look if you are needing to build on a non-linux OS.

Compiling the sample

The sample project is one included with the Net Yaroze SDK and can be used to verify that the toolchain is working:

cd <PREFIX>/mipsel-ecoff/sample/sjiscode
make

Should produce a binary that looks like this:

$ file main
main: MIPSEL ECOFF executable (paged) not stripped - version 2.11

Running executables

Since Net Yaroze executables are not PSX-EXE files (PS1 executable format) they cannot be loaded into an emulator or CD iso builder. The Net Yaroze Boot Disk (DTL-S3035) runs a program that listens for serial I/O commands and loads the entire Net Yaroze SDK into memory. At this point, SIOCONS.EXE can be used to load the Net Yaroze executable at the correct starting address and the serial command to execute whats loaded into memory can then be sent. It is possible to prebuild a PSX-EXE that loads a bare Net Yaroze executable in a similar way by combining it with the SDK into a single PSX-EXE file. To do this, I've adapted the https://github.com/gwald/Yarexe tool (itself also a combination of the work of others) into eco2exe over in the repo I currently keep assorted psx/ny dev tools. I adapted it with the hopes that it will be slightly more portable and maintainable as a Go project.

With a valid PSX-EXE it can now be ran in emulators that can load the PSX-EXE format (mednafen, NO$PSX) or a PSX CD image can be made with something like https://github.com/Lameguy64/mkpsxiso.

Resources

mipsel-ecoff-toolchain's People

Contributors

chrisrx 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

Watchers

 avatar  avatar  avatar  avatar

mipsel-ecoff-toolchain's Issues

Building failed

Hi,
I have clone your project and just run the script provided(on Ubuntu 22.04), I get a long list with:

Making symbolic directory links
mkdir: cannot create directory ‘/home/user/projects/mipsel-ecoff-toolchain/build/gcc/include/root//usr/lib/llvm-13/lib/clang/13.0.1/include/sanitizer’: No such file or directory
mkdir: cannot create directory ‘/home/user/projects/mipsel-ecoff-toolchain/build/gcc/include/root//usr/lib/llvm-13/lib/clang/13.0.1/include/fuzzer’: No such file or directory
.....
./fixinc.sh: 1: cd: can't cd to /home/user/projects/mipsel-ecoff-toolchain/build/gcc/include/root//usr/lib/llvm-13/lib/clang/13.0.1/include
....
//usr/include/unistd.h:851: error: parse error before "readlinkat"
//usr/include/unistd.h:853: error: parse error before "__THROW":

mkdir Errors, errors from fixinc.sh and a lot of parse errors...

Am I doing something wrong?
I need the mipsel-ecoff for vmips...

C++ and GDB

Hey Chris,

Thanks for this... it's very cool!
I tried building building this patched freebsd version of gdb-4.16 using your script as a guide.... but could failed :/
https://archive.org/details/NetYaroze-GNU-SOURCES

It would be great to have a working Net Yaroze GDB with GCC.

I also added the C++ to the NY GCC works fine with a very basic C++ classes demo program (not using new or delete, etc).

Cheers,
Mike.

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.