This small project will help to setup a working environment (tested in Windows) for Sega Mega Drive developing with SGDK toolchain and Visual Studio Code as prefered editor. Visual Studio Code will be setup with c/cpp code extension and tasks to build and clean the workspace.
-
Download SGDK
-
Download Visual Studio Code
-
Extract SGDK to a prefered directory.
-
Create an environment variable
GDKpointing to the SGDK directory (e.g. "C:/dev/sgdk"). -
Install Visual Studio Code.
-
Install the following extensions in vsCode:
C/C++ for Visual Studio Code -
Clone this github repo:
git clone https://github.com/pleft/SEGA_VSCode_Template.git.
-
Open
VSCodeandFile→Open Folder…and choose the folder of the checked out repository. -
Folder
.vscodecontains two files:c_cpp_properties.jsonandtasks.json -
In
c_cpp_properties.jsonit is added the include folder of theSGDK:"includePath": ["${GDK}/inc"] -
In
tasks.jsonthere are 2 tasks to help build and clean the project,makeandclean.-
To run
maketask pressCtrl-Shift-B. -
To run
makeorcleanpressCtrl-Pthen writetask makeortask clean.
-