diff options
| author | 2026-04-24 15:19:58 +0200 | |
|---|---|---|
| committer | 2026-04-24 15:34:20 +0200 | |
| commit | e2b9d133dad7b99ee625e5eef848a99ed52cb810 (patch) | |
| tree | 5156e6d7e780d3a85436f795218a49ed88eeaec0 /src/devices/cpu | |
| parent | ab7f28101984e558952477154f2a9ddeff6490f0 (diff) | |
m3745x: port arrays were the wrong size
Diffstat (limited to 'src/devices/cpu')
| -rw-r--r-- | src/devices/cpu/m6502/m3745x.cpp | 8 | ||||
| -rw-r--r-- | src/devices/cpu/m6502/m3745x.h | 10 | ||||
| -rw-r--r-- | src/devices/cpu/m6502/m5074x.cpp | 2 | ||||
| -rw-r--r-- | src/devices/cpu/m6502/m5074x.h | 10 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/devices/cpu/m6502/m3745x.cpp b/src/devices/cpu/m6502/m3745x.cpp index 7871f22d90d..d46885ba04b 100644 --- a/src/devices/cpu/m6502/m3745x.cpp +++ b/src/devices/cpu/m6502/m3745x.cpp @@ -175,7 +175,7 @@ void m3745x_device::recalc_irqs() all_ints = (m_intreq1 & m_intctrl1) << 8; all_ints |= (m_intreq2 & m_intctrl2); -// printf("recalc_irqs: last_all_ints = %04x last_ints = %04x (req1 %02x ctrl1 %02x req2 %02x ctrl2 %02x)\n", all_ints, m_last_all_ints, m_intreq1, m_intctrl1, m_intreq2, m_intctrl2); + //printf("recalc_irqs: last_all_ints = %04x last_ints = %04x (req1 %02x ctrl1 %02x req2 %02x ctrl2 %02x)\n", all_ints, m_last_all_ints, m_intreq1, m_intctrl1, m_intreq2, m_intctrl2); // check all 16 IRQ bits for changes for (int i = 0; i < 16; i++) @@ -186,19 +186,19 @@ void m3745x_device::recalc_irqs() // and wasn't last time if (!(m_last_all_ints & (1 << i))) { -// printf(" asserting irq %d (%d)\n", i, irq_lines[i]); + //printf(" asserting irq %d (%d)\n", i, irq_lines[i]); if (irq_lines[i] != -1) { m740_device::execute_set_input(irq_lines[i], ASSERT_LINE); } } } - else // bit is clear now + else // bit is clear now { // ...and wasn't clear last time if (m_last_all_ints & (1 << i)) { -// printf(" clearing irq %d (%d)\n", i, irq_lines[i]); + //printf(" clearing irq %d (%d)\n", i, irq_lines[i]); if (irq_lines[i] != -1) { m740_device::execute_set_input(irq_lines[i], CLEAR_LINE); diff --git a/src/devices/cpu/m6502/m3745x.h b/src/devices/cpu/m6502/m3745x.h index 9f7bc5acc93..fad1e36c1bd 100644 --- a/src/devices/cpu/m6502/m3745x.h +++ b/src/devices/cpu/m6502/m3745x.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:R. Belmont, Olivier Galibert #ifndef MAME_CPU_M6502_M3745X_H #define MAME_CPU_M6502_M3745X_H @@ -38,9 +38,9 @@ public: const address_space_config m_program_config; - template<std::size_t Bit> auto read_p() { return m_read_p[Bit-3].bind(); } - template<std::size_t Bit> auto write_p() { return m_write_p[Bit-3].bind(); } - template<std::size_t Bit> auto read_ad() { return m_read_ad[Bit].bind(); } + template<std::size_t Port> auto read_p() { return m_read_p[Port-3].bind(); } + template<std::size_t Port> auto write_p() { return m_write_p[Port-3].bind(); } + template<std::size_t Port> auto read_ad() { return m_read_ad[Port].bind(); } uint8_t ports_r(offs_t offset); void ports_w(offs_t offset, uint8_t data); @@ -76,7 +76,7 @@ protected: devcb_write8::array<4> m_write_p; devcb_read8::array<8> m_read_ad; - uint8_t m_ports[6], m_ddrs[6]; + uint8_t m_ports[4], m_ddrs[4]; uint8_t m_intreq1, m_intreq2, m_intctrl1, m_intctrl2; uint8_t m_adctrl; uint16_t m_last_all_ints; diff --git a/src/devices/cpu/m6502/m5074x.cpp b/src/devices/cpu/m6502/m5074x.cpp index d61ed050a93..6d3093c2b84 100644 --- a/src/devices/cpu/m6502/m5074x.cpp +++ b/src/devices/cpu/m6502/m5074x.cpp @@ -218,7 +218,7 @@ void m5074x_device::recalc_irqs() m740_device::execute_set_input(M740_INT0_LINE + i, ASSERT_LINE); } } - else // bit is clear now + else // bit is clear now { // ...and wasn't clear last time if (m_last_all_ints & (1 << i)) diff --git a/src/devices/cpu/m6502/m5074x.h b/src/devices/cpu/m6502/m5074x.h index 5dc07d7a383..58890840b00 100644 --- a/src/devices/cpu/m6502/m5074x.h +++ b/src/devices/cpu/m6502/m5074x.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:R. Belmont, Olivier Galibert #ifndef MAME_CPU_M6502_M5074X_H #define MAME_CPU_M6502_M5074X_H @@ -38,9 +38,9 @@ public: const address_space_config m_program_config; - template <std::size_t Bit> auto read_p() { return m_read_p[Bit].bind(); } - template <std::size_t Bit> auto write_p() { return m_write_p[Bit].bind(); } - template <std::size_t Bit> void set_pullups(u8 mask) { m_pullups[Bit] = mask; } + template <std::size_t Port> auto read_p() { return m_read_p[Port].bind(); } + template <std::size_t Port> auto write_p() { return m_write_p[Port].bind(); } + template <std::size_t Port> void set_pullups(u8 mask) { m_pullups[Port] = mask; } uint8_t ports_r(offs_t offset); void ports_w(offs_t offset, uint8_t data); @@ -122,7 +122,7 @@ public: M50753_INT2_LINE = INPUT_LINE_IRQ1 }; - template <std::size_t Bit> auto ad_in() { return m_ad_in[Bit].bind(); } + template <std::size_t Port> auto ad_in() { return m_ad_in[Port].bind(); } auto read_in_p() { return m_in_p.bind(); } |
