loading...
All Amiga articles | Back to top

Amiga Bootblock

The Motorola 68000

Amiga 1000 (1985)

The Motorola 68000 is a 16/32-bit processor introduced in 1979. It was very popular in 80s computers, notably:

It was also a popular CPU for arcade games:

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

Our minimal demo
_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.