<commit_before>#ifndef MMU_H
#define MMU_H

#include "gpu.h"

#include <cstdint>
#include <string>

class MMU {
public:
    MMU(GPU& gpu, std::string bios_file, std::string rom_file);
    
    uint8_t read_byte(uint16_t addr);
    uint16_t read_word(uint16_t addr);
    void write_byte(uint16_t addr, uint8_t val);
    void write_word(uint16_t addr, uint16_t val);
private:
    int get_area(uint16_t addr);

    enum AREA {
        AREA_BIOS = 0,
        AREA_ROM0 = 1,
        AREA_ROM1 = 2,
        AREA_VRAM = 3,
        AREA_ERAM = 4,
        AREA_WRAM = 5,
        AREA_OAM = 6,
        AREA_UNUSED = 7,
        AREA_IO = 8,
        AREA_HRAM = 9,
        AREA_IE_REG = 10
    };

    enum GPU_REG {
        GPU_REG_LCD_CONTROL = 0xFF40,
        GPU_REG_SCROLL_Y = 0xFF42,
        GPU_REG_SCROLL_X = 0xFF43,
        GPU_REG_CURR_SCANLINE = 0xFF44,
        GPU_REG_BG_PALETTE = 0xFF47
    };

    GPU& gpu;

    bool in_bios = true;

    uint8_t bios[0x100] = {0};
    uint8_t rom[0x4000] = {0};
    uint8_t eram[0x2000] = {0};
    uint8_t wram[0x2000] = {0};
    uint8_t hram[0x7F] = {0};
};

#endif
<commit_msg>Correct code style in mmu.h<commit_after>#ifndef MMU_H
#define MMU_H

#include "gpu.h"

#include <cstdint>
#include <string>

class MMU {
public:
    MMU(GPU& gpu, std::string bios_file, std::string rom_file);
    
    uint8_t read_byte(uint16_t addr);
    uint16_t read_word(uint16_t addr);
    void write_byte(uint16_t addr, uint8_t val);
    void write_word(uint16_t addr, uint16_t val);
private:
    int get_area(uint16_t addr);

    enum Area {
        AREA_BIOS = 0,
        AREA_ROM0 = 1,
        AREA_ROM1 = 2,
        AREA_VRAM = 3,
        AREA_ERAM = 4,
        AREA_WRAM = 5,
        AREA_OAM = 6,
        AREA_UNUSED = 7,
        AREA_IO = 8,
        AREA_HRAM = 9,
        AREA_IE_REG = 10
    };

    enum CpuReg {
        GPU_REG_LCD_CONTROL = 0xFF40,
        GPU_REG_SCROLL_Y = 0xFF42,
        GPU_REG_SCROLL_X = 0xFF43,
        GPU_REG_CURR_SCANLINE = 0xFF44,
        GPU_REG_BG_PALETTE = 0xFF47
    };

    GPU& gpu;

    bool in_bios = true;

    uint8_t bios[0x100] = {0};
    uint8_t rom[0x4000] = {0};
    uint8_t eram[0x2000] = {0};
    uint8_t wram[0x2000] = {0};
    uint8_t hram[0x7F] = {0};
};

#endif

{'fraction_non_alphanumeric': 0.1054739652870494, 'fraction_numerical': 0.06764574988874054, 'mean_word_length': 2.3254437869822486, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1493959', 'n_tokens_mistral': 1070, 'n_tokens_neox': 970, 'n_words': 196}