-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmmu.h
34 lines (32 loc) · 887 Bytes
/
mmu.h
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
28
29
30
31
32
33
34
#pragma once
#include <stdint.h>
#include <string>
using namespace::std;
void powerUp();
void reset();
void loadROM(string filename);
unsigned char readFromMem(uint16_t adr);
uint16_t getImmediate(uint16_t adr);
uint16_t getZeropage(uint16_t adr);
uint16_t getZeropageXIndex(uint16_t adr, uint8_t X);
uint16_t getZeropageYIndex(uint16_t adr, uint8_t Y);
uint16_t getIndirect(uint16_t adr);
uint16_t getIndirectXIndex(uint16_t adr, uint8_t X);
uint16_t getIndirectYIndex(uint16_t adr, uint8_t Y);
uint16_t getAbsolute(uint16_t adr);
uint16_t getAbsoluteXIndex(uint16_t adr, uint8_t X);
uint16_t getAbsoluteYIndex(uint16_t adr, uint8_t Y);
void writeToMem(uint16_t adr, uint8_t val);
void shadowWriteToMem(uint16_t adr, uint8_t val);
bool pageBoundaryCrossed();
void nextScanline();
bool irq();
enum ROM_TYPE {
iNES_16,
iNES_32
};
enum VRAM_MIRRORING {
NONE,
VERTICAL,
HORIZONTAL
};