From dedd5c981ee95d9667f1f2e5d0b419f08bee3908 Mon Sep 17 00:00:00 2001 From: Oxore Date: Thu, 29 Sep 2022 02:01:01 +0300 Subject: Rename IO2 to VDP, enable VDP rw trace --- bus.cpp | 12 +++++++----- bus.hpp | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/bus.cpp b/bus.cpp index 0003405..835bb56 100644 --- a/bus.cpp +++ b/bus.cpp @@ -22,7 +22,7 @@ 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_io2[IO2_SIZE] = {}; +unsigned char g_io2[VDP_SIZE] = {}; std::vector code_bkpts{}, read_bkpts{}, write_bkpts{}, access_bkpts{}; static void exit_error(const char* fmt, ...) @@ -153,9 +153,10 @@ static inline struct read_result memory_read( memory_read_concrete(bitness, g_io1, address - IO1_START), true, }; - } else if (is_in_range(address, IO2_START, IO2_SIZE)) { + } else if (is_in_range(address, VDP_START, VDP_SIZE)) { + printf("VDP read u%d 0x%0x\n", bitness * 8, address); return read_result{ - memory_read_concrete(bitness, g_io2, address - IO2_START), + memory_read_concrete(bitness, g_io2, address - VDP_START), true, }; } @@ -230,8 +231,9 @@ static inline bool memory_write( } } return true; - } else if (is_in_range(address, IO2_START, IO2_SIZE)) { - memory_write_concrete(bitness, g_io2, address - IO2_START, value); + } else if (is_in_range(address, VDP_START, VDP_SIZE)) { + printf("VDP write u%d 0x%0x\n", bitness * 8, address); + memory_write_concrete(bitness, g_io2, address - VDP_START, value); return true; } return false; diff --git a/bus.hpp b/bus.hpp index 6d87da3..9745073 100644 --- a/bus.hpp +++ b/bus.hpp @@ -15,8 +15,8 @@ #define SOUND_RAM_SIZE (0x2000) #define IO1_START (0xA10000) #define IO1_SIZE (0x4004) -#define IO2_START (0xC00000) -#define IO2_SIZE (0x20) +#define VDP_START (0xC00000) +#define VDP_SIZE (0x20) struct Breakpoint { uint32_t offset, length; @@ -26,5 +26,5 @@ extern unsigned char g_rom[ROM_SIZE]; extern unsigned char g_ram[RAM_SIZE]; extern unsigned char g_sound_ram[SOUND_RAM_SIZE]; extern unsigned char g_io1[IO1_SIZE]; -extern unsigned char g_io2[IO2_SIZE]; +extern unsigned char g_io2[VDP_SIZE]; extern std::vector code_bkpts, read_bkpts, write_bkpts, access_bkpts; -- cgit v1.2.3