PSn00bSDK Win64 Binary Test Release 0 (Build Date: 02-17-2021)
2018 - 2021 Meido-Tek Productions / Lameguy64

LibPSn00b built from Github commit 1625072
GCC version: 10.2.0
Binutils version: 2.35

-----------------------------
  About this release
-----------------------------

This is the official, long awaited, pre-compiled, ready-to-use 64-bit
binary release of PSn00bSDK for those looking to get into PlayStation
homebrew development using 100% free software quickly, or want to give
PSn00bSDK a quick test-drive without the hassle of having to compile
the GNU toolchain and the SDK itself.

Since PSn00bSDK is not yet 100% complete, not all features of the
PlayStation hardware are supported yet (see PSn00bSDK features for details).
But what is currently supported should still be enough to create some
interesting homebrew with PSn00bSDK, programming skill and talent permitting.

This release also features additional tools for convenience to the new
homebrew developer, such as mkpsxiso, timedit, liteload and mcomms. All
are pre-compiled and ready to use.
  

-----------------------------
  About PSn00bSDK
-----------------------------

(copied from the README in the Github repo)

PSn00bSDK is a 100% free and open source SDK project for the original Sony
PlayStation for developing homebrew applications and games for the console
100% freely. This SDK can be used for freeware, commercial, and open source
homebrew projects.

The SDK is composed mainly of libraries (libpsn00b) and some utilities that
provide a basic framework for developing software for the PlayStation
hardware, the compiler is separate (GCC) and should be acquired from GNU.
The library API is intentionally written to resemble the library API of the
official libraries as closely as possible. This design decision is not only
for familiarity reasons to experienced programmers, but also so that existing
sample code and tutorials would still apply to this SDK, as well as making
the process of porting over existing homebrew originally made with official
SDKs easier with minimal modification, provided it doesn't use libgs.

PSn00bSDK is currently a work in progress and cannot really be considered
production ready, but what is currently implemented should be enough to
produce some interesting homebrew with the SDK, especially with its extensive
support for the GPU and GTE hardware. There's no reason not to fully support
hardware features of a target platform when said hardware features have been
fully documented for years (nocash's PSX specs document in this case).

Most of libpsn00b is written mostly in MIPS assembly, moreso functions that
interface with the hardware. Many of the standard C functions are implemented
in custom MIPS assembly instead of equivalents found in the BIOS ROM, for both
stability (the BIOS libc implementation of the PlayStation is actually buggy)
and performance reasons.


-----------------------------
  PSn00bSDK Features
-----------------------------

As of January 5, 2021

* Extensive GPU support with polygon, line and sprite primitives, high-speed
  DMA transfers for VRAM data and ordering tables. All video modes for both
  NTSC and PAL standards also supported with fully adjustable display area
  and automatic video standard detection based on last GPU mode. No BIOS
  ROM checks used.

* Extensive GTE support with rotate, translate, perspective correction and
  lighting fully supported via C and assembly GTE macros paired with high
  speed matrix and vector functions. All calculations performed in fixed
  point integer math, not a single float defined.

* Flexible interrupt service routine with easy to use callback mechanism for
  simplified handling and hooking of hardware and DMA interrupts, no crude
  event handler hooks or kernel hacks providing great compatibility with
  HLE BIOS implementations. Should work without issue for loader/menu type
  programs as well.

* Complete Serial I/O support with SIOCONS driver for tty stdin/stdout
  console access. Hardware flow control also supported.

* BIOS controller functions for polling controller input work as intended
  thanks to proper handling of hardware interrupts. No crude manual polling
  of controllers in a main loop. BIOS memory card functions may also work,
  but not yet tested extensively.

* Full CD-ROM support via libpsxcd with data read, CD audio and XA audio
  playback support. Features built-in ISO9660 file system parser for locating
  and querying files and directories. Supports directories containing more
  than 30 files (classic ISO9660 only, no Rock Ridge or Joliet extensions)
  and also supports reading new sessions on a multi-session disc.
  
* Uses Sony SDK library syntax for familiarity to experienced programmers
  and to make porting existing homebrew projects to PSn00bSDK easier.

* Works on real hardware and most popular emulators.

* Fully expandable and customizable to your heart's content (via source
  release).


-----------------------------
  Setting Up PSn00bSDK
-----------------------------

