diff options
Diffstat (limited to 'apps/plugins/rockboy/cpu.h')
-rw-r--r-- | apps/plugins/rockboy/cpu.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/apps/plugins/rockboy/cpu.h b/apps/plugins/rockboy/cpu.h new file mode 100644 index 0000000000..22d58b0db0 --- /dev/null +++ b/apps/plugins/rockboy/cpu.h | |||
@@ -0,0 +1,41 @@ | |||
1 | |||
2 | |||
3 | #ifndef __CPU_H__ | ||
4 | #define __CPU_H__ | ||
5 | |||
6 | |||
7 | |||
8 | #include "defs.h" | ||
9 | |||
10 | |||
11 | union reg | ||
12 | { | ||
13 | byte b[2][2]; | ||
14 | word w[2]; | ||
15 | un32 d; /* padding for alignment, carry */ | ||
16 | }; | ||
17 | |||
18 | struct cpu | ||
19 | { | ||
20 | union reg pc, sp, bc, de, hl, af; | ||
21 | int ime, ima; | ||
22 | int speed; | ||
23 | int halt; | ||
24 | int div, tim; | ||
25 | int lcdc; | ||
26 | int snd; | ||
27 | }; | ||
28 | |||
29 | extern struct cpu cpu; | ||
30 | |||
31 | |||
32 | void cpu_reset(void); | ||
33 | void div_advance(int cnt); | ||
34 | void timer_advance(int cnt); | ||
35 | void lcdc_advance(int cnt); | ||
36 | void sound_advance(int cnt); | ||
37 | void cpu_timers(int cnt); | ||
38 | int cpu_emulate(int cycles); | ||
39 | |||
40 | |||
41 | #endif | ||