summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy/cpu-gb.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-07-03 14:05:12 +0000
committerJens Arnold <amiconn@rockbox.org>2005-07-03 14:05:12 +0000
commitd2456b44f73e6a1310d8dc2c98db92364b70e793 (patch)
tree5f6a7ff48924ebb9b35dd57775c4538d3388d136 /apps/plugins/rockboy/cpu-gb.h
parentd50ed1248de6f347e928bae349c3393696a0383f (diff)
downloadrockbox-d2456b44f73e6a1310d8dc2c98db92364b70e793.tar.gz
rockbox-d2456b44f73e6a1310d8dc2c98db92364b70e793.zip
Centralised the ICODE_ATTR and IDATA_ATTR #defines. Renamed some musepack and rockboy headers to avoid clashes with rockbox headers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6991 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/rockboy/cpu-gb.h')
-rw-r--r--apps/plugins/rockboy/cpu-gb.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/apps/plugins/rockboy/cpu-gb.h b/apps/plugins/rockboy/cpu-gb.h
new file mode 100644
index 0000000000..937b477b53
--- /dev/null
+++ b/apps/plugins/rockboy/cpu-gb.h
@@ -0,0 +1,59 @@
1
2
3#ifndef __CPU_GB_H__
4#define __CPU_GB_H__
5
6
7
8#include "defs.h"
9
10
11union reg
12{
13 byte b[2][2];
14 word w[2];
15 un32 d; /* padding for alignment, carry */
16};
17
18struct cpu
19{
20#ifdef DYNAREC
21 union reg a,b,c,d,e,hl,f,sp,pc;
22#else
23 union reg pc, sp, bc, de, hl, af;
24#endif
25 int ime, ima;
26 int speed;
27 int halt;
28 int div, tim;
29 int lcdc;
30 int snd;
31};
32
33extern struct cpu cpu;
34
35#ifdef DYNAREC
36struct dynarec_block {
37 union reg address;
38 void *block;
39 int length;
40 struct dynarec_block *next;
41};
42
43#define HASH_SIGNIFICANT_LOWER_BITS 8
44#define HASH_BITMASK ((1<<HASH_SIGNIFICANT_LOWER_BITS)-1)
45
46extern struct dynarec_block *address_map[1<<HASH_SIGNIFICANT_LOWER_BITS];
47extern int blockclen;
48#endif
49
50void cpu_reset(void);
51void div_advance(int cnt);
52void timer_advance(int cnt);
53void lcdc_advance(int cnt);
54void sound_advance(int cnt);
55void cpu_timers(int cnt);
56int cpu_emulate(int cycles) ICODE_ATTR;
57int cpu_step(int max) ICODE_ATTR;
58
59#endif