Skip to content

Commit 3f875e7

Browse files
committed
Fix memory view "Follow" issue showing incorrect position
1 parent efdac4c commit 3f875e7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5252

5353
### Fixed
5454

55+
- Memory view "Follow" showed wrong position
5556
- Disassembly sometimes only showed hex bytes instead of opcodes
5657
- The VIP-CHIP-8E interpreter had a typo leading to `BBnn` not working ([#12](https://github.com/gulrak/cadmium/issues/12))
5758
- Disassembling 0x7C, 0x7D or 0x7F generated single byte opcodes instead two byte ones ([#13](https://github.com/gulrak/cadmium/issues/12))

src/debugger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ void Debugger::render(Font& font, const std::function<void(Rectangle,int)>& draw
242242
SetStyle(DEFAULT, BORDER_WIDTH, 0);
243243
static auto lastExecMode = emu::GenericCpu::eRUNNING;
244244
if(_memViewFollow && chip8Core() && (_core->focussedExecutionUnit()->execMode() != emu::GenericCpu::ePAUSED || lastExecMode != emu::GenericCpu::ePAUSED))
245-
memScroll.y = -(float)(chip8Core()->getI() / 8) * lineSpacing;
245+
memScroll.y = -(float)(chip8Core()->getI() / 16) * lineSpacing;
246246
lastExecMode = _core->focussedExecutionUnit()->execMode();
247247
auto bytesPerLine = 16;
248248
BeginScrollPanel(area.height, {0,0,area.width-6, (float)(_core->memSize()/bytesPerLine + 1) * lineSpacing}, &memScroll);

0 commit comments

Comments
 (0)