add a basic structure for disassembler + executor
Instructions added Branch and Exchange (BX) Branch and Link (B) Multiply and Accumulate (MUL, MLA) Multiply Long and Accumulate (SMULL, SMLAL, UMULL, UMLAL) Single data swap (SWP) [WIP] Halfword Transfer (STRH, LDRH) Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
14
src/bus.hh
14
src/bus.hh
@@ -1,11 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "memory.hh"
|
||||
#include <memory>
|
||||
|
||||
class Bus {
|
||||
public:
|
||||
Bus(Memory&& memory);
|
||||
Bus(std::shared_ptr<Memory> memory);
|
||||
|
||||
uint8_t read_byte(size_t address);
|
||||
void write_byte(size_t address, uint8_t byte);
|
||||
|
||||
uint16_t read_halfword(size_t address);
|
||||
void write_halfword(size_t address, uint16_t halfword);
|
||||
|
||||
uint32_t read_word(size_t address);
|
||||
void write_word(size_t address, uint32_t word);
|
||||
|
||||
private:
|
||||
Memory memory;
|
||||
std::shared_ptr<Memory> memory;
|
||||
};
|
||||
|
Reference in New Issue
Block a user