Learn R Programming

⚠️There's a newer version (2.0.3) of this package.Take me there.

adfExplorer

Read and mutate virtual Commodore Amiga Disks, stored as files (a.k.a Amiga Disk Files).

Installation

Get CRAN version

install.packages("adfExplorer")

Get development version from R-Universe

install.packages("adfExplorer", repos = c("https://pepijn-devries.r-universe.dev", "https://cloud.r-project.org"))

Usage

The package comes with an example disk for which files and directories can be listed:

library(adfExplorer)
data("adf.example")

list.adf.files(adf.example)
#> [1] "Devs" "S"    "this" "mods"

You can also pull files from the virtual disk:

## get startup-sequence file and store as a vector of raw data
startup <- get.adf.file(adf.example, "DF0:s/startup-sequence")

## As this particular file is UTF8 text we can convert it from raw:
startup  |> rawToChar() |> iconv(from = "ISO-8859-1", to = "UTF-8") |> cat()
#> ; The Startup-Sequence is executed after booting
#> ; Everything after semicolons are comments and is ignored
#> ; By default standard commands are loaded from
#> ; the ROM kickstart. Additional commands should be
#> ; stored on the disk in the SYS:C directory.
#> ; For demonstration purposes we only echo some
#> ; text to the screen... Note that this will not
#> ; work on Amiga OS <2.0 as "Echo" is not available
#> ; in older ROM kickstart versions.
#> 
#> Echo "cADF Explorer Example Disk" ; Note that the weird characters at the start are escape-codes to format the text
#> Echo "This disk was created as an example for the"
#> Echo "R package 'adfExplorer' by Pepijn de Vries."

For more in depth examples see vignette("amigaDiskFiles").

Developmental status

It has been years since the initial release of this package. Since its release a lot has changed in R and in my skill set. I still have plans for this package, but this requires drastic changes. Therefore, I will only apply minimal maintenance to this package. Meanwhile I will work on a complete overhaul which will be released in due time as a new package. This new package will:

  • have the same or similar features as the current package.
  • will implement modern R features and try to adhere to tidyverse principles.
  • implement recursive procedures in C/C++ giving the package a speed boost.

But until then, please enjoy the current package as is.

Copy Link

Version

Install

install.packages('adfExplorer')

Monthly Downloads

342

Version

0.1.8

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Pepijn de Vries

Last Published

March 6th, 2024

Functions in adfExplorer (0.1.8)

amigaDisk-class

The amigaDisk class
amigaIntToRaw

Convert Amiga integers into raw values
get.adf.file

Get a file from an amigaDisk object
get.blockID

Get the block ID from the physical location on the disk
print

Print Amiga Disk File objects
blank.amigaDOSDisk

Create blank disk with file system
put.adf.file

Put a file onto an amigaDisk object
boot.block.code

Minimal executable code for a bootblock
rawToBitmap

Convert raw data into a bitmap or vice versa
adf.file.exists

Test file or directory existence in an amigaDisk object
read.adf

Read an Amiga Disk File
adf.file.remove

Remove a file from an amigaDisk object
displayRawData

Display raw data in a comprehensive way
adf.file.info

File information on virtual amigaDisk objects
write.adf

Write an amigaDisk object to an ADF file
adfExplorer-package

adfExplorer: Import from and Export to Amiga Disk Files
amigaBlock-class

The amigaBlock class
get.diskLocation

Get the physical location on the disk for a specific block
is.amigaDOS

Check if amigaDisk object is DOS formatted
rawToAmigaDate

Convert raw values into a date time object
adf.disk.name

Get or set the disk name of an amigaDisk object
adf.example

An example of an amigaDisk object
rawToAmigaInt

Convert raw values into Amiga integers
amigaBlock-method

Extract block from or replace a block on an amigaDisk object
amigaDateToRaw

Convert date time objects into raw values
current.adf.dir

Get or set the current directory of an amigaDisk object
is.bootable

Check if amigaDisk object is bootable
dir.create.adf

Create a directory on an amigaDisk object
list.adf.files

List files in an amigaDisk directory