Skip to content

Commit d133221

Browse files
committed
IRQ #0 on maincpu/subcpu latches
1 parent f903d62 commit d133221

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/mame/technics/kn5000.cpp

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ class kn5000_state : public driver_device
100100
: driver_device(mconfig, type, tag)
101101
, m_maincpu(*this, "maincpu")
102102
, m_subcpu(*this, "subcpu")
103+
, m_maincpu_latch(*this, "maincpu_latch")
104+
, m_subcpu_latch(*this, "subcpu_latch")
103105
, m_fdc(*this, "fdc")
104106
, m_checking_device_led_cn11(*this, "checking_device_led_cn11")
105107
, m_extension(*this, "extension")
@@ -116,6 +118,8 @@ class kn5000_state : public driver_device
116118
private:
117119
required_device<tmp94c241_device> m_maincpu;
118120
required_device<tmp94c241_device> m_subcpu;
121+
required_device<generic_latch_8_device> m_maincpu_latch;
122+
required_device<generic_latch_8_device> m_subcpu_latch;
119123
required_device<upd72067_device> m_fdc;
120124
required_device<beep_device> m_checking_device_led_cn11;
121125
required_device<kn5000_extension_device> m_extension;
@@ -167,8 +171,8 @@ void kn5000_state::maincpu_mem(address_map &map)
167171

168172
//FIXME: map(0x110000, 0x11ffff).m(m_fdc, FUNC(upd765a_device::map)); // Floppy Controller @ IC208
169173
//FIXME: map(0x120000, 0x12ffff).w(m_fdc, FUNC(upd765a_device::dack_w)); // Floppy DMA Acknowledge
170-
map(0x140000, 0x14ffff).r("to_maincpu_latch", FUNC(generic_latch_8_device::read)); // @ IC23
171-
map(0x140000, 0x14ffff).w("to_subcpu_latch", FUNC(generic_latch_8_device::write)); // @ IC22
174+
map(0x140000, 0x14ffff).r(m_maincpu_latch, FUNC(generic_latch_8_device::read)); // @ IC23
175+
map(0x140000, 0x14ffff).w(m_subcpu_latch, FUNC(generic_latch_8_device::write)); // @ IC22
172176
map(0x1703b0, 0x1703df).m("vga", FUNC(mn89304_vga_device::io_map)); // LCD controller @ IC206
173177
map(0x1a0000, 0x1bffff).rw("vga", FUNC(mn89304_vga_device::mem_linear_r), FUNC(mn89304_vga_device::mem_linear_w));
174178
map(0x1e0000, 0x1fffff).ram(); // 1Mbit SRAM @ IC21 (CS0) Note: I think this is the message "ERROR in back-up SRAM"
@@ -193,8 +197,8 @@ void kn5000_state::subcpu_mem(address_map &map)
193197
// There seems to also be devices at 110000, 130000 and 1e0000
194198

195199
map(0x000000, 0x0fffff).ram(); // 1Mbyte = 2 * 4Mbit DRAMs @ IC28, IC29
196-
map(0x120000, 0x12ffff).r("to_subcpu_latch", FUNC(generic_latch_8_device::read)); // @ IC22
197-
map(0x120000, 0x12ffff).w("to_maincpu_latch", FUNC(generic_latch_8_device::write)); // @ IC23
200+
map(0x120000, 0x12ffff).r(m_subcpu_latch, FUNC(generic_latch_8_device::read)); // @ IC22
201+
map(0x120000, 0x12ffff).w(m_maincpu_latch, FUNC(generic_latch_8_device::write)); // @ IC23
198202
//map(0x??????, 0x??????).rw(FUNC(kn5000_state::tone_generator_r), FUNC(kn5000_state::tone_generator_w)); // @ IC303
199203
//map(0x??????, 0x??????).rw(FUNC(kn5000_state::dsp1_r), FUNC(kn5000_state::dsp1_w)); // @ IC311
200204

@@ -707,7 +711,6 @@ void kn5000_state::kn5000(machine_config &config)
707711
TMP94C241(config, m_maincpu, 2 * 8_MHz_XTAL); // TMP94C241F @ IC5
708712
// Address bus is set to 32 bits by the pins AM1=+5v and AM0=GND
709713
m_maincpu->set_addrmap(AS_PROGRAM, &kn5000_state::maincpu_mem);
710-
// Interrupt 0: CLK on "to_maincpu_latch"
711714
// Interrupt 4: FDCINT
712715
// Interrupt 5: FDCIRQ
713716
// Interrupt 6: FDC.H/D
@@ -716,9 +719,6 @@ void kn5000_state::kn5000(machine_config &config)
716719
// Interrupt A <edge>: ~CPSCK "Control Panel Serial Clock"
717720
// ~NMI: SNS
718721
// TC0: FDCTC
719-
//
720-
// m_maincpu->port?_write().set(FUNC(kn5000_state::maincpu_port?_w));
721-
//
722722

723723

724724
// MAINCPU PORT 7:
@@ -806,7 +806,6 @@ void kn5000_state::kn5000(machine_config &config)
806806
TMP94C241(config, m_subcpu, 2*10_MHz_XTAL); // TMP94C241F @ IC27
807807
// Address bus is set to 8 bits by the pins AM1=GND and AM0=GND
808808
m_subcpu->set_addrmap(AS_PROGRAM, &kn5000_state::subcpu_mem);
809-
// Interrupt 0: CLK on "to_subcpu_latch"
810809

811810

812811
// SUBCPU PORT D:
@@ -823,8 +822,11 @@ void kn5000_state::kn5000(machine_config &config)
823822
});
824823

825824

826-
GENERIC_LATCH_8(config, "to_maincpu_latch"); // @ IC23
827-
GENERIC_LATCH_8(config, "to_subcpu_latch"); // @ IC22
825+
GENERIC_LATCH_8(config, m_maincpu_latch); // @ IC23
826+
m_maincpu_latch->data_pending_callback().set_inputline(m_maincpu, TLCS900_INT0);
827+
828+
GENERIC_LATCH_8(config, m_subcpu_latch); // @ IC22
829+
m_subcpu_latch->data_pending_callback().set_inputline(m_subcpu, TLCS900_INT0);
828830

829831
UPD72067(config, m_fdc, 32'000'000); // actual controller is UPD72068GF-3B9 at IC208
830832
m_fdc->intrq_wr_callback().set_inputline(m_maincpu, TLCS900_INT4);

0 commit comments

Comments
 (0)