You are on page 1of 1

View Options

Default Dark
Simple (Hide this menu)
Print Mode (white background)

Top Menu
***Main Menu***
68000 Assembly programming for the The Commodore Amiga (500) Youtube channel
Forum
The Amiga was the first hugely popular 16 bit home computer, and was the envy of all the 8 bit owners in AkuSprite Editor
the 80's and early 90's...
Dec/Bin/Hex/Oct/Ascii Table
With graphics closer to the arcade, and impressive digital sound, the Amiga dominated home computing
until the 486's stared to give the PC superior power... while often graphically comparable to the Atari ST... Z80 Content
the Amiga's superior sound... with 4 PCM channels brought high quality music to games and amateur ***Z80 Tutorial List***
musicians Learn Z80 Assembly
Specs: Hello World
Amiga 500 Advanced Series
Cpu 7mhz 68000 Multiplatform Series
Platform Specific Series
Ram 512k1MB
ChibiAkumas Series
Vram 1MB Grime Z80
Resolution 320x240 32 color Z80 Downloads
Bitmap planes 6 bitplanes with multiple options eg... 2 x 8 color 1x32 color Z80 Cheatsheet
Max Sprites 8 hardware sprites - 16x?? - 4 color Sources.7z
Sound chip 4 channel PCM DevTools kit
Z80 Platforms
Amstrad CPC
Useful Documents Elan Enterprise
Amiga Hardware Ref Manual - The best hardware document I've found Gameboy & Gameboy Color
Master System & GameGear
ChibiAkumas Tutorials MSX & MSX2
Sam Coupe
Lesson P6 - Bitmap Functions on the Amiga TI-83
Lesson P12 - Joystick Reading on the Amiga ZX Spectrum
Spectrum NEXT
Lesson P17 - Palette Definitions on the Amiga
Camputers Lynx
Lesson P23 - Sound on the Amiga
Lesson P28 - Hardware Sprites on the Amiga
6502 Content
***6502 Tutorial List***
Learn 6502 Assembly
Advanced Series
Platform Specific Series
Palette Definitions Hello World Series
Grime 6502
Palette definitions on the Amiga are performed by writing to memory registers between
6502 Downloads
$DFF180 and $DFF1BE
F E D C B A 9 8 7 6 5 4 3 2 1 0 6502 Cheatsheet
Definitions can be performed by writing a word to these registers, with 4 bits per channel Sources.7z
- - - - R3 R2 R1 R0 G3 G2 G1 G0 B3 B2 B1 B0
in the format shown to the right DevTools kit
There are a set of 32 words between $DFF180 and $DFF1BE, NAME ADD DFFnnn FUNCTION
6502 Platforms
COLOR00 180 Color table 00 Apple IIe
We don't actually set these directly, we want to change them within our copperlist! COLOR01 182 Color table 01 Atari 800 and 5200
COLOR02 184 Color table 02 Atari Lynx
COLOR03 186 Color table 03
BBC Micro
COLOR04 188 Color table 04
COLOR05 18A Color table 05
Commodore 64
COLOR06 18C Color table 06 Commander x16
COLOR07 18E Color table 07 Super Nintendo (SNES)
COLOR08 190 Color table 08 Nintendo NES / Famicom
COLOR09 192 Color table 09 PC Engine (Turbografx-16)
COLOR10 194 Color table 10
Vic 20
COLOR11 196 Color table 11
COLOR12 198 Color table 12
COLOR13 19A Color table 13 68000 Content
COLOR14 19C Color table 14 ***68000 Tutorial List***
COLOR15 19E Color table 15
Learn 68000 Assembly
COLOR16 1A0 Color table 16
Hello World Series
COLOR17 1A2 Color table 17 ... Sprite 0/1 Color 1
COLOR18 1A4 Color table 18 ... Sprite 0/1 Color 2 Platform Specific Series
COLOR19 1A6 Color table 19 ... Sprite 0/1 Color 3 Grime 68000
COLOR20 1A8 Color table 20 68000 Downloads
COLOR21 1AA Color table 21 ... Sprite 2/3 Color 1 68000 Cheatsheet
COLOR22 1AC Color table 22 ... Sprite 2/3 Color 2
Sources.7z
COLOR23 1AE Color table 23 ... Sprite 2/3 Color 3
COLOR24 1B0 Color table 24
DevTools kit
COLOR25 1B2 Color table 25 ... Sprite 4/5 Color 1 68000 Platforms
COLOR26 1B4 Color table 26 ... Sprite 4/5 Color 2 Amiga 500
COLOR27 1B6 Color table 27 ... Sprite 4/5 Color 3 Atari ST
COLOR28 1B8 Color table 28 Neo Geo
COLOR29 1BA Color table 29 ... Sprite 6/7 Color 1
Sega Genesis / Mega Drive
COLOR30 1BC Color table 30 ... Sprite 6/7 Color 2
COLOR31 1BE Color table 31 ... Sprite 6/7 Color 3
Sinclair QL
X68000 (Sharp x68k)

Memory Map 8086 Content


