diff options
author | Oxore <oxore@protonmail.com> | 2022-10-01 19:34:58 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2022-10-01 23:09:44 +0300 |
commit | 72abe5f3e714df9cc8310a78bdfa648feb79c4d2 (patch) | |
tree | 0333ee5e61f02548c7ce9dc7038698d15369acc9 /emulator.cpp | |
parent | f125cc7018ed32b7f919ff71ea3c7d9d2e6565de (diff) |
Add more VDP tracing, add VRAM, CRAM, VSRAM and status
Diffstat (limited to 'emulator.cpp')
-rw-r--r-- | emulator.cpp | 17 |
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 */ |