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