memory

package
v0.0.0-...-b784547 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bank

type Bank [0x4000]byte // Represents 16k memory bank

type Memory

type Memory struct {
	Screen *Bank         // current screen bank
	Cells  []*byte       // memory as a single array of 65536 bytes
	TC     *z80.TCounter // T state counter
	// contains filtered or unexported fields
}

func NewMem128k

func NewMem128k(rom1Path, rom2Path string) (*Memory, error)

Creates a new memory for 128k model with paging

func NewMem48k

func NewMem48k(romPath string) (*Memory, error)

Creates a new memory for 48k model

func (*Memory) LoadBank

func (m *Memory) LoadBank(page int, data []byte)

Loads the specified memory bank with data

func (*Memory) PageMode

func (m *Memory) PageMode(mode byte)

Sets the paging mode for 128k model

func (*Memory) Read

func (m *Memory) Read(addr uint16) byte

Reads a value from the memory address

func (*Memory) Write

func (m *Memory) Write(addr uint16, value byte)

Writes a value to the memory address

Jump to

Keyboard shortcuts

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