amiga_imgv

annotate src/amiga/copper.h @ 0:a4788c959918

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 25 Oct 2017 19:34:53 +0300
parents
children
rev   line source
nuclear@0 1 #ifndef COPPER_H_
nuclear@0 2 #define COPPER_H_
nuclear@0 3
nuclear@0 4 #include "inttypes.h"
nuclear@0 5
nuclear@0 6 #define COPPER_MOVE(reg, data) (((uint32_t)(reg) << 16) | ((uint32_t)(data) & 0xffff))
nuclear@0 7 #define COPPER_WAIT(x, y) \
nuclear@0 8 (0x0001fffe | ((uint32_t)((x) + 0x81) << 16) | ((uint32_t)((y) + 0x2c) << 24))
nuclear@0 9 #define COPPER_WAIT_OVERSCAN(x, y) \
nuclear@0 10 (0x0001fffe | ((uint32_t)(x) << 16) | ((uint32_t)(y) << 24))
nuclear@0 11 #define COPPER_VWAIT(s) (0x0001ff00 | ((uint32_t)((s) + 0x2c) << 24))
nuclear@0 12 #define COPPER_VWAIT_OVERSCAN(s) \
nuclear@0 13 (0x0001ff00 | ((uint32_t)(s) << 24))
nuclear@0 14 #define COPPER_END 0xfffffffe
nuclear@0 15
nuclear@0 16 extern uint32_t *copperlist, *copperlist_end;
nuclear@0 17
nuclear@0 18 enum {
nuclear@0 19 COPPER_SINGLE = 1,
nuclear@0 20 COPPER_DOUBLE = 2
nuclear@0 21 };
nuclear@0 22
nuclear@0 23 int init_copper(int maxlist, int nlists);
nuclear@0 24 void cleanup_copper(void);
nuclear@0 25
nuclear@0 26 /* enables copper DMA */
nuclear@0 27 void enable_copper(void);
nuclear@0 28 /* disables copper DMA */
nuclear@0 29 void disable_copper(void);
nuclear@0 30
nuclear@0 31 void clear_copper(void);
nuclear@0 32 void add_copper(uint32_t cmd);
nuclear@0 33 void sort_copper(void); /* TODO */
nuclear@0 34
nuclear@0 35 void swap_copper(void);
nuclear@0 36
nuclear@0 37
nuclear@0 38 #endif /* COPPER_H_ */