driver

package
v0.0.0-...-ef5716e Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASCII

type ASCII struct {
	Conn net.Conn
	// How many frames have been sent by the emulator
	FrameCount int
	// contains filtered or unexported fields
}

func (*ASCII) Init

func (stream *ASCII) Init(pixels *[160][144][3]uint8, title string)

func (*ASCII) Run

func (stream *ASCII) Run(drawSignal chan bool, onQuit func())

type ChannelIO

type ChannelIO struct {
	Data   byte
	Target *ChannelIO
	Open   bool
	Master bool

	SendDelay int

	Receive chan byte
}

func (*ChannelIO) FetchByte

func (io *ChannelIO) FetchByte(cycles int) (byte, bool)

func (*ChannelIO) SendByte

func (io *ChannelIO) SendByte(data byte) bool

func (*ChannelIO) SetChannelStatus

func (io *ChannelIO) SetChannelStatus(master bool, status bool)

func (*ChannelIO) SetTarget

func (io *ChannelIO) SetTarget(p *ChannelIO)

type ControllerDriver

type ControllerDriver interface {
	// Initialize controller status
	InitStatus(*byte)
	// Update input status for emulator, called by the emulator
	UpdateInput() bool
	// Update input status for the controller itself
	NewInput([]byte)
}

type DisplayDriver

type DisplayDriver interface {
	Init(*[160][144][3]uint8, string)
	Run(chan bool, func())
}

type KeyMap

type KeyMap struct {
	// Timestamp when the key was last pressed
	LastPress int64
	// Timestamp when the emulator last check the input status
	LastChecked int64
}

type LCD

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

func (*LCD) Init

func (lcd *LCD) Init(pixels *[160][144][3]uint8, title string)

func (*LCD) InitStatus

func (lcd *LCD) InitStatus(statusPointer *byte)

func (*LCD) NewInput

func (lcd *LCD) NewInput(b []byte)

func (*LCD) Run

func (lcd *LCD) Run(drawSignal chan bool, onQuit func())

func (*LCD) UpdateInput

func (lcd *LCD) UpdateInput() bool

type StaticImage

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

func (*StaticImage) EnqueueInput

func (s *StaticImage) EnqueueInput(button byte)

Render raw pixels into images

func (*StaticImage) Init

func (s *StaticImage) Init(pixels *[160][144][3]uint8, s2 string)

func (*StaticImage) InitStatus

func (s *StaticImage) InitStatus(b *byte)

func (*StaticImage) NewInput

func (s *StaticImage) NewInput(bytes []byte)

func (*StaticImage) Render

func (s *StaticImage) Render() *image.RGBA

Render raw pixels into images

func (*StaticImage) Run

func (s *StaticImage) Run(drawSignal chan bool, f func())

func (*StaticImage) UpdateInput

func (s *StaticImage) UpdateInput() bool

type TelnetController

type TelnetController struct {
	Keymap [8]KeyMap
	// contains filtered or unexported fields
}

func (*TelnetController) InitStatus

func (tel *TelnetController) InitStatus(statusPointer *byte)

func (*TelnetController) NewInput

func (tel *TelnetController) NewInput(data []byte)

func (*TelnetController) UpdateInput

func (tel *TelnetController) UpdateInput() bool

Jump to

Keyboard shortcuts

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