Feature: Basic GUI that displays hex information, register information, instruction information.
This commit is contained in:
42
src/Userspace.h
Normal file
42
src/Userspace.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
class Bus;
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <atomic>
|
||||
|
||||
#include "CPU.h"
|
||||
|
||||
class Userspace {
|
||||
public:
|
||||
Userspace();
|
||||
~Userspace() = default;
|
||||
|
||||
void Upload2Memory(uint8_t bytes[], size_t len);
|
||||
uint8_t* RetrieveMemory();
|
||||
|
||||
void Run();
|
||||
void Start();
|
||||
void Stop();
|
||||
void Step();
|
||||
void Reset();
|
||||
void Exit();
|
||||
|
||||
bool IsRunning();
|
||||
|
||||
CPUStatus GetCPUStatus();
|
||||
|
||||
private:
|
||||
std::shared_ptr<RAM> m_RAM;
|
||||
std::shared_ptr<Bus> m_Bus;
|
||||
CPU m_CPU;
|
||||
std::atomic<bool> m_Running = false;
|
||||
std::atomic<bool> m_ApplicationRunning = false;
|
||||
|
||||
std::shared_ptr<RAM> m_ProgramMemory;
|
||||
size_t m_ProgramMemoryLen;
|
||||
|
||||
private:
|
||||
void EmulatorLoop();
|
||||
};
|
||||
Reference in New Issue
Block a user