mrneo240 wrote: ↑
Thu Sep 10, 2020 7:06 pm
spencer723 wrote: ↑
Thu Sep 10, 2020 12:48 pm
I actually did the same thing recently on Windows and wanted to make a guide. It works pretty well but code completion and stuff is a little wonky right now
I'd love to see that!
Wow. Sorry for leaving you hanging
Here are my instructions for setting up the Dreamcast toolchain using Windows 10 and Windows Subsystem for Linux (WSL).
Installing WSL on Windows 10
Before we can start the setup process, we need to make sure WSL is installed and enabled on your computer. You can follow this guide
provided by Microsoft. I used Ubuntu 20.04, personally but any flavor of Linux should work. I also HIGHLY
suggest using Windows Terminal
over PowerShell or Command Prompt as Terminal is far superior and will allow you to spawn new Ubuntu terminal sessions with two clicks (after WSL is setup and a Linux distribution is installed).
Installing the Dreamcast toolchain using WSL
I actually found a guide
that explains how to compile and install the Dreamcast toolchain in more detail than I was originally going to write. I just performed the steps up until the "Downloading and Building dcload-ip" section since the rest wasn't relevant for my setup.
Setting up Visual Studio Code
You can download VS Code here
. You'll also want to install the Remote - WSL extension, C/C++ extension and maybe also the Makefile extension provided by Microsoft (I haven't tried this yet). I copied one of the examples from the KallistiOS examples directory as a base for my new project somewhere in the Linux filesystem (I used ~/dreamcast/<project name>). Navigate to that folder in your Linux terminal and type "code .". This will launch VS Code with the Remote - WSL extension enabled and allow you to develop directly inside of WSL.
Now, create a new folder called ".vscode" and create a new file called "settings.json". Paste the following contents into settings.json:
Code: Select all
This will tell VS Code where to look for the include files and which compiler to use for IntelliSense. When you go back to your source files, you should be able to see these awesome tooltips when you hover over functions thanks to the documentation in the source code:
You can also hold CTRL and click on any of the KallistiOS methods and VS Code should navigate to the definition for that method. You can then press ALT+Left Arrow to navigate back.
I'm working on a guide on how to use lxdream with GDB within VS Code but I'm having a lot of trouble creating a CDI (which seems to be the only way VS Code and lxdream are able to communicate through GDB).
Please let me know if you need any more info