Skip to content

Commit

Permalink
Debugger: Lua - Fixed writing to nesMemory not triggering side effect…
Browse files Browse the repository at this point in the history
…s as intended
  • Loading branch information
SourMesen committed Oct 6, 2023
1 parent 1678a5f commit 6421069
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Core/Debugger/MemoryDumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void MemoryDumper::SetMemoryValue(MemoryType memoryType, uint32_t address, uint8
case MemoryType::GsuMemory: _cartridge->GetGsu()->GetMemoryMappings()->DebugWrite(address, value); break;
case MemoryType::Cx4Memory: _cartridge->GetCx4()->GetMemoryMappings()->DebugWrite(address, value); break;
case MemoryType::GameboyMemory: _gameboy->GetMemoryManager()->DebugWrite(address, value); break;
case MemoryType::NesMemory: _nesConsole->DebugWrite(address, value); break;
case MemoryType::NesMemory: _nesConsole->DebugWrite(address, value, disableSideEffects); break;
case MemoryType::NesPpuMemory: _nesConsole->DebugWriteVram(address, value); break;
case MemoryType::PceMemory: _pceConsole->GetMemoryManager()->DebugWrite(address, value); break;
case MemoryType::SpcDspRegisters: _spc->DebugWriteDspReg(address, value); break;
Expand Down
4 changes: 2 additions & 2 deletions Core/NES/NesConsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,9 @@ uint8_t NesConsole::DebugRead(uint16_t addr)
return _memoryManager->DebugRead(addr);
}

void NesConsole::DebugWrite(uint16_t addr, uint8_t value)
void NesConsole::DebugWrite(uint16_t addr, uint8_t value, bool disableSideEffects)
{
_memoryManager->DebugWrite(addr, value);
_memoryManager->DebugWrite(addr, value, disableSideEffects);
}

uint8_t NesConsole::DebugReadVram(uint16_t addr)
Expand Down
2 changes: 1 addition & 1 deletion Core/NES/NesConsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class NesConsole final : public IConsole
AudioTrackInfo GetAudioTrackInfo() override;
void ProcessAudioPlayerAction(AudioPlayerActionParams p) override;
uint8_t DebugRead(uint16_t addr);
void DebugWrite(uint16_t addr, uint8_t value);
void DebugWrite(uint16_t addr, uint8_t value, bool disableSideEffects);
uint8_t DebugReadVram(uint16_t addr);
void DebugWriteVram(uint16_t addr, uint8_t value);

Expand Down

0 comments on commit 6421069

Please sign in to comment.