inputoutput

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2014 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

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

This section is empty.

Functions

This section is empty.

Types

type ControlScheme

type ControlScheme struct {
	RIGHT  byte
	LEFT   byte
	UP     byte
	DOWN   byte
	A      byte
	B      byte
	SELECT byte
	START  byte
}
var DefaultControlScheme ControlScheme = ControlScheme{
	RIGHT:  0x21,
	LEFT:   0x1F,
	UP:     0x12,
	DOWN:   0x20,
	A:      0x25,
	B:      0x24,
	SELECT: 0x22,
	START:  0x23,
}

type Display

type Display struct {
	Name                 string
	ScreenSizeMultiplier int
	// contains filtered or unexported fields
}

func (*Display) CleanUp

func (s *Display) CleanUp()

type IO

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

func NewIO

func NewIO() *IO

func (*IO) Init

func (i *IO) Init()

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) KeyDown

func (k *KeyHandler) KeyDown(key byte)

released sets bit for key to 0

func (*KeyHandler) KeyUp

func (k *KeyHandler) KeyUp(key byte)

released sets bit for key to 1

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) RestoreKeyboard

func (k *KeyHandler) RestoreKeyboard() error

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