|
1 | | -# fastbasic-starterproject |
2 | | -A sample project to use in Visual Studio Code with a custom build step |
| 1 | +FastBasic VSCode Starter Project |
| 2 | +======================== |
| 3 | + |
| 4 | +A sample project for *Visual Studio Code* with a custom build task to *FastBasic Cross Compile* and run the .xex in Altirra (Windows) or Atari800MacX (Mac) |
| 5 | + |
| 6 | + |
| 7 | +Prerequisites |
| 8 | +------------ |
| 9 | + - Install a Atari Emulator |
| 10 | + - Mac: [Atari800MacX](https://www.atarimac.com/atari800macx.php) |
| 11 | + - Windows: [Altirra](https://www.virtualdub.org/altirra.html) |
| 12 | + - Download the latest [Fastbasic Release](https://github.com/dmsc/fastbasic/releases/) |
| 13 | + |
| 14 | +Setup |
| 15 | +------------ |
| 16 | +1. Download and install [Visual Studio Code](https://code.visualstudio.com/) |
| 17 | +2. Clone or download a zip of this repo |
| 18 | +3. Edit the build script to point to the *FastBasic Compiler* and the *Emulator* |
| 19 | + - Mac: |
| 20 | + 1. Open **build** and change the path to your downloaded copy of the fastbasic compiler |
| 21 | + 2. Open terminal, go to the project folder, and type the following to make **build** executable: |
| 22 | + |
| 23 | + `chmod +x build` |
| 24 | + |
| 25 | + - Windows: |
| 26 | + 1. Open **build.bat** and change the path to your downloaded copy of the fastbasic compiler |
| 27 | + 2. Also change the path to the emulator |
| 28 | + |
| 29 | +Now you are ready to build the example file |
| 30 | + |
| 31 | +Build the example file |
| 32 | +---------- |
| 33 | +1. Open the project folder in VS Code |
| 34 | +2. Open the example.bas file |
| 35 | +3. Build the file |
| 36 | + - Mac: Press `Cmd+Shift+B` |
| 37 | + - Windows: Press `Ctrl+Shift+B` |
| 38 | +4. VSCode will open a new terminal window, compile, then start the emulator |
| 39 | + |
| 40 | + |
| 41 | +Tips / Troubleshooting |
| 42 | +------------------- |
| 43 | + - The VSCode terminal will show any Fastbasic compile errors |
| 44 | + - Bind the build task to an easier to press keyboard shortcut in VSCode. I use Cmd+D (Ctrl+D windows) |
| 45 | + - Press `Cmd+K, Cmd+S` ( `Ctrl+K, Ctrl+S` in Windows) to open the VSCode shortcuts window and search for `build task` |
| 46 | + - Look at the terminal for other issues, like the wrong path to the compiler or emulator |
| 47 | + |
| 48 | + |
0 commit comments