From To Description Learn 8086 Assembly
256K Chip RAM (A1000 Chip RAM,1st 256K for Platform Specific Series
000000 03FFFF
A500/A2000) Hello World Series
040000 07FFFF 256K bytes of Chip RAM (2nd 256K for A500/A2000) 8086 Downloads
080000 0FFFFF 512K Extended chip RAM (to 1 MB for A2000). 8086 Cheatsheet
100000 1FFFFF Reserved. Do not use. Sources.7z
200000 9FFFFF Primary 8 MB Auto-config space . DevTools kit
A00000 BEFFFF Reserved. Do not use. 8086 Platforms
BFD000 BFDF00 8520-B (access at even-byte addresses only) Wonderswan
BFE001 BFEF01 8520-A (access at odd-byte addresses only) MsDos
C00000 DFEFFF Reserved. Do not use.
C00000 D7FFFF Internal expansion (slow) memory (on some systems). ARM Content
D80000 DBFFFF Reserved. Do not use. Learn ARM Assembly
DC0000 DCFFFF Real time clock (not accessable on all systems). Platform Specific Series
DFF000 DFFFFF Chip registers. ARM Downloads
E00000 E7FFFF Reserved. Do not use. ARM Cheatsheet
E80000 E8FFFF Auto-config space Sources.7z
E90000 EFFFFF Secondary auto-config space (usually 64K I/O boards). DevTools kit
F00000 FBFFFF Reserved. Do not use. ARM Platforms
FC0000 FFFFFF 256K System ROM. Gameboy Advance
Nintendo DS
Risc Os
"Chip Registers" System Registers appear in the memory address rage $DFF000-$DFFFFFF... However they will appear without the
$DFF prefix when used in command sequences for the "Copper" coprocesor Risc-V Content
Learn Risc-V Assembly
NAME ADD R/WD Chip Function Risc-V Downloads
BLTDDAT & *000 ER A Blitter destination early read (dummy address) Risc-V Cheatsheet
DMACONR *002 R AP DMA control (and blitter status) read Sources.7z
VPOSR *004 R A( E ) Read vert most signif. bit (and frame flop) DevTools kit
VHPOSR *006 R A Read vert and horiz. position of beam
DSKDATR & *008 ER P Disk data early read (dummy address) PDP-11 Content
JOY0DAT *00A R D Joystick-mouse 0 data (vert,horiz) Learn PDP-11 Assembly
JOY1DAT *00C R D Joystick-mouse 1 data (vert,horiz) PDP-11 Downloads
CLXDAT *00E R D Collision data register (read and clear) PDP-11 Cheatsheet
ADKCONR *010 R P Audio, disk control register read Sources.7z
POT0DAT *012 R P( E ) Pot counter pair 0 data (vert,horiz) DevTools kit
POT1DAT *014 R P( E ) Pot counter pair 1 data (vert,horiz)
POTGOR *016 R P Pot port data read (formerly POTINP)
TMS9900 Content
SERDATR *018 R P Serial port data and status read Learn TMS9900 Assembly
DSKBYTR *01A R P Disk data byte and status read TMS9900 Downloads
INTENAR *01C R P Interrupt enable bits read
TMS9900 Cheatsheet
INTREQR *01E R P Interrupt request bits read
Sources.7z
DSKPTH + *020 W A( E ) Disk pointer (high 3 bits, 5 bits if ECS)
DevTools kit
DSKPTL + *022 W A Disk pointer (low 15 bits)
TMS9900 Platforms
DSKLEN *024 W P Disk length
Ti 99
DSKDAT & *026 W P Disk DMA data write
REFPTR & *028 W A Refresh pointer
VPOSW *02A W A Write vert most signif. bit (and frame flop) 6809 Content
Learn 6809 Assembly
VHPOSW *02C W A Write vert and horiz position of beam
6809 Downloads
COPCON *02E W A( E ) Coprocessor control register (CDANG)
6809/6309 Cheatsheet
SERDAT *030 W P Serial port data and stop bits write
Sources.7z
SERPER *032 W P Serial port period and control
DevTools kit
POTGO *034 W P Pot port data write and start
6809 Platforms
JOYTEST *036 W D Write to all four joystick-mouse counters at once
Dragon 32/Tandy Coco
STREQU & *038 S D Strobe for horiz sync with VB and EQU
Fujitsu FM7
STRVBL & *03A S D Strobe for horiz sync with VB (vert. blank)
TRS-80 Coco 3
STRHOR & *03C S DP Strobe for horiz sync
STRLONG & *03E S D( E ) Strobe for identification of long horiz. Line. Vectrex
BLTCON0 ~040 W A Blitter control register 0
BLTCON1 ~042 W A( E ) Blitter control register 1 My Game projects
BLTAFWM ~044 W A Blitter first word mask for source A Chibi Aliens
BLTALWM ~046 W A Blitter last word mask for source A Chibi Akumas
BLTCPTH + ~048 W A Blitter pointer to source C (high 3 bits)
BLTCPTL + ~04A W A Blitter pointer to source C (low 15 bits) Work in Progress
BLTBPTH + ~04C W A Blitter pointer to source B (high 3 bits) Learn 65816 Assembly
BLTBPTL + ~04E W A Blitter pointer to source B (low 15 bits) Learn eZ80 Assembly
BLTAPTH + ~050 W A( E ) Blitter pointer to source A (high 3 bits)
BLTAPTL + ~052 W A Blitter pointer to source A (low 15 bits) Misc bits
BLTDPTH + ~054 W A Blitter pointer to destination D (high 3 bits) Ruby programming
BLTDPTL + ~056 W A Blitter pointer to destination D (low 15 bits)
BLTSIZE ~058 W A Blitter start and size (window width,height)
BLTCON0L ~05A W A( E ) Blitter control 0, lower 8 bits (minterms)
BLTSIZV ~05C W A( E ) Blitter V size (for 15 bit vertical size)
BLTSIZH ~05E W A( E ) Blitter H size and start (for 11 bit H size)
BLTCMOD ~060 W A Blitter modulo for source C
BLTBMOD ~062 W A Blitter modulo for source B
BLTAMOD ~064 W A Blitter modulo for source A
BLTDMOD ~066 W A Blitter modulo for destination D Buy my Assembly programming book
on Amazon in Print or Kindle!
~068
~06A
~06C
~06E
BLTCDAT % ~070 W A Blitter source C data register
BLTBDAT % ~072 W A Blitter source B data register
BLTADAT % ~074 W A Blitter source A data register
~076
SPRHDAT ~078 W A( E ) Ext. logic UHRES sprite pointer and data id
~07A
DENISEID ~07C R D( E ) Chip revision level for Denise (video out chip)
DSKSYNC ~07E W P Disk sync pattern register for disk read
Coprocessor first location register (high 3 bits, high 5 Available worldwide!
COP1LCH + 80 W A( E ) Search 'ChibiAkumas' on
bits if ECS) your local Amazon website!
COP1LCL + 82 W A Coprocessor first location register (low 15 bits) Click here for more info!

