Creating a custom psx boot logo

A custom psx boot logo!

Needed tools :

Steps

Blender model creation

Create a model in blender. Keep your polycount low. For reference, the original psx logo has 560 triangles.
Make sure you only have one mesh in your object !

Logo in blender

Set shading to "Flat"

Tab into "Edit mode" with your object selected, and make sur your object's faces are set to "Flat" in "Shading".

Use vertex paint for colors

Either use vertex painting directly, or bake the object's materials to vertex color :

  1. In the "Material" tab, "Shading" section, check "Shadeless" for each material
    Set materials to shadeless
  2. In the "Data" tab, add a Vertex Color layer in the "Vertex colors" section
    Add vertex color layer
  3. In the "Render" tab, "Bake" section, check "Bake to Vertex Color", then hit "Bake" after making sure your object is selected.
    Check 'Bake to Vertex Color' and Bake

You can check this worked by switching to Vertex Paint mode.

Exporting using the RSD plugin

Make sure you apply transformations to your object before exporting.
In object mode, that's Ctrl + A, 'Location', 'Rotation & Scale'.

Ideally, your object should be at 0,0,0, and have X and Y dimensions of ~18 blender units.
Your object's front should point towards Blender's -Y axis (that's toward your eye by default).

Object's rough size, orientation and location

Then, export your object using Lameguy64's RSD plugin and proceed to the "RSD to TMD conversion" step.

Exporting using the DXF plugin

This method is not recommended as Color information is lost

Object orientation

The psx space coordinates is Y-UP, so you might have to make it so the top of your object points towards the positive Y axis in Blender (that's the green axis, pointing away from you).
Rotating the object
The key sequence to do that in Blender is Tab into edit mode, hit A key, hit R key, hit X key, hit -, 9, 0 then hit Enter.

  1. Export from blender as dxf with the "Export Autocad DXF" plugin.

  2. Use psyq's dxf2rsd.exe utility with dosbox to convert the DXF to RSD using the -back option to flip normals:

    DXF2RSD.EXE -o logo.rsd -back model.dxf
  3. Edit the RSD file with PsyQ's old rsdtool or use the modern smxtool to add colors and save as RSD.

Logo in smxtool

Checking the MAT file

You have to make sure the final .MAT file generated has every line's columns 2 to 4 look has these values ; 2 F C. E.g :

x    2 F C rrr ggg bbb

x is the vertex index.
2 > 0x2 (0010) means 'Light-source calculations performed' and 'Double-faced polygon.'
F means flat shaded
C means color and rrr ggg bbb is the color value.

See the '[Flag]' section in http://psx.arthus.net/sdk/Psy-Q/DOCS/FileFormat47.pdf, p.56 for more details on these values.

RSD to TMD conversion

Convert the RSD to TMD using psyq's RSDLINK.EXE tool with dosbox :

RSDLINK.EXE -s XXX.X -o logo.tmd logo.rsd

Here -s XXX.X is needed so that the model is scaled to the correct size.

The scale factor is not the same if you used DXF vs RSD export.

If using the DXF export plugin, scale factor is 240.0.

If using the RSD export plugin, scale factor is 60.0.

Patching the disk image

Patch your disk image with BootEdit.exe by selecting your bin file, then the new tmd file.

You can also change the license text; These are two 32 characters field with pre-determined spaces.

Apply the patch and voila !

Patch disk image

Logos to download

You can download the TMDs and corresponding blend for logos I made here :

http://psx.arthus.net/homebrew/assets/boot_logos/

Homebrew logo
32bit logo 32bit logo

Tips and infos

Original PSX logo

For reference, the original psx logo ranges from XYZ (-611, -775, -943) to (608, 231, 594) and has 560 triangles.

PSX's logo specs

You can check a tmd file with the TMDINFO.EXE utility:

TMDINFO.EXE logo.tmd

Original logo colors

The original colors in the logo are :

Color HEX RGB
Green 82D2C8 130, 210, 200
Blue 8BADD7 139, 173, 215
Yellow FBDF00 251, 223, 0
Red FF3232 255, 50 , 50

MAT file

To reduce filesize, one can use a range to specify color/shading/flags in one line :

0-256    0 F C 200 200 200 # Use light-source, flat shaded, grey for vertices 0 to 256

This would result in a stylish grey logo...

Style

Run Dos program from Linux CLI

You can ran a DOS program directly from CLI :

dosbox -c "rsdlink.exe -s 60.0 B:\input.rsd -o B:\output.tmd"

Here, B:\ is mapped to the folder that contains the input and ouptu files :

In dosbox.conf 'z [autoexec] section :

MOUNT B ~/path/to/files

Bash script

Here is a small bash wrapper to convert rsd to tmd :

#!/bin/bash

if [ "$1" == "-h" ] || [ "$1" == "" ]; then
    echo "Usage : rsd2tmd.sh scale output.tmd input.rsd"
fi

dosbox -c "rsdlink.exe -s ${1} -o B:\\$2 B:\\$3" -c "exit"

Converting TMD back to an OBJ file

A small java utility is available that can convert TMDs back to Wavefront OBJ files : https://github.com/ABelliqueux/tmd2obj.

Doc & Sources