Bit fields for Status
Closed this issue · 0 comments
TheoW03 commented
instead of using raw bits we use this
union
{
struct
{
unsigned mapper_lower : 4; // lower bits of mapper
unsigned four_screen : 1; // if 4 screen
unsigned trainer : 1; // trainer. Ie the PRG is a 512 offset
unsigned battery : 1; // for zelda (it used a battery to save )
unsigned vertical : 1; // if vertical
};
byte_t val;
} flag6;
good readbaility prevents bugs