Coprocessor second location register (high 3 bits, high


COP2LCH + 84 W A( E )
5 bits if ECS)
COP2LCL + 86 W A Coprocessor second location register (low 15 bits)
COPJMP1 88 S A Coprocessor restart at first location
COPJMP2 08A S A Coprocessor restart at second location
COPINS 08C W A Coprocessor instruction fetch identify
DIWSTRT 08E W A Display window start (upper left vert-horiz position)
DIWSTOP 90 W A Display window stop (lower right vert.-horiz. Position)
DDFSTRT 92 W A Display bitplane data fetch start (horiz. Position)
DDFSTOP 94 W A Display bitplane data fetch stop (horiz. position)
DMACON 96 W ADP DMA control write (clear or set)
CLXCON 98 W D Collision control
INTENA 09A W P Interrupt enable bits (clear or set bits)
INTREQ 09C W P Interrupt request bits (clear or set bits)
ADKCON 09E W P Audio, disk, UART control
AUD0LCH + 0A0 W A( E ) Audio channel 0 (L) location (high 3 bits, 5 if ECS)
AUD0LCL + 0A2 W A Audio channel 0 (L) location (low 15 bits)
AUD0LEN 0A4 W P Audio channel 0 (L) length
AUD0PER 0A6 W P( E ) Audio channel 0 (L) period
AUD0VOL 0A8 W P Audio channel 0 (L) volume
AUD0DAT & 0AA W P Audio channel 0 (L) data
0AC
0AE
AUD1LCH + 0B0 W A Audio channel 1 (R) location (high 3 bits)
AUD1LCL + 0B2 W A Audio channel 1 (R) location (low 15 bits)
AUD1LEN 0B4 W P Audio channel 1 (R) length
AUD1PER 0B6 W P Audio channel 1 (R) period
AUD1VOL 0B8 W P Audio channel 1 (R) volume
AUD1DAT & 0BA W P Audio channel 1 (R) data
0BC
0BE
AUD2LCH + 0C0 W A Audio channel 2 (L) location (high 3 bits)
AUD2LCL + 0C2 W A Audio channel 2 (L) location (low 15 bits)
AUD2LEN 0C4 W P Audio channel 2 (L) length
AUD2PER 0C6 W P Audio channel 2 (L) period
AUD2VOL 0C8 W P Audio channel 2 (L) volume
AUD2DAT & 0CA W P Audio channel 2 (L) data
0CC
0CE
AUD3LCH + 0D0 W A Audio channel 3 (R) location (high 3 bits)
AUD3LCL + 0D2 W A Audio channel 3 (R) location (low 15 bits)
AUD3LEN 0D4 W P Audio channel 3 (R) length
AUD3PER 0D6 W P Audio channel 3 (R) period
AUD3VOL 0D8 W P Audio channel 3 (R) volume
AUD3DAT & 0DA W P Audio channel 3 (R) data
0DC
0DE
BPL1PTH + 0E0 W A Bitplane 1 pointer (high 3 bits)
BPL1PTL + 0E2 W A Bitplane 1 pointer (low 15 bits)
BPL2PTH + 0E4 W A Bitplane 2 pointer (high 3 bits)
BPL2PTL + 0E6 W A Bitplane 2 pointer (low 15 bits)
BPL3PTH + 0E8 W A Bitplane 3 pointer (high 3 bits)
BPL3PTL + 0EA W A Bitplane 3 pointer (low 15 bits)
BPL4PTH + 0EC W A Bitplane 4 pointer (high 3 bits)
BPL4PTL + 0EE W A Bitplane 4 pointer (low 15 bits)
BPL5PTH + 0F0 W A Bitplane 5 pointer (high 3 bits)
BPL5PTL + 0F2 W A Bitplane 5 pointer (low 15 bits)
BPL6PTH + 0F4 W A Bitplane 6 pointer (high 3 bits)
BPL6PTL + 0F6 W A Bitplane 6 pointer (low 15 bits)
0F8
0FA
0FC
Recent New Content
0FE
Lesson P34 - Creating a game
BPLCON0 100 W AD( E ) Bitplane control register (misc. control bits) for the NeoGeo CD!
BPLCON1 102 W D Bitplane control reg. (scroll value PF1, PF2)
BPLCON2 104 W D( E ) Bitplane control reg. (priority control) Sprite Movement on the Dragon
BPLCON3 106 W D( E ) Bitplane control (enhanced features) 32- Simple 6502 ASM Lesson S1
BPL1MOD 108 W A Bitplane modulo (odd planes)
BPL2MOD 10A W A Bitplane modulo (even planes) Amiga - ASM PSET and POINT
10C for Pixel Plotting
10E
BPL1DAT & 110 W D Bitplane 1 data (parallel-to-serial convert) Learn 65816 Assembly: 8 and 16
bit modes on the 65816
BPL2DAT & 112 W D Bitplane 2 data (parallel-to-serial convert)
BPL3DAT & 114 W D Bitplane 3 data (parallel-to-serial convert) SNES - ASM PSET and POINT
BPL4DAT & 116 W D Bitplane 4 data (parallel-to-serial convert) for Pixel Plotting
BPL5DAT & 118 W D Bitplane 5 data (parallel-to-serial convert)
BPL6DAT & 11A W D Bitplane 6 data (parallel-to-serial convert) ARM Assembly Lesson H3
11C
11E Lesson P65 - Mouse reading on
SPR0PTH + 120 W A Sprite 0 pointer (high 3 bits) the Sam Coupe
SPR0PTL + 122 W A Sprite 0 pointer (low 15 bits)
Mouse Reading in MS-DOS
SPR1PTH + 124 W A Sprite 1 pointer (high 3 bits)
SPR1PTL + 126 W A Sprite 1 pointer (low 15 bits) Risc-V Assembly Lesson 3 - Bit
SPR2PTH + 128 W A Sprite 2 pointer (high 3 bits) ops and more maths!
SPR2PTL + 12A W A Sprite 2 pointer (low 15 bits)
SPR3PTH + 12C W A Sprite 3 pointer (high 3 bits) Mouse reading on the MSX
SPR3PTL + 12E W A Sprite 3 pointer (low 15 bits)
SPR4PTH + 130 W A Sprite 4 pointer (high 3 bits) Hello World on RISC-OS
SPR4PTL + 132 W A Sprite 4 pointer (low 15 bits)
Atari 800 / 5200 - ASM PSET and
SPR5PTH + 134 W A Sprite 5 pointer (high 3 bits)
POINT for Pixel Plotting
SPR5PTL + 136 W A Sprite 5 pointer (low 15 bits)
SPR6PTH + 138 W A Sprite 6 pointer (high 3 bits)
SPR6PTL + 13A W A Sprite 6 pointer (low 15 bits) Gaming + more:
SPR7PTH + 13C W A Sprite 7 pointer (high 3 bits)
SPR7PTL + 13E W A Sprite 7 pointer (low 15 bits) Emily The Strange (DS) - Live
SPR0POS % 140 W AD Sprite 0 vert-horiz start position data full playthrough
SPR0CTL % 142 W AD( E ) Sprite 0 vert stop position and control data
SPR0DATA % 144 W D Sprite 0 image data register A $150 calculator: Unboxing the
SPR0DATB % 146 W D Sprite 0 image data register B Ti-84 Plus CE (eZ80 cpu)
SPR1POS % 148 W AD Sprite 1 vert-horiz start position
SPR1CTL % 14A W AD Sprite 1 vert stop position and
SPR1DATA % 14C W D Sprite 1 image data register A
SPR1DATB % 14E W D Sprite 1 image data register B
SPR2POS % 150 W AD Sprite 2 vert-horiz start position data
SPR2CTL % 152 W AD Sprite 2 vert stop position and control data
SPR2DATA % 154 W D Sprite 2 image data register A
SPR2DATB % 156 W D Sprite 2 image data register B
SPR3POS % 158 W AD Sprite 3 vert-horiz start position data
SPR3CTL % 15A W AD Sprite 3 vert stop position and control data
SPR3DATA % 15C W D Sprite 3 image data register A
SPR3DATB % 15E W D Sprite 3 image data register B
SPR4POS % 160 W AD Sprite 4 vert-horiz start position data
SPR4CTL % 162 W AD Sprite 4 vert stop position and control data
SPR4DATA % 164 W D Sprite 4 image data register A
SPR4DATB % 166 W D Sprite 4 image data register B
SPR5POS % 168 W AD Sprite 5 vert-horiz start position data
SPR5CTL % 16A W AD Sprite 5 vert stop position and control data
SPR5DATA % 16C W D Sprite 5 image data register A
SPR5DATB % 16E W D Sprite 5 image data register B
SPR6POS % 170 W AD Sprite 6 vert-horiz start position data
SPR6CTL % 172 W AD Sprite 6 vert stop position and control data
SPR6DATA % 174 W D Sprite 6 image data register A
SPR6DATB % 176 W D Sprite 6 image data register B
SPR7POS % 178 W AD Sprite 7 vert-horiz start position data
SPR7CTL % 17A W AD Sprite 7 vert stop position and control data
SPR7DATA % 17C W D Sprite 7 image data register A
SPR7DATB % 17E W D Sprite 7 image data register B
COLOR00 180 W D Color table 00
COLOR01 182 W D Color table 01
COLOR02 184 W D Color table 02
COLOR03 186 W D Color table 03
COLOR04 188 W D Color table 04
COLOR05 18A W D Color table 05
COLOR06 18C W D Color table 06
COLOR07 18E W D Color table 07
COLOR08 190 W D Color table 08
COLOR09 192 W D Color table 09
COLOR10 194 W D Color table 10
COLOR11 196 W D Color table 11
COLOR12 198 W D Color table 12
COLOR13 19A W D Color table 13
COLOR14 19C W D Color table 14
COLOR15 19E W D Color table 15
COLOR16 1A0 W D Color table 16
COLOR17 1A2 W D Color table 17
COLOR18 1A4 W D Color table 18
COLOR19 1A6 W D Color table 19
COLOR20 1A8 W D Color table 20
COLOR21 1AA W D Color table 21
COLOR22 1AC W D Color table 22
COLOR23 1AE W D Color table 23
COLOR24 1B0 W D Color table 24
COLOR25 1B2 W D Color table 25
COLOR26 1B4 W D Color table 26
COLOR27 1B6 W D Color table 27
COLOR28 1B8 W D Color table 28
COLOR29 1BA W D Color table 29
COLOR30 1BC W D Color table 30
COLOR31 1BE W D Color table 31
HTOTAL 1C0 W A( E ) Highest number count, horiz line (VARBEAMEN=1)
HSSTOP 1C2 W A( E ) Horizontal line position for HSYNC stop
HBSTRT 1C4 W A( E ) Horizontal line position for HBLANK start
HBSTOP 1C6 W A( E ) Horizontal line position for HBLANK stop
VTOTAL 1C8 W A( E ) Highest numbered vertical line (VARBEAMEN=1)
VSSTOP 1CA W A( E ) Vertical line position for VSYNC stop
VBSTRT 1CC W A( E ) Vertical line for VBLANK start
VBSTOP 1CE W A( E ) Vertical line for VBLANK stop
1D0 Reserved
1D2 Reserved
1D4 Reserved
1D6 Reserved
1D8 Reserved
1DA Reserved
BEAMCON0 1DC W A( E ) Beam counter control register (SHRES,PAL)
HSSTRT 1DE W A( E ) Horizontal sync start (VARHSY)
VSSTRT 1E0 W A( E ) Vertical sync start (VARVSY)
HCENTER 1E2 W A( E ) Horizontal position for Vsync on interlace
DIWHIGH 1E4 W AD( E ) Display window -upper bits for start,

