video

package
v0.0.0-...-b97de10 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

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

Device represents the frame buffer. It implements the draw.Image interface.

func (*Device) At

func (d *Device) At(x, y int) color.Color

At implements the image.Image (and draw.Image) interface.

func (*Device) Bounds

func (d *Device) Bounds() image.Rectangle

Bounds implements the image.Image (and draw.Image) interface.

func (*Device) Close

func (d *Device) Close()

Close unmaps the framebuffer memory and closes the device file. Call this function when you are done using the frame buffer.

func (*Device) ColorModel

func (d *Device) ColorModel() color.Model

ColorModel implements the image.Image (and draw.Image) interface.

func (*Device) Set

func (d *Device) Set(x, y int, c color.Color)

Set implements the draw.Image interface.

type Renderer

type Renderer interface {
	Init()
	Render(draw.Image)
}

Renderer device specific renderer, framebuffer on Pi-Zero, GLFW window on Windows

type RendererLinux

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

RendererLinux is a PIZero specific renderer

func NewRenderer

func NewRenderer() *RendererLinux

NewRenderer makes and returns a new renderer

func (*RendererLinux) Init

func (r *RendererLinux) Init()

Init set up the renderer

func (*RendererLinux) Render

func (r *RendererLinux) Render(src draw.Image)

Render renders the current display buffer

type System

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

System Apple IIe Generic video system

func NewVideo

func NewVideo(b *appleii.Bus, r Renderer) *System

NewVideo requires a pointer to the memory system, and a valid renderer

func (*System) RenderFrame

func (s *System) RenderFrame(gpuMem []uint8, gpuAuxMem []uint8, gpuStart uint16, textMode bool, hiRes bool, col80 bool, mixed bool, dblhires bool)

RenderFrame render the current display screen based on the current graphics mode

func (*System) SetMonochromeColor

func (s *System) SetMonochromeColor(color color.RGBA)

SetMonochromeColor sets the color for monochrome mode, default is lightgreen

func (*System) ToggleColorMode

func (s *System) ToggleColorMode()

ToggleColorMode Set color or monochrome rendering mode

Jump to

Keyboard shortcuts

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