Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libmeteor/source/cpu_globals.hpp
2 views
1
// Meteor - A Nintendo Gameboy Advance emulator
2
// Copyright (C) 2009-2011 Philippe Daouadi
3
//
4
// This program is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17
#ifndef __CPU_GLOBALS_H__
18
#define __CPU_GLOBALS_H__
19
20
#undef R
21
#define R(reg) m_st.r[reg]
22
23
#undef CPU
24
#define CPU (*this)
25
26
#undef CPSR
27
#undef SPSR
28
#undef FLAG_Z
29
#undef FLAG_N
30
#undef FLAG_C
31
#undef FLAG_V
32
#undef FLAG_T
33
#define CPSR (m_st.cpsr.dw)
34
#define SPSR (m_st.spsr.dw)
35
#define FLAG_Z (m_st.icpsr.f_zero)
36
#define FLAG_N (m_st.icpsr.f_sign)
37
#define FLAG_C (m_st.icpsr.f_carry)
38
#define FLAG_V (m_st.icpsr.f_overflow)
39
#define FLAG_T (m_st.icpsr.thumb)
40
41
#endif
42
43