summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/rockboy/cpu.h')
-rw-r--r--apps/plugins/rockboy/cpu.h41
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
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 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
29extern struct cpu cpu;
30
31
32void cpu_reset(void);
33void div_advance(int cnt);
34void timer_advance(int cnt);
35void lcdc_advance(int cnt);
36void sound_advance(int cnt);
37void cpu_timers(int cnt);
38int cpu_emulate(int cycles);
39
40
41#endif