notifications

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package notifications allow communication from a cartridge directly to the emulation instance. This is useful, for example, by the Supercharger emulation to indicate the start/stop of the Supercharger tape.

Notifications are sometimes passed onto the GUI to inidicate to the user the event that has happened (eg. tape stopped, etc.) For some notifications however, it is appropriate for the emulation instance to deal with the notification invisibly.

Finally, some notifications are not generated by the cartridge but by the emulation instance, and sent to the GUI.

We can therefore think of the flow of notifications in the following manner:

   (a)              (b)                    (c)
Cartridge -----> Emulation Instance -----> GUI ----
            1                         2      \____|  3

The diagram also suggests that a GUI can both produce and receive a notification. This is possible and sometimes convenient to do.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notice added in v0.30.0

type Notice string

Notice describes events that somehow change the presentation of the emulation. These notifications can be used to present additional information to the user

const (
	// a screen shot is taking place
	NotifyScreenshot Notice = "NotifyScreenshot"

	// notifications sent when supercharger is loading from a sound file (eg. mp3 file)
	NotifySuperchargerSoundloadStarted Notice = "NotifySuperchargerSoundloadStarted"
	NotifySuperchargerSoundloadEnded   Notice = "NotifySuperchargerSoundloadEnded"
	NotifySuperchargerSoundloadRewind  Notice = "NotifySuperchargerSoundloadRewind"

	// if Supercharger is loading from a fastload binary then this event is
	// raised when the ROM requests the next block be loaded from the "tape
	NotifySuperchargerFastload Notice = "NotifySuperchargerFastload"

	// notifications sent by plusrom
	NotifyPlusROMNewInstall Notice = "NotifyPlusROMNewInstall"
	NotifyPlusROMNetwork    Notice = "NotifyPlusROMNetwork"

	// moviecart has started
	NotifyMovieCartStarted Notice = "NotifyMoveCartStarted"

	// unsupported DWARF data
	NotifyUnsupportedDWARF Notice = "NotifyUnsupportedDWARF"
)

List of defined notifications.

type Notify

type Notify interface {
	Notify(notice Notice) error
}

Notify is used for direct communication between a the hardware and the emulation package. Not often used but necessary for correct operation of:

Supercharger 'fastload' binaries require a post-load step that initiates the hardware based on information in the binary file.

PlusROM cartridges need information about network connectivity from the user on first use of the PlusROM system.

Jump to

Keyboard shortcuts

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