Documentation ¶
Overview ¶
Package cartridgeloader is used to specify the data that is to be attached to the emulated VCS.
When the cartridge is ready to be loaded into the emulator, the Load() function should be used. The Load() function handles loading of data from a different sources. Currently on local-file and data over HTTP is supported.
As well as the filename, the Loader type allows the cartridge mapping to be specified, if required.
The simplest instance of the Loader type:
cl := cartridgeloader.Loader{ Filename: "roms/Pitfall.bin", }
It is preferred however that the NewLoader() function is used. The NewLoader() function will set the mapping field automatically according to the filename extension.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
type Loader struct { // filename of cartridge to load. Filename string // empty string or "AUTO" indicates automatic fingerprinting Mapping string // expected hash of the loaded cartridge. empty string indicates that the // hash is unknown and need not be validated. after a load operation the // value will be the hash of the loaded data Hash string // contains filtered or unexported fields }
Loader is used to specify the cartridge to use when Attach()ing to the VCS. it also permits the called to specify the mapping of the cartridge (if necessary. fingerprinting is pretty good)
func NewLoader ¶ added in v0.3.1
NewLoader is the preferred method of initialisation for the Loader type.
The mapping argument will be used to set the Mapping field, unless the argument is either "AUTO" or the empty string. In which case the file extension is used to set the field.
File extensions should be the same as the ID of the intended mapper, as defined in the cartridge package. The exception is the DPC+ format which requires the file extension "DP+"
File extensions ".BIN" and "A26" will set the Mapping field to "AUTO".
Alphabetic characters in file extensions can be in upper or lower case or a mixture of both.