Emu:: Add broken function call
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
#include "emu.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
CPU::CPU(unsigned int frequency) : ProcessingUnit(frequency)
|
CPU::CPU(unsigned int frequency) : ProcessingUnit(frequency)
|
||||||
@@ -18,4 +19,6 @@ CPU::~CPU()
|
|||||||
|
|
||||||
void CPU::update() {
|
void CPU::update() {
|
||||||
printf("This is an update from the CPU\n");
|
printf("This is an update from the CPU\n");
|
||||||
|
Emu::the().writeMemory("RAM", 123, 42);
|
||||||
|
printf("fff");
|
||||||
}
|
}
|
||||||
@@ -24,3 +24,12 @@ void Emu::addMemorySpace(const char* name, int size) {
|
|||||||
memory.reserve(size);
|
memory.reserve(size);
|
||||||
m_memory_spaces.emplace(name, memory);
|
m_memory_spaces.emplace(name, memory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Emu::writeMemory(const char* memory_space, unsigned int location, uint8_t value) {
|
||||||
|
// printf("%s %d %d", memory_space, location, value);
|
||||||
|
// m_memory_spaces[memory_space][location] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t Emu::readMemory(const char* memory_space, unsigned int location){
|
||||||
|
// return m_memory_spaces[memory_space][location];
|
||||||
|
}
|
||||||
@@ -18,13 +18,9 @@ public:
|
|||||||
void addProcessingUnit(ProcessingUnit* processing_unit);
|
void addProcessingUnit(ProcessingUnit* processing_unit);
|
||||||
void addMemorySpace(const char* name, int size);
|
void addMemorySpace(const char* name, int size);
|
||||||
|
|
||||||
void writeRAM(const char* memory_space, int location);
|
void writeMemory(const char* memory_space, unsigned int location, uint8_t value);
|
||||||
void writeVRAM(const char* memory_space, int location);
|
|
||||||
void writeROM(const char* memory_space, int location);
|
|
||||||
|
|
||||||
uint8_t readRAM(const char* memory_space, int location);
|
uint8_t readMemory(const char* memory_space, unsigned int location);
|
||||||
uint8_t readVRAM(const char* memory_space, int location);
|
|
||||||
uint8_t readROM(const char* memory_space, int location);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned int m_frequency;
|
unsigned int m_frequency;
|
||||||
|
|||||||
Reference in New Issue
Block a user