This extension provides tools for developing games and applications for PlayStation 1, including:
- GCC, PSn00bSDK, and emulator included
- Creation of Hello World projects
- Compilation of projects for PlayStation 1
- ISO generation for projects
- Running projects in the emulator
Run the following command in PowerShell to install all required dependencies and the extension:
irm https://raw.githubusercontent.com/alextrevisan/psxdev-code-plugin/master/setup-ps1dev.ps1 | iex
This will:
- Install all required dependencies (MSYS2, make, Visual C++ Redistributable)
- Download and install the PS1 Development extension in VS Code
If you prefer to install the extension manually:
- Download the latest release from GitHub Releases
- Install it in VS Code using the command:
code --install-extension ps1-dev-extension.vsix
- Restart VS Code
To manually install the required dependencies:
-
Install Chocolatey (Windows package manager):
Set-ExecutionPolicy Bypass -Scope Process Invoke-RestMethod "https://community.chocolatey.org/install.ps1" | Invoke-Expression
-
Install MSYS2:
choco install msys2 -y
-
Update MSYS2 and install make:
C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Syuu --noconfirm; pacman -S --noconfirm make"
-
Add MSYS2 to system PATH:
[System.Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\tools\msys64\usr\bin", [System.EnvironmentVariableTarget]::Machine)
-
Install Visual C++ Redistributable:
$vcPath = "$env:TEMP\vc_redist.x64.exe" Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile $vcPath Start-Process -FilePath $vcPath -ArgumentList "/install /quiet /norestart" -Wait
This extension includes the following tools for PlayStation 1 development:
- GCC for MIPS: GCC compiler configured for the PlayStation 1's MIPS R3000A processor
- PSN00B SDK: SDK for PlayStation 1 game development
- Emulator: A PlayStation 1 emulator (optional)
- Automatic Environment Setup: The extension automatically configures the PlayStation 1 development environment when loaded.
- Automatic Tool Downloads: If the tools are not included, the extension will offer the option to download them automatically.
- Project Creation: Easily create "Hello World" projects for PlayStation 1.
- Project Compilation: Compile your PlayStation 1 projects with a single command.
- ISO Generation: Generate ISO files for your projects, ready to be run on emulators or real hardware.
- Emulator Execution: Run your compiled projects directly in the emulator.
- Visual Studio Code
- Operating system: Windows, macOS (in progress)
- Install the extension through the VS Code Marketplace.
- The extension will automatically check if the necessary tools are included.
- If any tools are missing, you will be notified to add them to the extension's
tools
directory.
The extension automatically configures the development environment when loaded. If you need to set it up manually, use the command:
PlayStation 1: Setup Development Environment
To create a new "Hello World" project for PlayStation 1:
- Open a folder in VS Code where you want to create the project.
- Run the command
PS1: Create Hello World Project
. - Type the project name when prompted.
- The project will be created with a
main.c
,Makefile
,setup.mk
, and other necessary files.
To compile your PlayStation 1 project:
- Open a project file (e.g.,
main.c
). - Run the command
PS1: Build Project
. - The project will be compiled using the Makefile, generating binary files in the
bin
folder.
To generate an ISO file for your project:
- Compile the project first.
- Run the command
PS1: Generate ISO
. - The ISO and CUE files will be generated in the project's
iso
folder.
To run your project in the emulator:
- Compile the project and generate the ISO first.
- Run the command
PS1: Run in Emulator
. - The emulator configured in the Makefile will be launched with the generated ISO file.
Projects created with this extension have the following structure:
project/
├── main.c - Main source code
├── Makefile - Main Makefile for the project
├── setup.mk - Build environment settings
├── system.cnf - PlayStation configuration file
├── cd.xml - ISO generation settings
├── bin/ - Compiled binary files
└── iso/ - Generated ISO files
The generated Makefile includes several settings that you can customize:
- Emulator: You can configure different emulators in the Makefile.
- Code Organization: The Makefile supports organizing code in directories like
engine/
andui/
. - Compilation Flags: Various optimization and configuration flags are already included.
ps1-dev-extension/
├── tools/
│ ├── gcc/ - GCC compiler for MIPS
│ ├── psn00b_sdk/ - PlayStation 1 SDK
│ └── emulator/ - PlayStation 1 emulator (optional)
└── templates/
└── hello-world/ - Hello World project template
- If you encounter compilation issues, ensure that the GCC compiler and SDK are correctly installed in the
tools
directory. - To add an emulator, place the emulator executable in the
tools/emulator/
directory.