gameboy_core 0.3.3

core library to be used for Gameboy emulation
Documentation
1
2
3
4
5
6
7
8
9
10
11
pub fn is_set(byte: u8, bit: u8) -> bool {
    byte & (1 << bit) != 0
}

pub fn set_bit(byte: u8, bit: u8) -> u8 {
    byte | (1 << bit)
}

pub fn unset_bit(byte: u8, bit: u8) -> u8 {
    byte & !(1 << bit)
}