6502-emulator/src/machine/terminal.h

38 lines
889 B
C
Raw Normal View History

#ifndef INC_6502_EMULATOR_TERMINAL_H
#define INC_6502_EMULATOR_TERMINAL_H
#include <memory>
2019-04-23 23:40:31 +00:00
#include <vector>
2019-04-23 20:19:00 +00:00
#include <SDL2/SDL.h>
#include "memory.h"
using namespace std;
namespace emu_6502 {
class Terminal {
private:
2019-04-23 23:40:31 +00:00
static const uint16_t LOW_ADDR = 0xE000;
static const uint16_t HIGH_ADDR = 0xF000;
static const uint8_t WIDTH = 64;
static const uint8_t HEIGHT = 64;
static const uint8_t PIXEL_WEIGHT = 8;
Memory& memory;
2019-04-23 20:19:00 +00:00
SDL_Renderer* renderer;
SDL_Window* window;
void on_memory_written(pair<uint16_t, uint8_t> address_value);
2019-04-23 20:19:00 +00:00
void draw_pixel(int x, int y, uint8_t colour);
public:
Terminal(Memory& memory);
Terminal(const Terminal&) = delete;
Terminal& operator=(const Terminal&) = delete;
~Terminal();
};
}
#endif //INC_6502_EMULATOR_TERMINAL_H