goapple2

package module
v0.0.0-...-998569c Latest Latest
Warning

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

Go to latest
Published: May 21, 2018 License: MIT Imports: 8 Imported by: 0

README

goapple2

Apple ][+ emulator written in Go.

Install

go get -u github.com/zellyn/goapple2/{texty,shiny}

Status

No Maintenance Intended

Basic functionality (keyboard input, text, low and hires graphics) works.

Very basic (and fake) read-only disk access works, for .dsk images where no trickery is involved.

This was one of my early Go-learning projects: the code organization is pretty horrible.

Shiny

This is the main "supported" interface, hacked together during hack day at GopherCon2016. It's almost certainly doing things wrong Shiny-wise: pull requests welcome. Press backquote/tilde to exit.

Texty

texty/ contains a hackish version of the emulator that runs in a terminal. It interprets all videoscan outputs as text, regardless of any other settings. Press ~ to exit.

Where to find ROMs

cd data/roms ./getroms.sh

Contributing

Pull requests welcome. If you have any questions, feel free to get in touch with me: username "zellyn" on gmail, twitter, facebook, github, golang slack.

Contributors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apple2

type Apple2 struct {
	Done bool
	// contains filtered or unexported fields
}

Apple II struct

func NewApple2

func NewApple2(p videoscan.Plotter, rom []byte, charRom [2048]byte, options ...Option) *Apple2

func (*Apple2) AddCard

func (a2 *Apple2) AddCard(card cards.Card) error

func (*Apple2) AddPCAction

func (a2 *Apple2) AddPCAction(address uint16, action PCAction)

func (*Apple2) DumpRAM

func (a2 *Apple2) DumpRAM(filename string) error

func (*Apple2) EmptyRead

func (a2 *Apple2) EmptyRead() byte

EmptyRead returns the value last read from RAM, lingering on the bus.

func (*Apple2) Handle12k

func (a2 *Apple2) Handle12k(onOff bool, slot byte)

func (*Apple2) HandleROM

func (a2 *Apple2) HandleROM(onOff bool, slot byte)

func (*Apple2) Keypress

func (a2 *Apple2) Keypress(key byte)

func (*Apple2) LogRegisters

func (a2 *Apple2) LogRegisters()

func (*Apple2) Quit

func (a2 *Apple2) Quit()

func (*Apple2) RamRead

func (a2 *Apple2) RamRead(address uint16) byte

func (*Apple2) Read

func (a2 *Apple2) Read(address uint16) byte

func (*Apple2) Step

func (a2 *Apple2) Step() error

func (*Apple2) Tick

func (a2 *Apple2) Tick()

func (*Apple2) Write

func (a2 *Apple2) Write(address uint16, value byte)

type Option

type Option func(*Apple2)

Option is an optional param to NewApple2.

func WithRAM

func WithRAM(address uint16, bytes []byte) Option

type PCAction

type PCAction struct {
	Type     PCActionType
	String   string
	Mask     byte
	Masked   byte
	Delay    uint64
	Callback func()
}

type PCActionType

type PCActionType int
const (
	ActionDumpMem PCActionType = iota + 1
	ActionLogRegisters
	ActionTrace
	ActionSetLimit
	ActionHere
	ActionDiskStatus
	ActionCallback
)

Notes

Bugs

  • make reads/writes atomic

  • this is not how the apple2 keyboard actually works

Directories

Path Synopsis
Simplest possible Apple II that will possibly boot, in exp/shiny.
Simplest possible Apple II that will possibly boot, in exp/shiny.
Simplest possible Apple II that will possibly boot.
Simplest possible Apple II that will possibly boot.
convert.go contains routines to convert from character ROMs to text and back.
convert.go contains routines to convert from character ROMs to text and back.

Jump to

Keyboard shortcuts

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