amiga_cyberspace

view src/copper.h @ 3:200e512488e4

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