Documentation ¶
Index ¶
- Variables
- func ReadGameFile(fileName string) ([]byte, error)
- type Emulator
- type GobSnapshotSerializer
- type JSONSnapshotSerializer
- type RawEmulator
- func (e *RawEmulator) BoostCPU(delta float64) float64
- func (e *RawEmulator) CPUBoostRate() float64
- func (e *RawEmulator) Disassemble()
- func (e *RawEmulator) GetSaveData() ([]byte, error)
- func (e *RawEmulator) Load(savedGame []byte) error
- func (e *RawEmulator) Pause()
- func (e *RawEmulator) Resume()
- func (e *RawEmulator) SaveToFile() error
- func (e *RawEmulator) SetCPUBoostRate(rate float64) float64
- func (e *RawEmulator) SetJoyPadButtonPressed(id int, button bus.JoyPadButton, pressed bool)
- type Save
- type Snapshot
- type SnapshotSerializer
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalSerializers = make(map[string]SnapshotSerializer)
Functions ¶
func ReadGameFile ¶
Types ¶
type Emulator ¶
type Emulator struct {
RawEmulator
}
Emulator browser render nes
func NewEmulator ¶
func NewEmulatorWithGameData ¶
type GobSnapshotSerializer ¶
type GobSnapshotSerializer struct{}
func (GobSnapshotSerializer) Deserialize ¶
func (gs GobSnapshotSerializer) Deserialize(data []byte) (Snapshot, error)
type JSONSnapshotSerializer ¶
type JSONSnapshotSerializer struct{}
func (JSONSnapshotSerializer) Deserialize ¶
func (js JSONSnapshotSerializer) Deserialize(data []byte) (Snapshot, error)
type RawEmulator ¶
type RawEmulator struct {
// contains filtered or unexported fields
}
func (*RawEmulator) BoostCPU ¶
func (e *RawEmulator) BoostCPU(delta float64) float64
func (*RawEmulator) CPUBoostRate ¶
func (e *RawEmulator) CPUBoostRate() float64
func (*RawEmulator) Disassemble ¶
func (e *RawEmulator) Disassemble()
func (*RawEmulator) GetSaveData ¶
func (e *RawEmulator) GetSaveData() ([]byte, error)
func (*RawEmulator) Load ¶
func (e *RawEmulator) Load(savedGame []byte) error
func (*RawEmulator) Pause ¶
func (e *RawEmulator) Pause()
func (*RawEmulator) Resume ¶
func (e *RawEmulator) Resume()
func (*RawEmulator) SaveToFile ¶
func (e *RawEmulator) SaveToFile() error
func (*RawEmulator) SetCPUBoostRate ¶
func (e *RawEmulator) SetCPUBoostRate(rate float64) float64
func (*RawEmulator) SetJoyPadButtonPressed ¶
func (e *RawEmulator) SetJoyPadButtonPressed(id int, button bus.JoyPadButton, pressed bool)
type SnapshotSerializer ¶
type SnapshotSerializer interface { Serialize(Snapshot) ([]byte, error) Deserialize([]byte) (Snapshot, error) }
func GetSnapshotSerializer ¶
func GetSnapshotSerializer(format string) SnapshotSerializer
Click to show internal directories.
Click to hide internal directories.