[Solved] CS2261 Lab0- GBA games

$25

File Name: CS2261_Lab0-_GBA_games.zip
File Size: 207.24 KB

SKU: [Solved] CS2261 Lab0- GBA games Category: Tag:
5/5 - (1 vote)

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/
  2. 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.
  2. On the first popup, click next. Then, select Install from the Internet and click next.
  3. 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.
  4. This next part doesnt matter. You can just accept the default and click next.
  5. Select Use System Proxy Settings and click next.
  6. Select the first mirror site in the list, the click next.
  7. This part is complicated, so pay close attention. In the search bar, type

gcc-core. Click the plus next to the category All and the category

Devel and find the package titled exactly gcc-core. Find the arrow to the right of the Skip for that package, and click it. Select the latest version that does not say (test) by it.

  1. Back in the search bar, type gcc-g++. Find the package titled exactly gcc-g++. Find the arrow to the right of the Skip for that package, and click it. Select the latest version that does not say (test) by it.
  2. Again, in the search bar, type gdb. Find the package titled exactly gdb.

Find the arrow to the right of the Skip for that package, and click it. Select the latest version that does not say (test) by it.

  1. One last time, in the search bar, type make. Find the package titled exactly make. Find the arrow to the right of the Skip for that package, and click it. Select the latest version that does not say (test) by it.
  2. Click next, then next again, then wait quite a while for everything to finish.
  1. Uncheck the two boxes (or dont; its your clutter, not mine) and then click finish.
  1. The last thing we need to do is add Cygwins bin folder to our System path. Open Control Panel, then go to System and Security, then System, then Advanced System Settings.
  2. In the dialog, click Environmental Variables.
  3. 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. 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 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.
    2. Open Command Prompt.
    3. 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 devkitARM

DevkitARM is your development kit for the Game Boy Advance, created by a group called devkitPro. Without it, we can compile C code, but not actually format the result for the Gameboy. So lets fix that.

  1. Go to the project website, https://github.com/devkitPro/installer/releases
  1. Click on devkitProUpdater-3.0.3.exe to download it.
  2. When the download finishes, open it, then hit Next.
  1. Click Download and install/ install from downloaded files and hit Next.
  2. Select Remove downloaded files and hit Next.
  1. During this step, deselect everything in the list except GBA, and hit Next.
  2. 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.
  3. 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 look like its going to fail, but it wont).

Thats all you have to do for devkitARM. Easy, right?

  • Part Three VisualBoyAdvance-M

VisualBoyAdvance-M is your emulator. Since we can now compile and format our code, it would be useless if we couldnt actually run it. So lets 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 Extract this 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. The same folder where you put Cygwin and devkitARM will usually suffice. Make note of this location, because you will have to find it in a later step.

Thats all have to do for VisualBoyAdvance-M. Even easier.

  • Part Four Makefile

Now that we have installed everything, we need to set up the compilation process so that we dont have to run 1,000 commands every time we want to compile our code. C uses Makefiles for this. I have provided one for you, but it needs to know where to find the things you just installed.

  1. In the provided Sample Project, find Makefile and open with a text editor (like Notepad or Sublime Text). Near the beginning, you will see three lines that end in =.
  2. 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.
  3. After the = next to DKPATH, type the exact path to the devkitPro folder (you dont need to add anything to the end for this one). If there are any spaces in the path, surround it in quotes.
  4. After the = next to VBASIM, type the exact path to the vbam-2.0.1 folder, add bin to the end, then add visualboyadvance-m.exe. If there are any spaces in the path, surround it in quotes.
  5. Make sure the result looks something like the following picture.
  1. Save and close the file.

Congrats. We now officially have everything it takes to simply compile, format, and run GBA games. Now lets make it simpler.

  • Part Five Sublime Text

We can make the process even more streamlined by incorporating the compilation process into our text editor. For this class, we highly encourage Sublime Text. Even if you have Sublime Text installed, do not skip these steps.

  1. If you dont have Sublime Text installed, download it from the project website, https://www.sublimetext.com/3. I dont need to walk you through this installation process; its user-friendly enough.
  2. Once you have Sublime Text installed, open it, then go to Tools, then Build System, then click New Build System
  3. It will open a new file. Delete everything in it, then paste in everything from the provided txt.
  1. Save it in the folder it suggests when you hit save, and title it

GBA.sublime-build.

  1. Close everything in Sublime Text, and then close Sublime Text.
  2. Reopen Sublime Text, then use it to open Makefile in the Sample Project folder.
  3. Go to Tools, then Build System, and make sure GBA is selected.
  4. Go to Tools, then Build With, then select Run.

After completing all of these steps, you should see output in the console at the bottom of Sublime Text that looks something like the following picture.

You should also see a GBA game running that looks something like the following picture.

If so, you are done with the lab. If not, there is an issue somewhere

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS2261 Lab0- GBA games
$25