summaryrefslogtreecommitdiff
path: root/emulator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'emulator.cpp')
-rw-r--r--emulator.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/emulator.cpp b/emulator.cpp
index 95cb0df..7e6ad25 100644
--- a/emulator.cpp
+++ b/emulator.cpp
@@ -2,11 +2,14 @@
*/
#include "bus.hpp"
+#include "vdp.hpp"
#include "m68k_debugging.hpp"
#include "gdbremote_parser.hpp"
#include "utils.hpp"
#include "musashi-m68k/m68k.h"
+#include <arpa/inet.h>
+#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdint>
@@ -14,10 +17,10 @@
#include <cstring>
#include <cstdarg>
#include <ctime>
+#include <fcntl.h>
#include <sys/socket.h>
-#include <arpa/inet.h>
+#include <memory>
#include <unistd.h>
-#include <fcntl.h>
#if !defined(DEBUG_TRACE_INSTRUCTIONS)
# define DEBUG_TRACE_INSTRUCTIONS 0
@@ -29,6 +32,14 @@
#define MESSAGE_BUFFER_SIZE 1024
+unsigned char g_rom[ROM_SIZE] = {};
+unsigned char g_ram[RAM_SIZE] = {};
+unsigned char g_sound_ram[SOUND_RAM_SIZE] = {};
+unsigned char g_io1[IO1_SIZE] = {};
+unsigned char g_psg[PSG_SIZE] = {};
+VDP g_vdp(VDP_START);
+std::vector<Breakpoint> code_bkpts{}, read_bkpts{}, write_bkpts{}, access_bkpts{};
+
template<typename T, size_t S>
struct Backtrace {
static_assert(S > 0, "Backtrace size cannot be zero");
@@ -269,7 +280,7 @@ static void exit_error(const char* fmt, ...)
/* Called when the CPU pulses the RESET line */
void m68k_reset_callback(void)
{
- // TODO
+ g_vdp.Reset();
}
/* Called when the CPU acknowledges an interrupt */