diff options
Diffstat (limited to 'bus.cpp')
-rw-r--r-- | bus.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -148,6 +148,13 @@ static inline ReadResult memory_read( true, }; } else if (is_in_range(address, SOUND_RAM_START, SOUND_RAM_SIZE)) { + if (DEBUG_TRACE_Z80RAM_ACCESS) { + printf( + "Z80RAM r%d%s @0x%08x\n", + bitness * 8, + (bitness <= 1 ? " " : ""), + SOUND_RAM_START + address); + } return ReadResult{ memory_read_concrete(bitness, g_sound_ram, address - SOUND_RAM_START), true, @@ -159,6 +166,13 @@ static inline ReadResult memory_read( }; } else if (is_in_range(address, VDP_START, VDP_SIZE)) { if (address == PSG_START) { + if (DEBUG_TRACE_PSG_ACCESS) { + printf( + "PSG r%d%s @0x%08x\n", + bitness * 8, + (bitness <= 1 ? " " : ""), + PSG_START + address); + } // XXX PSG does not seem necessary to implement return ReadResult{ g_psg[0], true }; } @@ -226,6 +240,15 @@ static inline bool memory_write( memory_write_concrete(bitness, g_ram, address - RAM_START, value); return true; } else if (is_in_range(address, SOUND_RAM_START, SOUND_RAM_SIZE)) { + if (DEBUG_TRACE_Z80RAM_ACCESS) { + printf( + "Z80RAM w%d%s @0x%08x 0x%0*x\n", + bitness * 8, + (bitness <= 1 ? " " : ""), + SOUND_RAM_START + address, + bitness * 2, + value); + } memory_write_concrete(bitness, g_sound_ram, address - SOUND_RAM_START, value); return true; } else if (is_in_range(address, IO1_START, IO1_SIZE)) { @@ -233,6 +256,15 @@ static inline bool memory_write( return true; } else if (is_in_range(address, VDP_START, VDP_SIZE)) { if (address == PSG_START) { + if (DEBUG_TRACE_PSG_ACCESS) { + printf( + "PSG w%d%s @0x%08x 0x%0*x\n", + bitness * 8, + (bitness <= 1 ? " " : ""), + PSG_START + address, + bitness * 2, + value); + } // XXX PSG does not seem necessary to implement g_psg[0] = value & 0xff; return true; |