app

package
v0.0.0-...-29fc142 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp(cfg config.Config) (*App, error)

NewApp instantiates the App in which the chip8 is going to run. It contains a chip8, a configuration, a beepFile and a beepStream to manage the sound, a pixelgl window which is used for all the peripherals, and the peripherals: a monitor(m) which draws the FrameBuffer of the chip 8, a keypad which manages all the inputs of the chip8, and a keyboard which manages the inputs of the app (in this case we only use it to quit when we press Esc., a key which is not used by chip8 ROM files). NewApp also load the fonts file given in the configuration.

func (*App) Run

func (myApp *App) Run()

Run loads the ROM given in the configuration into the chip8, then runs the chip8 making a distinction if the configuration indicates whether the application should run in debug mode.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL