To obtain the latest source of Vircon32 for both the emulator and DevTools, navigate to the Vircon32 homepage. On the left navigation menu you will want to click Emulator and click Emulator for PC
Scroll to the bottom of the new page under the Assets toggle you will see Source code.
For Unix based systems including Pi you will want to download the (tar.gz) version.
Another option to get the source code of different repositories onto your pi is to clone it from the Vircon32 github page. Once on the page, click on the repository you want to clone and copy its url. On your pi terminal go to the location you want to put the repository in and clone it from github using “git clone url_of_repository”. For this project you will want the computer software repository to make the emulator and dev tools from them. The documents and console software repositories can also include helpful information.
Open your terminal, navigate to where your file was saved (Most likely Downloads) and proceed to extract it.
You will now have a directory of the same name as that archived file, cd into it and read the Readme.md
Following the Readme, install the needed dependencies and create the appropriate directories.
To begin you will want to start with either the DevelopmentTools or Emulator
cd into one of those two directories and perform
mkdir build
It may be helpful to have the Readme available while you're in the build directory. Start by installing cmake if it's not already installed. Perform step 2 in the Readme as indicated. To install cmake or any other dependencies you may need for Vircon32, use:
sudo apt install [package]
You should receive an error saying MSYS Makefiles doesn't exist and you'll be given a list of options to use. For Linux/Pi users, use the Unix Makefiles and repeat.
You'll now get an error about not having a file called CMakeLists.txt Find that file and copy it into builds, although as long as CMakeLists.txt is in the same directory as the builds directory (DesktopEmulator/build or DevelopmentTools/build), it should work fine.
Keep trying to run command #3 in the Readme, it'll likely need further dependencies before it can get through without experiencing an error. The dependencies needed are listed at the bottom of the Readme. Use the following command to search for the necessary libraries, those library names should be all lowercase when searched.
aptitude search [package]
You'll likely be given a bunch of packages when running this command, look for the ones that resemble lib[package]-dev. Install it using the command format given above. You are (or will be) a developer in this class, you'll need these packages installed moving forward. When you test out command #3 from the Readme again, you'll know it worked if you don't get the error for that specific dependency.
When searching for libraries, you may get the following error:
E: Unable to locate package
In this case first check your spelling and make sure it is correct. If the issue persists, try running with the command sudo apt update to make the current system is up to date.
Replicate section per system/OS you are building for
Now that you have the Vircon32 emulator and Dev-tools, its time to modify the PATH of your system so that you can use the various command line tools that they offer, such as assemble or compile, anywhere on your system. First you need to locate where they are in your system, and make sure to note down the file path.
Linux-
To save the path of your emulator and dev-tools in a Linux environment you need to use this command.
pi@raspberry:~$ export PATH="/path-to-dev-tools:$PATH" pi@raspberry:~$ export PATH="/path-to-emulator:$PATH"
to see if the path was added correctly input the (echo “$PATH”) command, at this point your path should look something like this.
/opt/Vircon32/Emulator:/usr/local/Devtools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
These paths are temporary and will not save after you exit the terminal so its ok to mess up at this stage. After you are sure that you got the correct file path, its time to add them to your system so that they don't erase after you close the terminal.
pi@raspberry:~$ nano ~/.bashrc
At the bottom of this file add the two commands that you used to add the file paths, and boom you can now use the command line tools from the emulator and Devtools wherever you are on your system.
If you’re having trouble locating the files, you can check the install_manifest.txt file in the build directory to see where the files are stored.
mkdir btt0
and cd into it.
https://github.com/vircon32/ConsoleSoftware/tree/main/Tutorials/RobotGame/Tutorial01A-HelloWorld
Its important at this stage to make the make.sh an executable, to do this type chmod +x make.sh, this adds the executable file permission to the file.
pi@raspberry:~$ chmod +x make.sh
Its finally time to compile your first vircon32 game, to do this do ./make.sh and if no errors occur it should print out build successful.
There should now be a .v32 file in the bin directory. Load this into the emulator to run the program. The emulator is in the opt/Vircon32/Emulator file. Cartridges may take time to load.
After that you will want to make a file similar to hello.c,hello.xml, and make.sh . The file that you are going to submit is going to be a modified version of hello.c . So text on a page, but the amount,size,color,etc is up to you but the changes have to be significant.