mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Add a between-instructions enforcement of SH = 1.
This commit is contained in:
parent
cdb86022a6
commit
c0eb401d04
@ -67,6 +67,9 @@ template <typename BusHandler, bool uses_ready_line> void Processor<BusHandler,
|
||||
last_operation_pc_ = registers_.pc;
|
||||
last_operation_program_bank_ = uint8_t(registers_.program_bank >> 16);
|
||||
memory_lock_ = false;
|
||||
|
||||
// Reenforce the top byte of S if applicable.
|
||||
registers_.s.halves.high = stack_address();
|
||||
} continue;
|
||||
|
||||
case OperationDecode: {
|
||||
|
@ -1131,11 +1131,10 @@ void ProcessorStorage::set_emulation_mode(bool enabled) {
|
||||
set_m_x_flags(true, true);
|
||||
registers_.e_masks[0] = 0xff00;
|
||||
registers_.e_masks[1] = 0x00ff;
|
||||
registers_.s.halves.high = 1;
|
||||
} else {
|
||||
registers_.e_masks[0] = 0x0000;
|
||||
registers_.e_masks[1] = 0xffff;
|
||||
registers_.s.halves.high = 1; // To pretend it was 1 all along; this implementation actually ignores
|
||||
// the top byte while in emulation mode.
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user