Skip to content

Commit f9b7f6a

Browse files
committed
test
1 parent e4c865f commit f9b7f6a

File tree

2 files changed

+246
-265
lines changed

2 files changed

+246
-265
lines changed

emulator/src/Chipset/CPU.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,14 +442,15 @@ namespace casioemu {
442442
output << std::hex << std::setfill('0') << std::uppercase;
443443
for (StackFrame frame : stack) {
444444
output << " function "
445-
<< frame.new_csr << ":" << frame.new_pc << " returns to ";
445+
<< frame.new_csr << ":" << std::setw(4) << frame.new_pc
446+
<< " returns to ";
446447
if (frame.lr_pushed) {
447448
uint16_t saved_lr, saved_lcsr = 0;
448449
MMU &mmu = emulator.chipset.mmu;
449450
saved_lr = ((uint16_t)mmu.ReadData(frame.lr_push_address + 1)) << 8 | mmu.ReadData(frame.lr_push_address);
450451
if (memory_model == MM_LARGE)
451-
saved_lcsr = mmu.ReadData(frame.lr_push_address + 2);
452-
output << saved_lcsr << ":" << saved_lr;
452+
saved_lcsr = mmu.ReadData(frame.lr_push_address + 2) & 0xF;
453+
output << saved_lcsr << ":" << std::setw(4) << saved_lr;
453454

454455
output << " - lr pushed at "
455456
<< std::setw(4) << frame.lr_push_address;

0 commit comments

Comments
 (0)