Skip to content

Libretro Core

Dimitris Panokostas edited this page Nov 19, 2026 · 5 revisions

Libretro Core

Amiberry also builds as a libretro core for RetroArch-compatible frontends. This page covers core-specific loading behavior; controller hotkeys are documented separately in RetroArch Commands.

Content types

The core advertises these loadable extensions to the frontend:

adf, adz, dms, fdi, raw, ipf, hdf, hdz, lha, lzh, zip, 7z, uae, rp9, m3u, m3u8, iso, cue, ccd, nrg, mds, chd

Zip and 7z archives holding floppy images appear in the frontend's Disc Control menu as one entry per image, sorted by name, so multi-disk games can be swapped without an m3u playlist. The first image is inserted at start. If you browse into the archive and pick a file, the core inserts that file and still lists the other images in the archive. An archive without floppy images is passed to the emulator unchanged.

RP9 packages (.rp9) can be loaded directly — the core parses the embedded manifest and applies hardware configuration automatically, just like the standalone GUI build. Use your frontend's content browser to select an .rp9 file.

WHDLoad

WHDLoad .lha content can be loaded directly by the core. The core uses the frontend save directory for writable data, and prepares the WHDLoad save folders there.

Make sure the required WHDLoad boot files are available in the frontend system directory or bundled with the core package. The core checks the frontend system and save directories when setting up the Amiberry runtime paths.

Kickstart ROMs and rom.key

Put Kickstart ROMs where your frontend exposes them as the libretro system directory. The core also checks common Kickstarts and whdboot/save-data/Kickstarts subdirectories under the frontend system/save paths.

If your licensed ROM set uses Cloanto encryption, place rom.key alongside the ROMs. Current builds include rom.key in the libretro ROM scan so encrypted ROMs can be detected without a separate manual step.

Paths

The core maps the frontend save directory to AMIBERRY_HOME_DIR so writable Amiberry files stay under the frontend-managed save area. If the frontend does not provide a save directory, the core falls back to the system directory when possible.

Standalone path overrides from amiberry.conf are ignored in libretro builds, because host paths must stay derived from the frontend-provided directories.

Core options

The frontend lists the options in four categories: System, Input, Video and Audio. Options marked "restart" take effect when the core restarts, for example after reloading the content. The default is the first value unless the entry says otherwise.

System

Option Key Values Notes
System Model amiberry_model A500 (default), A500OG, A500+, A600, A1200OG, A1200, A4030, A4040, CD32, CD32FR, CDTV Amiga model and configuration preset. Restart.
Kickstart ROM amiberry_kickstart auto, kick.rom, kick13.rom, kick20.rom, kick31.rom, kick205.rom, kick40068.A1200, kick40068.A4000, cd32.rom, cdtv.rom Overrides the model's Kickstart file. Uses the system directory unless an absolute path is given. Restart.
CPU Model amiberry_cpu_model auto, 68000, 68010, 68020, 68030 auto uses the model's CPU. Restart.
Chipset amiberry_chipset auto, ocs, ecs auto uses the model's chipset. Shown for non-AGA models. Restart.
Chipset (AGA Models) amiberry_chipset_aga auto, ocs, ecs, aga Same, for the AGA models (A1200OG, A1200, A4030, A4040, CD32, CD32FR). Restart.
Floppy Speed amiberry_floppy_speed 0 (turbo), 100 (default, 1x), 200, 400, 800 Floppy drive speed multiplier.

The amiberry_model presets are:

Value Configuration
A500 512K Chip + 512K Slow, OCS, Kickstart 1.3
A500OG 512K Chip, OCS, Kickstart 1.2
A500+ 1MB Chip, ECS
A600 2MB Chip + 8MB Fast, ECS
A1200OG 2MB Chip, AGA
A1200 2MB Chip + 8MB Fast, AGA
A4030, A4040 A4000 with a 68030 or 68040, 2MB Chip + 8MB, AGA
CD32 2MB Chip, AGA
CD32FR CD32 with 8MB Fast, AGA
CDTV 1MB Chip, ECS

Input

Option Key Values Notes
Port 1 Device amiberry_port0_device mouse (default), joystick Device on Amiga port 1.
Port 2 Device amiberry_port1_device joystick (default), mouse Device on Amiga port 2.
Swap Ports amiberry_swap_ports disabled, enabled Swaps the devices between port 1 and port 2.
Joyport Order amiberry_joyport_order auto, 21, 12 Order that maps frontend controller ports to Amiga ports.
Joystick Deadzone amiberry_joy_deadzone 33 (default), 25, 20, 15, 10, 5, 0, 40, 50 Analog deadzone in percent.
Analog Sensitivity amiberry_analog_sensitivity 18 (default), 15, 20, 25, 30, 10 Analog stick sensitivity.
Analog Input amiberry_analog enabled, disabled Analog input mapping.
Joystick As Mouse amiberry_joy_as_mouse disabled, port1, port2, both The left analog stick of the selected port's controller moves the Amiga mouse in port 1, and L/R act as the left and right mouse buttons. Needs Analog Input on and a mouse in port 1.
Input Log File amiberry_input_log disabled, enabled Writes input events to a log file in the save directory.