Copper list commands


copperlist commands can set a chip register, or wait for a particluar screen position

Word 1 Word 2
F EDCBA 9 8 7 6 5 4 3 2 10 F E DCBA 9 8 7 6 5 4 3 2 1 0 Command Details
Change Buy my Assembly programming book
0 0 0 0 0 0 0n n n n n n n n 0 DDDDDDDD DDDDDDDD n= address to Change ($DFFnnn) D=new data for address
setting on Amazon in Print or Kindle!

V=Vops H=Hpos v=Vpos Compare enable h=hpos compare


VVV V V V VV HHHHHHH1 vvvvvvvv hhhhhhh 1 wait for pos
enable

The copperlist should end with an infinite wait '#$fffffffe'

Hardware Sprites
There are 8 hardware sprites on the Amiga, Hardware Sprites are 16 pixels wide, and can be any
height... each sprite is 4 colors (2bpp), but Sprites 0&1, 2&3 etc Sample Sprite Data:
StartSprite0:
Hardware sprites use a set of pointers, pointing to a sprite table in 'Chip Ram'... this table defines a dc.w $804A,$8800
dc.w $0001,$0304
;Header
;Bitmap Data
series of XY positions and bitmap data, that are used by the sprite DMA to define the image... dc.w $0001,$0304
dc.w $0001,$0304 Available worldwide!
dc.w $0001,$0304 Search 'ChibiAkumas' on
The format of the header is as follows: dc.w $0001,$0304 your local Amazon website!
dc.w $0001,$0304 Click here for more info!
dc.w $0001,$0304
Bit F E D C B A 9 8 7 6 5 4 3 2 1 0 dc.w $0001,$0304
Word1 S S S S S S S S H H H H H H H H S=Start Vertical position, H=Horizontal position dc.w $A070,$A800 ;Header
Word2 E E E E E E E E A - - - - - - - E=End Vertical position, A=Attatch to prev sprite dc.w $0304,$0001,$0304 ;Bitmap Data
dc.w $0001,$0304
dc.w $0001,$0304
The end of each Sprite list ends 0,0 dc.w $0001,$0304
dc.w $0001,$0304
dc.w $0001,$0304
We need to define the pointers to the sprite data, we do this in the Copperlist in the following way: dc.w $0001,$0304
dc.w $0001
move.l #StartSprite0,d0 dc.w 0,0 ;End of Sprites
move.w #$0122,(a6)+ ; StartSprite0 pointer (low 15 bits)
StartSprite1:
move.w d0,(a6)+ dc.w $804A,$8880 ;header
swap d0 dc.w $0001,$0304 ;Bitmap Data
dc.w $0001,$0304
move.w #$0120,(a6)+ ; StartSprite0 pointer (high 3 bits) dc.w $0010,$0403
move.w d0,(a6)+ dc.w $0010,$0403
dc.w $0304,$0001,$0304
dc.w $0010,$0403
dc.w $0010,$0403
dc.w $0001
The pointer addresses for other sprites are shown in the table below, you should define all the dc.w 0,0 ;End of Sprites
sprites, even if they point to an empty list... StartSprite2: ;Unused Sprites
StartSprite3:
StartSprite4:
StartSprite5:
Once we've defined our sprites, we need to turn the sprite DMA on: StartSprite6:
StartSprite7:
dc.w 0,0 ;End of Sprites
move.w #%1000001000100000,DMACON ; DMA set ON - DMA control (and blitter status) read

Sprite Pointers
The hardware sprites are defined by the following Chip Registers

NAME ADD R/WD Chip Function


DMACON 96 W ADP DMA control write (clear or set)
SPR0PTH + 120 W A Sprite 0 pointer (high 3 bits)
SPR0PTL + 122 W A Sprite 0 pointer (low 15 bits)
SPR1PTH + 124 W A Sprite 1 pointer (high 3 bits)
SPR1PTL + 126 W A Sprite 1 pointer (low 15 bits)
SPR2PTH + 128 W A Sprite 2 pointer (high 3 bits)
SPR2PTL + 12A W A Sprite 2 pointer (low 15 bits)
SPR3PTH + 12C W A Sprite 3 pointer (high 3 bits)
SPR3PTL + 12E W A Sprite 3 pointer (low 15 bits)
SPR4PTH + 130 W A Sprite 4 pointer (high 3 bits)
SPR4PTL + 132 W A Sprite 4 pointer (low 15 bits)
SPR5PTH + 134 W A Sprite 5 pointer (high 3 bits)
SPR5PTL + 136 W A Sprite 5 pointer (low 15 bits)
SPR6PTH + 138 W A Sprite 6 pointer (high 3 bits)
SPR6PTL + 13A W A Sprite 6 pointer (low 15 bits)
SPR7PTH + 13C W A Sprite 7 pointer (high 3 bits)
SPR7PTL + 13E W A Sprite 7 pointer (low 15 bits)

Hardware Sprites Pixel data


The Sprites are always 16 pixels wide, and by default 2bpp (4 colors)... each line of the Sprite 0
sprite is made up of 2 words of data... Byte 1 Byte 2 Byte 3 Byte 4
Bits 15-8 Bits 7-0 Bits 15-8 Bits 7-0
The first Word is effectively the 1st bitplane of the sprite. Line 1
Bitplane 0 Bitplane 0 Bitplane 1 Bitplane 1
The second Word is effectively the 2st bitplane of the sprite. Bits 15-8 Bits 7-0 Bits 15-8 Bits 7-0
Line 2
Bitplane 0 Bitplane 0 Bitplane 1 Bitplane 1
The third word will be the 1st bitplane of the 2nd line - and so on!
� � � � �
If we attach Sprite 1 to Sprite 0 - we effectively increase it to 16 colors (4bpp) - adding an
extra 2 bit-planes to the sprite! Sprite 1 (when Attached)
Byte 1 Byte 2 Byte 3 Byte 4
Note: We can only attach pairs of sprites, 0+1, 2+3, 4+5 or 6+7... we cannot attach sprite Bits 15-8 Bits 7-0 Bits 15-8 Bits 7-0
0 to sprite 2! Line 1
Bitplane 2 Bitplane 2 Bitplane 3 Bitplane 3
Bits 15-8 Bits 7-0 Bits 15-8 Bits 7-0
Line 2
Bitplane 2 Bitplane 2 Bitplane 3 Bitplane 3
� � � � �
Recent New Content
Lesson P34 - Creating a game
for the NeoGeo CD!
4 color 2bpp Hardware Sprites Colors
4 color Hardware sprites use 3 colors from palette 17-31... color 0 is always transparent... the colors vary depending on the sprite number Sprite Movement on the Dragon
16 color sprites use colors 17-31 32- Simple 6502 ASM Lesson S1

Sprite number Palette numbers Amiga - ASM PSET and POINT


0, 1 17, 18, 19 for Pixel Plotting
2, 3 21, 22, 23
Learn 65816 Assembly: 8 and 16
4, 5 25, 26, 27
bit modes on the 65816
6, 7 28, 29, 30
SNES - ASM PSET and POINT
for Pixel Plotting

ARM Assembly Lesson H3


