This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:fall2024:projects:btt0 [2024/08/02 18:53] – [URLs] kbird2 | notes:fall2024:projects:btt0 [2024/09/05 02:12] (current) – [Implementing your own Background] bpatrice | ||
---|---|---|---|
Line 5: | Line 5: | ||
====URLs==== | ====URLs==== | ||
- | To get the Vircon32 | + | To get the Vircon32 |
====API==== | ====API==== | ||
+ | Here is the link to Vircon32' | ||
+ | |||
+ | This page serves as a comprehensive reference of all the functions available in Vircon32’s C compiler. You will find this page useful since the C compiler for Vircon32 is different from standard C. | ||
+ | |||
=====Vircon32===== | =====Vircon32===== | ||
- | ====Obtain source of latest stable release of Vircon32 DevTools==== | + | ====Obtain source of latest stable release of Vircon32 DevTools |
- | ====Obtain source of latest | + | ===For Linux users=== |
+ | * Obtain | ||
+ | * Navigate to the location of your now downloaded .tar.gz file and extract using < | ||
+ | |||
+ | ===For Windows users=== | ||
+ | * Obtain the source.zip file for latest | ||
+ | * Navigate to the location of your now downloaded .zip file and extract | ||
+ | |||
+ | ===System independent=== | ||
+ | * You should now have a directory you can navigate into called ComputerSoftware/ | ||
+ | * Navigate inside and check for two directories call DesktopEmulator/ | ||
+ | =====Vircon32 installation===== | ||
+ | At the base of the ComputerSoftware/ | ||
+ | |||
+ | Following the Readme, install all dependencies | ||
+ | |||
+ | __These steps will be done the same in both the DesktopEmulator/ | ||
+ | |||
+ | Again following the Readme | ||
+ | * Create a build/ directory off of the DesktopEmulator/ | ||
+ | * For Linux systems & Pi rather than MSYS Makefiles you will want Unix Makefiles | ||
+ | * Follow the remaining commands in the Readme to the end | ||
+ | * Keep track of where the Emulator and the DevTools are installed and add those paths to your ~/.bashrc | ||
+ | * Don't forget to run source ~/.bashrc or close/ | ||
=====Hello World===== | =====Hello World===== | ||
Line 29: | Line 56: | ||
* Adding sounds | * Adding sounds | ||
+ | ====Implementing your own Background==== | ||
+ | |||
+ | A Vircon32 image file: | ||
+ | * has a max size of 640x360 pixels | ||
+ | * will also only take " | ||
+ | * needs the " | ||
+ | |||
+ | You can implement libraries in your " | ||
+ | < | ||
+ | #include " | ||
+ | </ | ||
+ | |||
+ | But to be able to use it in the " | ||
+ | |||
+ | Open your " | ||
+ | < | ||
+ | png2vircon FileName.png -o obj/ | ||
+ | </ | ||
+ | |||
+ | And then open your " | ||
+ | < | ||
+ | < | ||
+ | <texture path=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Back in your " | ||
+ | < | ||
+ | #define TextureFileName | ||
+ | #define RegionFileName | ||
+ | </ | ||
+ | |||
+ | The value corresponds to where it sits in your " | ||
+ | |||
+ | This is also the same for audio files, so your first audio file's value would correspond to 0. | ||
+ | |||
+ | Region can be 0 for backgrounds. | ||
+ | |||
+ | You then have to define it in the " | ||
+ | < | ||
+ | select_texture( TextureFileName ); | ||
+ | select_region( RegionFileName ); | ||
+ | define_region_topleft( 0,0, 639,359 ); | ||
+ | </ | ||
+ | |||
+ | Then to call it use: | ||
+ | < | ||
+ | select_texture( TextureFileName ); | ||
+ | select_region( RegionFileName ); | ||
+ | draw_region_at( 0,0 ); | ||
+ | </ | ||
=====Cartridge Build Scripts===== | =====Cartridge Build Scripts===== | ||
In the tutorials and demos there are corresponding build scripts that will take all the code and related resources, and run the appropriate development tools to create a Vircon32 cartridge file. | In the tutorials and demos there are corresponding build scripts that will take all the code and related resources, and run the appropriate development tools to create a Vircon32 cartridge file. |