File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ namespace casioemu {
244
244
SetupOpcodeDispatch ();
245
245
SetupRegisterProxies ();
246
246
impl_csr_mask = emulator.GetModelInfo (" csr_mask" );
247
+ real_hardware = emulator.GetModelInfo (" real_hardware" );
247
248
}
248
249
249
250
void CPU::SetupOpcodeDispatch () {
Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ namespace casioemu {
65
65
size_t impl_hint;
66
66
uint16_t impl_csr_mask;
67
67
68
+ bool real_hardware;
69
+
68
70
void SetupOpcodeDispatch ();
69
71
void SetupRegisterProxies ();
70
72
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ namespace casioemu {
10
10
void CPU::OP_ADDSP () {
11
11
impl_operands[0 ].value |= (impl_operands[0 ].value & 0x80 ) ? 0xFF00 : 0 ;
12
12
reg_sp += impl_operands[0 ].value ;
13
+ if (real_hardware) reg_sp &= ~1 ;
13
14
}
14
15
15
16
void CPU::OP_CTRL () {
@@ -46,6 +47,7 @@ namespace casioemu {
46
47
break ;
47
48
case 11 :
48
49
reg_sp = impl_operands[1 ].value ;
50
+ if (real_hardware) reg_sp &= ~1 ;
49
51
break ;
50
52
}
51
53
}
You can’t perform that action at this time.
0 commit comments