diff options
Diffstat (limited to 'apps/plugins/rockboy/cpu.c')
-rw-r--r-- | apps/plugins/rockboy/cpu.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/rockboy/cpu.c b/apps/plugins/rockboy/cpu.c index 1aca06f337..2fc7411411 100644 --- a/apps/plugins/rockboy/cpu.c +++ b/apps/plugins/rockboy/cpu.c | |||
@@ -147,9 +147,9 @@ F = (F & (FN)) | ZFLAG(A) | daa_carry_table[LB(acc)>>2]; } | |||
147 | (r) = swap_table[(r)]; \ | 147 | (r) = swap_table[(r)]; \ |
148 | F = ZFLAG((r)); } | 148 | F = ZFLAG((r)); } |
149 | 149 | ||
150 | #define BIT(n,r) { F = (F & FC) | ZFLAG(((r) & (1 << (n)))) | FH; } | 150 | #define BIT(n,r) { F = (F & FC) | ZFLAG(((r) & BIT_N(n))) | FH; } |
151 | #define RES(n,r) { (r) &= ~(1 << (n)); } | 151 | #define RES(n,r) { (r) &= ~BIT_N(n); } |
152 | #define SET(n,r) { (r) |= (1 << (n)); } | 152 | #define SET(n,r) { (r) |= BIT_N(n); } |
153 | 153 | ||
154 | #define CB_REG_CASES(r, n) \ | 154 | #define CB_REG_CASES(r, n) \ |
155 | case 0x00|(n): RLC(r); break; \ | 155 | case 0x00|(n): RLC(r); break; \ |
@@ -225,7 +225,7 @@ label: op(b); break; | |||
225 | 225 | ||
226 | 226 | ||
227 | #define PRE_INT ( DI, PUSH(PC) ) | 227 | #define PRE_INT ( DI, PUSH(PC) ) |
228 | #define THROW_INT(n) ( (IF &= ~(1<<(n))), (PC = 0x40+((n)<<3)) ) | 228 | #define THROW_INT(n) ( (IF &= ~BIT_N(n)), (PC = 0x40+((n)<<3)) ) |
229 | 229 | ||
230 | #ifdef DYNAREC | 230 | #ifdef DYNAREC |
231 | un32 reg_backup[16]; | 231 | un32 reg_backup[16]; |
@@ -355,7 +355,7 @@ static int cpu_idle(int max) | |||
355 | 355 | ||
356 | /* Figure out when the next timer interrupt will happen */ | 356 | /* Figure out when the next timer interrupt will happen */ |
357 | unit = ((-R_TAC) & 3) << 1; | 357 | unit = ((-R_TAC) & 3) << 1; |
358 | cnt = (511 - cpu.tim + (1<<unit)) >> unit; | 358 | cnt = (511 - cpu.tim + BIT_N(unit)) >> unit; |
359 | cnt += (255 - R_TIMA) << (9 - unit); | 359 | cnt += (255 - R_TIMA) << (9 - unit); |
360 | 360 | ||
361 | if (max < cnt) | 361 | if (max < cnt) |