| Title: | Emulating the Amiga Using the vAmiga Engine |
|---|---|
| Description: | This is an Amiga emulator based on the vAmiga project <https://github.com/dirkwhoffmann/vAmiga>. It provides low level access to the emulator and allows users to interact with the emulated machine through the console or scripts. |
| Authors: | Pepijn de Vries [aut, cre] (ORCID: <https://orcid.org/0000-0002-7961-6646>), Dirk Hoffmann [aut, cph] |
| Maintainer: | Pepijn de Vries <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.0.0.9007 |
| Built: | 2026-06-01 23:05:31 UTC |
| Source: | https://github.com/pepijn-devries/ramiga |
An abstract class to represent emulator components. Each of the emulator components inherit from this class. It provides consistent access to and control over component specific options.
optionsA named list of options. You can get and set
all individual elements. Elements are always returned as
character, but can be also be set as numeric or logical,
depending on the specific option. Assignment values are always
parsed by the vAmiga engine.
new()
Most emulator components don't need to be initialised. It's simplest
to create an emulator with RamigaEmulator$new(). All components
can be accessed through the R6 object fields.
RamigaComponent$new(emulator, component_id, ...)
emulatorAll emulator components should be part of an emulator. All components (except for the emulator itself) therefore needs the, initialised with an emulator.
component_idInteger value used to identify different types of components.
...Ignored
get_pointer()
Get the pointer to the emulator object in memory
RamigaComponent$get_pointer(...)
...Ignored
Returns the externalptr pointing to the C++ class
instance in memory
get_emulator()
Get associated emulator.
RamigaComponent$get_emulator(...)
...Ignored
Returns a RamigaEmulator class object instance in memory
list_options()
List available options for the emulator component. It shows the name of the option and indicates their intended value(s).
RamigaComponent$list_options(...)
...Ignored
Returns a named list with available options.
clone()
The objects of this class are cloneable with this method.
RamigaComponent$clone(deep = FALSE)
deepWhether to make a deep clone.
A class that represents control devices, like the mouse or joystick.
ramiga::RamigaComponent -> RamigaControlDevice
new()
RamigaControlDevice$new(emulator, port_number, type)
emulatorA virtual control device only is meaningful when connected to a virtual device. Therefore, you need an emulator (RamigaEmulator) to connect the device to.
port_numberPort on the virtual machine to which the device is connected. Should be either port 1 or 2.
typeType of device, should be either "mouse", or "joystick".
print()
Prints some basic information about the control device
RamigaControlDevice$print(...)
...Ignored
clone()
The objects of this class are cloneable with this method.
RamigaControlDevice$clone(deep = FALSE)
deepWhether to make a deep clone.
A class that represents the emulator's control ports (for mouse and joystick).
ramiga::RamigaComponent -> RamigaControlPort
deviceThis field tells you which device (mouse, joystick or none)
is connected to the current port. Should be a RamigaControlDevice
class object, or NULL if there is no device.
new()
RamigaControlPort$new(emulator, port_number = 1L, device = NULL)
emulatorAn RamigaEmulator class object. The control port to be created needs to be associated with a virtual machine. The initiated object will represent the control port of the emulated machine.
port_numberThe Amiga has two control ports. This number specifies which one we are using. Should be either 1 or 2.
deviceDevice connected to this port. An RamigaControlDevice
class object or NULL if there is no device.
print()
Print some basic information about the control port.
RamigaControlPort$print(...)
...Ignored
clone()
The objects of this class are cloneable with this method.
RamigaControlPort$clone(deep = FALSE)
deepWhether to make a deep clone.
A class that represents the emulator's Central Processing Unit (CPU).
ramiga::RamigaComponent -> RamigaCPU
get_cycles()
Get the CPU cycle count since the emulator started
RamigaCPU$get_cycles()
Returns the count in number of cycles
get_program_counter()
Get the memory address of the currently running program
RamigaCPU$get_program_counter()
On the Amiga memory addresses are mapped as 32 bit
unsigned integers. As R doesn't support this type, it is
returned as a numeric (double) value.
get_config()
Get current CPU configuration details
RamigaCPU$get_config()
Returns a named list
print()
Print some basic information about the CPU
RamigaCPU$print(...)
...Ignored
clone()
The objects of this class are cloneable with this method.
RamigaCPU$clone(deep = FALSE)
deepWhether to make a deep clone.
A class representing the emulator for emulating an Amiga.
ramiga::RamigaComponent -> RamigaEmulator
memoryThe emulated memory, represented by RamigaMemory
cpuThe emulated CPU, represented by RamigaCPU
floppy_drivesThe emulated floppy drives, represented by
a named list of RamigaFloppyDrive objects.
control_portsControl ports to which a virtual mouse or joystick can be connected. It is represented by the RamigaControlPort class.
outputGet object to capture emulator output. Handled by RamigaOutput.
new()
Initialise a new Amiga emulator
RamigaEmulator$new()
power_on()
When the emulator is initialised it is powered off. Call this to power on the virtual machine.
RamigaEmulator$power_on()
Returns the emulator object
power_off()
Power off emulator. Advisable if you plan to make adjustments to the emulated hardware configuration.
RamigaEmulator$power_off()
Returns the emulator object
soft_reset()
A soft reset, just resets the CPU, causing the system to reboot.
This is similar to simultaneously pressing
RamigaEmulator$soft_reset()
Returns the emulator object
hard_reset()
A hard reset. Same as powering of the machine, then powering it back on.
RamigaEmulator$hard_reset()
Returns the emulator object
run()
When initialised, the emulator is paused. Call this to start
running the virtual machine. It will hold up the R thread
untill you interrupt (by pressing
RamigaEmulator$run()
Returns NULL invisibly.
next_frame()
Update the machines state to the next video frame. The machine runs until the vertical blank is reached and pauses immediately.
RamigaEmulator$next_frame()
Returns the emulator object
fast_forward()
Runs the emulator at warp speed and skips the specified number of frames
RamigaEmulator$fast_forward(frames)
Returns the emulator object
get_info()
Get information about the emulator state.
RamigaEmulator$get_info()
Returns a named list.
get_config()
Get information about the emulator configuration.
RamigaEmulator$get_config()
Returns a named list.
set_config()
Quickly set the emulator configuration to one of the pre-specified schemes.
RamigaEmulator$set_config(scheme = "A500_OCS_1MB", ...)
schemeShould be one of the following strings:
"A1000_OCS_1MB", "A500_OCS_1MB" (default), "A500_ECS_1MB",
or "A500_PLUS_1MB".
...Ignored
Returns a string
get_version()
Get the version number of the vAmiga core used by this package
RamigaEmulator$get_version(...)
...Ignored
Returns a string
print()
Prints basic information about the emulator.
RamigaEmulator$print(...)
...Ignored
clone()
The objects of this class are cloneable with this method.
RamigaEmulator$clone(deep = FALSE)
deepWhether to make a deep clone.
Obtain the file system from a virtual device (if available), such that you can interact with it.
new()
Attempt to access the file system on a device image if available
RamigaFileSystem$new(image)
imageThe virtual device (represented by a RamigaImage class object), from which the file system should be retrieved
get_volume_name()
Get the name of the volume of that contains the file system
RamigaFileSystem$get_volume_name()
Returns the name of the volume
get_traits()
Get some traits of the file system.
RamigaFileSystem$get_traits(...)
...Ignored
Returns a named list of file system traits.
print()
Prints basic info about the file system
RamigaFileSystem$print(...)
...Ignored.
clone()
The objects of this class are cloneable with this method.
RamigaFileSystem$clone(deep = FALSE)
deepWhether to make a deep clone.
A class that represents the emulator's floppy drive.
ramiga::RamigaComponent -> RamigaFloppyDrive
new()
RamigaFloppyDrive$new(emulator, drive_number = 0)
emulatorAn RamigaEmulator class object. The floppy drive to be created needs to be associated with a virtual machine. The initiated object will represent the floppy drive of the emulated machine.
drive_numberThe emulator has 4 floppy drives, numbered 0 to 3. Pick which drive you want to operate
insert_disk()
Insert a virtual floppy disk in the virtual floppy drive.
RamigaFloppyDrive$insert_disk(disk, write_protected = TRUE)
diskA floppy disk represented by a RamigaImage class object.
write_protectedlogical value indicating whether the
inserted disk needs to be write protected. Default is TRUE
eject_disk()
Eject a virtual floppy disk from the virtual drive
RamigaFloppyDrive$eject_disk(delay = 0)
delayDelay for ejecting the disk counted in CPU cycles.
get_info()
Get information about the floppy drive
RamigaFloppyDrive$get_info()
Returns a named list with information
print()
Prints some basic information about the floppy drive
RamigaFloppyDrive$print(...)
...Ignored
clone()
The objects of this class are cloneable with this method.
RamigaFloppyDrive$clone(deep = FALSE)
deepWhether to make a deep clone.
A virtual device represented by an image.
new()
Initialise an image from a disk image file.
RamigaImage$new(path)
pathFile pointing to disk image file.
info()
Get information about the image.
RamigaImage$info()
Returns a named list with information
size()
Get the size of the device represented by the image.
RamigaImage$size()
Returns the size of the image in bytes.
get_pointer()
Get the pointer to the image object in memory
RamigaImage$get_pointer(...)
...Ignored.
Returns the externalptr pointing to the C++ class
instance in memory.
is_formatted()
Determines if there is a file system present.
RamigaImage$is_formatted()
Returns logical indicating if disk contains a file system.
get_file_system()
Get a file system from a virtual device if present
RamigaImage$get_file_system(...)
...Ignored.
Returns a RamigaFileSystem class object
print()
Print some basic information about the device
RamigaImage$print(...)
...Ignored.
clone()
The objects of this class are cloneable with this method.
RamigaImage$clone(deep = FALSE)
deepWhether to make a deep clone.
The RamigaMemory class represents the memory of the emulated machine. Use this object to interact with the machines memory.
ramiga::RamigaComponent -> RamigaEmulator
load_rom()
Load an operating system to ROM. It can be an official Kickstart ROM image, or the rom provided for AROS Research Operating System.
RamigaMemory$load_rom(path)
pathFile path pointing to the location of the ROM file.
Returns the updated RamigaMemory object.
load_rom_extension()
Load an extension to a ROM file.
RamigaMemory$load_rom_extension(path)
pathFile path pointing to the location of the ROM extension file.
Returns the updated RamigaMemory object.
has_rom()
Check if a ROM image was successfully loaded
RamigaMemory$has_rom()
Returns a logical value.
get_rom_traits()
Get ROM characteristics if known.
RamigaMemory$get_rom_traits()
Returns NULL if no ROM has been loaded. It will return
A named list with ROM traits otherwise.
get_config()
Get details on the configuration of the emulated memory
RamigaMemory$get_config()
Returns a named list with memory configurations.
print()
Print some basic information about the emulated memory.
RamigaMemory$print(...)
...Ignored.
clone()
The objects of this class are cloneable with this method.
RamigaMemory$clone(deep = FALSE)
deepWhether to make a deep clone.
A class to capture output from the Amiga emulator (RamigaEmulator class).
ramiga::RamigaComponent -> RamigaOutput
capture_video_frame()
Captures the current pixel information as sent to the monitor of the virtual device.
RamigaOutput$capture_video_frame(file, ...)
fileA path to a png file where to store the captured frame.
...Ignored
If file is missing it returns a grDevices::as.raster() object.
Otherwise, it will save it as png file to the specified path and returns
nothing.
capture_audio_buffer()
Capture the audio that is currently on the output buffer. While the emulator is running, audio is continuously generated and stored in a ring buffer. Use this function to collect data in this buffer. It can only be read once and the buffer has a limited capacity.
RamigaOutput$capture_audio_buffer(file, ...)
fileA file path to store the audio (RIFF wav format).
...Ignored
If file is omitted, the audio data is returned as
a matrix of numeric values. It returns 2 rows (for both
stereo channels). The number of columns correspond with the
number of samples available from the buffer. The waveform
is scaled between -1 and +1, such that it can be played
directly with audio::play().
print()
Prints basic information about the emulator output.
RamigaOutput$print(...)
...Ignored
clone()
The objects of this class are cloneable with this method.
RamigaOutput$clone(deep = FALSE)
deepWhether to make a deep clone.
Helper function to write stereo audio to a WAV file.
save_wav(samples, path, rate = 44100L)save_wav(samples, path, rate = 44100L)
samples |
A |
path |
Path of the file where the audio needs to be stored |
rate |
Sample rate. Defaults to 44100L |
Nothing