Sound ports on the Amiga
Lesson P65 - Mouse reading on
We need to use the Chip registers to control the sound, but unlike with the graphics, we're not going to use the Sam Coupe
the Copper Chip.
Mouse Reading in MS-DOS
When we specify the address of the sample, we need this to be in Chip ram (Defined with 'Section
ChipRAM,Data_c') Risc-V Assembly Lesson 3 - Bit
ops and more maths!
Address
Name Function Bits Details
$DFFnnn Mouse reading on the MSX
DMACON 096 DMA control write (clear or set) S-----E- ---DCBA S=Set/Clr E=enable ABCD=Channnels
AUD0LCH 0A0 Audio channel 0 (L) location (high 3 bits, 5 if ECS) -------- ---hhHHH Address H � Must be within CHIP ram! Hello World on RISC-OS
AUD0LCL 0A2 Audio channel 0 (L) location (low 15 bits) LLLLLLLL LLLLLLL- Address L � Must be within CHIP ram!
AUD0LEN 0A4 Audio channel 0 (L) length DDDDDDDD DDDDDDDD Data Length (in words) Atari 800 / 5200 - ASM PSET and
AUD0PER 0A6 Audio channel 0 (L) period PPPPPPPP PPPPPPPP Period (High number=Low Pitch) POINT for Pixel Plotting
AUD0VOL 0A8 Audio channel 0 (L) volume -------- --VVVVVV V=Volume (64=max)
AUD0DAT 0AA Audio channel 0 (L) data DDDDDDDD DDDDDDDD Data Gaming + more:
AUD1LCH 0B0 Audio channel 1 (R) location (high 3 bits) -------- ---hhHHH Address H � Must be within CHIP ram!
AUD1LCL 0B2 Audio channel 1 (R) location (low 15 bits) LLLLLLLL LLLLLLL- Address L � Must be within CHIP ram! Emily The Strange (DS) - Live
AUD1LEN 0B4 Audio channel 1 (R) length DDDDDDDD DDDDDDDD Data Length (in words) full playthrough
AUD1PER 0B6 Audio channel 1 (R) period PPPPPPPP PPPPPPPP Period (High number=Low Pitch)
AUD1VOL 0B8 Audio channel 1 (R) volume -------- --VVVVVV V=Volume (64=max) $150 calculator: Unboxing the
Ti-84 Plus CE (eZ80 cpu)
AUD1DAT 0BA Audio channel 1 (R) data DDDDDDDD DDDDDDDD Data
AUD2LCH 0C0 Audio channel 2 (L) location (high 3 bits) -------- ---hhHHH Address H � Must be within CHIP ram!
AUD2LCL 0C2 Audio channel 2 (L) location (low 15 bits) LLLLLLLL LLLLLLL- Address L � Must be within CHIP ram!
AUD2LEN 0C4 Audio channel 2 (L) length DDDDDDDD DDDDDDDD Data Length (in words)
AUD2PER 0C6 Audio channel 2 (L) period PPPPPPPP PPPPPPPP Period (High number=Low Pitch)
AUD2VOL 0C8 Audio channel 2 (L) volume -------- --VVVVVV V=Volume (64=max)
AUD2DAT 0CA Audio channel 2 (L) data DDDDDDDD DDDDDDDD Data
AUD3LCH 0D0 Audio channel 3 (R) location (high 3 bits) -------- ---hhHHH Address H � Must be within CHIP ram!
AUD3LCL 0D2 Audio channel 3 (R) location (low 15 bits) LLLLLLLL LLLLLLL- Address L � Must be within CHIP ram!
AUD3LEN 0D4 Audio channel 3 (R) length DDDDDDDD DDDDDDDD Data Length (in words)
AUD3PER 0D6 Audio channel 3 (R) period PPPPPPPP PPPPPPPP Period (High number=Low Pitch)
AUD3VOL 0D8 Audio channel 3 (R) volume -------- --VVVVVV V=Volume (64=max)
AUD3DAT 0DA Audio channel 3 (R) data DDDDDDDD DDDDDDDD Data
We're going to use Channel 0 and Channel 1 to make a 'mono sound...

As each channel is 16 bytes apart, we can specify the registers of Channel1 as Channel0's +16 - Eg: DFF0A2+16 for
DFF0B2

This will make it easier to see we're changing the equivalent setting of Channel 1 when we set both together.

Libraries
Offset
Category Offset Hex Meaning
Dec
exec 30 $ffe2 -$001e Supervisor(userFunction)(a5)
exec 36 $ffdc -$0024 ExitIntr()()
exec 42 $ffd6 -$002a Schedule()()
exec 48 $ffd0 -$0030 Reschedule()()
exec 54 $ffca -$0036 Switch()()
exec 60 $ffc4 -$003c Dispatch()()
exec 66 $ffbe -$0042 Exception()()
exec 72 $ffb8 -$0048 InitCode(startClass,version)(d0/d1)
exec 78 $ffb2 -$004e InitStruct(initTable,memory,size)(a1/a2,d0)
exec 84 $ffac -$0054 MakeLibrary(funcInit,structInit,libInit,dataSize,segList)
MakeFunctions(target,functionArray,funcDispBase)
exec 90 $ffa6 -$005a
(a0/a1/a2)
exec 96 $ffa0 -$0060 FindResident(name)(a1)
exec 102 $ff9a -$0066 InitResident(resident,segList)(a1,d1)
exec 108 $ff94 -$006c Alert(alertNum)(d7)
exec 114 $ff8e -$0072 Debug(flags)(d0)
exec 120 $ff88 -$0078 Disable()()
exec 126 $ff82 -$007e Enable()()
exec 132 $ff7c -$0084 Forbid()()
exec 138 $ff76 -$008a Permit()()
exec 144 $ff70 -$0090 SetSR(newSR,mask)(d0/d1)
exec 150 $ff6a -$0096 SuperState()()
exec 156 $ff64 -$009c UserState(sysStack)(d0)
exec 162 $ff5e -$00a2 SetIntVector(intNumber,interrupt)(d0/a1)
exec 168 $ff58 -$00a8 AddIntServer(intNumber,interrupt)(d0/a1)
exec 174 $ff52 -$00ae RemIntServer(intNumber,interrupt)(d0/a1)
exec 180 $ff4c -$00b4 Cause(interrupt)(a1)
exec 186 $ff46 -$00ba Allocate(freeList,byteSize)(a0,d0)
exec 192 $ff40 -$00c0 Deallocate(freeList,memoryBlock,byteSize)(a0/a1,d0)
exec 198 $ff3a -$00c6 AllocMem(byteSize,requirements)(d0/d1)
exec 204 $ff34 -$00cc AllocAbs(byteSize,location)(d0/a1)
exec 210 $ff2e -$00d2 FreeMem(memoryBlock,byteSize)(a1,d0)
exec 216 $ff28 -$00d8 AvailMem(requirements)(d1)
exec 222 $ff22 -$00de AllocEntry(entry)(a0)
exec 228 $ff1c -$00e4 FreeEntry(entry)(a0)
exec 234 $ff16 -$00ea Insert(list,node,pred)(a0/a1/a2)
exec 240 $ff10 -$00f0 AddHead(list,node)(a0/a1)
exec 246 $ff0a -$00f6 AddTail(list,node)(a0/a1)
exec 252 $ff04 -$00fc Remove(node)(a1)
exec 258 $fefe -$0102 RemHead(list)(a0)
exec 264 $fef8 -$0108 RemTail(list)(a0)
exec 270 $fef2 -$010e Enqueue(list,node)(a0/a1)
exec 276 $feec -$0114 FindName(list,name)(a0/a1)
exec 282 $fee6 -$011a AddTask(task,initPC,finalPC)(a1/a2/a3)
exec 288 $fee0 -$0120 RemTask(task)(a1)
exec 294 $feda -$0126 FindTask(name)(a1)
exec 300 $fed4 -$012c SetTaskPri(task,priority)(a1,d0)
exec 306 $fece -$0132 SetSignal(newSignals,signalSet)(d0/d1)
exec 312 $fec8 -$0138 SetExcept(newSignals,signalSet)(d0/d1)
exec 318 $fec2 -$013e Wait(signalSet)(d0)
exec 324 $febc -$0144 Signal(task,signalSet)(a1,d0)
exec 330 $feb6 -$014a AllocSignal(signalNum)(d0)
exec 336 $feb0 -$0150 FreeSignal(signalNum)(d0)
exec 342 $feaa -$0156 AllocTrap(trapNum)(d0)
exec 348 $fea4 -$015c FreeTrap(trapNum)(d0)
exec 354 $fe9e -$0162 AddPort(port)(a1)
exec 360 $fe98 -$0168 RemPort(port)(a1)
exec 366 $fe92 -$016e PutMsg(port,message)(a0/a1)
exec 372 $fe8c -$0174 GetMsg(port)(a0)
exec 378 $fe86 -$017a ReplyMsg(message)(a1)
exec 384 $fe80 -$0180 WaitPort(port)(a0)
exec 390 $fe7a -$0186 FindPort(name)(a1)
exec 396 $fe74 -$018c AddLibrary(library)(a1)
Buy my Assembly programming book
exec 402 $fe6e -$0192 RemLibrary(library)(a1) on Amazon in Print or Kindle!
exec 408 $fe68 -$0198 OldOpenLibrary(libName)(a1)
exec 414 $fe62 -$019e CloseLibrary(library)(a1)
exec 420 $fe5c -$01a4 SetFunction(library,funcOffset,newFunction)(a1,a0,d0)
exec 426 $fe56 -$01aa SumLibrary(library)(a1)
exec 432 $fe50 -$01b0 AddDevice(device)(a1)
exec 438 $fe4a -$01b6 RemDevice(device)(a1)
exec 444 $fe44 -$01bc OpenDevice(devName,unit,ioRequest,flags)(a0,d0/a1,d1)
exec 450 $fe3e -$01c2 CloseDevice(ioRequest)(a1)
exec 456 $fe38 -$01c8 DoIO(ioRequest)(a1)
exec 462 $fe32 -$01ce SendIO(ioRequest)(a1)
exec 468 $fe2c -$01d4 CheckIO(ioRequest)(a1)
exec 474 $fe26 -$01da WaitIO(ioRequest)(a1) Available worldwide!
exec 480 $fe20 -$01e0 AbortIO(ioRequest)(a1) Search 'ChibiAkumas' on
your local Amazon website!
exec 486 $fe1a -$01e6 AddResource(resource)(a1) Click here for more info!

exec 492 $fe14 -$01ec RemResource(resource)(a1)


exec 498 $fe0e -$01f2 OpenResource(resName)(a1)
exec 504 $fe08 -$01f8 RawIOInit()()
exec 510 $fe02 -$01fe RawMayGetChar()()
exec 516 $fdfc -$0204 RawPutChar()()
exec 522 $fdf6 -$020a RawDoFmt(formatString,dataStream,putChProc,putChData)
exec 528 $fdf0 -$0210 GetCC()()
exec 534 $fdea -$0216 TypeOfMem(address)(a1)
exec 540 $fde4 -$021c Procure(semaport,bidMsg)(a0/a1)
exec 546 $fdde -$0222 Vacate(semaport)(a0)
exec 552 $fdd8 -$0228 OpenLibrary(libName,version)(a1,d0)
exec 558 $fdd2 -$022e InitSemaphore(sigSem)(a0)
exec 564 $fdcc -$0234 ObtainSemaphore(sigSem)(a0)
exec 570 $fdc6 -$023a ReleaseSemaphore(sigSem)(a0)
exec 576 $fdc0 -$0240 AttemptSemaphore(sigSem)(a0)
exec 582 $fdba -$0246 ObtainSemaphoreList(sigSem)(a0)
exec 588 $fdb4 -$024c ReleaseSemaphoreList(sigSem)(a0)
exec 594 $fdae -$0252 FindSemaphore(sigSem)(a1)
exec 600 $fda8 -$0258 AddSemaphore(sigSem)(a1)
exec 606 $fda2 -$025e RemSemaphore(sigSem)(a1)
exec 612 $fd9c -$0264 SumKickData()()
exec 618 $fd96 -$026a AddMemList(size,attributes,pri,base,name)(d0/d1/d2/a0/a1)
exec 624 $fd90 -$0270 CopyMem(source,dest,size)(a0/a1,d0)
exec 630 $fd8a -$0276 CopyMemQuick(source,dest,size)(a0/a1,d0)
exec 636 $fd84 -$027c CacheClearU()()
exec 642 $fd7e -$0282 CacheClearE(address,length,caches)(a0,d0/d1)
exec 648 $fd78 -$0288 CacheControl(cacheBits,cacheMask)(d0/d1)
exec 654 $fd72 -$028e CreateIORequest(port,size)(a0,d0)
exec 660 $fd6c -$0294 DeleteIORequest(iorequest)(a0)
exec 666 $fd66 -$029a CreateMsgPort()()
exec 672 $fd60 -$02a0 DeleteMsgPort(port)(a0)
exec 678 $fd5a -$02a6 ObtainSemaphoreShared(sigSem)(a0)
exec 684 $fd54 -$02ac AllocVec(byteSize,requirements)(d0/d1)
exec 690 $fd4e -$02b2 FreeVec(memoryBlock)(a1)
exec 696 $fd48 -$02b8 CreatePrivatePool(requirements,puddleSize,puddleThresh)
exec 702 $fd42 -$02be DeletePrivatePool(poolHeader)(a0)
exec 708 $fd3c -$02c4 AllocPooled(memSize,poolHeader)(d0/a0)
exec 714 $fd36 -$02ca FreePooled(memory,poolHeader)(a1,a0)
exec 720 $fd30 -$02d0 ExecReserved00(nothing)(d0)
exec 726 $fd2a -$02d6 ColdReboot()()
exec 732 $fd24 -$02dc StackSwap(newSize,newSP,newStack)(d0/d1/a0)
exec 738 $fd1e -$02e2 ChildFree(tid)(d0)
exec 744 $fd18 -$02e8 ChildOrphan(tid)(d0)
exec 750 $fd12 -$02ee ChildStatus(tid)(d0)
exec 756 $fd0c -$02f4 ChildWait(tid)(d0)
exec 762 $fd06 -$02fa ExecReserved01(nothing)(d0)
exec 768 $fd00 -$0300 ExecReserved02(nothing)(d0)
exec 774 $fcfa -$0306 ExecReserved03(nothing)(d0)
exec 780 $fcf4 -$030c ExecReserved04(nothing)(d0)

Graphics.Library
Offset
Category Offset Hex Meaning
Dec
graphics.library 30 $ffe2 -$001e BltBitMap(srcBitMap,xSrc,ySrc,destBitMap,xDest,yDest,xSize,
graphics.library 36 $ffdc -$0024 BltTemplate(source,xSrc,srcMod,destRP,xDest,yDest,xSize,
graphics.library 42 $ffd6 -$002a ClearEOL(rp)(a1)
graphics.library 48 $ffd0 -$0030 ClearScreen(rp)(a1)
graphics.library 54 $ffca -$0036 TextLength(rp,string,count)(a1,a0,d0)
graphics.library 60 $ffc4 -$003c Text(rp,string,count)(a1,a0,d0)
graphics.library 66 $ffbe -$0042 SetFont(rp,textFont)(a1,a0)
graphics.library 72 $ffb8 -$0048 OpenFont(textAttr)(a0)
graphics.library 78 $ffb2 -$004e CloseFont(textFont)(a1) Recent New Content
Lesson P34 - Creating a game
graphics.library 84 $ffac -$0054 AskSoftStyle(rp)(a1)
for the NeoGeo CD!
graphics.library 90 $ffa6 -$005a SetSoftStyle(rp,style,enable)(a1,d0/d1)
graphics.library 96 $ffa0 -$0060 AddBob(bob,rp)(a0/a1) Sprite Movement on the Dragon
graphics.library 102 $ff9a -$0066 AddVSprite(vSprite,rp)(a0/a1) 32- Simple 6502 ASM Lesson S1
graphics.library 108 $ff94 -$006c DoCollision(rp)(a1)
graphics.library 114 $ff8e -$0072 DrawGList(rp,vp)(a1,a0) Amiga - ASM PSET and POINT
graphics.library 120 $ff88 -$0078 InitGels(head,tail,gelsInfo)(a0/a1/a2) for Pixel Plotting
graphics.library 126 $ff82 -$007e InitMasks(vSprite)(a0)
graphics.library 132 $ff7c -$0084 RemIBob(bob,rp,vp)(a0/a1/a2) Learn 65816 Assembly: 8 and 16
graphics.library 138 $ff76 -$008a RemVSprite(vSprite)(a0) bit modes on the 65816
graphics.library 144 $ff70 -$0090 SetCollision(num,routine,gelsInfo)(d0/a0/a1) SNES - ASM PSET and POINT
graphics.library 150 $ff6a -$0096 SortGList(rp)(a1) for Pixel Plotting
graphics.library 156 $ff64 -$009c AddAnimOb(anOb,anKey,rp)(a0/a1/a2)
graphics.library 162 $ff5e -$00a2 Animate(anKey,rp)(a0/a1) ARM Assembly Lesson H3
graphics.library 168 $ff58 -$00a8 GetGBuffers(anOb,rp,flag)(a0/a1,d0)
graphics.library 174 $ff52 -$00ae InitGMasks(anOb)(a0) Lesson P65 - Mouse reading on
graphics.library 180 $ff4c -$00b4 DrawEllipse(rp,xCenter,yCenter,a,b)(a1,d0/d1/d2/d3) the Sam Coupe
graphics.library 186 $ff46 -$00ba AreaEllipse(rp,xCenter,yCenter,a,b)(a1,d0/d1/d2/d3)
graphics.library 192 $ff40 -$00c0 LoadRGB4(vp,colors,count)(a0/a1,d0) Mouse Reading in MS-DOS
graphics.library 198 $ff3a -$00c6 InitRastPort(rp)(a1)
Risc-V Assembly Lesson 3 - Bit
graphics.library 204 $ff34 -$00cc InitVPort(vp)(a0) ops and more maths!
graphics.library 210 $ff2e -$00d2 MrgCop(view)(a1)
graphics.library 216 $ff28 -$00d8 MakeVPort(view,vp)(a0/a1) Mouse reading on the MSX
graphics.library 222 $ff22 -$00de LoadView(view)(a1)
graphics.library 228 $ff1c -$00e4 WaitBlit()() Hello World on RISC-OS
graphics.library 234 $ff16 -$00ea SetRast(rp,pen)(a1,d0)
graphics.library 240 $ff10 -$00f0 Move(rp,x,y)(a1,d0/d1) Atari 800 / 5200 - ASM PSET and
POINT for Pixel Plotting
graphics.library 246 $ff0a -$00f6 Draw(rp,x,y)(a1,d0/d1)
graphics.library 252 $ff04 -$00fc AreaMove(rp,x,y)(a1,d0/d1)
graphics.library 258 $fefe -$0102 AreaDraw(rp,x,y)(a1,d0/d1) Gaming + more:
graphics.library 264 $fef8 -$0108 AreaEnd(rp)(a1)
graphics.library 270 $fef2 -$010e WaitTOF()() Emily The Strange (DS) - Live
graphics.library 276 $feec -$0114 QBlit(blit)(a1) full playthrough
graphics.library 282 $fee6 -$011a InitArea(areaInfo,vectorBuffer,maxVectors)(a0/a1,d0)
graphics.library 288 $fee0 -$0120 SetRGB4(vp,index,red,green,blue)(a0,d0/d1/d2/d3) $150 calculator: Unboxing the
graphics.library 294 $feda -$0126 QBSBlit(blit)(a1) Ti-84 Plus CE (eZ80 cpu)
graphics.library 300 $fed4 -$012c BltClear(memBlock,byteCount,flags)(a1,d0/d1)
graphics.library 306 $fece -$0132 RectFill(rp,xMin,yMin,xMax,yMax)(a1,d0/d1/d2/d3)
graphics.library 312 $fec8 -$0138 BltPattern(rp,mask,xMin,yMin,xMax,yMax,maskBPR)
graphics.library 318 $fec2 -$013e ReadPixel(rp,x,y)(a1,d0/d1)
graphics.library 324 $febc -$0144 WritePixel(rp,x,y)(a1,d0/d1)
graphics.library 330 $feb6 -$014a Flood(rp,mode,x,y)(a1,d2,d0/d1)
graphics.library 336 $feb0 -$0150 PolyDraw(rp,count,polyTable)(a1,d0/a0)
graphics.library 342 $feaa -$0156 SetAPen(rp,pen)(a1,d0)
graphics.library 348 $fea4 -$015c SetBPen(rp,pen)(a1,d0)
graphics.library 354 $fe9e -$0162 SetDrMd(rp,drawMode)(a1,d0)
graphics.library 360 $fe98 -$0168 InitView(view)(a1)
graphics.library 366 $fe92 -$016e CBump(copList)(a1)
graphics.library 372 $fe8c -$0174 CMove(copList,destination,data)(a1,d0/d1)
graphics.library 378 $fe86 -$017a CWait(copList,v,h)(a1,d0/d1)
graphics.library 384 $fe80 -$0180 VBeamPos()()
graphics.library 390 $fe7a -$0186 InitBitMap(bitMap,depth,width,height)(a0,d0/d1/d2)
graphics.library 396 $fe74 -$018c ScrollRaster(rp,dx,dy,xMin,yMin,xMax,yMax)
graphics.library 402 $fe6e -$0192 WaitBOVP(vp)(a0)
graphics.library 408 $fe68 -$0198 GetSprite(sprite,num)(a0,d0)
graphics.library 414 $fe62 -$019e FreeSprite(num)(d0)
graphics.library 420 $fe5c -$01a4 ChangeSprite(vp,sprite,newData)(a0/a1/a2)
graphics.library 426 $fe56 -$01aa MoveSprite(vp,sprite,x,y)(a0/a1,d0/d1)
graphics.library 432 $fe50 -$01b0 LockLayerRom(layer)(a5)
graphics.library 438 $fe4a -$01b6 UnlockLayerRom(layer)(a5)
graphics.library 444 $fe44 -$01bc SyncSBitMap(layer)(a0)
graphics.library 450 $fe3e -$01c2 CopySBitMap(layer)(a0)
graphics.library 456 $fe38 -$01c8 OwnBlitter()()
graphics.library 462 $fe32 -$01ce DisownBlitter()()
graphics.library 468 $fe2c -$01d4 InitTmpRas(tmpRas,buffer,size)(a0/a1,d0)
graphics.library 474 $fe26 -$01da AskFont(rp,textAttr)(a1,a0)
graphics.library 480 $fe20 -$01e0 AddFont(textFont)(a1)
graphics.library 486 $fe1a -$01e6 RemFont(textFont)(a1)
graphics.library 492 $fe14 -$01ec AllocRaster(width,height)(d0/d1)
graphics.library 498 $fe0e -$01f2 FreeRaster(p,width,height)(a0,d0/d1)
graphics.library 504 $fe08 -$01f8 AndRectRegion(region,rectangle)(a0/a1)
graphics.library 510 $fe02 -$01fe OrRectRegion(region,rectangle)(a0/a1)
graphics.library 516 $fdfc -$0204 NewRegion()()
graphics.library 522 $fdf6 -$020a ClearRectRegion(region,rectangle)(a0/a1)
graphics.library 528 $fdf0 -$0210 ClearRegion(region)(a0)
graphics.library 534 $fdea -$0216 DisposeRegion(region)(a0)
graphics.library 540 $fde4 -$021c FreeVPortCopLists(vp)(a0)
graphics.library 546 $fdde -$0222 FreeCopList(copList)(a0)
graphics.library 552 $fdd8 -$0228 ClipBlit(srcRP,xSrc,ySrc,destRP,xDest,yDest,xSize,ySize,
graphics.library 558 $fdd2 -$022e XorRectRegion(region,rectangle)(a0/a1)
graphics.library 564 $fdcc -$0234 FreeCprList(cprList)(a0)
graphics.library 570 $fdc6 -$023a GetColorMap(entries)(d0)
graphics.library 576 $fdc0 -$0240 FreeColorMap(colorMap)(a0)
graphics.library 582 $fdba -$0246 GetRGB4(colorMap,entry)(a0,d0)
graphics.library 588 $fdb4 -$024c ScrollVPort(vp)(a0)
graphics.library 594 $fdae -$0252 UCopperListInit(uCopList,n)(a0,d0)
graphics.library 600 $fda8 -$0258 FreeGBuffers(anOb,rp,flag)(a0/a1,d0)
graphics.library 606 $fda2 -$025e BltBitMapRastPort(srcBitMap,xSrc,ySrc,destRP,xDest,yDest,
graphics.library 612 $fd9c -$0264 OrRegionRegion(srcRegion,destRegion)(a0/a1)
graphics.library 618 $fd96 -$026a XorRegionRegion(srcRegion,destRegion)(a0/a1)
graphics.library 624 $fd90 -$0270 AndRegionRegion(srcRegion,destRegion)(a0/a1)
graphics.library 630 $fd8a -$0276 SetRGB4CM(colorMap,index,red,green,blue)(a0,d0/d1/d2/d3)
graphics.library 636 $fd84 -$027c BltMaskBitMapRastPort(srcBitMap,xSrc,ySrc,destRP,xDest,
graphics.library 654 $fd72 -$028e AttemptLockLayerRom(layer)(a5)
graphics.library 660 $fd6c -$0294 GfxNew(gfxNodeType)(d0)
graphics.library 666 $fd66 -$029a GfxFree(gfxNodePtr)(a0)
graphics.library 672 $fd60 -$02a0 GfxAssociate(associateNode,gfxNodePtr)(a0/a1)
graphics.library 678 $fd5a -$02a6 BitMapScale(bitScaleArgs)(a0)
graphics.library 684 $fd54 -$02ac ScalerDiv(factor,numerator,denominator)(d0/d1/d2)
graphics.library 690 $fd4e -$02b2 TextExtent(rp,string,count,textExtent)(a1,a0,d0/a2)
graphics.library 696 $fd48 -$02b8 TextFit(rp,string,strLen,textExtent,constrainingExtent,
graphics.library 702 $fd42 -$02be GfxLookUp(associateNode)(a0)
graphics.library 708 $fd3c -$02c4 VideoControl(colorMap,tagarray)(a0/a1)
graphics.library 714 $fd36 -$02ca OpenMonitor(monitorName,displayID)(a1,d0)
graphics.library 720 $fd30 -$02d0 CloseMonitor(monitorSpec)(a0)
graphics.library 726 $fd2a -$02d6 FindDisplayInfo(displayID)(d0)
graphics.library 732 $fd24 -$02dc NextDisplayInfo(displayID)(d0)
graphics.library 738 $fd1e -$02e2 AddDisplayInfo(displayInfoRecord)(a0)
graphics.library 744 $fd18 -$02e8 AddDisplayInfoData(handle,buf,size,tagID,displayID)
graphics.library 750 $fd12 -$02ee SetDisplayInfoData(handle,buf,size,tagID,displayID)
graphics.library 756 $fd0c -$02f4 GetDisplayInfoData(handle,buf,size,tagID,displayID)
graphics.library 762 $fd06 -$02fa FontExtent(font,fontExtent)(a0/a1)
graphics.library 768 $fd00 -$0300 ReadPixelLine8(rp,xstart,ystart,width,array,tempRP)
graphics.library 774 $fcfa -$0306 WritePixelLine8(rp,xstart,ystart,width,array,tempRP)
graphics.library 780 $fcf4 -$030c ReadPixelArray8(rp,xstart,ystart,xstop,ystop,array,temprp)
graphics.library 786 $fcee -$0312 WritePixelArray8(rp,xstart,ystart,xstop,ystop,array,temprp)
graphics.library 792 $fce8 -$0318 GetVPModeID(vp)(a0)
graphics.library 798 $fce2 -$031e ModeNotAvailable(modeID)(d0)
graphics.library 804 $fcdc -$0324 WeighTAMatch(reqTextAttr,targetTextAttr,targetTags)
graphics.library 810 $fcd6 -$032a EraseRect(rp,xMin,yMin,xMax,yMax)(a1,d0/d1/d2/d3)
graphics.library 816 $fcd0 -$0330 ExtendFont(font,fontTags)(a0/a1)
graphics.library 822 $fcca -$0336 StripFont(font)(a0)

Blitter
These can be used to combine bits from multiple sources, Remember A and B can be bitshifted, and A can be masked. The MinTerm we use will
define the resulting data we write to D. the Sources A,B and C can be bitmap sprites, Masks or the current screen data (for XOR or masked
sprites). ABCD must be in CHIP RAM.

Surprisingly Bitshifting does not affect speed, however unsurprisingly the more DMA channels we use, the slower the transfer will be.

See the Amiga Hardware Manual for more Blitting details

Minterms
'MinTerms' are Logical operations used by BLIT function - these are selected by the bottom 8 bits of BLTCON0 ($DFF040)

In the charts below, ! means NOT (Bits flipped)... in bit logic terms * is effectively AND ... + is effectively OR

$F0 D=A
$0F D=!A
$CC D=B
$33 D=!B
$AA D=C
$55 D=!C

$A0 D=A*C $C0 D=A*B $88 D=B*C


$50 D=A*!C $30 D=A*!B $44 D=B*!C
$0A D=!A*C $0C D=!A*B $22 D=!B*C
$05 D=!A*!C $03 D=!A*!B $11 D=!B*!C

$FC D=A+B $EE D=B+C


$FA D=A+C $BB D=!B+C
$F3 D=A+!B $DD D=B+!C
$F5 D=A+!C $77 D=B+!C
$CF D=!A+B $FE D=A+B+C
$AF D=!A+C $80 D=A*B*C
$3F D=!A+!B
$5F D=!A+!C

$F0 D=A PSET A=Sprite D=ScreenRam


$CA D=A*B+!A*C MASK A=SpriteMask B=Sprite C=CurrentScreenRam D=ScreenRam
$5A D=!A*C+A*!C XOR A=Sprite C=CurrentScreenRam D=ScreenRam

The above examples can also be performed in other ways!

Combining Minterms

Multiple Minterms can be added by ORing... for example: Multiple minterms can be multiplied by ANDing... for example:

D=A is $F0 D=A is $F0


D=!B is $33 D=C is $AA
so... D=A+!B is $F3 so D=A*C is $A0

'Minterms' are a boolean algebra thing!... but you only need to know which number code to use for your blitter.

If you're feeling brainy, and want to become a super smarypants, you can learn more about Minterms here... Just be careful
your head doesn't explode with all the maths!

Documentation
Amiga Hardware Reference Manual

You might also like