Learn R Programming

AmigaFFH (version 0.4.7)

rawToSysConfig: Coerce raw data into a SysConfig class object

Description

SysConfig objects are comprehensive representations of binary Amiga system-configuration files. Use this function to convert raw data from such a file to a SysConfig object.

Usage

rawToSysConfig(x)

Value

Returns a SysConfig class object based on x.

Arguments

x

A vector of raw data that needs to be converted into an S3 SysConfig class object. It should have a length of at least 232. Although system-configurations can be extended, such extended files are not supported here.

Author

Pepijn de Vries

Details

The Amiga used the system-configuration file to store certain system preferences in a binary file. With this function such raw data can be converted into a more comprehensive SysConfig object. Use as.raw() to achieve the inverse.

See Also

Other SysConfig.operations: SysConfig, read.SysConfig(), simpleSysConfig(), write.SysConfig()

Other raw.operations: as.AmigaBasic(), as.raw.AmigaBasic(), colourToAmigaRaw(), packBitmap(), rawToAmigaBasicBMAP(), rawToAmigaBasicShape(), rawToAmigaBasic(), rawToAmigaBitmapFontSet(), rawToAmigaBitmapFont(), rawToAmigaIcon(), rawToHWSprite(), rawToIFFChunk(), simpleAmigaIcon()

Examples

Run this code
if (requireNamespace("adfExplorer", quietly = TRUE)) {
  library(adfExplorer)
  
  ## get the system-configuration from the adfExplorer example disk:
  disk <- connect_adf(
    system.file("example.adz", package = "adfExplorer")
  )
  virtual_file_con <- adf_file_con(disk, "devs/system-configuration")
  sc <- readBin(virtual_file_con, "raw", 1024)
  close(disk)

  ## This will get you the raw data from the file:
  typeof(sc)

  ## Convert the raw data to a more comprehensive named list (and S3 SysConfig class):
  sc <- rawToSysConfig(sc)
}

Run the code above in your browser using DataLab