mirror of
https://github.com/cmosher01/v6502cpp.git
synced 2024-06-16 05:29:37 +00:00
3a0229555b
removed redundant code from v6502.cpp; moved relevant code from v6502.cpp to addressbus.h added crude Makefile fix other compilation errors
27 lines
430 B
C++
27 lines
430 B
C++
#ifndef ADDRESSBUS_H
|
|
#define ADDRESSBUS_H
|
|
|
|
class AddressBus {
|
|
private:
|
|
unsigned char memory[0x10000];
|
|
|
|
public:
|
|
|
|
AddressBus() {
|
|
for (int i = 0; i < 0x10000; ++i) {
|
|
memory[i] = 0;
|
|
}
|
|
}
|
|
~AddressBus() {}
|
|
|
|
unsigned char read(unsigned short addr) {
|
|
return memory[addr];
|
|
}
|
|
|
|
void write(unsigned short addr, unsigned char data) {
|
|
memory[addr] = data;
|
|
}
|
|
};
|
|
|
|
#endif
|