File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ namespace casioemu {
99
99
100
100
cpu.Reset ();
101
101
102
+ for (size_t ix = 0 ; ix < INT_COUNT; ix++) interrupts_active[ix] = false ;
102
103
interrupts_active[INT_RESET] = true ;
103
104
pending_interrupt_count = 1 ;
104
105
@@ -193,16 +194,13 @@ namespace casioemu {
193
194
case INT_RESET:
194
195
exception_level = 0 ;
195
196
break ;
196
-
197
197
case INT_BREAK:
198
198
case INT_NONMASKABLE:
199
199
exception_level = 2 ;
200
200
break ;
201
-
202
201
case INT_EMULATOR:
203
202
exception_level = 3 ;
204
203
break ;
205
-
206
204
default :
207
205
exception_level = 1 ;
208
206
break ;
@@ -214,14 +212,14 @@ namespace casioemu {
214
212
if (cpu.GetMasterInterruptEnable ())
215
213
cpu.Raise (exception_level, index);
216
214
}
217
- } else {
215
+ } else if (index) {
218
216
cpu.Raise (exception_level, index);
219
217
}
220
218
221
219
run_mode = RM_RUN;
222
220
223
221
// * TODO: introduce delay
224
-
222
+ if (!index) return ;
225
223
interrupts_active[index] = false ;
226
224
pending_interrupt_count--;
227
225
}
You can’t perform that action at this time.
0 commit comments