Chris Collins

Tools · retro

Amiga dev bench

Write 68000 assembly, build it with the real vasm assembler and vlink linker compiled to WebAssembly, and boot it on an emulated Amiga 500 (vAmiga) with the free AROS Kickstart, or your own ROM. Includes examples, a listing, a hunk view, downloadable ADFs, and the vAmiga debugger.

Added

Works with

How to use it

A complete small Amiga toolchain running in your browser:

  • vasm (Volker Barthelmann and Frank Wille’s assembler, 68000–68060, Motorola syntax) builds an object file.

  • vlink (Frank Wille’s linker) turns it into an AmigaDOS executable.

  • The dev bench puts that program on a bootable 880 KB floppy with an s/startup-sequence that runs it.

  • vAmiga (Dirk Hoffmann’s cycle-exact Amiga emulator, in the vAmigaWeb build) boots the disk.

Nothing is installed and nothing is sent anywhere. The assembler and linker are about 0.8 MB together. They load when you first build; the emulator (about 10 MB) loads when you first run. After the first visit, both come from the browser’s cache.

Writing and building

Pick an example to start from, or type your own main.s:

  • Hello, Amiga uses dos.library to print to the boot console.

  • Copper rainbow takes over the display and changes COLOR00 on every scan line.

  • Sprite bounce moves hardware sprite 0 over a copper-gradient sky by rewriting its control words each frame.

  • Bootblock intro is a raw 1 KB bootblock that runs before AmigaDOS starts.

The system-takeover examples give the machine back cleanly when you press the left mouse button.

Keys and buttons:

  • Build (Ctrl/Cmd+B) assembles and links.

  • Build & run (Ctrl/Cmd+Enter) also inserts the disk in DF0 and resets the Amiga.

  • Tab inserts a real tab.

  • ⛶ Full screen (or F when you are not typing) gives the editor and the Amiga the whole screen, side by side on a wide screen and the Amiga above the editor on a phone — the browser’s full screen where it is allowed, otherwise a full-window layer (iPhone). Escape leaves (when the Amiga has the mouse, the first Escape releases it).

Errors and warnings are listed under the editor and marked in the line numbers; click one to jump to its line. Errors inside a macro or an include file are reported against the line in main.s that used it.

  • Executable mode: vasmm68k_mot -Fhunk then vlink -bamigahunk. Sections keep their memory type, so section name,data_c and bss_c land in chip RAM. The custom chips (copper, blitter, sprites, bitplanes, audio) can only read chip RAM.

  • Bootblock mode: vasmm68k_mot -Fbin. The code must start with dc.b "DOS",0, a checksum long and the root block (880). The dev bench calculates the checksum and writes the 1024 bytes to the first two blocks of a fresh OFS disk.

  • Strip symbols passes -s to vlink; No optimisation passes -no-opt to vasm. The CPU selector passes -m68020 and so on.

The tabs below the editor show:

  • Build output: the exact command lines and the tools' messages.

  • Listing: addresses and the generated code for every source line.

  • Hunks: each hunk’s type, memory, size, relocation count and symbols.

  • Includes: the files every build can include, listed below.

devbench.i

Everything below, plus CALLEXEC, CALLLIB, WAITMOUSE and WAITVB macros.

lvo/exec_lib.i and the other library files

_LVO… offsets for exec, dos, graphics, intuition, layers, diskfont, utility, icon, gadtools, asl, expansion, keymap, lowlevel and the maths libraries, generated from the AmigaOS 3.2 NDK SFD files.

hardware/custom.i

Every custom chip register offset from $DFF000, in upper and lower case.

hardware/dmabits.i, hardware/intbits.i

DMAF_… and INTF_… bits.

exec/memory.i, dos/dos.i, graphics/gfxbase.i, exec/execbase.i

The constants and structure offsets the examples use.

These are short, self-written stand-ins, not the Commodore/Hyperion NDK headers.

Running

The emulated machine is an Amiga 500 (OCS, 68000, 512 KB chip and 512 KB slow RAM). It boots the AROS Kickstart replacement, a free, open-source re-implementation of the Amiga ROM. Most system-friendly programs and most hardware-banging code run on it. Some games and demos expect Commodore’s exact ROM.

If you own a Kickstart ROM (for example from Amiga Forever), choose Choose my ROM file…. The ROM is kept in this browser’s local storage (IndexedDB) and is never uploaded. Forget my ROM removes it.

  • Insert disk… boots any ADF, ADZ, DMS, or a zipped disk image.

  • Fast boot runs the emulator at full speed for the first few seconds after a reset.

  • Keys = joystick 2 maps the cursor keys and fire to a joystick in port 2.

  • Click the Amiga’s screen to give it the mouse; Esc releases it.

  • Screenshot saves the current frame as a PNG.

Debugging

The Debugger tab is vAmiga’s RetroShell debugger:

  • r cpu shows the registers, d disassembles, m dumps memory, os tasks lists AmigaOS tasks.

  • break, s and n set breakpoints and step.

  • ? copper and similar commands inspect a chip. help lists everything.

Find my program in memory searches RAM for each of your hunks and reports where AmigaDOS loaded them. It matches bytes that relocation leaves unchanged. It then disassembles your code at that address.

Credits and licences

  • vasm © Volker Barthelmann and Frank Wille; vlink © Frank Wille. Both are built unmodified from the official release archives and distributed for non-commercial use under their licences: vasm, vlink, source and build details. Code you assemble for AmigaOS/68k may be used and sold freely.

  • vAmiga © Dirk Hoffmann (core, Mozilla Public License 2.0); vAmigaWeb © mithrendal and contributors (GNU GPL v3, licence). The build here is compiled from their published source; the complete corresponding source, including the build script, is at geekychris/vAmigaWeb (details on the source page).

  • AROS ROM © The AROS Development Team, under the AROS Public License.

Sharing

Share link copies a link with the source and build options (?src=, ?mode=exe|boot, ?cpu=, ?strip=, ?noOpt=, ?turbo=, ?joy=); longer programs are packed into ?s=. Opening it loads the program into the editor — press Build & run. Your own Kickstart ROM never travels in a link.

Runs entirely in your browser; nothing you type leaves this page.