From 7dac721f10c709660373e94af65e5f5798ea1270 Mon Sep 17 00:00:00 2001 From: jaby Date: Sun, 24 Apr 2022 15:11:24 +0200 Subject: [PATCH] Create project --- .gitignore | 9 ++++ Code/Makefile | 50 ++++++++++++++++++++ Code/iso/JabyEngine.cnf | 4 ++ Code/iso/JabyEngineISODesc.xml | 24 ++++++++++ Code/iso/JabyEngineLBAFile.json | 14 ++++++ Code/src/JabyEngine.cpp | 7 +++ JabyEngine.code-workspace | 82 +++++++++++++++++++++++++++++++++ 7 files changed, 190 insertions(+) create mode 100644 .gitignore create mode 100644 Code/Makefile create mode 100644 Code/iso/JabyEngine.cnf create mode 100644 Code/iso/JabyEngineISODesc.xml create mode 100644 Code/iso/JabyEngineLBAFile.json create mode 100644 Code/src/JabyEngine.cpp create mode 100644 JabyEngine.code-workspace diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..d4ba8961 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# For now we ignore what is in root +**/bin +**/iso/Info +/iso + +*.dep +*.o +*.ii +*.s \ No newline at end of file diff --git a/Code/Makefile b/Code/Makefile new file mode 100644 index 00000000..36a66c4f --- /dev/null +++ b/Code/Makefile @@ -0,0 +1,50 @@ +BINDIR ?= bin/ +PCSX_REDUX ?= ../../../GIT/pcsx-redux/src/mips +PSYQ_PATH ?= ../../../PSYQ/Converted +TARGET = JabyEngine +TYPE = ps-exe +BUILD = Release + +#OVERLAYSCRIPT ?= overlay.ld +#OVERLAYSECTION ?= .ovly0 .ovly1 + +rwildcard = $(wildcard $(addprefix $1/*.,$2)) $(foreach d,$(wildcard $1/*),$(call rwildcard,$d,$2)) + +#Source list +SRCS = $(call rwildcard, src, c cpp) +SRCS += $(PCSX_REDUX)/common/crt0/crt0.s + +CPPFLAGS += -I$(PSYQ_PATH)/Include + +LDFLAGS += -L$(PSYQ_PATH)/Lib +LDFLAGS += -Wl,--start-group +LDFLAGS += -lapi +LDFLAGS += -lc +LDFLAGS += -lc2 +LDFLAGS += -lcard +LDFLAGS += -lcomb +LDFLAGS += -lds +LDFLAGS += -letc +LDFLAGS += -lgpu +LDFLAGS += -lgs +LDFLAGS += -lgte +LDFLAGS += -lgun +LDFLAGS += -lhmd +LDFLAGS += -lmath +LDFLAGS += -lmcrd +LDFLAGS += -lmcx +LDFLAGS += -lpad +LDFLAGS += -lpress +LDFLAGS += -lsio +LDFLAGS += -lsnd +LDFLAGS += -lspu +LDFLAGS += -ltap +LDFLAGS += -lcd +LDFLAGS += -Wl,--end-group + +include $(PCSX_REDUX)/common.mk + +fullclean: clean + rm -fr iso/Info/* bin/GlobalLBATable.bin + +rebuild: fullclean all \ No newline at end of file diff --git a/Code/iso/JabyEngine.cnf b/Code/iso/JabyEngine.cnf new file mode 100644 index 00000000..22d980e8 --- /dev/null +++ b/Code/iso/JabyEngine.cnf @@ -0,0 +1,4 @@ +BOOT=cdrom:\SCES_003.90;1 +TCB=4 +EVENT=10 +STACK=801FFFF0 \ No newline at end of file diff --git a/Code/iso/JabyEngineISODesc.xml b/Code/iso/JabyEngineISODesc.xml new file mode 100644 index 00000000..b82c9ca9 --- /dev/null +++ b/Code/iso/JabyEngineISODesc.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + diff --git a/Code/iso/JabyEngineLBAFile.json b/Code/iso/JabyEngineLBAFile.json new file mode 100644 index 00000000..d2119195 --- /dev/null +++ b/Code/iso/JabyEngineLBAFile.json @@ -0,0 +1,14 @@ +{ + "Output":"Code/bin/GlobalLBATable.bin", + "Input":"Code/iso/Info/JabyEngine.lba", + "Order": [ + "BOOT/SPLASH.TIM", + "MAIN/OVERLAY.OVL", + "TILESET/START.BIN", + "TILESET/DEBUG.BIN", + "MAIN/AREA/START.ARA", + "SPRITE/TEST.BIN", + "SOUND/TEST.VAG", + "XA/NEGA.XA" + ] + } \ No newline at end of file diff --git a/Code/src/JabyEngine.cpp b/Code/src/JabyEngine.cpp new file mode 100644 index 00000000..58569506 --- /dev/null +++ b/Code/src/JabyEngine.cpp @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("Hello Planschi!\n"); + return 0; +} \ No newline at end of file diff --git a/JabyEngine.code-workspace b/JabyEngine.code-workspace new file mode 100644 index 00000000..4b194ff1 --- /dev/null +++ b/JabyEngine.code-workspace @@ -0,0 +1,82 @@ +{ + "folders": [ + { + "path": "." + } + ], + "tasks": { + "version": "2.0.0", + "tasks": [ + { + "label": "make", + "type": "shell", + "command": "wsl make ${input:target} BUILD=${input:build}", + "options": { + "cwd": "Code" + }, + "problemMatcher": [] + }, + { + "label": "finalize", + "type": "shell", + "command": "FinalizeCD.bat ${input:finalize} JabyEngine Code\\iso", + "options": { + "env": { + "PATH": "../../Tools/;../../Tools/mkpsxiso;${env:PATH}" + } + }, + "problemMatcher": [], + }, + { + "label": "make project", + "type": "shell", + "dependsOrder": "sequence", + "dependsOn": ["make", "finalize"], + "group": { + "kind": "build", + "isDefault": true + } + }, + ], + "inputs": [ + { + "id": "build", + "type": "pickString", + "description": "Build type to use", + "options": ["Debug", "Release"], + "default": "Release" + }, + { + "id": "target", + "type": "pickString", + "description": "Target to build", + "options": ["", "rebuild", "fullclean", "clean"], + "default": "" + }, + { + "id": "finalize", + "type": "pickString", + "description": "Mode for FinalizeCD", + "options": ["all", "calculate", "skip"], + "default": "all" + } + ], + }, + "settings": { + "C_Cpp.default.name": "PSX", + "C_Cpp.default.includePath": [ + "../../PSYQ/Converted/Include" + ], + "C_Cpp.default.compilerPath": "", + "C_Cpp.default.cStandard": "c17", + "C_Cpp.default.cppStandard": "c++20", + "C_Cpp.default.compilerArgs": [ + ], + "C_Cpp.default.defines": [ + ], + "files.exclude": { + "**/*.o": true, + "**/*.dep": true + } + } +}