summaryrefslogtreecommitdiff
path: root/bus.hpp
blob: 1b4503deaa8596f805e11e1fa5da3d60f216617d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* SPDX-License-Identifier: Unlicense
 */

#pragma once

#include <cstdint>
#include <vector>
#include <algorithm>

#define ROM_START       (0)
#define ROM_SIZE        (0x400000)
#define RAM_START       (0xFF0000)
#define RAM_SIZE        (0x10000)
#define IO1_START       (0xA10000)
#define IO1_SIZE        (0x4004)
#define IO2_START       (0xC00000)
#define IO2_SIZE        (0x20)

struct Breakpoint {
    uint32_t offset, length;
};

extern unsigned char g_rom[ROM_SIZE];
extern unsigned char g_ram[RAM_SIZE];
extern unsigned char g_io1[IO1_SIZE];
extern unsigned char g_io2[IO2_SIZE];
extern std::vector<Breakpoint> code_bkpts, read_bkpts, write_bkpts, access_bkpts;