timer

package
v0.0.0-...-e0ac686 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timer

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

Timer stores the state of the internal timer

func New

func New() *Timer

NewTimer creates an initialized timer

func (*Timer) EndMachineCycle

func (t *Timer) EndMachineCycle() bool

EndMachineCycle updates the timer after a machine cycle

func (*Timer) ReadDIV

func (t *Timer) ReadDIV() uint8

DIV returns the value of the DIV register

func (*Timer) ReadTAC

func (t *Timer) ReadTAC() uint8

TAC returns the value of the TAC register

func (*Timer) ReadTIMA

func (t *Timer) ReadTIMA() uint8

TIMA returns the value of the TIMA register

func (*Timer) ReadTMA

func (t *Timer) ReadTMA() uint8

TMA returns the value of the TMA register

func (*Timer) Reset

func (t *Timer) Reset()

Reset the counter to zero, used when a value is written to DIV

func (*Timer) WriteDIV

func (t *Timer) WriteDIV(value uint8)

WriteDIV is called on writes to the DIV register

func (*Timer) WriteTAC

func (t *Timer) WriteTAC(value uint8)

WriteTAC is called on writes to the TAC register

func (*Timer) WriteTIMA

func (t *Timer) WriteTIMA(value uint8)

WriteTIMA is called on writes to the TIMA register

func (*Timer) WriteTMA

func (t *Timer) WriteTMA(value uint8)

WriteTMA is called on writes to the TMA register

Jump to

Keyboard shortcuts

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