Documentation
¶
Index ¶
Constants ¶
View Source
const ( // The display parameters for original CHIP-8 DisplayWidth = 64 DisplayHeight = 32 )
Variables ¶
View Source
var ( Base = Color{25, 23, 36} Surface = Color{31, 29, 46} Overlay = Color{38, 35, 58} Muted = Color{110, 106, 134} Subtle = Color{144, 140, 170} Text = Color{224, 222, 244} Love = Color{235, 111, 146} Gold = Color{246, 193, 119} Rose = Color{235, 188, 186} Pine = Color{49, 116, 143} Foam = Color{156, 207, 216} Iris = Color{196, 167, 231} )
View Source
var (
SupportedModes = []string{
"CHIP-8 (default)",
"COSMAC-VIP",
}
)
Functions ¶
This section is empty.
Types ¶
type CHIP8 ¶
type CHIP8 struct { // Index register, holding addresses in memory. I uint16 // CPU registers. V [16]byte // Tweakable settings to use when running the interpreter Options CHIP8Options // Logger object to use Logger *log.Logger // contains filtered or unexported fields }
type CHIP8Options ¶
type CHIP8Options struct { // So it can be seen on modern displays DisplayScaleFactor int `mapstructure:"display_scale_factor"` // Max cycle speed of CHIP-8 exec loop ThrottleSpeed int `mapstructure:"throttle_speed"` // Limit how many instruction_limits the program is run for. For debug purposes. InstructionLimit int `mapstructure:"instruction_limit"` // Enable quirks for COSMAC-like behavior CosmacQuirks COSMACQuirks `mapstructure:"cosmac-vip"` }
func DefaultCHIP8Options ¶
func DefaultCHIP8Options() CHIP8Options
type COSMACQuirks ¶
type COSMACQuirks struct { // reset VF to 0 during instructions 8XY1, 8XY2, 8XY3 ResetVF bool `mapstructure:"reset_vf"` // increment memory index I during FX55 and FX65 IncrementI bool `mapstructure:"increment_i"` }
func (*COSMACQuirks) EnableAll ¶
func (cq *COSMACQuirks) EnableAll()
Click to show internal directories.
Click to hide internal directories.