Latest upload by: John
08 DEC 2014 10:22 PM
PSXDEV logo
Chat with Members on EFnet!
IRC Channel Log: EFnet #psxdev

PlayStation Development Network - Psy-Q Hello World Tutorial

Revision 1.4

This tutorial will teach you how to display the text 'Hello World' on your screen from a PlayStation 1. To program on the PlayStation 1, you use the C language. Using C++ is possible too, but this tutorial will not go into it.


First off, make sure you have Psy-Q installed. You may see how to setup Psy-Q by clicking here.
Also be sure that your environment variables are setup correctly. The link above on how to setup Psy-Q will explain it for you.


To get started, you will need to make a new directory called 'projects'.
This is where you will store all of your work.

Under 'projects', make a new directory called 'hiworld'.

NOTE: You can't call the folder 'helloworld' because DOS does not like long character strings in folder names. File names must be limited to 8 characters or less. Windows 7 however does not have this problem, but the Psy-Q tools will not like it and you will run into trouble.

You should now have a directory structure that looks like, 'C:\psyq\projects\hiworld'.

Following the same rule above, make another folder called 'source' under 'hiworld'.

You should now have a directory structure that looks like, 'C:\psyq\projects\hiworld\source'.

NOTE: It is very important that you keep your folders organized. As an example, should you have images, music or text documents, you would make folders under 'hiworld' called 'images', 'music' and 'data'.


You will now need to make a MAIN.C file which will have your code.
All files, goes under 'C:\psyq\projects\hiworld\source\'.

The MAIN.C code may be found here. Simply COPY and PASTE the source code into a text document, and rename the extension from '.TXT' to '.C', accepting the changes.

NOTE: A great text editor to use for Windows 7, is the Programmers Notepad (freeware).

You will also need to download the MAKEFILE code which will essentially, make, the files needed by Psy-Q.
You can download source code for that by clicking here.

Make sure that you put this code into a text file, once again renaming the files name from 'TEXTFILE.TXT' to 'MAIKEFILE.MAK', accepting the changes again.

You should now have a directory tree/structure that looks like:
'C:\psyq\projects\hiworld\source\main.c'.
'C:\psyq\projects\hiworld\source\makefile.mak'.


It is now time to compile and make your program (Hello World).

Start by holding SHIFT and right clicking within the 'C:\psyq\projects\hiworld\source' window. Then simply select 'Open command window here'. Otherwise, the alternative and longer method is to press WINDOWS + R. Once the run window is open, type 'cmd', and then press return (or click OK).



If you are going the long way, what you then want to do is navigate to 'C:\psyq\projects\hiworld\source'. You can do this by typing 'cd C:\psyq\projects\hiworld\source' in the command prompt and pressing return to execute the command.

NOTE: It would be a good idea to copy from your System32 folder a Command Prompt console to your working directory. When you run it, it will add the path you are working from, making the use of psymake easier and faster. Windows 95/98 did this automatically, but for some reason later Windows versions removed this feature and replaced it with the 'SHIFT + Right Click' method.

Simply now type 'psymake' to start the compiling process.


Once compiled, you will then have a file called 'MAIN.CPE' under your working directory (C:\psyq\projects\hiworld\source\main.cpe).

To make your executable from this file, you have to type 'cpe2x main.cpe'.

NOTE: You can make your makefile do this automatically for you by adding the lines 'cpe2x /ce main.cpe'. The '/ce' switch makes a European PS-EXE. Look at the 'cpe2x' commands to see what else it can output for you, and adjust your switch as needed.

Congratulations! You have successfully made your Hello World executable PlayStation program.


You may test your 'MAIN.EXE' by running it under an emulator, such as PSXeven which can be downloaded here.

PlayStation BIOS's may be found here.

Should you want to burn this to a CD-ROM to be shown off on your friends PlayStaton, you will need to read 'How do I make a bootable PlayStation 1 CD-ROM?' here.


Copyright © 2012-2017 PSXDEV.net

, "PlayStation", , , "DUALSHOCK", "Net Yaroze" and "PSone" are registered trademarks of Sony Computer Entertainment Inc. .
This page is for informational use only. The user of this software, assumes full responsbility ensuring its use in accordance with local and federal laws.
The software and hardware on this site is provided "as-is", without any express, implied warranty or guarantees.

BTC: 1HkVTxmXRT7s7XUqNFGWaXgq9nJjy4yfLv | LTC: LLidfCazaV9GztZ536z8VXJ4C8Ywk85CSB