AmigaBasicBMAP-io: Read and write Amiga Basic BMAP files

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Read and write AmigaBasicBMAP binary file format.

Usage

1
2
3

Arguments

file

A character string of the filename of the Amiga Basic BMAP file to be read or written.

disk

A virtual Commodore Amiga disk from which the file should be read or written to. This should be an amigaDisk object. Using this argument requires the adfExplorer package. When set to NULL, this argument is ignored.

x

A AmigaBasicBMAP class object that needs to be stored.

Details

An Amiga Basic BMAP file maps the offset of routines in Amiga libraries and can be read as a comprehensive list and written back to a binary file using these functions.

Value

Returns an AmigaBasicBMAP class object read from the file in case of read.AmigaBasicBMAP. Otherwise, invisibly returns the result of the call of close to the file connection. Or, when disk is specified, a copy of disk is returned to which the file is written.

Author(s)

Pepijn de Vries

See Also

Other AmigaBasic.operations: AmigaBasic.reserved(), AmigaBasicBMAP, AmigaBasic, [.AmigaBasic(), as.AmigaBasicBMAP(), as.AmigaBasic(), as.character(), check.names.AmigaBasic(), names.AmigaBasic(), rawToAmigaBasicBMAP(), rawToAmigaBasic(), read.AmigaBasic(), write.AmigaBasic()

Other io.operations: read.AmigaBasicShape(), read.AmigaBasic(), read.AmigaBitmapFontSet(), read.AmigaBitmapFont(), read.AmigaIcon(), read.SysConfig(), read.iff(), write.AmigaBasicShape(), write.AmigaBasic(), write.AmigaBitmapFont(), write.AmigaIcon(), write.SysConfig(), write.iff()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
## A small fragment of the dos.library BMAP would look like this:
dos.bmap <- as.AmigaBasicBMAP(list(
  xOpen = list(
    libraryVectorOffset = -30,
    registers = as.raw(2:3)
  ),
  xClose = list(
    libraryVectorOffset = -36,
    registers = as.raw(2)
  ),
  xRead = list(
    libraryVectorOffset = -42,
    registers = as.raw(2:4)
  )
))

## This will write the BMAP to a file:
write.AmigaBasicBMAP(dos.bmap, file.path(tempdir(), "dos.bmap"))

## This will read the same file:
dos.bmap.copy <- read.AmigaBasicBMAP(file.path(tempdir(), "dos.bmap"))

## End(Not run)

AmigaFFH documentation built on Sept. 5, 2021, 5:22 p.m.