This binary release depends on MSys2 for the MinGW64 runtime libraries and
GNU build utilities such as make. Start by downloading the msys64 installer
from https://www.msys2.org/ and install it to your system.

Once installation is finished, open a Msys2 MinGW 64-bit shell and do the
following operations:

* Update Msys2 with `pacman -Syu`. You may be prompted to close the shell
  window and open a new one after files have finished downloading.
  
* Install required packages with `pacman -S mingw-w64-x86_64-toolchain
  mingw-w64-x86_64-tinyxml2 mingw-w64-x86_64-freeimage make`.
  
* Extract the psn00bsdk directory to the root of your C drive.
  
* Go to the psn00bsdk directory in the MSys2 shell by entering
  `cd /c/psn00bsdk`.
  
* Execute the env-vars.sh shell script with `. ./env-vars.sh` to update and
  adds required variables to the shell environment. You may add the export
  lines to your shell profile later to make it permanent.
  
* Enter the examples directory with `cd examples` and enter `make`. This will
  build all the examples in the directory to test if your setup can build
  PSn00bSDK programs.
  
If you wish to place the psn00bsdk directory elsewhere, simply update the
paths in the shell script to match your preferred location. This also applies
to the batch file version.


If you much prefer to use PSn00bSDK from the Command Prompt, you can do the
following:

* Add paths C:\msys64\usr\bin and C:\msys64\mingw64\bin to your system's
  PATH environment variable. You can edit it through your system's
  Advanced Settings -> Environment Variables. Make sure the paths are
  separated with a semicolon (;).
  
* Open a Command Prompt and enter `make` to confirm if your paths are set
  correctly. It should output a 'no targets specified' message.
  
* Go to the psn00bsdk directory and execute the env-vars.bat file to update
  and add required variables to the environment. You can set the directory
  paths from this batch file to your system's environment variables to make
  it permanent.
  
* Enter the examples directory and run `make` to test if the setup is
  working properly. If you've compiled the examples from the MSys2
  shell prior you will have to execute `make clean` first to test the
  build process thoroughly.
  
  
-----------------------------
  Learning Resources
-----------------------------

If you're completely new to PlayStation homebrew development and are having
a difficult time understanding the inner workings of the console as far as
programming goes, Lameguy's PlayStation Programming Series which can be 
found at http://lameguy64.net/tutorials/pstutorials/ may be a good starting
place. It is currently a work in progress tutorial series, but a new chapter
is added almost every month.


-----------------------------
  Differences from Mainline
-----------------------------

* Toolchain prefix is mipsel-none-elf instead of mipsel-unknown-elf, the
  former seems more correct in newer GCC versions.
  
* Path defaults in the setup files assumes the toolchain and libraries to be
  at C:\psn00bsdk for Windows and /usr/local/psn00bsdk for Linux. Overrides
  via PSN00BSDK_TC and PSN00BSDK_LIBS environment variables still apply.

* Source code available separately.

  
-----------------------------
  Tools Included
-----------------------------

* TIMedit 0.10a	https://github.com/lameguy64/timedit

* mkpsxiso 1.30	https://github.com/lameguy64/mkpsxiso

* img2tim 0.75	https://github.com/lameguy64/img2tim

* mcomms 0.87	https://github.com/lameguy64/mcomms

* LITELOAD 1.3	https://github.com/lameguy64/liteload

* n00bROM 0.30b	https://github.com/lameguy64/n00brom

Most recent versions available as of the creation of this package are
included in this release.


-----------------------------
  Usage terms
-----------------------------

PSn00bSDK falls under the terms and conditions of the Mozilla Public
License. A quick summary of this license is that PSn00bSDK can be used
freely in both free and open source projects and commercial closed source
projects as projects using PSn00bSDK does not necessarily have to follow
the MPL as well.

If modifications to the SDK were made as part of the development of such
projects that enhance its functionality, such changes must be contributed
back in return.

Homebrew made with PSn00bSDK may not be released under 'annoyingmous'.
Although there's nothing that would enforce it, this term may as well be
ignored despite it annoying the SDK author.


-----------------------------
  Credits
-----------------------------

Original author:
* Lameguy64 (John "Lameguy" Wilbert Villamor)

Honorable mentions:
* ijacquez - helpful suggestions for getting C++ working.
* NicolasNoble - his OpenBIOS project gave insight to how the BIOS works
  internally.

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 (during PSn00bSDK's infancy).
