From ed612b00a3517e48d86b95f2120c31721f58c146 Mon Sep 17 00:00:00 2001 From: Jaby Date: Tue, 25 Apr 2023 18:12:42 +0200 Subject: [PATCH] Create PoolBox project --- examples/PoolBox/.gitignore | 6 ++ examples/PoolBox/PoolBox.code-workspace | 77 ++++++++++++++++++++++ examples/PoolBox/application/Makefile | 17 +++++ examples/PoolBox/application/Overlays.json | 12 ++++ examples/PoolBox/application/src/main.cpp | 5 ++ examples/PoolBox/iso/Config.xml | 10 +++ examples/PoolBox/iso/System.cnf | 4 ++ 7 files changed, 131 insertions(+) create mode 100644 examples/PoolBox/.gitignore create mode 100644 examples/PoolBox/PoolBox.code-workspace create mode 100644 examples/PoolBox/application/Makefile create mode 100644 examples/PoolBox/application/Overlays.json create mode 100644 examples/PoolBox/application/src/main.cpp create mode 100644 examples/PoolBox/iso/Config.xml create mode 100644 examples/PoolBox/iso/System.cnf diff --git a/examples/PoolBox/.gitignore b/examples/PoolBox/.gitignore new file mode 100644 index 00000000..fa0401e8 --- /dev/null +++ b/examples/PoolBox/.gitignore @@ -0,0 +1,6 @@ +*.bin +*.cue +*.d +*.o +*.lba +**/bin \ No newline at end of file diff --git a/examples/PoolBox/PoolBox.code-workspace b/examples/PoolBox/PoolBox.code-workspace new file mode 100644 index 00000000..b7f04eff --- /dev/null +++ b/examples/PoolBox/PoolBox.code-workspace @@ -0,0 +1,77 @@ +{ + "folders": [ + { + "path": ".", + "name": "PoolBox" + } + ], + "tasks": { + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "wsl make ${input:target} BUILD_PROFILE=${input:build profile} JABY_ENGINE_DIR=$(wslpath ${env:JABY_ENGINE_PATH})", + "group": { + "kind": "build", + "isDefault": true + }, + "options": { + "cwd": "application", + "env": { + "PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}" + } + } + }, + { + "label": "cdgen", + "type": "shell", + "command": "${env:JABY_ENGINE_PATH}/bin/psxcdgen_ex.exe --list iso/PoolBox.lba -o iso/PoolBox psx bin-cue iso/Config.xml", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "build & generate cd", + "type": "shell", + "dependsOn": ["build", "cdgen"], + "dependsOrder": "sequence", + "group": { + "kind": "build", + "isDefault": true + } + } + ], + "inputs": [ + { + "id": "build profile", + "type": "pickString", + "options": ["debug", "release"], + "default": "release", + "description": "The build profile for PoolBox" + }, + { + "id": "target", + "type": "pickString", + "options": ["all", "clean", "rebuild"], + "default": "all", + "description": "the build target" + } + ] + }, + "settings": { + "C_Cpp.default.includePath": [ + "${env:JABY_ENGINE_PATH}/include" + ], + "C_Cpp.default.compilerPath": "", + "C_Cpp.default.cStandard": "c17", + "C_Cpp.default.cppStandard": "c++20", + "C_Cpp.default.intelliSenseMode": "linux-gcc-x86", + "C_Cpp.default.compilerArgs": [ + ], + "C_Cpp.default.defines": [ + "JABYENGINE_PAL" + ], + } +} \ No newline at end of file diff --git a/examples/PoolBox/application/Makefile b/examples/PoolBox/application/Makefile new file mode 100644 index 00000000..efec30b8 --- /dev/null +++ b/examples/PoolBox/application/Makefile @@ -0,0 +1,17 @@ +ARTIFACT = PoolBox +BUILD_DIR = bin + +#OVERLAY_CONFIG = Overlays.json + +include $(JABY_ENGINE_DIR)/lib/Wildcard.mk +SRCS = $(call rwildcard, src, c cpp) + +INCLUDES += -I$(JABY_ENGINE_DIR)/include + +include $(JABY_ENGINE_DIR)/lib/Makefile +include $(JABY_ENGINE_DIR)/lib/PSEXETarget.mk + +clean: + rm -fr $(OUTPUT_DIR) + rm -fr ../iso/*.bin + rm -fr ../iso/*.cue \ No newline at end of file diff --git a/examples/PoolBox/application/Overlays.json b/examples/PoolBox/application/Overlays.json new file mode 100644 index 00000000..5e779d49 --- /dev/null +++ b/examples/PoolBox/application/Overlays.json @@ -0,0 +1,12 @@ +{ + "slot_0": { + "main_area": { + "pattern": "bin/*/src/MainState/*.o" + } + }, + "slot_1": { + "main_area2": { + "pattern": "bin/*/src/MainState2/*.o" + } + } +} \ No newline at end of file diff --git a/examples/PoolBox/application/src/main.cpp b/examples/PoolBox/application/src/main.cpp new file mode 100644 index 00000000..64bee7d0 --- /dev/null +++ b/examples/PoolBox/application/src/main.cpp @@ -0,0 +1,5 @@ +#include + +void main() { + printf("Hello Planschbecken!\n"); +} \ No newline at end of file diff --git a/examples/PoolBox/iso/Config.xml b/examples/PoolBox/iso/Config.xml new file mode 100644 index 00000000..9c58e342 --- /dev/null +++ b/examples/PoolBox/iso/Config.xml @@ -0,0 +1,10 @@ + + + Jaby + %PSX_LICENSE_PATH%/LICENSEE.DAT + + + iso/System.cnf +
application/bin/PSX-release/PoolBox.psexe
+ +
\ No newline at end of file diff --git a/examples/PoolBox/iso/System.cnf b/examples/PoolBox/iso/System.cnf new file mode 100644 index 00000000..bf22c6f7 --- /dev/null +++ b/examples/PoolBox/iso/System.cnf @@ -0,0 +1,4 @@ +BOOT=cdrom:\XXXX_AAA.AA;1 +TCB=4 +EVENT=10 +STACK=801FFFF0 \ No newline at end of file