implemented draw function in interpreter
This commit is contained in:
@@ -14,6 +14,7 @@ private:
|
||||
using sreg_t = unsigned;
|
||||
|
||||
public:
|
||||
constexpr static sreg_t scLowRestFontAddr = 0x0000;
|
||||
constexpr static sreg_t scResetVector = 0x0200;
|
||||
constexpr static size_t scMemorySize = 4096;
|
||||
|
||||
@@ -35,10 +36,11 @@ public:
|
||||
public:
|
||||
Interpreter(unsigned ticksPerSecond, Display &display, Buzzer &buzzer, Keypad &keypad);
|
||||
void tick();
|
||||
void loadProgram(size_t where, char const* data, size_t count);
|
||||
void loadProgram(char const* data, size_t count, size_t where = scResetVector);
|
||||
|
||||
private:
|
||||
void executeArithmetic(Opcode opcode, int iReg, reg_t operand);
|
||||
void executeDraw(uint8_t x, uint8_t y, uint8_t n);
|
||||
|
||||
private:
|
||||
std::vector<uint8_t> mvMemory;
|
||||
@@ -49,6 +51,7 @@ private:
|
||||
const unsigned mcTicksPerSecond;
|
||||
sreg_t mvSpecialReg[SR_COUNT];
|
||||
reg_t mvReg[R_COUNT];
|
||||
bool mIsHighResMode;
|
||||
}; // class Interpreter
|
||||
|
||||
}; // namespace chocohip8
|
||||
|
||||
Reference in New Issue
Block a user