public
Description: A Nintendo Gameboy and Gameboy Color emulator for the Apple iPhone and iPod Touch.
Homepage: http://www.zodttd.com
Clone URL: git://github.com/zodttd/gameboy4iphone.git
Click here to lend your support to: gameboy4iphone and make a donation at www.pledgie.com !
gameboy4iphone / cpuregs.h
100644 57 lines (38 sloc) 0.849 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef __CPUREGS_H__
 
#define __CPUREGS_H__
 
 
 
#include "defs.h"
#include "cpu.h"
 
#define LB(r) ((r).b[LO][LO])
#define HB(r) ((r).b[LO][HI])
#define W(r) ((r).w[LO])
#define DW(r) ((r).d)
 
#define A HB(cpu.af)
#define F LB(cpu.af)
#define B HB(cpu.bc)
#define C LB(cpu.bc)
#define D HB(cpu.de)
#define E LB(cpu.de)
#define H HB(cpu.hl)
#define L LB(cpu.hl)
 
#define AF W(cpu.af)
#define BC W(cpu.bc)
#define DE W(cpu.de)
#define HL W(cpu.hl)
 
#define PC W(cpu.pc)
#define SP W(cpu.sp)
 
#define xAF DW(cpu.af)
#define xBC DW(cpu.bc)
#define xDE DW(cpu.de)
#define xHL DW(cpu.hl)
 
#define xPC DW(cpu.pc)
#define xSP DW(cpu.sp)
 
#define IMA cpu.ima
#define IME cpu.ime
#define IF R_IF
#define IE R_IE
 
#define FZ 0x80
#define FN 0x40
#define FH 0x20
#define FC 0x10
#define FL 0x0F /* low unused portion of flags */
 
 
#endif /* __CPUREGS_H__ */