GameBoy Emulator 1
Game Boy emulator core and tooling
Loading...
Searching...
No Matches
common.hpp
1#pragma once
2
3#include <cstdint>
4#include <iostream>
5#include <string>
6#include <fstream>
7#include <vector>
8#include <iomanip>
9#include <stdexcept>
10
11typedef uint8_t u8;
12typedef uint16_t u16;
13typedef uint32_t u32;
14typedef uint64_t u64;
15
16#define BIT(a, n) ((a & (1 << n)) ? 1 : 0)
17#define BIT_SET(a, n, on) (on ? (a) |= (1 << n) : (a) &= ~(1 << n))
18#define BETWEEN(a, b, c) ((a >= b) && (a <= c))
19
20void delay(u32 ms);
21
23 bool right = false, left = false, up = false, down = false;
24 bool a = false, b = false, select = false, start = false;
25};