mirror of
https://github.com/cmosher01/v6502cpp.git
synced 2024-10-31 16:05:31 +00:00
27 lines
433 B
C++
27 lines
433 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] = 0x95;
|
|
}
|
|
}
|
|
~AddressBus() {}
|
|
|
|
unsigned char read(unsigned short addr) {
|
|
return memory[addr];
|
|
}
|
|
|
|
void write(unsigned short addr, unsigned char data) {
|
|
memory[addr] = data;
|
|
}
|
|
};
|
|
|
|
#endif
|