genesis

package module
v0.0.0-...-9c1cf01 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2018 License: BSD-3-Clause Imports: 8 Imported by: 0

README

genesis

Genesis is an experimental, work in progress emulator for the Sega Genesis written entirely in Go.

The emulator ecosystem for the Genesis is very well established and mature. Essentially there is no need for another contender. The purpose of this project mainly for personal growth and to spark interest in the Go community.

Kudos to existing projects like:

Design goals

  • Every component should be modular and reusable
  • Component APIs must be well documented and follow established Go idioms
  • Performance is sacrificed (within reason) for code simplicity
  • Emulator internals should be highly observable

Notes in code generation

My initial approach to this project was to use go generate to generate discrete functions for all < 65536 possible operation codes. This would significantly reduce the number of machine instructions and branches required to execute any given Motorola 68000 instruction.

The approach worked, (see early commits to m68k) and performed well at runtime, but resulted in > 30 second compile times and > 80MB binaries. This was not conducive to a buiding a thriving developer community.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type System

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

func New

func New() *System

New returns a new Sega Genesis system emulator.

func (*System) Load

func (c *System) Load(b *rom.ROM) (err error)

Load resets the system state before mapping the given ROM into memory and initializing the system ready to execute the ROM's main program.

func (*System) Reset

func (c *System) Reset() error

Reset resets the state of the Genesis system, as if the Reset button on the console had been pushed.

func (*System) Run

func (c *System) Run() (err error)

Run executes the loaded ROM until an error is encountered.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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