aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/CMakeLists.txt4
-rw-r--r--template/CMakePresets.json25
-rw-r--r--template/iso.xml56
3 files changed, 70 insertions, 15 deletions
diff --git a/template/CMakeLists.txt b/template/CMakeLists.txt
index 4aa648f..a3399db 100644
--- a/template/CMakeLists.txt
+++ b/template/CMakeLists.txt
@@ -1,7 +1,7 @@
# PSn00bSDK example CMake script
# (C) 2021 spicyjpeg - MPL licensed
-cmake_minimum_required(VERSION 3.20)
+cmake_minimum_required(VERSION 3.21)
project(
PSn00bSDK-template
@@ -11,7 +11,7 @@ project(
HOMEPAGE_URL "http://lameguy64.net/?page=psn00bsdk"
)
-psn00bsdk_add_executable(template STATIC main.c)
+psn00bsdk_add_executable(template GPREL main.c)
psn00bsdk_add_cd_image(
iso # Target name
diff --git a/template/CMakePresets.json b/template/CMakePresets.json
index d08b334..97d8428 100644
--- a/template/CMakePresets.json
+++ b/template/CMakePresets.json
@@ -1,22 +1,25 @@
{
- "version": 2,
+ "version": 3,
"cmakeMinimumRequired": {
"major": 3,
- "minor": 20,
+ "minor": 21,
"patch": 0
},
"configurePresets": [
{
- "name": "default",
- "displayName": "Default configuration",
- "description": "Use this preset to build the project using PSn00bSDK.",
- "generator": "Ninja",
- "binaryDir": "${sourceDir}/build",
+ "name": "default",
+ "displayName": "Default configuration",
+ "description": "Use this preset to build the project using PSn00bSDK.",
+ "generator": "Ninja",
+ "toolchainFile": "$env{PSN00BSDK_LIBS}/cmake/sdk.cmake",
+ "binaryDir": "${sourceDir}/build",
"cacheVariables": {
- "CMAKE_BUILD_TYPE": "Debug",
- "CMAKE_TOOLCHAIN_FILE": "$env{PSN00BSDK_LIBS}/cmake/sdk.cmake",
- "PSN00BSDK_TC": "",
- "PSN00BSDK_TARGET": "mipsel-none-elf"
+ "CMAKE_BUILD_TYPE": "Debug",
+ "PSN00BSDK_TC": "",
+ "PSN00BSDK_TARGET": "mipsel-none-elf"
+ },
+ "warnings": {
+ "dev": false
}
}
]
diff --git a/template/iso.xml b/template/iso.xml
index 477c636..29fbd2d 100644
--- a/template/iso.xml
+++ b/template/iso.xml
@@ -11,6 +11,21 @@
cue_sheet="${CD_IMAGE_NAME}.cue"
>
<track type="data">
+ <!--
+ The "volume", "volume_set", "publisher", "data_preparer" and
+ "copyright" strings below can be freely modified. The ISO9660
+ specification, however, imposes the following limitations:
+
+ - "volume" and "volume_set" must be 32 characters or less, and can
+ only contain uppercase letters, digits and underscores.
+ - "publisher" and "data_preparer" can be up to 128 characters long
+ and can additionally contain spaces and some special characters.
+ - "copyright" should be a path to a file on the disc, even one that
+ does not exist (but in practice it can be set to anything).
+
+ "system" and "application" must always be set to "PLAYSTATION" in
+ order for the disc to be recognized as valid.
+ -->
<identifiers
system ="PLAYSTATION"
volume ="PSN00BSDK_TEMPLATE"
@@ -21,14 +36,51 @@
copyright ="README.TXT;1"
/>
+ <!--
+ You may optionally include a license file using the <license> tag.
+ Some consoles, particularly Japanese or PAL models with a modchip,
+ require the disc to contain valid license data and will refuse to
+ boot if it is missing. License files are usually not required on
+ US consoles or when booting via softmods or cheat cartridges.
+
+ License files are region-specific and are not distributed with
+ PSn00bSDK for obvious reasons, but can be dumped from an official
+ game using dumpsxiso or extracted from the Sony SDK.
+ -->
+ <!--<license file="${PROJECT_SOURCE_DIR}/license.dat" />-->
+
+ <!--
+ Files and directories can be added to the disc by placing <file>
+ and <dir> tags below. All file names are case-insensitive and must
+ be in 8.3 format, i.e. no more than 8 characters for the name and 3
+ for the optional extension. Directories cannot have extensions.
+
+ A boot configuration file (SYSTEM.CNF) or executable (PSX.EXE) must
+ be present in the root directory. Due to BIOS limitations the root
+ directory cannot hold more than 30 files or directories, and the
+ entire disc must contain 45 directories or less. Subdirectories can
+ contain any number of files.
+ -->
<directory_tree>
<file name="SYSTEM.CNF" type="data" source="${PROJECT_SOURCE_DIR}/system.cnf" />
<file name="TEMPLATE.EXE" type="data" source="template.exe" />
- <file name="TEMPLATE.MAP" type="data" source="template.map" />
+ <!--
+ This file is only required if you are using dynamic linking
+ (see the system/dynlink example). It contains the executable's
+ symbol map and can be used to obtain the address of a function
+ or global variable by its name.
+ -->
+ <!--<file name="TEMPLATE.MAP" type="data" source="template.map" />-->
<dummy sectors="1024"/>
</directory_tree>
</track>
- <!--<track type="audio" source="track2.wav" />-->
+ <!--
+ CD-DA tracks can be added to the CD image by using one or more <track>
+ tags. The source attribute must be a path to an audio file in WAV, FLAC
+ or MP3 format (using WAV or FLAC is highly recommended to preserve
+ audio quality if you have a lossless copy of the source track).
+ -->
+ <!--<track type="audio" source="${PROJECT_SOURCE_DIR}/track2.wav" />-->
</iso_project>