Documentation ¶
Overview ¶
Package controllers contains the implementations for all the emulated controllers for the VCS.
Index ¶
- func NewGamepad(instance *instance.Instance, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
- func NewKeypad(instance *instance.Instance, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
- func NewPaddle(instance *instance.Instance, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
- func NewStick(instance *instance.Instance, 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 Paddle
- func (pdl *Paddle) HandleEvent(event ports.Event, data ports.EventData) (bool, error)
- func (pdl *Paddle) ID() plugging.PeripheralID
- func (pdl *Paddle) IsActive() bool
- func (pdl *Paddle) Plumb(bus ports.PeripheralBus)
- func (pdl *Paddle) PortID() plugging.PortID
- func (pdl *Paddle) Reset()
- func (pdl *Paddle) Snapshot() ports.Peripheral
- func (pdl *Paddle) Step()
- func (pdl *Paddle) String() string
- func (pdl *Paddle) Unplug()
- func (pdl *Paddle) 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(instance *instance.Instance, 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(instance *instance.Instance, 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 NewPaddle ¶
func NewPaddle(instance *instance.Instance, port plugging.PortID, bus ports.PeripheralBus) ports.Peripheral
NewPaddle is the preferred method of initialisation for the Paddle type Satisifies the ports.NewPeripheral interface and can be used as an argument to ports.AttachPlayer0() and ports.AttachPlayer1().
func NewStick ¶
func NewStick(instance *instance.Instance, 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 Paddle ¶
type Paddle struct {
// contains filtered or unexported fields
}
Paddle represents the VCS paddle controller type.
func (*Paddle) HandleEvent ¶
HandleEvent implements the ports.Peripheral interface.
func (*Paddle) ID ¶
func (pdl *Paddle) ID() plugging.PeripheralID
ID implements the ports.Peripheral interface.
func (*Paddle) Plumb ¶
func (pdl *Paddle) Plumb(bus ports.PeripheralBus)
Plumb implements the ports.Peripheral interface.
func (*Paddle) Snapshot ¶
func (pdl *Paddle) Snapshot() ports.Peripheral
Snapshot implements the 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.