From 83b2cb465ec34c98bb692556b4dc4d60af5ce8a5 Mon Sep 17 00:00:00 2001 From: Jaby Date: Sun, 21 Aug 2022 21:00:00 +0200 Subject: [PATCH] Created PSX Game template to use --- Legacy/JabyEngine.code-workspace | 141 ------------------ Legacy/Library/Code/Makefile | 54 ------- Legacy/Library/Code/Wrapper.mk | 19 --- Legacy/Library/Code/iso/JabyEngineISODesc.xml | 36 ----- .../Library/Code/iso/JabyEngineLBAFile.json | 6 - Legacy/Library/Code/src/Audio/XAAudio.cpp | 94 ------------ Legacy/Library/Code/src/Audio/XAAudio.h | 16 -- Legacy/Library/Code/src/JabyEngine.cpp | 74 --------- Legacy/Library/Code/src/JabyEngine.h | 4 - Legacy/Library/Makefile | 100 ------------- Legacy/Ressource/wuff.bin | Bin 2324 -> 0 bytes Legacy/Tools/Finalize.bat | 19 --- .../#{ProjectName}.code-workspace | 63 ++++++++ template/JabyEngine-PSX_Game/.gitignore | 5 + .../JabyEngine-PSX_Game/application/Makefile | 18 +++ .../application/src/main.cpp | 3 + template/JabyEngine-PSX_Game/iso/Config.xml | 19 +++ .../JabyEngine-PSX_Game/iso/System.cnf | 0 18 files changed, 108 insertions(+), 563 deletions(-) delete mode 100644 Legacy/JabyEngine.code-workspace delete mode 100644 Legacy/Library/Code/Makefile delete mode 100644 Legacy/Library/Code/Wrapper.mk delete mode 100644 Legacy/Library/Code/iso/JabyEngineISODesc.xml delete mode 100644 Legacy/Library/Code/iso/JabyEngineLBAFile.json delete mode 100644 Legacy/Library/Code/src/Audio/XAAudio.cpp delete mode 100644 Legacy/Library/Code/src/Audio/XAAudio.h delete mode 100644 Legacy/Library/Code/src/JabyEngine.cpp delete mode 100644 Legacy/Library/Code/src/JabyEngine.h delete mode 100644 Legacy/Library/Makefile delete mode 100644 Legacy/Ressource/wuff.bin delete mode 100644 Legacy/Tools/Finalize.bat create mode 100644 template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace create mode 100644 template/JabyEngine-PSX_Game/.gitignore create mode 100644 template/JabyEngine-PSX_Game/application/Makefile create mode 100644 template/JabyEngine-PSX_Game/application/src/main.cpp create mode 100644 template/JabyEngine-PSX_Game/iso/Config.xml rename Legacy/Library/Code/iso/JabyEngine.cnf => template/JabyEngine-PSX_Game/iso/System.cnf (100%) diff --git a/Legacy/JabyEngine.code-workspace b/Legacy/JabyEngine.code-workspace deleted file mode 100644 index 8c479d23..00000000 --- a/Legacy/JabyEngine.code-workspace +++ /dev/null @@ -1,141 +0,0 @@ -{ - "folders": [ - { - "name": "JabyEngine", - "path": "." - }, - { - "name": "PSYQ", - "path": "..\\..\\..\\PSYQ\\Converted\\Include" - }, - { - "name": "NEXTGPU", - "path": "..\\..\\..\\..\\..\\PSX\\projects\\NEXTGPU" - }, - { - "name": "CDPLAYER", - "path": "..\\..\\..\\..\\..\\PSX\\projects\\CDPLAYER" - } - ], - "tasks": { - "version": "2.0.0", - "tasks": [ - { - "label": "make", - "type": "shell", - "command": "wsl make ${input:target} BUILD=${input:build}", - "options": { - "cwd": "Library/Code" - }, - "problemMatcher": [] - }, - { - "label": "finalize", - "type": "shell", - "command": "Finalize.bat ${input:finalize_tool} ${input:finalize} JabyEngine Library\\Code", - "options": { - "env": { - "PATH": "./Tools/;./Tools/psxcdgen/psxcdgen/target/release;../../Tools/;../../Tools/mkpsxiso;${env:PATH}" - } - }, - "group": { - "kind": "build", - "isDefault": true - }, - "problemMatcher": [], - }, - { - "label": "nugget make", - "type": "shell", - "dependsOrder": "sequence", - "dependsOn": ["make", "finalize"], - "group": { - "kind": "build", - "isDefault": true - } - }, - { - "label": "jaby make", - "type": "shell", - "command": "wsl make ${input:target} BUILD=${input:build} USE_JABY_MAKE=true", - "options": { - "cwd": "Library/Code" - }, - "group": { - "kind": "build", - "isDefault": true - } - }, - { - "label": "jaby make & finalize", - "type": "shell", - "dependsOrder": "sequence", - "dependsOn": ["jaby 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" - }, - { - "id": "finalize_tool", - "type": "pickString", - "description": "Tool to use for Finalizing the CD", - "options": ["mkpsxiso.exe", "psxcdgen"], - "default": "mkpsxiso.exe" - }, - { - "id": "target", - "type": "pickString", - "description": "Phony target", - "options": ["all", "clean"], - "default": "all" - }, - { - "id": "build_profile", - "type": "pickString", - "description": "Build type to use", - "options": ["debug", "release"], - "default": "release" - }, - ], - }, - "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.associations": { - "CDDADEMO.C": "cpp" - } - } -} diff --git a/Legacy/Library/Code/Makefile b/Legacy/Library/Code/Makefile deleted file mode 100644 index f1e48aa1..00000000 --- a/Legacy/Library/Code/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -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 -D_WCHAR_T - -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 - -ifdef USE_JABY_MAKE -include Wrapper.mk -else -include $(PCSX_REDUX)/common.mk -endif - -fullclean: clean - rm -fr iso/Info/* bin/GlobalLBATable.bin - -rebuild: fullclean all \ No newline at end of file diff --git a/Legacy/Library/Code/Wrapper.mk b/Legacy/Library/Code/Wrapper.mk deleted file mode 100644 index 33662b6f..00000000 --- a/Legacy/Library/Code/Wrapper.mk +++ /dev/null @@ -1,19 +0,0 @@ -#this makefile translates from NUGGET make to JabyMake -ARTIFACT = JabyEngine - -BUILD_DIR = bin -ifeq ($(BUILD),Release) -BUILD_PROFILE := release -else -BUILD_PROFILE := debug -endif - -CCFLAGS_all := $(CPPFLAGS) -LIBS := $(LDFLAGS) - -undefine CPPFLAGS -undefine LDFLAGS -undefine BUILD - -#include the real make file -include ../Makefile \ No newline at end of file diff --git a/Legacy/Library/Code/iso/JabyEngineISODesc.xml b/Legacy/Library/Code/iso/JabyEngineISODesc.xml deleted file mode 100644 index 04d8e9c7..00000000 --- a/Legacy/Library/Code/iso/JabyEngineISODesc.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Legacy/Library/Code/iso/JabyEngineLBAFile.json b/Legacy/Library/Code/iso/JabyEngineLBAFile.json deleted file mode 100644 index ab6aaedc..00000000 --- a/Legacy/Library/Code/iso/JabyEngineLBAFile.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Output":"Library/Code/bin/GlobalLBATable.bin", - "Input":"Library/Code/iso/Info/JabyEngine.lba", - "Order": [ - ] - } \ No newline at end of file diff --git a/Legacy/Library/Code/src/Audio/XAAudio.cpp b/Legacy/Library/Code/src/Audio/XAAudio.cpp deleted file mode 100644 index 26b32432..00000000 --- a/Legacy/Library/Code/src/Audio/XAAudio.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include "XAAudio.h" -#include -#include - -namespace XAAudio -{ - static constexpr int BigSectorSize = 2340; - - static CdlCB oldCallback = nullptr; - static CdlLOC curLoc; - static int curChannel; - - static u_char buffer[(sizeof(u_long)*8)]; - - static u_short getChannel(u_char *buffer) - { - const u_short currentChannel = *((unsigned short *)(buffer + 12) + 1); - return ((currentChannel&31744) >> 10); - } - - static u_short getID(u_char *buffer) - { - return *(u_short*)(buffer + 12); - } - - void cbready(int intr, u_char *result) - { - static const u_short VideoFrameID = 352; - - if(intr == CdlDataReady) - { - CdGetSector((u_long*)buffer, 8); - - const u_short ID = getID(buffer); - const u_short actChannel = getChannel(buffer); - - if((ID == VideoFrameID) && (actChannel == curChannel)) - { - CdControlF(CdlReadS, (u_char*)&curLoc); - } - } - } - - void enable(bool doubleSpeed) - { - // setup the XA playback - adjust the speed as needed by your XA samples - u_char param[4]; - - param[0] = (((doubleSpeed) ? CdlModeSpeed : 0x0)|CdlModeRT|CdlModeSF|CdlModeSize1); - - CdControlB(CdlSetmode, param, 0); - CdControlF(CdlPause, 0); - - oldCallback = CdReadyCallback((CdlCB)cbready); - } - - void disable() - { - // reset any callback that we replaced - CdControlF(CdlPause, 0); - CdReadyCallback(oldCallback); - - // clear XA mode - u_char param = 0x0; - CdControlB(CdlSetmode, ¶m, 0); - } - - void play(const CdlLOC &file, int channel) - { - CdlFILTER theFilter; - - curLoc = file; - curChannel = channel; - - // set the volume to max - SsSetSerialVol(SS_SERIAL_A, 127, 127); - - // set up the XA filter - theFilter.file = 1; - theFilter.chan = channel; - CdControlF(CdlSetfilter, (u_char*)&theFilter); - - // begin playing - CdControlF(CdlReadS, (u_char*)&file); - } - - CdlLOC locate(const char* fileName) - { - CdlFILE file = {0}; - - CdSearchFile(&file, const_cast(fileName)); - return file.pos; - } -} \ No newline at end of file diff --git a/Legacy/Library/Code/src/Audio/XAAudio.h b/Legacy/Library/Code/src/Audio/XAAudio.h deleted file mode 100644 index 0b7ba2a0..00000000 --- a/Legacy/Library/Code/src/Audio/XAAudio.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef XAAUDIO_H -#define XAAUDIO_H -#include -#include - -namespace XAAudio -{ - void enable(bool doubleSpeed); - void disable(); - - void play(const CdlLOC &file, int channel); - - CdlLOC locate(const char* fileName); -} - -#endif // !XAAUDIO_H diff --git a/Legacy/Library/Code/src/JabyEngine.cpp b/Legacy/Library/Code/src/JabyEngine.cpp deleted file mode 100644 index 1f8d65b8..00000000 --- a/Legacy/Library/Code/src/JabyEngine.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "Audio/XAAudio.h" -#include "JabyEngine.h" -#include -#include -#include -#include -#include -#include -#include - -static CdlLOC TOC[100] = {0}; - -static void setup() { - ResetCallback(); - //ResetGraph(0); - - CdInit(); - CdSetDebug(3); - - SetVideoMode(MODE_PAL); - SsSetTickMode(SS_TICK50); - - //SetDispMask(1); -} - -static int fill_toc() { - u_char param[4] = {0}; - - param[0] = CdlModeRept|CdlModeDA; // report ON / CD-DA ON - - CdControlB(CdlSetmode, param, 0); - return CdGetToc(TOC); // TOC -} - -static void play_track(int track, int track_count) { - for(int n = 0; n < track_count; n++) { - const auto& cur_toc = TOC[n]; - printf("Track %i.) starts at %x:%x:%x\n", n, cur_toc.minute, cur_toc.second, cur_toc.sector); - } - - CdControlB(CdlSetloc, reinterpret_cast(&TOC[track]), 0); // seek to start of track "track" - CdControlB(CdlPlay, 0, 0); // play track -} - -static void play_xa_track(const char* name, int channel) { - CdlFILE file; - - if(CdSearchFile(&file, const_cast(name)) == nullptr) - { - printf("Couldn't locate file %s on disk!\n", name); - return; - } - - XAAudio::enable(true); - XAAudio::play(file.pos, 1); -} - -int main() { - setup(); - const int track_count = fill_toc(); - - printf("Hello Planschi!\nI found %i tracks\n", track_count); - -#ifdef USE_CDDA - //Play CDDA - play_track(2, track_count); -#else - //Play CDXA - play_xa_track("\\XA\\FXSHKT.XA;1", 0); -#endif - - while(true); - return 0; -} \ No newline at end of file diff --git a/Legacy/Library/Code/src/JabyEngine.h b/Legacy/Library/Code/src/JabyEngine.h deleted file mode 100644 index 24a176e0..00000000 --- a/Legacy/Library/Code/src/JabyEngine.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef JABYENGINE_H -#define JABYENGINE_H - -#endif //!JABYENGINE_H \ No newline at end of file diff --git a/Legacy/Library/Makefile b/Legacy/Library/Makefile deleted file mode 100644 index d6764aeb..00000000 --- a/Legacy/Library/Makefile +++ /dev/null @@ -1,100 +0,0 @@ -#Build architecture/variant string, possible values: x86, armv7le, etc... -PLATFORM ?= PSX - -#Build profile, possible values: release, debug, profile, coverage -BUILD_DIR ?= build -BUILD_PROFILE ?= debug - -CONFIG_NAME ?= $(PLATFORM)-$(BUILD_PROFILE) -OUTPUT_DIR = $(BUILD_DIR)/$(CONFIG_NAME) -TARGET = $(OUTPUT_DIR)/$(ARTIFACT) - -#Compiler definitions -HAS_LINUX_MIPS_GCC = $(shell which mipsel-linux-gnu-gcc > /dev/null 2> /dev/null && echo true || echo false) -ifeq ($(HAS_LINUX_MIPS_GCC),true) -PREFIX ?= mipsel-linux-gnu -FORMAT ?= elf32-tradlittlemips -else -PREFIX ?= mipsel-none-elf -FORMAT ?= elf32-littlemips -endif - -$(info We currently only support normal linker scripts) -LDSCRIPT ?= $(PCSX_REDUX)/ps-exe.ld -LDSCRIPT := $(addprefix $(PCSX_REDUX)/default.ld , -T$(LDSCRIPT)) - -CC = $(PREFIX)-gcc-10 -CXX = $(PREFIX)-g++-10 -LD = $(CXX) - -#architecture flags -ARCHFLAGS = -march=mips1 -mabi=32 -EL -fno-pic -mno-shared -mno-abicalls -mfp32 -ARCHFLAGS += -fno-stack-protector -nostdlib -ffreestanding - -#Compiler flags for build profiles -CCFLAGS_release += -O3 -CCFLAGS_debug += -O0 - -CXXFLAGS += -fno-exceptions -fno-rtti - -USE_FUNCTION_SECTIONS ?= true -ifeq ($(USE_FUNCTION_SECTIONS),true) -CCFLAGS_all += -ffunction-sections -endif -CCFLAGS_all += -mno-gpopt -fomit-frame-pointer -CCFLAGS_all += -fno-builtin -fno-strict-aliasing -Wno-attributes -CCFLAGS_all += $(ARCHFLAGS) - -CCFLAGS_all += $(CCFLAGS_$(BUILD_PROFILE)) - -#Linker flags -LDFLAGS_release += -Os - -LDFLAGS_all += -Wl,-Map=$(TARGET).map -nostdlib -T$(LDSCRIPT) -static -Wl,--gc-sections -Wl,--build-id=none -LDFLAGS_all += $(ARCHFLAGS) -Wl,--oformat=$(FORMAT) -LDFLAGS_all += $(LDFLAGS_$(BUILD_PROFILE)) - -LIBS_all += $(LIBS_$(BUILD_PROFILE)) - -DEPS = -Wp,-MMD,$(@:%.o=%.d),-MT,$@ - -#Macro to expand files recursively: parameters $1 - directory, $2 - extension, i.e. cpp -rwildcard = $(wildcard $(addprefix $1/*.,$2)) $(foreach d,$(wildcard $1/*),$(call rwildcard,$d,$2)) - -#Object files list -OBJS = $(addprefix $(OUTPUT_DIR)/,$(addsuffix .o, $(subst ..,!super,$(basename $(SRCS))))) - -#Compiling rule -$(OUTPUT_DIR)/%.o: %.c - @mkdir -p $(dir $@) - $(CC) -c $(DEPS) -o $@ $(CCFLAGS_all) $(CCFLAGS) $< - -$(OUTPUT_DIR)/%.o: %.cpp - @mkdir -p $(dir $@) - $(CXX) -c $(DEPS) -o $@ $(CCFLAGS_all) $(CXXFLAGS) $< - -.SECONDEXPANSION: -$(OUTPUT_DIR)/%.o: $$(subst !super,..,%.s) - @mkdir -p $(dir $@) - $(CC) $(ARCHFLAGS) -I$(PCSX_REDUX) -g -c -o $@ $< - -#Linking rule -$(TARGET).elf: $(OBJS) - $(LD) -o $(TARGET).elf $(LDFLAGS_all) $(LDFLAGS) $(OBJS) $(LIBS_all) $(LIBS) - -#Strips the psexe -$(TARGET).psexe: $(TARGET).elf - $(PREFIX)-objcopy $(addprefix -R , $(OVERLAYSECTION)) -O binary $< $@ - -#Rules section for default compilation and linking -all: $(TARGET).psexe - -clean: - rm -fr $(OUTPUT_DIR) - -rebuild: - $(MAKE) clean - $(MAKE) all - -#Inclusion of dependencies (object files to source and includes) --include $(OBJS:%.o=%.d) \ No newline at end of file diff --git a/Legacy/Ressource/wuff.bin b/Legacy/Ressource/wuff.bin deleted file mode 100644 index 4b70b0e3da35729c3ce73a361c6202a9d6bc38aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2324 zcmeIy&2QUe90%~ncD4ga?8i+Hu;Ut?BaCazHfMPv!Dp6Txw{Pt59 za=~24XA(Wobqrt%W8hgdfN=ofcz}iY5Gt-DE1TFT&?#Bz&f9V~O~`!Mh8YC{4vNTO zSWSbq8qe1DY>C|qILa5pKL0)BaFgLaLkMRPMMt!(1~jTXK?J6Qv0Usg%ei1|IoE8a zivwiE$?zUvaDexoC-2LYc!y78WG4E!V`&0&>e0}O4@n*ts9eiyU9R=CnitQvfzdqhECY+{D zMl_?oMI~UOI3NzYpv&WVv$&FVLj%ok*P?8iKWJ6dIj>TmEewM5{&)M9WAn>X)~<_A zJ~!N01Kdt$ki^@XhZ^W86gE+4-7N5H_yaq0cNaxYUdUbmn#y`RP%d=N+PThRx#(PsW zFa)}rAZP~IkQdnz=F@hV#5m0MJsjttZu6H&WL$#K_B;TB4wh~;!grP8VH#7Qaej*^jk~c3{8{X)@qFCg!cv#{WrqGvXe4J!CSASp{*~)fOP8-)nF<4t z=5X<3q7VZQYO6CnS%f&_g+#Ps3%dp&cAs$rZHVJ6kp|U_OA2Z)--~B(b1Zcba^+`Z zi`7mha*1ayJ&+darGPSqcMsAA(JWfuRO+Ktv5vF93FuvoW}-{imzJg$=aP}BMyZC= zIgKw^MMCcuOex}l(%L@ZvLuU4u)!K~Ss{eO{nfp%x=^1Kc15Fbynd`N0ED?G6U6iE zBhLolw2QaNF+%oM_hD6F`{s_c^)M{tlX3l15JRb_k&g1gL9k#R%PJj+YALj~pE%~=;hqNDCoZm-0+NrxB<$J3IZtJb zB%$5{G?~ZzPyMXU8|4x8awaN`_j`bhB)Gp+mscr$jzdv> z+bv7fNroF6lpW)*QS1w@ub<8n$V`*KtkUphrbLbxH;^sX4oyWzy>v_D?$z?TI7!#U iOrI0QgQ0?(j?!D{OLUcztFR==h>|Ubk^LX^f96lt18jT% diff --git a/Legacy/Tools/Finalize.bat b/Legacy/Tools/Finalize.bat deleted file mode 100644 index 86c599c3..00000000 --- a/Legacy/Tools/Finalize.bat +++ /dev/null @@ -1,19 +0,0 @@ -@echo off -if not exist "%4\iso\Info" mkdir %4\iso\Info -if not exist "iso" mkdir iso - -if %2 == skip goto end - -if not exist "%4/bin/GlobalLBATable.bin" echo Planschi > "%4%/bin/GlobalLBATable.bin" - -echo "Calculate LBAs" -%1 -y -lba %4\iso\Info\%3.lba -lbahead %4\iso\Info\%3.h -noisogen %4\iso\%3ISODesc.xml *> nul -if exist "%4\iso\%3LBAFile.json" LBAHacker.exe %4\iso\%3LBAFile.json - -if %2 == calculate goto end - -rem this used to have "*> nul" -%1 -y %4\iso\%3ISODesc.xml -echo "Wrote ISO image" - -:end \ No newline at end of file diff --git a/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace b/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace new file mode 100644 index 00000000..9ee08666 --- /dev/null +++ b/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace @@ -0,0 +1,63 @@ +{ + "folders": [ + { + "path": ".", + "name": "#{ProjectName}" + } + ], + "tasks": { + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "wsl make ${input:target} BUILD_PROFILE=${input:build profile} JABY_ENGINE_DIR=../${config:jaby_engine_path}", + "group": { + "kind": "build", + "isDefault": true + }, + "options": { + "cwd": "application" + } + }, + { + "label": "cdgen", + "type": "shell", + "command": "${config:jaby_engine_path}/bin/psxcdgen.exe 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 #{ProjectName}" + }, + { + "id": "target", + "type": "pickString", + "options": ["all", "clean", "rebuild"], + "default": "all", + "description": "the build target" + } + ] + }, + "settings": { + "jaby_engine_path": "#{JabyEnginePath}", + } +} \ No newline at end of file diff --git a/template/JabyEngine-PSX_Game/.gitignore b/template/JabyEngine-PSX_Game/.gitignore new file mode 100644 index 00000000..5fb16184 --- /dev/null +++ b/template/JabyEngine-PSX_Game/.gitignore @@ -0,0 +1,5 @@ +*.bin +*.cue +*.d +*.o +**/bin \ No newline at end of file diff --git a/template/JabyEngine-PSX_Game/application/Makefile b/template/JabyEngine-PSX_Game/application/Makefile new file mode 100644 index 00000000..5a36f34e --- /dev/null +++ b/template/JabyEngine-PSX_Game/application/Makefile @@ -0,0 +1,18 @@ +ARTIFACT = #{ProjectName} +BUILD_DIR = bin +PSCX_REDUX_DIR = $(JABY_ENGINE_DIR)/lib/pcsx-redux + +include $(JABY_ENGINE_DIR)/lib/Wildcard.mk +SRCS = $(call rwildcard, src, c cpp) + +LIBS = -L$(JABY_ENGINE_DIR)/lib/PSX-$(BUILD_PROFILE) -lJabyEngine + +include $(JABY_ENGINE_DIR)/lib/Makefile + +#Rules section for default compilation and linking +all: $(TARGET).psexe + +clean: + rm -fr $(OUTPUT_DIR) + rm -fr ../iso/*.bin + rm -fr ../iso/*.cue \ No newline at end of file diff --git a/template/JabyEngine-PSX_Game/application/src/main.cpp b/template/JabyEngine-PSX_Game/application/src/main.cpp new file mode 100644 index 00000000..e9cdae16 --- /dev/null +++ b/template/JabyEngine-PSX_Game/application/src/main.cpp @@ -0,0 +1,3 @@ +int main() { + return 0; +} \ No newline at end of file diff --git a/template/JabyEngine-PSX_Game/iso/Config.xml b/template/JabyEngine-PSX_Game/iso/Config.xml new file mode 100644 index 00000000..258c9a74 --- /dev/null +++ b/template/JabyEngine-PSX_Game/iso/Config.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/Legacy/Library/Code/iso/JabyEngine.cnf b/template/JabyEngine-PSX_Game/iso/System.cnf similarity index 100% rename from Legacy/Library/Code/iso/JabyEngine.cnf rename to template/JabyEngine-PSX_Game/iso/System.cnf