Lab 00: Windows Installation Solution

$30.00

Description

Provided Files

  • Installation Files

    1. tasks.json

    1. devkitProUpdater-3.0.3.exe

    1. vbam-2.1.0.zip

  • Sample Project

    1. main.c

    1. Makefile

Files to Edit/Add

Makefile

Instructions

In this lab, you will be installing the software to write, compile, and run GBA games for this class. It is broken up into various parts. If any part does not produce the expected outcome, alert a TA and fix the problem before continuing.

  • Part One – Cygwin

  • Cygwin is what students running Windows will use as a C Compiler. This is the biggest difference between the Windows and Mac installations, since the Mac folk (usually) already have a C Compiler installed.

  1. Go to the project website, https://www.cygwin.com/

  1. If your computer is 64-bit, click on setup-x86_64.exe. Otherwise, click on setup-x86.exe.

  1. Open the folder where it downloaded and run that file.

  1. On the first popup, click next. Then, select “Install from the Internet” and click next.

  1. Choose the directory where you want Cygwin to install. This must be somewhere that you will not move or delete until this class is over. Make note of this location, because you will have to find it in a later step. Then click next.

  1. This next part doesn’t matter. You can just accept the defaults and click Next.

  1. Select “Use System Proxy Settings” and click next.

  1. Select the first mirror site in the list, then click next.

  1. This part is complicated, so pay close attention. In the search bar, type“gcc-core”. Click the plus next to the category “Devel” and find the package titled exactly “gcc-core”. Find the icon to the left of the “Skip” for that package, and click it. The word “Skip” will transform into the version number for the package. Pick version 7.4.0-1 (this version differs from the version highlighted in the picture below, but trust us, you want 7.4.0-1).

  1. Back in the search bar, type “gcc-g++”. Click the plus next to the category “Devel” and find the package titled exactly “gcc-g++”. Click on the word “skip”, and it will

transform into the version number for the package. Select the same version as before.

  1. Again, in the search bar, type “gdb”. Click the plus next to the category “Devel” and find the package titled exactly “gdb”. Click on the word “skip”, and it will transform into the version number for the package.

  1. One last time, in the search bar, type “make”. Click the plus next to the category “Devel” and find the package titled exactly “make”. Click on the word “skip”, and it will transform into the version number for the package.

  1. Click next, then next again, then wait quite a while for everything to finish.

14. Uncheck the two boxes (or don’t; it’s your clutter, not mine) and then click finish.

  1. The last thing we need to do is add Cygwin’s bin folder to our System path. Open Control Panel, then go to System and Security, then System, then Advanced System Settings.

  1. In the dialog, click “Environmental Variables”.

  1. In the new dialog, under System Variables (not User Variables), select “Path” and click “Edit”.

  1. This new screen will depend on which version of Windows you are running.

    • If it is an organized list of items (like in the picture below), click “New”, and in the blank that opens up, copy the exact path to where you installed Cygwin (the location I told you to remember earlier)and add “\bin” to the end. For example, the default should be “C:\cygwin64\bin”. Press enter.

    • If it is a singular text box, move the cursor all the way to the end, type a semicolon, and then copy the exact path to where you installed Cygwin (the location I told you to remember earlier) and add “\bin” to the end. If it has any spaces in it, surround the whole thing in quotes (not including the semicolon you added before).

  1. Press OK on all of the Control Panel dialogs you have opened thus far.

  1. Open Command Prompt.

  1. Type “gcc” and press enter. If what you see is something like the picture below, you installed Cygwin correctly. If not, alert a TA.

  • Congrats! You have completed the hard part. You are free to delete all of the things

associated with this part in your Downloads folder (unless of course you were crazy enough to install Cygwin there).

  • Part Two – VisualBoyAdvance-M

  • VisualBoyAdvance-M is your emulator. Since we can now compile and format our code, it would be useless if we couldn’t actually run it. So let’s fix that.

    • Note: if you already have a GBA emulator that you are comfortable with, I still highly recommend you use this one for this class. It has some special features that will come in handy for debugging.

  1. Downloading this from its website requires having 7-Zip installed, so I provided it to you in a .zip file. Extract the vbam-2.0.1.zip file.

  2. Find the folder it creates once unzipped, and move it somewhere that you will not move or delete until this class is over. Next to the Cygwin folder will usually suffice.

