From 72abe5f3e714df9cc8310a78bdfa648feb79c4d2 Mon Sep 17 00:00:00 2001 From: Oxore Date: Sat, 1 Oct 2022 19:34:58 +0300 Subject: Add more VDP tracing, add VRAM, CRAM, VSRAM and status --- emulator.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'emulator.cpp') 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 +#include #include #include #include @@ -14,10 +17,10 @@ #include #include #include +#include #include -#include +#include #include -#include #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 code_bkpts{}, read_bkpts{}, write_bkpts{}, access_bkpts{}; + template 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 */ -- cgit v1.2.3