inputoutput

package
v0.0.3-0...-fde8617 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UP = iota
	DOWN
	LEFT
	RIGHT
	A
	B
	START
	SELECT
)
View Source
const PREFIX string = "IO"
View Source
const ROW_1 byte = 0x10
View Source
const ROW_2 byte = 0x20
View Source
const SCREEN_HEIGHT int = 144
View Source
const SCREEN_WIDTH int = 160

Variables

View Source
var KeyToIntMap = map[string]int{
	"up":     UP,
	"down":   DOWN,
	"left":   LEFT,
	"right":  RIGHT,
	"a":      A,
	"b":      B,
	"start":  START,
	"select": SELECT,
}

Functions

This section is empty.

Types

type IO

type IO struct {
	KeyHandler          *KeyHandler
	ScreenOutputChannel chan *types.Screen
	AudioOutputChannel  chan int
}

func NewIO

func NewIO() *IO

func (*IO) Run

func (i *IO) Run()

This will wait for updates to the display or audio and dispatch them accordingly

type KeyHandler

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

func (*KeyHandler) LinkIRQHandler

func (k *KeyHandler) LinkIRQHandler(m components.IRQHandler)

func (*KeyHandler) Name

func (k *KeyHandler) Name() string

func (*KeyHandler) Read

func (k *KeyHandler) Read(addr types.Word) byte

func (*KeyHandler) Reset

func (k *KeyHandler) Reset()

func (*KeyHandler) ServeHTTP

func (kh *KeyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*KeyHandler) Write

func (k *KeyHandler) Write(addr types.Word, value byte)

Jump to

Keyboard shortcuts

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