Finished implentation of devices and added Opcode class

This commit is contained in:
aljazbrodar. 2025-11-27 14:44:07 +01:00
parent 9cc0c10e35
commit 3f39c6cb71
78 changed files with 262 additions and 90 deletions

View file

@ -1,5 +1,6 @@
#ifndef MACHINE_H
#define MACHINE_H
#include "device.h"
class Machine {
private:
@ -15,6 +16,7 @@ private:
static const int MEMORY_SIZE = 1000000;
static const int MAX_ADDRESS = MEMORY_SIZE - 1;
unsigned char memory[MEMORY_SIZE];
Device* devices[256];
public:
Machine();
@ -46,6 +48,8 @@ public:
unsigned int getWord(unsigned int address);
void setWord(unsigned int address, unsigned int val);
Device * getDevice(int num);
void setDevice(int num, Device * device);
};
#endif