### Build and Install RetroArch on Haiku Source: https://docs.libretro.com/development/retroarch/compilation/haiku This sequence of commands compiles and installs RetroArch on Haiku. It requires the 'gcc' compiler and uses a configure script to set installation paths. 'make' builds the project, 'make install' installs it, and 'retroarch' runs the application. ```shell # Build ./configure --prefix=~/config/non-packaged/ --datarootdir=~/config/non-packaged/data/ --with-man_dir=~/config/non-packaged/documentation/man/ make # Install make install # Run retroarch ``` -------------------------------- ### Install Git and Build Tools on Ubuntu Source: https://docs.libretro.com/development/retroarch/compilation/ubuntu Installs necessary build tools, including git, for compiling software on Ubuntu. This command uses apt-get to install the 'git' and 'build-essential' packages. ```bash # apt-get install git build-essential ``` -------------------------------- ### Clone Libretro Super Tool Source: https://docs.libretro.com/development/retroarch/compilation/ubuntu Downloads the 'libretro-super' toolset, which simplifies fetching and compiling Libretro cores. Uses git clone to get the repository. Requires git to be installed. ```bash $ git clone https://github.com/libretro/libretro-super.git $ cd libretro-super ``` -------------------------------- ### Libretro MAME/MESS Software List Entry Example Source: https://docs.libretro.com/guides/softwarelist-getting-started This XML snippet demonstrates the structure of a software list entry for an Atari 7800 game within the MAME/MESS emulation system. It includes details like the software name, description, year, publisher, and hardware-specific parts with ROM information. This format is used by MAME/MESS to identify and load games. ```xml Asteroids (NTSC) 1984 Atari ``` -------------------------------- ### Sega CD Game Single-Track CUE File Example Source: https://docs.libretro.com/library/genesis_plus_gx This example shows the structure of a .cue file for a single-track Sega CD game. It specifies the binary file name and the track information, including its mode and start index. This file is essential for loading Sega CD games that use the BIN/CUE format. ```text FILE "foo.bin" BINARY TRACK 01 MODE1/2352 INDEX 01 00:00:00 ``` -------------------------------- ### Configure and Build Ludo on Windows Source: https://docs.libretro.com/guides/building-ludo This snippet details the steps for setting up the build environment on Windows, including Git Bash, Go, MinGW-w64, and OpenAL, followed by commands to clone, build, and run Ludo. ```bash export CGO_CFLAGS="-I/c/openal-soft-1.19.0-bin/include/" export CGO_LDFLAGS="-L/c/openal-soft-1.19.0-bin/build/Release/" git clone --recursive https://github.com/libretro/ludo.git cd ludo go build ./ludo ``` -------------------------------- ### DOSBox Configuration Example Source: https://docs.libretro.com/library/dosbox An example of a DOSBox configuration file used to mount a game directory and launch an executable. This configuration can be placed in the game folder to override default settings. ```dos [autoexec] @echo off mount d "/storage/roms/dos/game" d: game.exe ``` -------------------------------- ### Install Ccache for Faster Builds Source: https://docs.libretro.com/development/retroarch/compilation/ubuntu Installs the ccache compiler cache utility on Ubuntu to speed up subsequent build processes. Requires apt-get and potentially configuring the PATH environment variable. ```bash # apt-get install ccache ``` -------------------------------- ### Install RetroArch Build Dependencies (Ubuntu) Source: https://docs.libretro.com/development/retroarch/compilation/ubuntu Installs build dependencies required for compiling RetroArch on Ubuntu using apt-get. May require enabling source repositories in apt configuration. ```bash # apt-get build-dep retroarch ``` -------------------------------- ### Build Ludo on Mac OS X Source: https://docs.libretro.com/guides/building-ludo This snippet provides instructions for building Ludo on Mac OS X, including setting up Xcode and Homebrew, installing Go and OpenAL, and then cloning, building, and running the project. ```bash brew install go openal-soft git clone --recursive https://github.com/libretro/ludo.git cd ludo go build ./ludo ``` -------------------------------- ### Install Core Dependencies (Debian/Ubuntu) Source: https://docs.libretro.com/development/retroarch/compilation/android Example command to install core dependencies on Debian-based systems like Ubuntu using `apt-get`. The `-dev` suffix is often required for development libraries. Consult the libretro-deps repository for specific needs. ```shell sudo apt-get install libfaac-dev ``` -------------------------------- ### Basic Cg Vertex Shader - Hello World Example Source: https://docs.libretro.com/development/shader/cg-shaders A fundamental Cg vertex shader example demonstrating the transformation of vertex positions and passing through color and texture coordinates. This serves as a starting point for Cg graphics programming. ```cg void main_vertex (float4 pos : POSITION, out float4 out_pos : POSITION, uniform float4x4 modelViewProj, float4 color : COLOR, out float4 out_color : COLOR, float2 tex : TEXCOORD, out float2 out_tex : TEXCOORD ) { out_pos = mul(modelViewProj, pos); out_color = color ; out_tex = tex ; } ```