-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMemory.h
More file actions
33 lines (28 loc) · 708 Bytes
/
Memory.h
File metadata and controls
33 lines (28 loc) · 708 Bytes
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
// Memory.h
// Authors: Joe Story, Hunter King
#ifndef MEMORY_H
#define MEMORY_H
#include <cstdint> //fixed-width unsigned ints
#include "Sim.h"
class Memory{
//Private data
uint8_t mem[MEMORY_SIZE];
bool memError;
uint16_t lastUsed;
//Public Functions
public:
Memory();
uint8_t getByte(uint16_t byteAddress);
void putByte(uint16_t byteAddress, uint8_t val);
uint16_t getWord(uint16_t byteAddress);
void putTile(uint16_t baddy, uint8_t arr[16]);
uint8_t * getTile(uint16_t baddy);
uint16_t getTileRow(uint16_t baddy);
void reset(void);
void dumpROM(void);
void dumpVRAM(void);
void dump(int, int);
uint16_t trace(void);
bool isMemError(void);
};
#endif