Amiga
AmigaOS only (--target m68k-amigaos)
Programming the Amiga’s custom chips directly (only for amigaos targets): taking the machine over from the
operating system and giving it back, waiting for the vertical blank, chip memory, the copper and the mouse button
(Hardware); bitmaps, the blitter, copper lists, sprites and a screen to draw on (Screen, Bitmap, Blitter,
CopperList, Sprite).
using Amiga;
Hardware.TakeOver(); // the OS stops drawing; DMA and interrupts are oursHardware.StartCopper(list); // a copper list in chip memory (Hardware.AllocChip)while (!Hardware.LeftMouseButton()){ Hardware.WaitVBlank(); ... // Hardware.Write(Custom.COLOR00, 0x0F00), ...}Hardware.Restore(); // the OS display, DMA and interrupts are backThe registers are written with volatile accesses (Memory.VolatileWrite), so every write reaches the chips.
| Type | Description |
|---|---|
Bitmap |
A picture in chip memory: Depth bitplanes of Width x Height pixels, one after the other (plane p starts at Plane(p)). |
SystemFont |
The font of the system (GfxBase->DefaultFont, in ROM): Topaz 8, or the one set in the preferences. |
Blitter |
The blitter: draws into chip memory while the CPU goes on. |
CopperList |
A copper list in chip memory: MOVEs to the custom chip registers and WAITs for raster lines. |
Sprite |
A hardware sprite: 16 pixels wide, as high as needed, three colors (sprites 0 and 1 use the colors 17-19, 2 and 3 21-23, 4 and 5 25-27, 6 and 7 29-31). |
Screen |
A low resolution PAL screen: a bitmap (two with double buffering) shown by a copper list that also sets the palette and the sprites. |
Hardware |
Direct access to the custom chips: registers, taking the machine over, the vertical blank, chip memory and the mouse button. |
Custom |
The custom chip registers: their offsets from 0xDFF000, for Hardware.Write, Hardware.Read and copper lists (CopperList.Move). |
Constants
Section titled “Constants”| Name | Description |
|---|---|
DmaSet |
The bit of Custom.DMACON that switches the given channels on (otherwise off). |
DmaMaster |
DMACON: all DMA (the master switch). |
DmaBitplanes |
DMACON: the bitplanes. |
DmaCopper |
DMACON: the copper. |
DmaBlitter |
DMACON: the blitter. |
DmaSprites |
DMACON: the sprites. |
MemChip |
Hardware.AllocChip: chip memory (MEMF_CHIP), which the custom chips can reach. |
MemClear |
Memory that is cleared (MEMF_CLEAR). |
DmaSet
Section titled “DmaSet”const int DmaSet = 32768The bit of Custom.DMACON that switches the given channels on (otherwise off).
Since 0.15
DmaMaster
Section titled “DmaMaster”const int DmaMaster = 512DMACON: all DMA (the master switch).
Since 0.15
DmaBitplanes
Section titled “DmaBitplanes”const int DmaBitplanes = 256DMACON: the bitplanes.
Since 0.15
DmaCopper
Section titled “DmaCopper”const int DmaCopper = 128DMACON: the copper.
Since 0.15
DmaBlitter
Section titled “DmaBlitter”const int DmaBlitter = 64DMACON: the blitter.
Since 0.15
DmaSprites
Section titled “DmaSprites”const int DmaSprites = 32DMACON: the sprites.
Since 0.15
MemChip
Section titled “MemChip”const int MemChip = 2Hardware.AllocChip: chip memory (MEMF_CHIP), which the custom chips can reach.
Since 0.15
MemClear
Section titled “MemClear”const int MemClear = 65536Memory that is cleared (MEMF_CLEAR).
Since 0.15