diff options
| author | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-07-17 11:30:07 +0800 |
|---|---|---|
| committer | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-07-17 11:30:07 +0800 |
| commit | 0d4345a9bf2623df079c50a3bc73cbb7deca1176 (patch) | |
| tree | 6cda70b844f39fc2d65a806b91a6010066433b56 /README.md | |
| parent | b956c5391b955e793a4d54572aa58872b4c66c30 (diff) | |
| download | psn00bsdk-0d4345a9bf2623df079c50a3bc73cbb7deca1176.tar.gz | |
Added C++ support, updated build instructions and makefiles, consolidated libc and libgcc (during build process), libraries now v0.12b and more
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 125 |
1 files changed, 73 insertions, 52 deletions
@@ -28,7 +28,7 @@ performance reasons. ## Notable features -As of libpsn00b run-time library v0.10b +As of libpsn00b run-time library v0.11b * Extensive GPU support with polygon primitives, high-speed DMA VRAM transfers and DMA ordering table processing. All video modes for both NTSC @@ -41,10 +41,10 @@ As of libpsn00b run-time library v0.10b matrix and vector functions, all calculations performed in fixed point integer math. -* Stable and easy to use interrupt service routine with callback system for +* Stable interrupt service routine with easy to use callback system for simplified handling of hardware and DMA interrupts, no crude event handlers - or kernel hacks used and should be compatible with HLE BIOS implementations - and homebrew loaders and menus. + or kernel hacks used and should be compatible with HLE BIOS implementations, + and should play well with writing loader programs. * Complete Serial I/O support with SIOCONS driver for tty console access through serial interface. @@ -58,7 +58,7 @@ As of libpsn00b run-time library v0.10b initialization. * Uses Sony SDK library syntax for familiarity to experienced programmers - and to make porting existing homebrew to PSn00bSDK easier. + and to make porting existing homebrew projects to PSn00bSDK easier. * Works on real hardware and most popular emulators. @@ -73,52 +73,72 @@ not included in this repository for Windows users are planned, though some arrangements would need to be made first. Perhaps once PSn00bSDK is considered halfway production ready. -A precompiled copy of the GCC 7.2.0 toolchain for Windows is available -in lameguy64's website (http://lameguy64.tk) in the PSn00bSDK page. This -should make building PSn00bSDK under Windows a bit easier as building the -toolchain is the hardest part of building PSn00bSDK as its more difficult -to get it to compile correctly under Windows than on Linux and BSDs. +A precompiled copy of the GCC 7.4.0 toolchain for Windows is available +in the PSn00bSDK page of Lameguy64's website +( http://lameguy64.tk/?page=psn00bsdk ). This should make building PSn00bSDK +under Windows a bit easier as building the toolchain is the hardest part +of building PSn00bSDK as its more difficult to get it to compile correctly +under Windows than on Linux and BSDs. ## Building the SDK -### Windows (needs work/testing): +### Windows: 1. Download the following: - * MinGW GCC (32-bit or 64-bit whichever you prefer) - * MSys2 (32-bit or 64-bit whichever you prefer) - * tinyxml2 (for lzpack and smxlink) - * GCC 7.2.0 for mipsel-unknown-elf (download from Lameguy64's website) -2. Install MSys2 and MinGW GCC. -3. Extract GCC 7.2.0 for mipsel-unknown-elf to the root of your C drive. -4. Update your PATH environment variable to point to the bin directories of - GCC 7.2.0 for mipsel-unknown-elf, MSys2 and MinGW GCC. Make sure you can - access gcc, mipsel-unknown-elf-gcc and make from any directory in the - command prompt. -5. Build tinyxml2 with MinGW GCC through MSys2's shell - (./configure then make). -6. Clone/download PSn00bSDK source files. -7. Enter libpsn00b directory and run make. -8. Enter tools directory and run make, then 'make install' to consolidate the - executables to a bin directory. Add this directory to your PATH - environment variable and make sure elf2x is accessible from any directory. -9. Compile the example programs to test if the SDK is set up correctly. - Update directory paths in sdk-common.mk when necessary. + * MSys2 (32-bit or 64-bit version whichever you prefer) + * GCC 7.4.0 for mipsel-unknown-elf (download from Lameguy64's website at + http://lameguy64.tk?page=psn00bsdk ) +2. Install MSys2, update packages (with pacman -Syu) then install the + following packages: + * git + * make + * mingw-w64-i686-gcc (for 32-bit) or mingw-w64-x86_64-gcc (64-bit) + * mingw-w64-i686-tinyxml2 (32-bit) or mingw-w64-x86_64-tinyxml2 (64-bit) + You will need to close and reopen MSys2 for the PATH environment to + update for MinGW. +3. Extract GCC 7.4.0 for mipsel-unknown-elf to the root of your C drive. +4. Edit `mipsel-unknown-elf/mipsel-unknown-elf/lib/ldscripts/elf32elmip.x` + and update the .text definitions as explained in toolchain.txt. +5. Add `export PATH=$PATH:/c/mipsel-unknown-elf/bin` to your `.bash_profile` + file in MSys2. Test if mipsel-unknown-elf-gcc can be called from any + directory in the terminal. +6. Clone from PSn00bSDK source with + `git clone https://github.com/lameguy64/psn00bsdk` + Clone it in the root of your C drive or in any location you choose. +7. Enter tools directory in PSn00bSDK and run `make` to build all tools. + Then, run `make install` to consolidate all tools to a single bin + directory. Add this directory to your PATH variable + (with export=$PATH:<path to SDK>/tools/bin) and make sure `elf2x` can + be called from any directory. +8. Enter libpsn00b directory and run `make` to build all libpsn00b libraries. +9. Enter examples directory and run `make`, this also verifies if the SDK + has been set up correctly. Update directory paths in `sdk-common.mk` when + necessary. + +If you prefer to do things in the Command Prompt, you can add the paths +c:\msys64\usr\bin, c:\msys64\mingw64\bin (mingw32 for 32-bit), +c:\mipsel-unknown-elf\bin and c:\psn00bsdk\tools\bin (paths may vary +depending on where you've installed/extracted them) to your system's +PATH environment variable. This way, you can invoke make and compile +programs with PSn00bSDK within the Command Prompt. + ### Linux and Unix-likes: -1. Build and install the GNU GCC toolchain configured for mipsel-unknown-elf - (see toolchain.txt for details). -2. Update your PATH environment variable to point to the bin directory of the - toolchain. Make sure the toolchain executables are accessible from any - directory in the terminal. -2. Install the following (development) package: - * tinyxml2 -3. Clone/download PSn00bSDK source files. -4. Enter the libpsn00b directory and run make. -5. Enter the tools directory and run make, then 'make install' to consolidate - the executables to a bin directory. Add this directory to your PATH - variable and make sure elf2x is accessible from any directory. +1. Install gcc, make, texinfo, git and development packages of mpfr, mpc, + gmp, isl and tinyxml2 libraries. +2. Build and install the GNU GCC toolchain targeting mipsel-unknown-elf + (see toolchain.txt for details). Update your PATH environment variable to + include the bin directory of the toolchain and make sure they can be + accessed from any directory. +3. Clone from PSn00bSDK source with + `git clone https://github.com/lameguy64/psn00bsdk` +4. Enter tools directory and run `make`, then `make install` to consolidate + the tools to a bin directory. Add this directory to your PATH variable and + make sure `elf2x` is accessible from any directory. +5. Enter the libpsn00b directory and run `make`. You may need to edit the + `common.mk` file to correspond with the GCC version you're using. 6. Compile the example programs to test if the SDK is set up correctly. - Update directory paths in sdk-common.mk when necessary. + Update directory paths in `sdk-common.mk` when necessary. ## Examples @@ -130,20 +150,16 @@ and contributed example programs are welcome. ## To-do List -* libc: C++ support (getting classes, new and delete working is enough) - and better sprintf() (one from PSXSDK is slow due to unnecessary usage - of int64 and somewhat a bit buggy) yet to be implemented. More standard - C library stuff also yet to be implemented. - -* psxgpu: VRAM download and VRAM move functions, some more primitives - and macros yet to be implemented. +* psxgpu: VRAM move function, some primitives and macros yet to be + implemented. * psxgte: Higher level GTE rotate translate and perspective functions yet to be implemented. -* psxspu: Lots of work to do. +* psxspu: Plenty of work to be done. -* psxapi: Plenty of BIOS function calls yet to be added. +* psxapi: BIOS function calls intended for stdio may need to be in + libc instead. * psxetc: Text stream stuff (FntOpen(), FntPrint(), FndFlush()) for debug purposes yet to be implemented. @@ -170,6 +186,11 @@ back in return. Main developer: * Lameguy64 +Honorable mentions: +* ijacquez (for the helpful suggestions on getting C++ working) + +Helpful contributors can be found in the changelog. + References used: * nocash's PlayStation specs document (http://problemkaputt.de/psx-spx.htm) * Tails92's PSXSDK project. |
