Documentation ¶
Overview ¶
Package controllers contains the implementations for all the emulated controllers for the VCS.
Index ¶
- func NewGamepad(env *environment.Environment, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
- func NewKeypad(env *environment.Environment, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
- func NewPaddlePair(env *environment.Environment, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
- func NewStick(env *environment.Environment, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
- type Gamepad
- func (pad *Gamepad) HandleEvent(event ports.Event, data ports.EventData) (bool, error)
- func (pad *Gamepad) ID() plugging.PeripheralID
- func (pad *Gamepad) IsActive() bool
- func (pad *Gamepad) Plumb(bus ports.PeripheralBus)
- func (pad *Gamepad) PortID() plugging.PortID
- func (pad *Gamepad) Reset()
- func (pad *Gamepad) Snapshot() ports.Peripheral
- func (pad *Gamepad) Step()
- func (pad *Gamepad) String() string
- func (pad *Gamepad) Unplug()
- func (pad *Gamepad) Update(data chipbus.ChangedRegister) bool
- type Keypad
- func (key *Keypad) HandleEvent(event ports.Event, data ports.EventData) (bool, error)
- func (key *Keypad) ID() plugging.PeripheralID
- func (key *Keypad) IsActive() bool
- func (key *Keypad) Plumb(bus ports.PeripheralBus)
- func (key *Keypad) PortID() plugging.PortID
- func (key *Keypad) Reset()
- func (key *Keypad) Snapshot() ports.Peripheral
- func (key *Keypad) Step()
- func (key *Keypad) String() string
- func (key *Keypad) Unplug()
- func (key *Keypad) Update(data chipbus.ChangedRegister) bool
- type Paddles
- func (pdl *Paddles) HandleEvent(event ports.Event, data ports.EventData) (bool, error)
- func (pdl *Paddles) ID() plugging.PeripheralID
- func (pdl *Paddles) IsActive() bool
- func (pdl *Paddles) Plumb(bus ports.PeripheralBus)
- func (pdl *Paddles) PortID() plugging.PortID
- func (pdl *Paddles) Reset()
- func (pdl *Paddles) Snapshot() ports.Peripheral
- func (pdl *Paddles) Step()
- func (pdl *Paddles) String() string
- func (pdl *Paddles) Unplug()
- func (pdl *Paddles) Update(data chipbus.ChangedRegister) bool
- type Stick
- func (stk *Stick) HandleEvent(event ports.Event, data ports.EventData) (bool, error)
- func (stk *Stick) ID() plugging.PeripheralID
- func (stk *Stick) IsActive() bool
- func (stk *Stick) Plumb(bus ports.PeripheralBus)
- func (stk *Stick) PortID() plugging.PortID
- func (stk *Stick) Reset()
- func (stk *Stick) Snapshot() ports.Peripheral
- func (stk *Stick) Step()
- func (stk *Stick) String() string
- func (stk *Stick) Unplug()
- func (stk *Stick) Update(data chipbus.ChangedRegister) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGamepad ¶
func NewGamepad(env *environment.Environment, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
NewGamepad is the preferred method of initialisation for the Gamepad type Satisifies the ports.NewPeripheral interface and can be used as an argument to ports.AttachPlayer0() and ports.AttachPlayer1().
func NewKeypad ¶
func NewKeypad(env *environment.Environment, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
NewKeypad is the preferred method of initialisation for the Keyboard type Satisifies the ports.NewPeripheral interface and can be used as an argument to ports.AttachPlayer0() and ports.AttachPlayer1().
func NewPaddlePair ¶ added in v0.21.0
func NewPaddlePair(env *environment.Environment, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
NewPaddlePair is the preferred method of initialisation for the PaddlePair type Satisifies the ports.NewPeripheral interface and can be used as an argument to ports.AttachPlayer0() and ports.AttachPlayer1().
func NewStick ¶
func NewStick(env *environment.Environment, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
NewStick is the preferred method of initialisation for the Stick type Satisifies the ports.NewPeripheral interface and can be used as an argument to ports.AttachPlayer0() and ports.AttachPlayer1().
Types ¶
type Gamepad ¶
type Gamepad struct {
// contains filtered or unexported fields
}
Gamepad represents a two button gamepad. It is based on and is virtually the same as the regular Stick type.
It also consumes the same event types as the regular Stick type.
Information about how 2-button gamepads are expected to be handled found in the AtariAge thread below:
func (*Gamepad) HandleEvent ¶
HandleEvent implements the ports.Peripheral interface.
func (*Gamepad) ID ¶
func (pad *Gamepad) ID() plugging.PeripheralID
ID implements the ports.Peripheral interface.
func (*Gamepad) Plumb ¶
func (pad *Gamepad) Plumb(bus ports.PeripheralBus)
Plumb implements the ports.Peripheral interface.
func (*Gamepad) Reset ¶
func (pad *Gamepad) Reset()
Reset implements the ports.Peripheral interface.
func (*Gamepad) Snapshot ¶
func (pad *Gamepad) Snapshot() ports.Peripheral
Snapshot implements the Peripheral interface.
type Keypad ¶
type Keypad struct {
// contains filtered or unexported fields
}
Keypad represents the VCS keypad type.
func (*Keypad) HandleEvent ¶
HandleEvent implements the ports.Peripheral interface.
func (*Keypad) ID ¶
func (key *Keypad) ID() plugging.PeripheralID
ID implements the ports.Peripheral interface.
func (*Keypad) Plumb ¶
func (key *Keypad) Plumb(bus ports.PeripheralBus)
Plumb implements the ports.Peripheral interface.
func (*Keypad) Snapshot ¶
func (key *Keypad) Snapshot() ports.Peripheral
Snapshot implements the Peripheral interface.
type Paddles ¶ added in v0.21.0
type Paddles struct {
// contains filtered or unexported fields
}
Paddles represents a pair of paddles inserted into the same port
func (*Paddles) HandleEvent ¶ added in v0.21.0
HandleEvent implements the ports.Peripheral interface.
func (*Paddles) ID ¶ added in v0.21.0
func (pdl *Paddles) ID() plugging.PeripheralID
ID implements the ports.Peripheral interface.
func (*Paddles) Plumb ¶ added in v0.21.0
func (pdl *Paddles) Plumb(bus ports.PeripheralBus)
Plumb implements the ports.Peripheral interface.
func (*Paddles) Reset ¶ added in v0.21.0
func (pdl *Paddles) Reset()
Reset implements the ports.Peripheral interface.
func (*Paddles) Snapshot ¶ added in v0.21.0
func (pdl *Paddles) Snapshot() ports.Peripheral
Snapshot implements the Peripheral interface.
func (*Paddles) Step ¶ added in v0.21.0
func (pdl *Paddles) Step()
Step implements the ports.Peripheral interface.
type Stick ¶
type Stick struct {
// contains filtered or unexported fields
}
Stick represents the VCS digital joystick controller.
func (*Stick) HandleEvent ¶
HandleEvent implements the ports.Peripheral interface.
func (*Stick) ID ¶
func (stk *Stick) ID() plugging.PeripheralID
ID implements the ports.Peripheral interface.
func (*Stick) Plumb ¶
func (stk *Stick) Plumb(bus ports.PeripheralBus)
Plumb implements the ports.Peripheral interface.
func (*Stick) Snapshot ¶
func (stk *Stick) Snapshot() ports.Peripheral
Snapshot implements the Peripheral interface.