Directory structure

This is only recomended structure, you can do waht you want.

First of all create directory where all your games will stored:

cd ~
mkdir psx_homebrew

Copy to this directory Makefile.cfg from PSXSDK distro.

Now you can create directory for every game here.

Typical Makefile

For example we created directory named "app1". For example we created hers source file app1_main.c , then Makefile will be like this:

include ../Makefile.cfg

all:
    mkdir -p cd_root
    psx-gcc -O3 $(CFLAGS) -DEXAMPLES_VMODE=$(EXAMPLES_VMODE) -o app1.elf app1_main.c
    elf2exe app1.elf app1.exe
    cp app1.exe cd_root
    systemcnf app1.exe > cd_root/system.cnf
    $(MKISOFS_COMMAND) -o app1.hsf -V APP1 -sysid PLAYSTATION cd_root
    mkpsxiso app1.hsf app1.bin $(CDLIC_FILE)
    rm -f app1.hsf
clean:
    rm -f app1.bin app1.cue app1.exe app1.elf
    rm -fr cd_root

You can just run make here and get PSone executable and .bin image, which you can burn on CD.

Hosted by uCoz