This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Docker PS2SDK (Linux)",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**",
|
||||||
|
"~/ps2dev-intellisense/ps2sdk/common/include/**",
|
||||||
|
"~/ps2dev-intellisense/ps2sdk/ee/include/**",
|
||||||
|
"~/ps2dev-intellisense/ps2sdk/iop/include/**",
|
||||||
|
"~/ps2dev-intellisense/ps2sdk/ports/include/**",
|
||||||
|
"~/ps2dev-intellisense/ee/include/**",
|
||||||
|
"~/ps2dev-intellisense/ee/lib/gcc/mips64r5900el-ps2-elf/11.3.0/include/**",
|
||||||
|
"~/ps2dev-intellisense/ee/lib/gcc/mips64r5900el-ps2-elf/11.3.0/include-fixed/**",
|
||||||
|
"~/ps2dev-intellisense/ee/lib/gcc/mips64r5900el-ps2-elf/11.3.0/install-tools/include/**",
|
||||||
|
"~/ps2dev-intellisense/ee/lib/gcc/mips64r5900el-ps2-elf/11.3.0/plugin/include/**",
|
||||||
|
"~/ps2dev-intellisense/ee/mips64r5900el-ps2-elf/include/**",
|
||||||
|
"~/ps2dev-intellisense/ee/mips64r5900el-ps2-elf/sys-include/**",
|
||||||
|
"~/ps2dev-intellisense/gsKit/include/**",
|
||||||
|
"~/ps2dev-intellisense/iop/lib/gcc/mipsel-ps2-elf/11.3.0/include/**",
|
||||||
|
"~/ps2dev-intellisense/iop/lib/gcc/mipsel-ps2-elf/11.3.0/install-tools/include/**",
|
||||||
|
"~/ps2dev-intellisense/iop/lib/gcc/mipsel-ps2-elf/11.3.0/plugin/include/**",
|
||||||
|
"~/ps2dev-intellisense/iop/lib/gcc/mipsel-ps2-elf/11.3.0/include-fixed/**",
|
||||||
|
"~/ps2dev-intellisense/iop/lib/gcc/mipsel-ps2-irx/11.3.0/include/**",
|
||||||
|
"~/ps2dev-intellisense/iop/lib/gcc/mipsel-ps2-irx/11.3.0/install-tools/include/**",
|
||||||
|
"~/ps2dev-intellisense/iop/lib/gcc/mipsel-ps2-irx/11.3.0/plugin/include/**",
|
||||||
|
"~/ps2dev-intellisense/iop/lib/gcc/mipsel-ps2-irx/11.3.0/include-fixed/**"
|
||||||
|
],
|
||||||
|
"defines": [
|
||||||
|
"_EE",
|
||||||
|
"_IOP",
|
||||||
|
"__SPU__",
|
||||||
|
"INTELLISENSE"
|
||||||
|
],
|
||||||
|
"cppStandard": "c++20",
|
||||||
|
"compilerPath": "", // Should be empty
|
||||||
|
"intelliSenseMode": "linux-gcc-x86",
|
||||||
|
"configurationProvider": "ms-vscode.cpptools"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"buildDirectory": "./",
|
||||||
|
"C_Cpp.default.intelliSenseMode": "gcc-x86",
|
||||||
|
"files.associations": {
|
||||||
|
"*.vcl": "asm-collection",
|
||||||
|
"*.i": "asm-collection",
|
||||||
|
"*.vsm": "asm-collection",
|
||||||
|
"*.vclpp": "asm-collection",
|
||||||
|
"*.hpp": "cpp",
|
||||||
|
"*.cpp": "cpp",
|
||||||
|
"*.h": "c",
|
||||||
|
"*.c": "c"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "Build & run",
|
||||||
|
"dependsOrder": "sequence",
|
||||||
|
"dependsOn": [
|
||||||
|
"1. Copy source code to docker volume",
|
||||||
|
"2. Compile via docker container",
|
||||||
|
"3. Copy binaries to host",
|
||||||
|
"4. Run PCSX2"
|
||||||
|
],
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "1. Copy source code to docker volume",
|
||||||
|
"command": "docker exec -t tyra-game-compiler sh -c 'rsync -ac --delete --exclude=\".git\" --exclude=\".vscode\" --exclude=\"*obj*/**\" --exclude=\"*bin*/**\" /host/ /src/'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "2. Compile via docker container",
|
||||||
|
"command": "docker exec -t tyra-game-compiler sh -c 'cd ${config:buildDirectory} && make'",
|
||||||
|
"problemMatcher": {
|
||||||
|
"base": "$gcc",
|
||||||
|
"fileLocation": [
|
||||||
|
"autoDetect"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "3. Copy binaries to host",
|
||||||
|
"command": "docker exec -t tyra-game-compiler sh -c 'rsync -zac --include=\"*/\" --include=\"*bin*/**\" --exclude=\"*\" /src/ /host/'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "4. Run PCSX2",
|
||||||
|
"options": {
|
||||||
|
"cwd": "${config:buildDirectory}"
|
||||||
|
},
|
||||||
|
"command": "./run.ps1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "Convert WAV to ADPCM",
|
||||||
|
"dependsOn": [
|
||||||
|
"1. Copy source code to docker volume"
|
||||||
|
],
|
||||||
|
"command": "docker exec -t tyra-game-compiler sh -c 'adpenc ${input:wav2adpcmSource} ${input:wav2adpcmTarget} && rsync -zac /src/${input:wav2adpcmTarget} /host/${input:wav2adpcmTarget}'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "Cleanup",
|
||||||
|
"command": "docker exec -t tyra-game-compiler sh -c 'rm -rf /src/*'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "Update Tyra",
|
||||||
|
"command": "docker exec -t tyra-game-compiler sh -c 'rm -rf /tyra && mkdir -p /tyra && git clone https://github.com/h4570/tyra.git /tyra && cd /tyra && git checkout ${input:tyraBranch} && cd engine && make'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "Send to PS2",
|
||||||
|
"command": "docker exec -t tyra-game-compiler sh -c 'cd ${config:buildDirectory}/bin && killall -v ps2client || true && ps2client -h ${input:ps2Ip} reset && ps2client -h ${input:ps2Ip} reset && ps2client -h ${input:ps2Ip} execee host:$(find . -maxdepth 1 -type f -name \"*.elf\")'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "Open PS2 output logger",
|
||||||
|
"command": "docker stop ps2-logs || true && docker run -t --rm --name=ps2-logs -p ${input:local2Ip}:18194:18194/udp h4570/tyra sh -c 'ps2client -h ${input:ps2Ip} listen'",
|
||||||
|
"runOptions": {
|
||||||
|
"instanceLimit": 1
|
||||||
|
},
|
||||||
|
"presentation": {
|
||||||
|
"reveal": "always",
|
||||||
|
"panel": "new"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "Start docker container",
|
||||||
|
"command": "docker compose up -d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "Stop docker container",
|
||||||
|
"command": "docker compose down"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "[Debug] Copy obj directory to host",
|
||||||
|
"command": "docker exec -t tyra-game-compiler sh -c 'rsync -zac --include=\"*/\" --include=\"obj/**\" --exclude=\"*\" /src/ /host/'"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"id": "wav2adpcmSource",
|
||||||
|
"description": "Source file path (ex. ):",
|
||||||
|
"default": "res/sound.wav",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "wav2adpcmTarget",
|
||||||
|
"description": "Target file path (ex. ):",
|
||||||
|
"default": "res/sound.adpcm",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ps2Ip",
|
||||||
|
"description": "PS2link ip address:",
|
||||||
|
"default": "192.168.1.200",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "local2Ip",
|
||||||
|
"description": "Local ip address:",
|
||||||
|
"default": "192.168.1.245",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "tyraBranch",
|
||||||
|
"description": "Tyra branch:",
|
||||||
|
"default": "master",
|
||||||
|
"type": "promptString"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user