Make note of this location, because you will have to find it in a later step.

  • That’s all have to do for VisualBoyAdvance-M.

Part Three – devkitARM

  1. Click on “devkitProUpdater-3.0.3.exe” provided in the Lab00 folder and hit next.

  1. Click “Download and install/ install from downloaded files” and hit Next.

3. Select “Remove downloaded files” and hit Next.

  1. During this step, deselect everything in the list except GBA, and hit Next.

  1. Select a destination folder somewhere that you will not move or delete until this class is over. The same folder where you put Cygwin will usually suffice. Make note of this location, because you will have to find it in a later step.

  1. When asked to choose the Start Menu Folder, put whatever you want. The default is fine. Hit Next, wait for the install to finish (it will take a long time and open a bunch of strange terminal windows, and it looks like it’s going to fail, but it won’t).

  1. After the install finishes, the last thing we need to do is add devkitARM’s bin folder to our System path, just like we did with Cygwin. Open Control Panel, then go to System and Security, then System, then Advanced System Settings.

  1. In the dialog, click “Environmental Variables”.

  1. In the new dialog, under System Variables (not User Variables), select “Path” and click “Edit”.

  1. This new screen will depend on which version of Windows you are running.

    • If it is an organized list of items (like in the picture below), click “New”, and in the blank that opens up, copy the exact path to where you installed devkitPro (the location I told you to remember earlier) and add “\devkitARM\bin” to the end. Then press Enter.

    • If it is a singular text box, move the cursor all the way to the end, type a semicolon, and then copy the exact path to where you installed devkitPro (the location I told you to remember earlier) and add “\devkitARM\bin” to the end. If it has any spaces in it, surround the whole thing in quotes (not including the semicolon you added before).

  1. Press OK on all of the Control Panel dialogs you have opened thus far.

  1. If you have any terminal windows (or text editors) open right now, close and reopen them.

  • Part Four – Makefile

  1. Open the Makefile in the provided files with a text editor. Near the beginning of this file, you will see three lines that end in “=”.

  1. After the “=” next to “CCPATH”, type the exact path to the cygwin (or cygwin64) folder, and add “\bin” to the end. If there are any spaces in the path, surround it in quotes.

  1. After the “=” next to “DKPATH”, type the exact path to the new devkitPro folder (you don’t need to add anything to the end for this one). If there are any spaces in the path, surround it in quotes.

  1. After the “=” next to “VBASIM”, type the exact path to the vbam-2.1.0 folder, add “\bin” to the end, then add “\visualboyadvance-m.exe”. If there are any spaces in the path, surround it in quotes.

  1. Type “ctrl + shift + p” and in the box that pops up, type “Convert Indentation to Tabs”, as seen in the picture below. Select the “Convert Indentation to Tabs” option.

  1. Make sure the result looks something like the following picture

  1. Save the file.

  • Part Five – VS Code

  • We can make the process even more streamlined by incorporating the

compilation process into our text editor. For this class, we are now encouraging you to use VSCode. Even if you have VSCode installed, do not skip these steps.

  1. If you don’t have VSCode installed, download it from the project website, https://code.visualstudio.com/download

    • Pick the “User Installer” for Windows 7/8/10 for your system (32 vs 64-bit)

  1. Once you have it installed, open the Lab00 folder from VS code. This will open the Lab00 folder as a VS Code workspace folder.

  2. Click “Terminal>Configure Default Build Tasks”, and replace the default code with the code provided in the Lab00.zip (tasks.json).

  1. Restart VS Code. Open main.c and then hit ctrl+shift+b. You should see output in the console that looks something like the following picture.

Then, you should also see a GBA game running that looks something like the following picture.If so, you are done with the lab and may follow the submission instructions! 😀 If not, there is an issue somewhere, so notify a TA!

Submission Instructions

Zip up the entire sample project folder, including all source files, the Makefile, and everything produced during compilation (including the .gba file). Submit this zip on Canvas.

Name your submission Lab00_FirstnameLastname, for example:“Lab00_MarieZimmerman.zip”.


error: Content is protected !!