Expand description

octopt is a library for handling CHIP-8 configuration settings.

CHIP-8 is a virtual machine for playing simple computer games. It has been around since 1977, and has many slightly incompatible implementations.

Games often require specific behavior from its interpreter to run correctly, but you can’t know what behavior it expects just by looking at its bytecode.

This library contains structs and enums that represent all possible CHIP-8 options, which you can use for your CHIP-8 emulator.

Modules

An RGB color triplet struct that can be used with serde.

Structs

If the CHIP-8 interpreter supports custom colors for visual elements, it can use these values for setting them.

Representation of Octo options.

Represents the different “quirks”, ie. divergent behaviors, of the CHIP-8 runtime. These are the most important ones to support, as many games depend on specific settings here to run properly.

Enums

Represents the different fonts a CHIP-8 interpreter can provide.

Represents the different possible behaviors of attempting to draw a sprite with 0 height with the instruction DXY0 while in lores (low-resolution 64x32) mode.

Represents different CHIP-8 “platforms”. In this context, a platform is some CHIP-8 specification which has its own set of Options. This includes, but is not limited to, actual target hardware systems that run CHIP-8, specific CHIP-8 interpreters with their own quirks, extensions to the CHIP-8 language, etc.

Possible orientations of the display. Note that this should only affect the visual representation of the screen; draw operations still act as if the screen rotation is 0. Only used by some Octo games.

Represents the different touch modes supported by Octo.