Video

Option Key Values Notes
Video Standard amiberry_video_standard auto, pal, ntsc PAL (50 Hz) or NTSC (60 Hz) timing. auto uses the model's default. Restart.
Internal VSync amiberry_internal_vsync disabled, standard, standard_50 See below.
Crop Overscan amiberry_crop_overscan disabled, enabled, small, medium, large, extra See below.
On-Screen Status Line amiberry_statusline disabled, enabled See below.
On-Screen Status Line Size amiberry_statusline_size 1x, 2x, 3x, 4x Scale of the status line.
On-Screen Keyboard amiberry_on_screen_keyboard disabled, enabled See below.

Internal VSync

With standard or standard_50 (shown as "Standard" and "Standard (50Hz)"), the core leaves frame pacing to the frontend. It shows a frame and continues when the frontend calls retro_run() again. Use it when the frontend syncs to a display that runs at the Amiga's refresh rate, 50 Hz for PAL or 60 Hz for NTSC. With disabled, the core waits for its own frame deadline.

Before Amiberry 8.6.0 the core also waited for its own frame deadline with this option on. On a display locked to the Amiga's rate the two clocks drifted apart and games could run at half speed.

Crop overscan

Trims the overscan border of the native Amiga picture. It has no effect in RTG (Picasso96) screens, which are never cropped. This is independent of the standalone GUI's "Auto Crop" setting.

Value Label Result
disabled Disabled Shows the full picture, including the overscan border.
enabled Automatic Detects the drawn area of the picture and crops to it.
small Fixed 320x256 Centered crop, the loosest of the fixed sizes.
medium Fixed 320x240 Tighter centered crop.
large Fixed 320x200 Tighter again.
extra Fixed 320x180 The tightest centered crop.

The fixed sizes suit games whose display size changes during play, where the automatic crop would keep resizing the picture.

On-screen status line

Draws the Amiberry status line at the bottom of the picture, with the power, floppy, hard drive and CD activity LEDs and the disk insert and eject messages, as in the standalone build. amiberry_statusline_size multiplies its size from 1x to 4x. Use a larger value on high-resolution output.

On-screen keyboard

Shows an on-screen Amiga keyboard at the bottom of the screen. A gamepad button shows and hides it, left stick (L3) by default. The D-pad or stick moves the focus and another button presses the focused key. A loaded .uae file can set a different toggle button, but only a button the frontend can send works. Any other value falls back to left stick.

Audio

Option Key Values Notes
Audio Rate (Hz) amiberry_audio_rate auto, 44100, 48000 Sample rate. auto uses the default. Restart.
Audio Interpolation amiberry_audio_interpolation auto, none, anti, sinc Resampling method, shown as Off, Anti-alias and Sinc. Restart.
Sound Filter amiberry_sound_filter off, emulated, on Amiga audio low-pass filter. emulated follows the A500 hardware filter, on keeps it always on.
Stereo Separation amiberry_stereo_separation 0 to 10, default 7 0 is mono, 7 is the Amiga's hard-panned output, 10 is full stereo.
MIDI Output amiberry_midi_output disabled, libretro, munt_mt32, munt_cm32l Only in builds with MIDI support. libretro sends MIDI through the frontend's MIDI driver (RetroArch: Settings > Audio > MIDI). The Munt values need a build with the MT-32 emulation and the ROM files in system/mt32-roms/.

Building the core into another program

libretro/Makefile can build the core as a static archive for a program that drives it through the libretro API, instead of as a shared core for a frontend. Pass STATIC_LINKING=1 to build amiberry_libretro.a. These variables adjust the build:

Variable Effect
TARGET=<path> Names the output file.
OBJDIR=<dir> Puts the object files in <dir>, so one source tree can build several setups.
EXTRA_SOURCES=<files> The program's own .cpp and .c files, compiled with the core's flags.
NLOHMANN_JSON_INCLUDE=<dir> Folder that holds nlohmann/json.hpp, instead of downloading it into libretro/deps/.
CPPFLAGS, CFLAGS, CXXFLAGS Added to every compile.
NO_JIT=1 Leaves out the JIT. 64-bit x86 builds always leave it out.
NO_STD_THREAD=1 For hosts without std::thread. CHD work queues run their work on the thread that queues it.
NO_HOST_SIGNALS=1 Installs no fault or SIGTERM handlers.
NO_CHD_SPECIAL_FILES=1 CHD's file layer opens every name as a file, with no socket., domain. or pty names. Not for platform=win.

libretro/amiberry_embed.h declares amiberry_libretro_set_extra_args(). It appends command-line arguments to the ones the core builds from its options and the content, so they take precedence. Call it before retro_load_game(). The core renders sound at the rate retro_get_system_av_info() reports, 44100 Hz unless amiberry_audio_rate is 48000. A program that plays the samples without resampling must set the option to its device's rate.

GDB remote debugging

The core includes the same GDB remote server as the desktop builds. Enable it with the debugging_features and gdb_port options in the loaded .uae file, then connect from the host with a GDB client. See GDB Remote Debugging.

Clone this wiki locally