input

package
v0.0.0-...-86b10a5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Write(value uint8)
	Read() uint8
}

Controller represents IO for general-purpose controller ports from NES

type StandardController

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

StandardController http://wiki.nesdev.com/w/index.php/Standard_controller

func (*StandardController) Read

func (c *StandardController) Read() uint8

func (*StandardController) Update

func (c *StandardController) Update(state uint8)

func (*StandardController) Write

func (c *StandardController) Write(value uint8)

type StandardControllerButton

type StandardControllerButton = uint8
const (
	StandardA      StandardControllerButton = 1 << 0
	StandardB      StandardControllerButton = 1 << 1
	StandardSelect StandardControllerButton = 1 << 2
	StandardStart  StandardControllerButton = 1 << 3
	StandardUp     StandardControllerButton = 1 << 4
	StandardDown   StandardControllerButton = 1 << 5
	StandardLeft   StandardControllerButton = 1 << 6
	StandardRight  StandardControllerButton = 1 << 7
)

Jump to

Keyboard shortcuts

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