From f1aa614fb51d04c4227ab849f1aee2cea809d7f8 Mon Sep 17 00:00:00 2001 From: Tim Stirrat Date: Tue, 16 Jul 2024 15:45:06 +1000 Subject: [PATCH] Add `.vscode` configs There configs should make life easier for other folks trying to build and debug --- .gitignore | 4 +-- .vscode/c_cpp_properties.json | 13 ++++++++ .vscode/launch.json | 15 +++++++++ .vscode/tasks.json | 62 +++++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index 9ca7c32..58e4f32 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -.vscode/ +.vscode/settings.json gbdk/ Source/obj Source/out -mgb.gb \ No newline at end of file +mgb.gb diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..becf50c --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,13 @@ +{ + "configurations": [ + { + "name": "Mac", + "includePath": ["${workspaceFolder}/**"], + "defines": ["__TARGET_gb=1", "__PORT_sm83=1"], + "compilerPath": "", + "cStandard": "c11", + "intelliSenseMode": "${default}" + } + ], + "version": 4 +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..89e5566 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "emulicious-debugger", + "request": "launch", + "name": "Debug in Emulicious", + "program": "${workspaceFolder}/Source/out/mGB.gb", + "port": 58870, + "stopOnEntry": false, + "preLaunchTask": "make-debug", + "additionalSrcFolders": "Source/obj" + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..901b11d --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,62 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "make-debug", + "type": "shell", + "command": "make clean && make DEBUG=1", + "options": { + "cwd": "Source/" + }, + "problemMatcher": [] + }, + { + "label": "make", + "type": "shell", + "command": "make clean && make", + "options": { + "cwd": "Source/" + }, + "problemMatcher": [] + }, + { + "label": "make-release", + "type": "shell", + "command": "make clean && make RELEASE=1", + "options": { + "cwd": "Source/" + }, + "problemMatcher": [] + }, + { + "label": "install", + "detail": "Installs the rom onto a cartridge using ems-flasher (bank 2)", + "type": "shell", + "command": "ems-flasher --write --verbose --bank 2 out/mGB.gb", + "options": { + "cwd": "Source/" + }, + "dependsOn": "make-release", + "problemMatcher": [] + }, + { + "label": "romusage", + "type": "shell", + "command": "gbdk/bin/romusage", + "args": ["Source/out/mGB.noi", "-sRe", "-sRp", "-g"], + "dependsOn": "make-debug", + "problemMatcher": [] + }, + { + "label": "run-sameboy", + "type": "shell", + "command": "/Applications/SameBoy.app/Contents/MacOS/SameBoy", + "args": ["out/mGB.gb", "~/Downloads/lsdj9_3_3-arduinoboy/lsdj.gb"], + "options": { + "cwd": "Source/" + }, + "dependsOn": "make-debug", + "problemMatcher": [] + } + ] +}