All posts by El Bucanero

Free Spirit

Building your PS3 dev environment on macOS

This post will guide you to build an open-source PS3 development environment on macOS from the ground up, and show you how to compile and run your first PS3 homebrew app.

Prerequisites

  • macOS (currently v10.14.6 Mojave)
  • Xcode (currently v10.3)
  • Homebrew (package manager)

Setting up the requirements

Xcode

  1. Download the latest Xcode from the Apple Mac Store.
  2. Install Xcode
  3. Run Xcode for the first time, and allow the application to install all the required libraries and complete the initial setup.

Homebrew (package manager)

Install the Homebrew package manager from brew.sh , by running the following command from a Terminal window:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installing required packages

Once Homebrew is ready, we’ll use it to install the required packages to build the PS3 toolchain, by running the following command from a console window:

brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config

Building the PS3 toolchain and libraries

To build the PS3 toolchain and the open-source libraries (including PSL1GHT), first we need to create a new folder:

sudo mkdir /usr/local/ps3dev

Next, we check out the build scripts and start the building process:

git clone https://github.com/bucanero/ps3toolchain.git
cd ps3toolchain
./toolchain-sudo.sh

Now your system will start downloading and building the GCC cross-compiler toolchain for the PS3, and continue with the PSL1GHT library.

Please note that depending on your hardware, available memory, and network connection speed, this can take a while.

Building your first sample

If everything goes as expected, when the toolchain script finishes, you’ll have a complete PS3 development environment ready to begin coding your own PlayStation homebrew apps and games.

To build a basic PSL1GHT sample and test the toolchain:

cd build/psl1ght/samples/graphics/blitting/
make

You should see an output similar to:

bitmap.c
main.c
linking ... blitting.elf
CEX self ... blitting.self
ELF header size @ 40
8 program headers @ 40
23 section headers @ 51478
deflated...processing segment 0 with rlen 26388 len 10cab offset 0...encrypted...
deflated...processing segment 1 with rlen 5140 len 14e9 offset 30000...encrypted...
deflated...processing segment 2 with rlen 30f0 len e5e offset 40000...encrypted...
deflated...processing segment 3 with rlen 1260 len 218 offset 50000...encrypted...
processing segment 4 with rlen 0 len 0 offset 51260...encrypted...
processing segment 5 with rlen 0 len 0 offset 35140...encrypted...
processing segment 6 with rlen 0 len 0 offset 0...encrypted...
deflated...processing segment 7 with rlen 28 len 22 offset 26360...encrypted...
segments enumerated
built crypt data
file built
self written in memory

Running your first sample

To run and test our sample code, we execute the PS3Load app on a host PlayStation 3, and send the compiled binary code over the network.

Installing PS3Load on your PS3

  1. Download the PS3Load v0.2 host app from Brewology.com
  2. Install the .pkg file on your PS3
  3. Connect the PS3 to your LAN network (Wi-Fi or Ethernet)
  4. Run PS3Load from the XMB (in the Network tab)

Sending your sample code

When the host PS3Load app is running, you’ll see your PS3’s IP address on the screen. Take note of it, so we can setup our PS3Load environment:

export PS3LOAD=tcp:192.168.0.30

Last but not least, we send the binary file to the host PS3. Now we are ready to see our first sample app running on the PlayStation:

/usr/local/ps3dev/bin/ps3load blitting.self

At this point, you should be watching a nice “PSL1GHT” demo on your PS3 screen.  Smile

Congrats! you’ve reached the end of this guide and hopefully you’re now ready to start coding some great homebrew apps and games for the PS3.

Update

Download pre-compiled binaries for macOS and Linux (Ubuntu) here: https://github.com/bucanero/ps3toolchain/releases

VMU save files links fixed!

I’ve just realized that my Dreamcast VMU saves download links were not working, due to a change over SourceForge’s servers. Frown

I fixed the links, updated the VMU listings, and now everything should be back online!

Don’t worry, even if our beloved last SEGA console is 10+ years old, I still care about it and I’ll keep my downloads, tools and VMU files available. Smile

all those Falling…

It is a great pity for all those thinking like this:
Pleasure is the only good; by that they fall!
Terror is a necessary way; by that they fall!
Sensuality is innocent; by that they fall!
Violence is allowable; by that they fall!
Money makes happiness; by that they fall!
Power is progress; by that they fall!
Falsehood is acceptable; by that they fall!
Stealing gives wealth; by that they fall!
Conceit can conceal; by that they fall!
Science knows all; by that they fall!
Killing can be good; by that they fall!
Hunting is only fun; by that they fall!
Adultery is mature; by that they fall!
Paedophilia is harmless; by that they fall!
Drugs are fantastic; by that they fall!
Booze is medicine; by that they fall!
Giving does not help; by that they fall!
After death is nothing!; by that they fall!
The Hells do not exist; by that they fall!
Intentional Action has no effect; by that they fall!
I am better than…; by that they fall!
I know better…; by that they fall!
Making merit cannot elevate; by that they fall!

Continue reading all those Falling…

Heurística aplicada a la asignación de RRHH

A continuación, el Abstract del trabajo publicado en la revista Ciencia y Teconología (Edición XI, 2011) de la Facultad de Ingeniería de la Universidad de Palermo.

Este trabajo presenta un algoritmo de asignación de recursos humanos en una Universidad, junto con un desarrollo asociado con el fin de evaluar objetivamente el rendimiento computacional de la solución planteada. Los resultados obtenidos por las diferentes pruebas dentro del prototipo permitieron analizar la utilidad y performance de la solución heurística propuesta en un caso real, permitiendo su futura comparación frente a otras soluciones posibles.

La publicación completa del trabajo en PDF se puede descargar aquí.

El Insomnio del Hada

Había una vez un hada en el bosque a la que no le gustaba dormir, y recorría el bosque buscando una manera de descansar y cerrar los ojos. Sin importar lo que intentase, ella no podía conciliar el sueño.
Un día el hada encontró un brujo gruñón en el bosque, y le contó su problema. El brujo, deseando demostrar el poder de sus artes ocultas, le dijo: “en mi libro de conjuros hay más de mil hechizos para hacerte dormir”, y así se decidió a probarlos hasta que el hada pudiese descansar.
Cada noche, el brujo y el hada se encontraban frente al fuego, y el brujo preparaba el conjuro. Y cada noche, el hechizo que intentaba no surtía efecto, y así iba tachando del libro cada pocima que había probado sin resultado.
Pasaron mil noches juntos, el brujo nunca dejaba de intentarlo, y el hada no dejaba de ir al encuentro. Ella ya no se preocupaba por dormir, queria seguir despierta a su lado.
Un día, despues de mil hechizos, el libro se terminó. El brujo, herido en su orgullo de mago, le dijo: “he fracasado, no pude lograr que puedas dormir y descansar”… y el hada, sonriente, le dijo “lograste mucho más que eso, me hiciste soñar”.
Dice la leyenda que esa noche, el brujo le contó un cuento de su infancia, y el hada se durmió en sus brazos. Sin hechizos, sin pocimas, sin conjuros…