Amiga Bootblock
The Motorola 68000
The Motorola 68000 is a 16/32-bit processor introduced in 1979. It was very popular in 80s computers, notably:
- The first Sun Microsystems workstation, Sun-1 (1982)
- The Apple Lisa (1983)
- The Silicon Graphics IRIS 1000 (1984)
- The Atari ST (1985), one of the most prominent computers used for home music production.
- The Sharp X68000 (1987), notable for its great Capcom arcade ports.
It was also a popular CPU for arcade games:
- Sega's arcade hardware platform, System 16 (1985), known for Shinobi, Golden Axe, Altered Beast.
- Capcom's arcade system, CP System II (1993), known for Super Street Fighter II, the Street Fighter Alpha series, Darkstalkers, and Marvel vs. Capcom.
- SNK's 1990 arcade platform Neo Geo (1990), with games such as Metal Slug, Fatal Fury, King of Fighters, Samurai Shodown
And of course, it was the CPU of the SEGA Genesis.
The first generation Commodore Amigas feature a MC68000 running at 7 MHz.
Tools
You'll only need two tools to create an disk image with an Amiga bootblock.
You'll need the open source assembler vasm built with Motorola-style syntax (vasmm68k_mot.exe
).
The second tool needed is genboot which generates an ADF disk file with correct checksum from an assembled binary.
Hello World
_start:
dc.b 'D','O','S',0 ; disk type
dc.l 0 ; checksum placeholder
dc.l 880 ; root block
; Because this is a bootblock, we will have ExecBase in a6 here
clr.w d0
loop:
addq.w #1,d0
move.w d0,$dff180 ; flash screen
cmp.w #$fff,d0
bne loop
clr.w d0
bra loop
Making an ADF
First we assemble our program:
vasmm68k_mot demo.asm -Fbin -o demo.bin
Then we generate the ADF:
genboot demo.bin demo.adf
which should generate output like this:
genboot 1.0 (c) 2024 Nameless Algorithm
Read 32 bytes from 'demo.bin'
0000: 444f5300 00000000 00000370 42405240 33c000df f180b07c 0fff66f2 424060ee
Checksum: 13deef01
Opening 'demo.adf' for writing...
Success: Wrote 901120 bytes, expected 901120.
the computed checksum is inserted at the offset $04 (the 'checksum placeholder' in our example code), and then the file is padded to the expected size for an Amiga floppy disk, 901120 bytes (= 880 KB).
This ADF file can now be loaded in an Amiga emulator such as WinUAE.