Skip to content

Commit bb0cbcb

Browse files
committed
[C++] Make sure on_get_int_vector() always gets called before on_get_i().
1 parent c4bfa3f commit bb0cbcb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

z80.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class root {
225225
unsigned on_get_int_mode() const { return 0; }
226226
void on_set_int_mode(unsigned mode) { unused(mode); }
227227
void on_set_is_int_disabled(bool f) { unused(f); }
228-
fast_u8 on_get_int_vector() { return 0xFF; }
228+
fast_u8 on_get_int_vector() { return 0xff; }
229229

230230
void set_i_on_ld(fast_u8 i) { self().on_set_i(i); }
231231

@@ -3770,7 +3770,9 @@ class internals::executor_base : public B {
37703770
break;
37713771
case 2: {
37723772
// ack(7) w(3) w(3) r(3) r(3)
3773-
fast_u16 vector_addr = make16(self().on_get_i(), self().on_get_int_vector());
3773+
fast_u8 v = self().on_get_int_vector();
3774+
fast_u8 i = self().on_get_i();
3775+
fast_u16 vector_addr = make16(i, v);
37743776
fast_u8 lo = self().on_read_cycle(vector_addr);
37753777
fast_u8 hi = self().on_read_cycle(inc16(vector_addr));
37763778
isr_addr = make16(hi, lo); }

0 commit comments

Comments
 (0)