8 /* General internal/io stuff */
26 /* Interrupts flags */
90 #define REG(n) ram.hi[(n)]
94 /* General internal/io stuff */
96 #define R_P1 REG(RI_P1)
97 #define R_SB REG(RI_SB)
98 #define R_SC REG(RI_SC)
99 #define R_DIV REG(RI_DIV)
100 #define R_TIMA REG(RI_TIMA)
101 #define R_TMA REG(RI_TMA)
102 #define R_TAC REG(RI_TAC)
104 #define R_KEY1 REG(RI_KEY1)
106 #define R_RP REG(RI_RP)
108 #define R_SVBK REG(RI_SVBK)
112 /* Interrupts flags */
114 #define R_IF REG(RI_IF)
115 #define R_IE REG(RI_IE)
122 #define R_LCDC REG(RI_LCDC)
123 #define R_STAT REG(RI_STAT)
124 #define R_SCY REG(RI_SCY)
125 #define R_SCX REG(RI_SCX)
126 #define R_LY REG(RI_LY)
127 #define R_LYC REG(RI_LYC)
128 #define R_DMA REG(RI_DMA)
129 #define R_BGP REG(RI_BGP)
130 #define R_OBP0 REG(RI_OBP0)
131 #define R_OBP1 REG(RI_OBP1)
132 #define R_WY REG(RI_WY)
133 #define R_WX REG(RI_WX)
135 #define R_VBK REG(RI_VBK)
137 #define R_HDMA1 REG(RI_HDMA1)
138 #define R_HDMA2 REG(RI_HDMA2)
139 #define R_HDMA3 REG(RI_HDMA3)
140 #define R_HDMA4 REG(RI_HDMA4)
141 #define R_HDMA5 REG(RI_HDMA5)
143 #define R_BCPS REG(RI_BCPS)
144 #define R_BCPD REG(RI_BCPD)
145 #define R_OCPS REG(RI_OCPS)
146 #define R_OCPD REG(RI_OCPD)
152 #define R_NR10 REG(RI_NR10)
153 #define R_NR11 REG(RI_NR11)
154 #define R_NR12 REG(RI_NR12)
155 #define R_NR13 REG(RI_NR13)
156 #define R_NR14 REG(RI_NR14)
157 #define R_NR21 REG(RI_NR21)
158 #define R_NR22 REG(RI_NR22)
159 #define R_NR23 REG(RI_NR23)
160 #define R_NR24 REG(RI_NR24)
161 #define R_NR30 REG(RI_NR30)
162 #define R_NR31 REG(RI_NR31)
163 #define R_NR32 REG(RI_NR32)
164 #define R_NR33 REG(RI_NR33)
165 #define R_NR34 REG(RI_NR34)
166 #define R_NR41 REG(RI_NR41)
167 #define R_NR42 REG(RI_NR42)
168 #define R_NR43 REG(RI_NR43)
169 #define R_NR44 REG(RI_NR44)
170 #define R_NR50 REG(RI_NR50)
171 #define R_NR51 REG(RI_NR51)
172 #define R_NR52 REG(RI_NR52)