summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Olivier Galibert <galibert@pobox.com>2019-04-04 07:36:51 +0200
committerGravatarGravatar Olivier Galibert <galibert@pobox.com>2019-04-05 00:00:58 +0200
commite39802db90860d6628c35265f7c78ce3534f5a53 (patch) (github)
tree796f3fb6524361b61bad36530f3c56e027db57b9
parentb54a2a517cdd8d9b9ba0456c54c0cced7dd794fc (diff)
downloadmame-e39802db90860d6628c35265f7c78ce3534f5a53.tar.bz2
mame-e39802db90860d6628c35265f7c78ce3534f5a53.zip
68000: Rework interrupt handling [O. Galibert]
* Implement the cpu space as an address space * Make all vectored interrupts use the cpu space * Make it possible to direct the cpu space to another space, use it for amiga (which handles it as a normal AS_PROGRAM read) * Make it possible to disable the priority muxer and get 3 lines instead, use it for cps2
-rw-r--r--src/devices/bus/vme/vme_fccpu20.cpp7
-rw-r--r--src/devices/bus/vme/vme_fccpu20.h1
-rw-r--r--src/devices/bus/vme/vme_fcscsi.cpp112
-rw-r--r--src/devices/bus/vme/vme_fcscsi.h3
-rw-r--r--src/devices/cpu/m68000/m68000.h40
-rw-r--r--src/devices/cpu/m68000/m68kcpu.cpp87
-rw-r--r--src/devices/machine/68153bim.cpp8
-rw-r--r--src/devices/machine/68153bim.h2
-rw-r--r--src/devices/machine/68340.cpp14
-rw-r--r--src/devices/machine/68340.h3
-rw-r--r--src/devices/machine/fga002.cpp6
-rw-r--r--src/devices/machine/fga002.h2
-rw-r--r--src/devices/machine/mc68328.cpp11
-rw-r--r--src/devices/machine/mc68328.h3
-rw-r--r--src/devices/machine/mc68901.cpp25
-rw-r--r--src/devices/machine/mc68901.h2
-rw-r--r--src/devices/machine/sega_scu.cpp24
-rw-r--r--src/devices/machine/tmp68301.cpp11
-rw-r--r--src/devices/machine/tmp68301.h5
-rw-r--r--src/devices/video/stvvdp1.cpp2
-rw-r--r--src/mame/audio/mario.cpp2
-rw-r--r--src/mame/audio/timeplt.cpp2
-rw-r--r--src/mame/audio/trackfld.cpp2
-rw-r--r--src/mame/drivers/1942.cpp4
-rw-r--r--src/mame/drivers/88games.cpp2
-rw-r--r--src/mame/drivers/abc1600.cpp33
-rw-r--r--src/mame/drivers/airbustr.cpp6
-rw-r--r--src/mame/drivers/airraid.cpp4
-rw-r--r--src/mame/drivers/amiga.cpp12
-rw-r--r--src/mame/drivers/amust.cpp2
-rw-r--r--src/mame/drivers/apollo.cpp31
-rw-r--r--src/mame/drivers/argus.cpp8
-rw-r--r--src/mame/drivers/atarist.cpp28
-rw-r--r--src/mame/drivers/attache.cpp2
-rw-r--r--src/mame/drivers/battlnts.cpp2
-rw-r--r--src/mame/drivers/berzerk.cpp2
-rw-r--r--src/mame/drivers/bfm_ad5.cpp2
-rw-r--r--src/mame/drivers/bitgraph.cpp2
-rw-r--r--src/mame/drivers/blockout.cpp2
-rw-r--r--src/mame/drivers/bottom9.cpp2
-rw-r--r--src/mame/drivers/cat.cpp15
-rw-r--r--src/mame/drivers/cclimber.cpp2
-rw-r--r--src/mame/drivers/cgc7900.cpp9
-rw-r--r--src/mame/drivers/champbas.cpp2
-rw-r--r--src/mame/drivers/changela.cpp4
-rw-r--r--src/mame/drivers/circusc.cpp2
-rw-r--r--src/mame/drivers/combatsc.cpp2
-rw-r--r--src/mame/drivers/commando.cpp2
-rw-r--r--src/mame/drivers/cosmic.cpp4
-rw-r--r--src/mame/drivers/cps1.cpp16
-rw-r--r--src/mame/drivers/cps2.cpp10
-rw-r--r--src/mame/drivers/dacholer.cpp4
-rw-r--r--src/mame/drivers/darkmist.cpp4
-rw-r--r--src/mame/drivers/ddayjlc.cpp2
-rw-r--r--src/mame/drivers/ddenlovr.cpp14
-rw-r--r--src/mame/drivers/deadang.cpp8
-rw-r--r--src/mame/drivers/dectalk.cpp20
-rw-r--r--src/mame/drivers/dfruit.cpp6
-rw-r--r--src/mame/drivers/djboy.cpp4
-rw-r--r--src/mame/drivers/dkong.cpp2
-rw-r--r--src/mame/drivers/dmndrby.cpp4
-rw-r--r--src/mame/drivers/dynduke.cpp4
-rw-r--r--src/mame/drivers/ecoinfr.cpp4
-rw-r--r--src/mame/drivers/enigma2.cpp2
-rw-r--r--src/mame/drivers/esq5505.cpp28
-rw-r--r--src/mame/drivers/exedexes.cpp4
-rw-r--r--src/mame/drivers/exprraid.cpp2
-rw-r--r--src/mame/drivers/fantland.cpp4
-rw-r--r--src/mame/drivers/fccpu30.cpp10
-rw-r--r--src/mame/drivers/fcrash.cpp20
-rw-r--r--src/mame/drivers/firetrap.cpp6
-rw-r--r--src/mame/drivers/fp1100.cpp6
-rw-r--r--src/mame/drivers/galaxia.cpp2
-rw-r--r--src/mame/drivers/goldngam.cpp20
-rw-r--r--src/mame/drivers/goodejan.cpp2
-rw-r--r--src/mame/drivers/gradius3.cpp2
-rw-r--r--src/mame/drivers/gundealr.cpp4
-rw-r--r--src/mame/drivers/gunpey.cpp4
-rw-r--r--src/mame/drivers/gyruss.cpp2
-rw-r--r--src/mame/drivers/h8.cpp4
-rw-r--r--src/mame/drivers/h89.cpp2
-rw-r--r--src/mame/drivers/higemaru.cpp4
-rw-r--r--src/mame/drivers/hp16500.cpp2
-rw-r--r--src/mame/drivers/hp9k_3xx.cpp14
-rw-r--r--src/mame/drivers/hp_ipc.cpp14
-rw-r--r--src/mame/drivers/ht68k.cpp2
-rw-r--r--src/mame/drivers/hvyunit.cpp4
-rw-r--r--src/mame/drivers/hyperscan.cpp8
-rw-r--r--src/mame/drivers/icebox.cpp2
-rw-r--r--src/mame/drivers/instruct.cpp4
-rw-r--r--src/mame/drivers/iris3130.cpp4
-rw-r--r--src/mame/drivers/ironhors.cpp2
-rw-r--r--src/mame/drivers/junofrst.cpp2
-rw-r--r--src/mame/drivers/kingobox.cpp6
-rw-r--r--src/mame/drivers/laserbat.cpp2
-rw-r--r--src/mame/drivers/lastbank.cpp4
-rw-r--r--src/mame/drivers/lwings.cpp2
-rw-r--r--src/mame/drivers/lwriter.cpp2
-rw-r--r--src/mame/drivers/m79amb.cpp2
-rw-r--r--src/mame/drivers/m90.cpp4
-rw-r--r--src/mame/drivers/magicard.cpp23
-rw-r--r--src/mame/drivers/mainevt.cpp2
-rw-r--r--src/mame/drivers/manohman.cpp23
-rw-r--r--src/mame/drivers/maygayv1.cpp11
-rw-r--r--src/mame/drivers/mdisk.cpp2
-rw-r--r--src/mame/drivers/meadows.cpp2
-rw-r--r--src/mame/drivers/metlfrzr.cpp4
-rw-r--r--src/mame/drivers/meyc8088.cpp2
-rw-r--r--src/mame/drivers/micro3d.cpp7
-rw-r--r--src/mame/drivers/mikie.cpp2
-rw-r--r--src/mame/drivers/mustache.cpp4
-rw-r--r--src/mame/drivers/mz2500.cpp2
-rw-r--r--src/mame/drivers/n8080.cpp4
-rw-r--r--src/mame/drivers/nakajies.cpp2
-rw-r--r--src/mame/drivers/ncdmips.cpp2
-rw-r--r--src/mame/drivers/nemesis.cpp2
-rw-r--r--src/mame/drivers/next.cpp2
-rw-r--r--src/mame/drivers/nichild.cpp2
-rw-r--r--src/mame/drivers/olibochu.cpp4
-rw-r--r--src/mame/drivers/pacman.cpp2
-rw-r--r--src/mame/drivers/pandoras.cpp2
-rw-r--r--src/mame/drivers/panicr.cpp4
-rw-r--r--src/mame/drivers/parodius.cpp2
-rw-r--r--src/mame/drivers/pc8401a.cpp2
-rw-r--r--src/mame/drivers/pdp1.cpp4
-rw-r--r--src/mame/drivers/pokemini.cpp2
-rw-r--r--src/mame/drivers/psychic5.cpp4
-rw-r--r--src/mame/drivers/px4.cpp10
-rw-r--r--src/mame/drivers/quasar.cpp2
-rw-r--r--src/mame/drivers/raiden.cpp4
-rw-r--r--src/mame/drivers/raiden2.cpp2
-rw-r--r--src/mame/drivers/rainbow.cpp4
-rw-r--r--src/mame/drivers/rollerg.cpp2
-rw-r--r--src/mame/drivers/sbasketb.cpp2
-rw-r--r--src/mame/drivers/sbowling.cpp4
-rw-r--r--src/mame/drivers/scyclone.cpp2
-rw-r--r--src/mame/drivers/seabattl.cpp2
-rw-r--r--src/mame/drivers/segas32.cpp4
-rw-r--r--src/mame/drivers/segaybd.cpp2
-rw-r--r--src/mame/drivers/seibuspi.cpp2
-rw-r--r--src/mame/drivers/sengokmj.cpp2
-rw-r--r--src/mame/drivers/sfkick.cpp2
-rw-r--r--src/mame/drivers/shanghai.cpp2
-rw-r--r--src/mame/drivers/sigmab98.cpp14
-rw-r--r--src/mame/drivers/spacefb.cpp2
-rw-r--r--src/mame/drivers/splash.cpp6
-rw-r--r--src/mame/drivers/spy.cpp2
-rw-r--r--src/mame/drivers/subhuntr.cpp2
-rw-r--r--src/mame/drivers/sun3x.cpp3
-rw-r--r--src/mame/drivers/symbolics.cpp8
-rw-r--r--src/mame/drivers/taitojc.cpp9
-rw-r--r--src/mame/drivers/tatsumi.cpp2
-rw-r--r--src/mame/drivers/techno.cpp10
-rw-r--r--src/mame/drivers/thunderx.cpp2
-rw-r--r--src/mame/drivers/ti990_10.cpp2
-rw-r--r--src/mame/drivers/tmaster.cpp10
-rw-r--r--src/mame/drivers/tmnt.cpp8
-rw-r--r--src/mame/drivers/toaplan2.cpp16
-rw-r--r--src/mame/drivers/tp84.cpp2
-rw-r--r--src/mame/drivers/twin16.cpp4
-rw-r--r--src/mame/drivers/vendetta.cpp4
-rw-r--r--src/mame/drivers/vulgus.cpp2
-rw-r--r--src/mame/drivers/wildpkr.cpp19
-rw-r--r--src/mame/drivers/x68k.cpp30
-rw-r--r--src/mame/drivers/xxmissio.cpp4
-rw-r--r--src/mame/drivers/zac_1.cpp2
-rw-r--r--src/mame/drivers/zerozone.cpp2
-rw-r--r--src/mame/drivers/zorba.cpp5
-rw-r--r--src/mame/includes/abc1600.h2
-rw-r--r--src/mame/includes/apollo.h5
-rw-r--r--src/mame/includes/atarist.h4
-rw-r--r--src/mame/includes/cgc7900.h1
-rw-r--r--src/mame/includes/cps1.h2
-rw-r--r--src/mame/includes/micro3d.h1
-rw-r--r--src/mame/includes/taitojc.h1
-rw-r--r--src/mame/includes/toaplan2.h4
-rw-r--r--src/mame/includes/x68k.h5
-rw-r--r--src/mame/machine/apollo.cpp4
-rw-r--r--src/mame/machine/concept.cpp4
-rw-r--r--src/mame/machine/lisa.cpp20
-rw-r--r--src/mame/machine/m1comm.cpp4
-rw-r--r--src/mame/machine/micro3d.cpp2
-rw-r--r--src/mame/machine/osborne1.cpp8
-rw-r--r--src/mame/machine/saturn.cpp4
-rw-r--r--src/mame/machine/simpsons.cpp2
-rw-r--r--src/mame/machine/stfight.cpp4
-rw-r--r--src/mame/machine/tnzs.cpp2
-rw-r--r--src/mame/machine/wswan.cpp16
-rw-r--r--src/mame/machine/x68k_kbd.cpp2
-rw-r--r--src/mame/video/astrocde.cpp8
-rw-r--r--src/mame/video/lockon.cpp4
-rw-r--r--src/mame/video/ninjakd2.cpp2
-rw-r--r--src/mame/video/tmnt.cpp6
-rw-r--r--src/mame/video/tx1.cpp2
-rw-r--r--src/mame/video/vc4000.cpp2
195 files changed, 711 insertions, 622 deletions
diff --git a/src/devices/bus/vme/vme_fccpu20.cpp b/src/devices/bus/vme/vme_fccpu20.cpp
index d6f5ab56d30..657cff917cf 100644
--- a/src/devices/bus/vme/vme_fccpu20.cpp
+++ b/src/devices/bus/vme/vme_fccpu20.cpp
@@ -252,12 +252,17 @@ static DEVICE_INPUT_DEFAULTS_START( terminal )
DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 )
DEVICE_INPUT_DEFAULTS_END
+void vme_fccpu20_device::cpu_space_map(address_map &map)
+{
+ map(0xfffff2, 0xffffff).lr16("bim irq", [this](offs_t offset) -> u16 { return m_bim->iack(offset+1); });
+}
+
void vme_fccpu20_device::device_add_mconfig(machine_config &config)
{
/* basic machine hardware */
M68020(config, m_maincpu, CLOCK50 / 3); /* Crytstal verified from picture HCI */
m_maincpu->set_addrmap(AS_PROGRAM, &vme_fccpu20_device::cpu20_mem);
- m_maincpu->set_irq_acknowledge_callback("bim", FUNC(bim68153_device::iack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &vme_fccpu20_device::cpu_space_map);
/* PIT Parallel Interface and Timer device, assumed strapped for on board clock */
PIT68230(config, m_pit, CLOCK32 / 4); /* Crystal not verified */
diff --git a/src/devices/bus/vme/vme_fccpu20.h b/src/devices/bus/vme/vme_fccpu20.h
index 4be52d07477..23ebf0338d6 100644
--- a/src/devices/bus/vme/vme_fccpu20.h
+++ b/src/devices/bus/vme/vme_fccpu20.h
@@ -69,6 +69,7 @@ private:
DECLARE_WRITE32_MEMBER (bootvect_w);
void cpu20_mem(address_map &map);
+ void cpu_space_map(address_map &map);
required_device<pit68230_device> m_pit;
required_device<bim68153_device> m_bim;
diff --git a/src/devices/bus/vme/vme_fcscsi.cpp b/src/devices/bus/vme/vme_fcscsi.cpp
index 262a7bcde14..e48f058d4db 100644
--- a/src/devices/bus/vme/vme_fcscsi.cpp
+++ b/src/devices/bus/vme/vme_fcscsi.cpp
@@ -200,6 +200,55 @@ void vme_fcscsi1_card_device::fcscsi1_mem(address_map &map)
map(0xcc0009, 0xcc0009).rw(FUNC(vme_fcscsi1_card_device::tcr_r), FUNC(vme_fcscsi1_card_device::tcr_w)); /* The Control Register, SCSI ID and FD drive select bits */
}
+/*
+----------------------------------------------------
+ IRQ IRQ
+Level Source B4l inserted B4l removed (Def)
+-----------------------------------------------------
+ 1 P3 Pin #13 AV1 Autovector AV1 Autovector
+ 2 DMAC DMAC AV2 Autovector
+ 3 SCSIBC AV3 Autovector AV3 Autovector
+ 4 FDC AV4 Autovector AV4 Autovector
+ 5 PI/T Timer PI/T Timer Vect PI/T Timer Vect
+ 6 -- -- --
+ 7 PI/T Port PI/T Port Vect PI/T Port Vect
+------------------------------------------------------
+Default configuration: B41 jumper removed
+
+The PI/T port interrupt can be used under software control to
+cause non-maskable (Level 7) interrupts if the watchdog timer
+elapses and/or if the VMEbus interrupt trigger call occurs.
+*/
+
+/* TODO: Add configurable B41 jumper */
+#define B41 0
+
+void vme_fcscsi1_card_device::update_irq_to_maincpu() {
+ if (fdc_irq_state) {
+ m_maincpu->set_input_line(M68K_IRQ_3, ASSERT_LINE);
+ m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE);
+ m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
+ } else if (dmac_irq_state) {
+ m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE);
+ m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
+ m_maincpu->set_input_line(M68K_IRQ_2, ASSERT_LINE);
+ } else {
+ m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE);
+ m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE);
+ m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
+ }
+}
+
+void vme_fcscsi1_card_device::cpu_space_map(address_map &map)
+{
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff4, 0xfffff5).lr16("dmac irq", [this]() -> u16 {
+ dmac_irq_state = 0;
+ u16 vector = B41 ? dmac_irq_vector : 0x18+2;
+ update_irq_to_maincpu();
+ return vector;
+ });
+}
FLOPPY_FORMATS_MEMBER( vme_fcscsi1_card_device::floppy_formats )
FLOPPY_PC_FORMAT
@@ -233,7 +282,7 @@ void vme_fcscsi1_card_device::device_add_mconfig(machine_config &config)
/* basic machine hardware */
M68010(config, m_maincpu, CPU_CRYSTAL / 2); /* 7474 based frequency divide by 2 */
m_maincpu->set_addrmap(AS_PROGRAM, &vme_fcscsi1_card_device::fcscsi1_mem);
- m_maincpu->set_irq_acknowledge_callback(FUNC(vme_fcscsi1_card_device::maincpu_irq_acknowledge_callback));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &vme_fcscsi1_card_device::cpu_space_map);
/* FDC */
WD1772(config, m_fdc, PIT_CRYSTAL / 2);
@@ -461,67 +510,6 @@ WRITE8_MEMBER (vme_fcscsi1_card_device::not_implemented_w){
return;
}
-/*
-----------------------------------------------------
- IRQ IRQ
-Level Source B4l inserted B4l removed (Def)
------------------------------------------------------
- 1 P3 Pin #13 AV1 Autovector AV1 Autovector
- 2 DMAC DMAC AV2 Autovector
- 3 SCSIBC AV3 Autovector AV3 Autovector
- 4 FDC AV4 Autovector AV4 Autovector
- 5 PI/T Timer PI/T Timer Vect PI/T Timer Vect
- 6 -- -- --
- 7 PI/T Port PI/T Port Vect PI/T Port Vect
-------------------------------------------------------
-Default configuration: B41 jumper removed
-
-The PI/T port interrupt can be used under software control to
-cause non-maskable (Level 7) interrupts if the watchdog timer
-elapses and/or if the VMEbus interrupt trigger call occurs.
-*/
-
-/* TODO: Add configurable B41 jumper */
-#define B41 0
-
-void vme_fcscsi1_card_device::update_irq_to_maincpu() {
- if (fdc_irq_state) {
- m_maincpu->set_input_line(M68K_IRQ_3, ASSERT_LINE);
- m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE);
- m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
- } else if (dmac_irq_state) {
- m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE);
- m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
-#if B41 == 1
- m_maincpu->set_input_line_and_vector(M68K_IRQ_2, ASSERT_LINE, dmac_irq_vector);
-#else
- m_maincpu->set_input_line(M68K_IRQ_2, ASSERT_LINE);
-#endif
- } else {
- m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE);
- m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE);
- m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
- }
-}
-
-IRQ_CALLBACK_MEMBER(vme_fcscsi1_card_device::maincpu_irq_acknowledge_callback)
-{
- // We immediately update the interrupt presented to the CPU, so that it doesn't
- // end up retrying the same interrupt over and over. We then return the appropriate vector.
- int vector = 0;
- switch(irqline) {
- case 2:
- dmac_irq_state = 0;
- vector = dmac_irq_vector;
- break;
- default:
- logerror("\nUnexpected IRQ ACK Callback: IRQ %d\n", irqline);
- return 0;
- }
- update_irq_to_maincpu();
- return vector;
-}
-
// This info isn't kept in a card driver atm so storing it as a comment for later use
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
//COMP( 1986, fcscsi1, 0, 0, fcscsi1, fcscsi1, driver_device, 0, "Force Computers Gmbh", "SYS68K/SCSI-1", MACHINE_IS_SKELETON )
diff --git a/src/devices/bus/vme/vme_fcscsi.h b/src/devices/bus/vme/vme_fcscsi.h
index 35e95520585..02f22d1eaa1 100644
--- a/src/devices/bus/vme/vme_fcscsi.h
+++ b/src/devices/bus/vme/vme_fcscsi.h
@@ -35,8 +35,6 @@ protected:
int dmac_irq_vector;
private:
- IRQ_CALLBACK_MEMBER(maincpu_irq_acknowledge_callback);
-
//dmac
DECLARE_WRITE8_MEMBER(dma_end);
DECLARE_WRITE8_MEMBER(dma_error);
@@ -60,6 +58,7 @@ private:
DECLARE_WRITE8_MEMBER(scsi_w);
void fcscsi1_mem(address_map &map);
+ void cpu_space_map(address_map &map);
required_device<cpu_device> m_maincpu;
required_device<wd1772_device> m_fdc;
diff --git a/src/devices/cpu/m68000/m68000.h b/src/devices/cpu/m68000/m68000.h
index 0ee41f348b5..5dd032d28ea 100644
--- a/src/devices/cpu/m68000/m68000.h
+++ b/src/devices/cpu/m68000/m68000.h
@@ -22,6 +22,9 @@ constexpr int M68K_IC_SIZE = 128;
/* There are 7 levels of interrupt to the 68K.
* A transition from < 7 to 7 will cause a non-maskable interrupt (NMI).
+ *
+ * If disable_interrupt_mixer() has been called, the 3 interrupt lines
+ * are modeled instead, as numbers 0-2.
*/
constexpr int M68K_IRQ_NONE = 0;
constexpr int M68K_IRQ_1 = 1;
@@ -73,23 +76,6 @@ constexpr int M68K_HMMU_DISABLE = 0; /* no translation */
constexpr int M68K_HMMU_ENABLE_II = 1; /* Mac II style fixed translation */
constexpr int M68K_HMMU_ENABLE_LC = 2; /* Mac LC style fixed translation */
-/* Special interrupt acknowledge values.
- * Use these as special returns from the interrupt acknowledge callback
- * (specified later in this header).
- */
-
-/* Causes an interrupt autovector (0x18 + interrupt level) to be taken.
- * This happens in a real 68K if VPA or AVEC is asserted during an interrupt
- * acknowledge cycle instead of DTACK.
- */
-constexpr uint32_t M68K_INT_ACK_AUTOVECTOR = 0xffffffff;
-
-/* Causes the spurious interrupt vector (0x18) to be taken
- * This happens in a real 68K if BERR is asserted during the interrupt
- * acknowledge cycle (i.e. no devices responded to the acknowledge).
- */
-constexpr uint32_t M68K_INT_ACK_SPURIOUS = 0xfffffffe;
-
enum
{
/* NOTE: M68K_SP fetches the current SP, be it USP, ISP, or MSP */
@@ -106,10 +92,15 @@ enum
class m68000_base_device : public cpu_device
{
public:
+ enum {
+ AS_CPU_SPACE = 4
+ };
// construction/destruction
m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ void autovectors_map(address_map &map);
+
protected:
void presave();
void postload();
@@ -122,9 +113,8 @@ protected:
// device_execute_interface overrides
virtual uint32_t execute_min_cycles() const override { return 4; };
virtual uint32_t execute_max_cycles() const override { return 158; };
- virtual uint32_t execute_input_lines() const override { return 8; }; // number of input lines
- virtual uint32_t execute_default_irq_vector(int inputnum) const override { return M68K_INT_ACK_AUTOVECTOR; }
- virtual bool execute_input_edge_triggered(int inputnum) const override { return inputnum == M68K_IRQ_7; }
+ virtual uint32_t execute_input_lines() const override { return m_interrupt_mixer ? 8 : 3; }; // number of input lines
+ virtual bool execute_input_edge_triggered(int inputnum) const override { return m_interrupt_mixer ? inputnum == M68K_IRQ_7 : false; }
virtual void execute_run() override;
virtual void execute_set_input(int inputnum, int state) override;
@@ -138,6 +128,7 @@ protected:
// address spaces
const address_space_config m_program_config, m_oprogram_config;
+ address_space_config m_cpu_space_config;
void define_state(void);
@@ -151,6 +142,8 @@ public:
int get_pmmu_enable() {return m_pmmu_enabled;};
void set_fpu_enable(int enable);
void set_buserror_details(uint32_t fault_addr, uint8_t rw, uint8_t fc);
+ void disable_interrupt_mixer() { m_interrupt_mixer = false; }
+ void set_cpu_space(int space_id) { m_cpu_space_id = space_id; }
protected:
m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock,
@@ -161,6 +154,8 @@ protected:
int m_has_fpu; /* Indicates if a FPU is available (yes on 030, 040, may be on 020) */
+ bool m_interrupt_mixer; /* Indicates whether to put a virtual 8->3 priority mixer on the input lines (default true) */
+ int m_cpu_space_id; /* CPU space address space id (default AS_CPU_SPACE) */
uint32_t m_cpu_type; /* CPU Type: 68000, 68008, 68010, 68EC020, 68020, 68EC030, 68030, 68EC040, or 68040 */
//
@@ -232,8 +227,6 @@ protected:
const uint8_t* m_cyc_exception;
/* Callbacks to host */
- device_irq_acknowledge_delegate m_int_ack_callback; /* Interrupt Acknowledge */
- write32_delegate m_bkpt_ack_callback; /* Breakpoint Acknowledge */
write_line_delegate m_reset_instr_callback; /* Called when a RESET instruction is encountered */
write32_delegate m_cmpild_instr_callback; /* Called when a CMPI.L #v, Dn instruction is encountered */
write_line_delegate m_rte_instr_callback; /* Called when a RTE instruction is encountered */
@@ -241,7 +234,7 @@ protected:
allowing writeback to be disabled globally or selectively
or other side effects to be implemented */
- address_space *m_program, *m_oprogram;
+ address_space *m_program, *m_oprogram, *m_cpu_space;
/* Redirect memory calls */
@@ -324,6 +317,7 @@ protected:
void init_cpu_scc68070(void);
void init_cpu_coldfire(void);
+ void default_autovectors_map(address_map &map);
void m68ki_exception_interrupt(uint32_t int_level);
diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp
index 851c27163ea..a899366052a 100644
--- a/src/devices/cpu/m68000/m68kcpu.cpp
+++ b/src/devices/cpu/m68000/m68kcpu.cpp
@@ -640,9 +640,12 @@ void m68000_base_device::set_irq_line(int irqline, int state)
vstate &= ~(1 << irqline);
m_virq_state = vstate;
- for(blevel = 7; blevel > 0; blevel--)
- if(vstate & (1 << blevel))
- break;
+ if(m_interrupt_mixer) {
+ for(blevel = 7; blevel > 0; blevel--)
+ if(vstate & (1 << blevel))
+ break;
+ } else
+ blevel = vstate;
m_int_level = blevel << 8;
@@ -920,7 +923,7 @@ void m68000_base_device::init_cpu_common(void)
//this = device;//deviceparam;
m_program = &space(AS_PROGRAM);
m_oprogram = has_space(AS_OPCODES) ? &space(AS_OPCODES) : m_program;
- m_int_ack_callback = device_irq_acknowledge_delegate(FUNC(m68000_base_device::standard_irq_callback_member), this);
+ m_cpu_space = &space(m_cpu_space_id);
/* disable all MMUs */
m_has_pmmu = 0;
@@ -2119,18 +2122,19 @@ void m68000_base_device::m68ki_exception_interrupt(uint32_t int_level)
if(m_stopped)
return;
- /* Acknowledge the interrupt */
- vector = m_int_ack_callback(*this, int_level);
-
- /* Get the interrupt vector */
- if(vector == M68K_INT_ACK_AUTOVECTOR)
- /* Use the autovectors. This is the most commonly used implementation */
- vector = EXCEPTION_INTERRUPT_AUTOVECTOR+int_level;
- else if(vector == M68K_INT_ACK_SPURIOUS)
- /* Called if no devices respond to the interrupt acknowledge */
- vector = EXCEPTION_SPURIOUS_INTERRUPT;
- else if(vector > 255)
- return;
+ /* Inform the device than an interrupt is taken */
+ if(m_interrupt_mixer)
+ standard_irq_callback(int_level);
+ else
+ for(int i=0; i<3; i++)
+ if(int_level & (1<<i))
+ standard_irq_callback(i);
+
+ /* Acknowledge the interrupt by reading the cpu space. */
+ /* We require the handlers for autovector to return the correct
+ vector, including for spurious interrupts. */
+
+ vector = m_cpu_space->read_word(0xfffffff0 | (int_level << 1)) & 0xff;
/* Start exception processing */
sr = m68ki_init_exception();
@@ -2170,7 +2174,10 @@ m68000_base_device::m68000_base_device(const machine_config &mconfig, const char
const device_type type, uint32_t prg_data_width, uint32_t prg_address_bits, address_map_constructor internal_map)
: cpu_device(mconfig, type, tag, owner, clock),
m_program_config("program", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, internal_map),
- m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, internal_map)
+ m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, internal_map),
+ m_cpu_space_config("cpu space", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, address_map_constructor(FUNC(m68000_base_device::default_autovectors_map), this)),
+ m_interrupt_mixer(true),
+ m_cpu_space_id(AS_CPU_SPACE)
{
clear_all();
}
@@ -2180,7 +2187,10 @@ m68000_base_device::m68000_base_device(const machine_config &mconfig, const char
const device_type type, uint32_t prg_data_width, uint32_t prg_address_bits)
: cpu_device(mconfig, type, tag, owner, clock),
m_program_config("program", ENDIANNESS_BIG, prg_data_width, prg_address_bits),
- m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, prg_data_width, prg_address_bits)
+ m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, prg_data_width, prg_address_bits),
+ m_cpu_space_config("cpu space", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, address_map_constructor(FUNC(m68000_base_device::default_autovectors_map), this)),
+ m_interrupt_mixer(true),
+ m_cpu_space_id(AS_CPU_SPACE)
{
clear_all();
}
@@ -2257,7 +2267,6 @@ void m68000_base_device::clear_all()
m_cyc_instruction = nullptr;
m_cyc_exception = nullptr;
- m_int_ack_callback = device_irq_acknowledge_delegate();
m_program = nullptr;
m_space = nullptr;
@@ -2302,6 +2311,19 @@ void m68000_base_device::clear_all()
m_internal = nullptr;
}
+void m68000_base_device::autovectors_map(address_map &map)
+{
+ // Eventually add the sync to E due to vpa
+ map(0x2, 0xf).lr16("autovectors", [](offs_t offset) -> u16 { return 0x19+offset; });
+}
+
+void m68000_base_device::default_autovectors_map(address_map &map)
+{
+ if(m_cpu_space_id == AS_CPU_SPACE && !has_configured_map(AS_CPU_SPACE)) {
+ offs_t mask = make_bitmask<offs_t>(m_program_config.addr_width());
+ map(mask - 0xf, mask).m(*this, FUNC(m68000_base_device::autovectors_map));
+ }
+}
void m68000_base_device::device_start()
{
@@ -2344,14 +2366,27 @@ void m68000_base_device::execute_set_input(int inputnum, int state)
device_memory_interface::space_config_vector m68000_base_device::memory_space_config() const
{
if(has_configured_map(AS_OPCODES))
- return space_config_vector {
- std::make_pair(AS_PROGRAM, &m_program_config),
- std::make_pair(AS_OPCODES, &m_oprogram_config)
- };
+ if(m_cpu_space_id == AS_CPU_SPACE)
+ return space_config_vector {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_OPCODES, &m_oprogram_config),
+ std::make_pair(AS_CPU_SPACE, &m_cpu_space_config)
+ };
+ else
+ return space_config_vector {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_OPCODES, &m_oprogram_config)
+ };
else
- return space_config_vector {
- std::make_pair(AS_PROGRAM, &m_program_config)
- };
+ if(m_cpu_space_id == AS_CPU_SPACE)
+ return space_config_vector {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_CPU_SPACE, &m_cpu_space_config)
+ };
+ else
+ return space_config_vector {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
diff --git a/src/devices/machine/68153bim.cpp b/src/devices/machine/68153bim.cpp
index 8df821a813e..271e4d63da7 100644
--- a/src/devices/machine/68153bim.cpp
+++ b/src/devices/machine/68153bim.cpp
@@ -166,9 +166,8 @@ void bim68153_device::device_reset()
cycle is initiated in BIM by receiving IACK low R/W, A1, A2, A3 are latched, and the interrupt level on line A1-A3
is compared with any interrupt requests pending in the chip. Further activity can be one of four cases.*/
#define MAX_VECTOR 255
-IRQ_CALLBACK_MEMBER(bim68153_device::iack)
+u16 bim68153_device::iack(int irqline)
{
- int vec = M68K_INT_ACK_AUTOVECTOR;
int found = 0;
// int level = 0;
int ch = -1;
@@ -183,7 +182,7 @@ IRQ_CALLBACK_MEMBER(bim68153_device::iack)
LOGIACK(" - IRQ cleared due to IACKIN\n");
m_out_iackout_cb(CLEAR_LINE);
m_out_int_cb(CLEAR_LINE); // should really be tristated
- return MAX_VECTOR + 1; // This is a 68K emulation specific response and will terminate the iack cycle
+ return 0x18;
}
for (auto & elem : m_chn)
@@ -205,10 +204,11 @@ IRQ_CALLBACK_MEMBER(bim68153_device::iack)
{
m_out_iackout_cb(CLEAR_LINE); // No more interrupts to serve, pass the message to next device in daisy chain
m_out_int_cb(CLEAR_LINE); // should really be tristated but board driver must make sure to mitigate if this is a problem
- return MAX_VECTOR + 1; // This is a 68K emulation specific response and will terminate the iack cycle
+ return 0x18;
}
m_irq_level = m_chn[ch]->m_control & bim68153_channel::REG_CNTRL_INT_LVL_MSK;
+ int vec;
if ((m_chn[ch]->m_control & bim68153_channel::REG_CNTRL_INT_EXT) == 0)
{
diff --git a/src/devices/machine/68153bim.h b/src/devices/machine/68153bim.h
index e5b9cc4d589..3528005c787 100644
--- a/src/devices/machine/68153bim.h
+++ b/src/devices/machine/68153bim.h
@@ -104,7 +104,7 @@ public:
// construction/destruction
bim68153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- IRQ_CALLBACK_MEMBER(iack);
+ u16 iack(int irqline);
int acknowledge();
int get_irq_level();
diff --git a/src/devices/machine/68340.cpp b/src/devices/machine/68340.cpp
index bae8be35b62..7f9671fa12d 100644
--- a/src/devices/machine/68340.cpp
+++ b/src/devices/machine/68340.cpp
@@ -67,8 +67,15 @@ void m68340_cpu_device::update_ipl()
}
}
-IRQ_CALLBACK_MEMBER(m68340_cpu_device::int_ack)
+void m68340_cpu_device::internal_vectors_r(address_map &map)
{
+ map(0xfffff2, 0xffffff).r(FUNC(m68340_cpu_device::int_ack));
+}
+
+
+u16 m68340_cpu_device::int_ack(offs_t offset)
+{
+ int irqline = offset + 1;
uint8_t pit_iarb = pit_arbitrate(irqline);
uint8_t scu_iarb = m_serial->arbitrate(irqline);
uint8_t t1_iarb = m_timer[0]->arbitrate(irqline);
@@ -76,7 +83,7 @@ IRQ_CALLBACK_MEMBER(m68340_cpu_device::int_ack)
uint8_t iarb = std::max({pit_iarb, scu_iarb, t1_iarb, t2_iarb});
LOGMASKED(LOG_IPL, "Level %d interrupt arbitration: PIT = %X, SCU = %X, T1 = %X, T2 = %X\n", irqline, pit_iarb, scu_iarb, t1_iarb, t2_iarb);
int response = 0;
- uint32_t vector = standard_irq_callback(irqline);
+ uint32_t vector = 0x18; // Spurious interrupt
// Valid IARB levels are F (high) to 1 (low) and should be unique among modules using the same interrupt level
if (iarb != 0)
@@ -228,6 +235,7 @@ m68340_cpu_device::m68340_cpu_device(const machine_config &mconfig, const char *
m_m68340DMA = nullptr;
m_m68340_base = 0;
m_ipl = 0;
+ m_cpu_space_config.m_internal_map = address_map_constructor(FUNC(m68340_cpu_device::internal_vectors_r), this);
}
void m68340_cpu_device::device_reset()
@@ -259,8 +267,6 @@ void m68340_cpu_device::device_start()
m_m68340_base = 0x00000000;
m_internal = &space(AS_PROGRAM);
-
- m_int_ack_callback = device_irq_acknowledge_delegate(FUNC(m68340_cpu_device::int_ack), this);
}
void m68340_cpu_device::m68k_reset_peripherals()
diff --git a/src/devices/machine/68340.h b/src/devices/machine/68340.h
index 23f3ed6b147..84e51785596 100644
--- a/src/devices/machine/68340.h
+++ b/src/devices/machine/68340.h
@@ -56,7 +56,8 @@ private:
required_device_array<mc68340_timer_module_device, 2> m_timer;
void update_ipl();
- IRQ_CALLBACK_MEMBER(int_ack);
+ void internal_vectors_r(address_map &map);
+ u16 int_ack(offs_t offset);
TIMER_CALLBACK_MEMBER(periodic_interrupt_timer_callback);
diff --git a/src/devices/machine/fga002.cpp b/src/devices/machine/fga002.cpp
index 50ae32bfe0e..d9708fb37fc 100644
--- a/src/devices/machine/fga002.cpp
+++ b/src/devices/machine/fga002.cpp
@@ -253,9 +253,9 @@ void fga002_device::trigger_interrupt(uint8_t data)
m_out_int_cb(ASSERT_LINE);
}
-IRQ_CALLBACK_MEMBER(fga002_device::iack)
+u16 fga002_device::iack()
{
- int vec = M68K_INT_ACK_AUTOVECTOR;
+ int vec = 0x18; // Spurious interrupt
int vec_found = 0;
int level;
@@ -295,7 +295,7 @@ IRQ_CALLBACK_MEMBER(fga002_device::iack)
default: break; /* Since we need the vector for the switch statement the default job is already done */
}
LOGVEC("dev:%02x ", vec);
- if (vec == INT_ACK_AUTOVECTOR) vec = INT_EMPTY;
+ if (vec == 0x18) vec = INT_EMPTY;
LOGVEC("avec:%02x ", vec);
// Add vector page bits and return vector
diff --git a/src/devices/machine/fga002.h b/src/devices/machine/fga002.h
index 6a699a193f0..dac28d1c81c 100644
--- a/src/devices/machine/fga002.h
+++ b/src/devices/machine/fga002.h
@@ -25,7 +25,7 @@ class fga002_device : public device_t
DECLARE_WRITE_LINE_MEMBER( lirq6_w );
DECLARE_WRITE_LINE_MEMBER( lirq7_w );
- IRQ_CALLBACK_MEMBER(iack);
+ u16 iack();
int acknowledge();
int get_irq_level();
diff --git a/src/devices/machine/mc68328.cpp b/src/devices/machine/mc68328.cpp
index 6f453483102..9117801749f 100644
--- a/src/devices/machine/mc68328.cpp
+++ b/src/devices/machine/mc68328.cpp
@@ -353,6 +353,11 @@ void mc68328_device::internal_map(address_map &map)
map(0xfff000, 0xffffff).rw(FUNC(mc68328_device::internal_read), FUNC(mc68328_device::internal_write));
}
+void mc68328_device::cpu_space_map(address_map &map)
+{
+ map(0xfffff2, 0xffffff).r(FUNC(mc68328_device::irq_callback));
+}
+
mc68328_device::mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: m68000_device(mconfig, tag, owner, clock, MC68328, 16, 24, address_map_constructor(FUNC(mc68328_device::internal_map), this))
@@ -448,8 +453,6 @@ void mc68328_device::device_reset()
{
m68000_device::device_reset();
- m_int_ack_callback = device_irq_acknowledge_delegate(FUNC(mc68328_device::vector_gen), this);
-
m_regs.scr = 0x0c;
m_regs.grpbasea = 0x0000;
m_regs.grpbaseb = 0x0000;
@@ -705,9 +708,9 @@ void mc68328_device::set_port_d_lines(uint8_t state, int bit)
poll_port_d_interrupts();
}
-IRQ_CALLBACK_MEMBER( mc68328_device::vector_gen )
+u16 mc68328_device::irq_callback(offs_t offset)
{
- return m_regs.ivr | irqline;
+ return m_regs.ivr | (offset + 1);
}
uint32_t mc68328_device::get_timer_frequency(uint32_t index)
diff --git a/src/devices/machine/mc68328.h b/src/devices/machine/mc68328.h
index 42708bb18c1..36f69f5ab40 100644
--- a/src/devices/machine/mc68328.h
+++ b/src/devices/machine/mc68328.h
@@ -330,7 +330,8 @@ private:
// internal state
void set_interrupt_line(uint32_t line, uint32_t active);
void poll_port_d_interrupts();
- IRQ_CALLBACK_MEMBER(vector_gen);
+ void cpu_space_map(address_map &map);
+ u16 irq_callback(offs_t offset);
uint32_t get_timer_frequency(uint32_t index);
void maybe_start_timer(uint32_t index, uint32_t new_enable);
void timer_compare_event(uint32_t index);
diff --git a/src/devices/machine/mc68901.cpp b/src/devices/machine/mc68901.cpp
index 3a178089dfc..1b175bbb703 100644
--- a/src/devices/machine/mc68901.cpp
+++ b/src/devices/machine/mc68901.cpp
@@ -1114,30 +1114,31 @@ WRITE8_MEMBER( mc68901_device::write )
}
-int mc68901_device::get_vector()
+u16 mc68901_device::get_vector()
{
- int ch;
-
- for (ch = 15; ch >= 0; ch--)
+ for (int ch = 15; ch >= 0; ch--)
{
if (BIT(m_imr, ch) && BIT(m_ipr, ch))
{
- if (m_vr & VR_S)
+ if (!machine().side_effects_disabled())
{
- /* set interrupt-in-service bit */
- m_isr |= (1 << ch);
- }
+ if (m_vr & VR_S)
+ {
+ /* set interrupt-in-service bit */
+ m_isr |= (1 << ch);
+ }
- /* clear interrupt pending bit */
- m_ipr &= ~(1 << ch);
+ /* clear interrupt pending bit */
+ m_ipr &= ~(1 << ch);
- check_interrupts();
+ check_interrupts();
+ }
return (m_vr & 0xf0) | ch;
}
}
- return M68K_INT_ACK_SPURIOUS;
+ return 0x18; // Spurious irq
}
WRITE_LINE_MEMBER( mc68901_device::i0_w ) { gpio_input(0, state); }
diff --git a/src/devices/machine/mc68901.h b/src/devices/machine/mc68901.h
index d1598b41a00..4754c24fc6e 100644
--- a/src/devices/machine/mc68901.h
+++ b/src/devices/machine/mc68901.h
@@ -75,7 +75,7 @@ public:
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
- int get_vector();
+ u16 get_vector();
DECLARE_WRITE_LINE_MEMBER( i0_w );
DECLARE_WRITE_LINE_MEMBER( i1_w );
diff --git a/src/devices/machine/sega_scu.cpp b/src/devices/machine/sega_scu.cpp
index 3046cccf5b6..54b46c57114 100644
--- a/src/devices/machine/sega_scu.cpp
+++ b/src/devices/machine/sega_scu.cpp
@@ -284,7 +284,7 @@ void sega_scu_device::device_timer(emu_timer &timer, device_timer_id id, int par
const uint16_t irqmask = 1 << (11-id);
if(!(m_ism & irqmask))
- m_hostcpu->set_input_line_and_vector(irqlevel, HOLD_LINE, irqvector);
+ m_hostcpu->set_input_line_and_vector(irqlevel, HOLD_LINE, irqvector); // SH2
else
m_ist |= (irqmask);
@@ -400,7 +400,7 @@ void sega_scu_device::handle_dma_direct(uint8_t level)
{
//popmessage("Warning: SCU transfer from BIOS area, contact MAMEdev");
if(!(m_ism & IRQ_DMAILL))
- m_hostcpu->set_input_line_and_vector(3, HOLD_LINE, 0x4c);
+ m_hostcpu->set_input_line_and_vector(3, HOLD_LINE, 0x4c); // SH2
else
m_ist |= (IRQ_DMAILL);
return;
@@ -620,7 +620,7 @@ void sega_scu_device::check_scanline_timers(int scanline,int y_step)
{
if(!(m_ism & IRQ_TIMER_0))
{
- m_hostcpu->set_input_line_and_vector(0xc, HOLD_LINE, 0x43 );
+ m_hostcpu->set_input_line_and_vector(0xc, HOLD_LINE, 0x43 ); // SH2
dma_start_factor_ack(3);
}
else
@@ -635,7 +635,7 @@ void sega_scu_device::check_scanline_timers(int scanline,int y_step)
{
if(!(m_ism & IRQ_TIMER_1))
{
- m_hostcpu->set_input_line_and_vector(0xb, HOLD_LINE, 0x44 );
+ m_hostcpu->set_input_line_and_vector(0xb, HOLD_LINE, 0x44 ); // SH2
dma_start_factor_ack(4);
}
else
@@ -692,7 +692,7 @@ void sega_scu_device::test_pending_irqs()
{
if(irq_level[i] != -1) /* TODO: cheap check for undefined irqs */
{
- m_hostcpu->set_input_line_and_vector(irq_level[i], HOLD_LINE, 0x40 + i);
+ m_hostcpu->set_input_line_and_vector(irq_level[i], HOLD_LINE, 0x40 + i); // SH2
m_ist &= ~(1 << i);
return; /* avoid spurious irqs, correct? */
}
@@ -707,7 +707,7 @@ WRITE_LINE_MEMBER(sega_scu_device::vblank_out_w)
if(!(m_ism & IRQ_VBLANK_OUT))
{
- m_hostcpu->set_input_line_and_vector(0xe, HOLD_LINE, 0x41);
+ m_hostcpu->set_input_line_and_vector(0xe, HOLD_LINE, 0x41); // SH2
dma_start_factor_ack(1);
}
else
@@ -721,7 +721,7 @@ WRITE_LINE_MEMBER(sega_scu_device::vblank_in_w)
if(!(m_ism & IRQ_VBLANK_IN))
{
- m_hostcpu->set_input_line_and_vector(0xf, HOLD_LINE ,0x40);
+ m_hostcpu->set_input_line_and_vector(0xf, HOLD_LINE ,0x40); // SH2
dma_start_factor_ack(0);
}
else
@@ -735,7 +735,7 @@ WRITE_LINE_MEMBER(sega_scu_device::hblank_in_w)
if(!(m_ism & IRQ_HBLANK_IN))
{
- m_hostcpu->set_input_line_and_vector(0xd, HOLD_LINE, 0x42);
+ m_hostcpu->set_input_line_and_vector(0xd, HOLD_LINE, 0x42); // SH2
dma_start_factor_ack(2);
}
else
@@ -749,7 +749,7 @@ WRITE_LINE_MEMBER(sega_scu_device::vdp1_end_w)
if(!(m_ism & IRQ_VDP1_END))
{
- m_hostcpu->set_input_line_and_vector(0x2, HOLD_LINE, 0x4d);
+ m_hostcpu->set_input_line_and_vector(0x2, HOLD_LINE, 0x4d); // SH2
dma_start_factor_ack(6);
}
else
@@ -763,7 +763,7 @@ WRITE_LINE_MEMBER(sega_scu_device::sound_req_w)
if(!(m_ism & IRQ_SOUND_REQ))
{
- m_hostcpu->set_input_line_and_vector(9, HOLD_LINE, 0x46);
+ m_hostcpu->set_input_line_and_vector(9, HOLD_LINE, 0x46); // SH2
dma_start_factor_ack(5);
}
else
@@ -776,7 +776,7 @@ WRITE_LINE_MEMBER(sega_scu_device::smpc_irq_w)
return;
if(!(m_ism & IRQ_SMPC))
- m_hostcpu->set_input_line_and_vector(8, HOLD_LINE, 0x47);
+ m_hostcpu->set_input_line_and_vector(8, HOLD_LINE, 0x47); // SH2
else
m_ist |= (IRQ_SMPC);
}
@@ -787,7 +787,7 @@ WRITE_LINE_MEMBER(sega_scu_device::scudsp_end_w)
return;
if(!(m_ism & IRQ_DSP_END))
- m_hostcpu->set_input_line_and_vector(0xa, HOLD_LINE, 0x45);
+ m_hostcpu->set_input_line_and_vector(0xa, HOLD_LINE, 0x45); // SH2
else
m_ist |= (IRQ_DSP_END);
diff --git a/src/devices/machine/tmp68301.cpp b/src/devices/machine/tmp68301.cpp
index 1eea072c64a..e21691dfecf 100644
--- a/src/devices/machine/tmp68301.cpp
+++ b/src/devices/machine/tmp68301.cpp
@@ -148,6 +148,7 @@ tmp68301_device::tmp68301_device(const machine_config &mconfig, const char *tag,
{
memset(m_regs, 0, sizeof(m_regs));
memset(m_icr, 0, sizeof(m_icr));
+ m_cpu_space_config.m_internal_map = address_map_constructor(FUNC(tmp68301_device::internal_vectors_r), this);
}
@@ -166,7 +167,6 @@ void tmp68301_device::device_start()
m_out_parallel_cb.resolve_safe();
m_program->install_device(0xfffc00, 0xffffff, *this, &tmp68301_device::tmp68301_regs);
- m_int_ack_callback = device_irq_acknowledge_delegate(FUNC(tmp68301_device::irq_callback), this);
save_item(NAME(m_regs));
save_item(NAME(m_icr));
@@ -198,8 +198,15 @@ void tmp68301_device::device_reset()
// INLINE HELPERS
//**************************************************************************
-IRQ_CALLBACK_MEMBER(tmp68301_device::irq_callback)
+void tmp68301_device::internal_vectors_r(address_map &map)
{
+ map(0xfffff2, 0xffffff).r(FUNC(tmp68301_device::irq_callback));
+}
+
+
+u16 tmp68301_device::irq_callback(offs_t offset)
+{
+ int irqline = offset + 1;
uint8_t IVNR = m_regs[0x9a/2] & 0xe0; // Interrupt Vector Number Register (IVNR)
for (int src : { 0, 7, 3, 1, 8, 4, 5, 9, 2 })
diff --git a/src/devices/machine/tmp68301.h b/src/devices/machine/tmp68301.h
index c350b9b0be6..679dd641036 100644
--- a/src/devices/machine/tmp68301.h
+++ b/src/devices/machine/tmp68301.h
@@ -51,8 +51,6 @@ private:
void tmp68301_regs(address_map &map);
- IRQ_CALLBACK_MEMBER(irq_callback);
-
protected:
// device-level overrides
virtual void device_start() override;
@@ -92,6 +90,9 @@ private:
uint16_t m_pdir;
uint16_t m_pdr;
uint8_t m_icr[10];
+
+ void internal_vectors_r(address_map &map);
+ u16 irq_callback(offs_t offset);
};
DECLARE_DEVICE_TYPE(TMP68301, tmp68301_device)
diff --git a/src/devices/video/stvvdp1.cpp b/src/devices/video/stvvdp1.cpp
index 0f8b5093740..4242c6d6883 100644
--- a/src/devices/video/stvvdp1.cpp
+++ b/src/devices/video/stvvdp1.cpp
@@ -1822,7 +1822,7 @@ TIMER_CALLBACK_MEMBER(saturn_state::vdp1_draw_end )
#if 0
if(!(m_scu.ism & IRQ_VDP1_END))
{
- m_maincpu->set_input_line_and_vector(0x2, HOLD_LINE, 0x4d);
+ m_maincpu->set_input_line_and_vector(0x2, HOLD_LINE, 0x4d); // SH2
scu_do_transfer(6);
}
else
diff --git a/src/mame/audio/mario.cpp b/src/mame/audio/mario.cpp
index 94fa3f3da1e..05d318e4769 100644
--- a/src/mame/audio/mario.cpp
+++ b/src/mame/audio/mario.cpp
@@ -529,7 +529,7 @@ WRITE8_MEMBER(mario_state::masao_sh_irqtrigger_w)
if (m_last == 1 && data == 0)
{
/* setting bit 0 high then low triggers IRQ on the sound CPU */
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
m_last = data;
diff --git a/src/mame/audio/timeplt.cpp b/src/mame/audio/timeplt.cpp
index 78e41db51d2..67459036356 100644
--- a/src/mame/audio/timeplt.cpp
+++ b/src/mame/audio/timeplt.cpp
@@ -137,7 +137,7 @@ WRITE_LINE_MEMBER(timeplt_audio_device::sh_irqtrigger_w)
if (m_last_irq_state == 0 && state)
{
/* setting bit 0 low then high triggers IRQ on the sound CPU */
- m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
m_last_irq_state = state;
diff --git a/src/mame/audio/trackfld.cpp b/src/mame/audio/trackfld.cpp
index aa8bfdaa50c..4b0bec7ba1d 100644
--- a/src/mame/audio/trackfld.cpp
+++ b/src/mame/audio/trackfld.cpp
@@ -125,7 +125,7 @@ WRITE_LINE_MEMBER(trackfld_audio_device::sh_irqtrigger_w)
if (m_last_irq == 0 && state)
{
/* setting bit 0 low then high triggers IRQ on the sound CPU */
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
m_last_irq = state;
diff --git a/src/mame/drivers/1942.cpp b/src/mame/drivers/1942.cpp
index 3dea5f551d8..505da280cec 100644
--- a/src/mame/drivers/1942.cpp
+++ b/src/mame/drivers/1942.cpp
@@ -175,10 +175,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(_1942_state::_1942_scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h - vblank */
if(scanline == 0) // unknown irq event, presumably vblank-in or a periodic one (writes to the soundlatch and drives freeze dip-switch)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* Z80 - RST 08h */
}
diff --git a/src/mame/drivers/88games.cpp b/src/mame/drivers/88games.cpp
index ca2d5d8d2c5..924a19df8fd 100644
--- a/src/mame/drivers/88games.cpp
+++ b/src/mame/drivers/88games.cpp
@@ -69,7 +69,7 @@ WRITE8_MEMBER(_88games_state::k88games_5f84_w)
WRITE8_MEMBER(_88games_state::k88games_sh_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
diff --git a/src/mame/drivers/abc1600.cpp b/src/mame/drivers/abc1600.cpp
index 0b04337d1cb..18390d27031 100644
--- a/src/mame/drivers/abc1600.cpp
+++ b/src/mame/drivers/abc1600.cpp
@@ -804,35 +804,14 @@ WRITE_LINE_MEMBER( abc1600_state::nmi_w )
// MACHINE INITIALIZATION
//**************************************************************************
-//-------------------------------------------------
-// IRQ_CALLBACK_MEMBER( abc1600_int_ack )
-//-------------------------------------------------
-
-IRQ_CALLBACK_MEMBER( abc1600_state::abc1600_int_ack )
+void abc1600_state::cpu_space_map(address_map &map)
{
- int data = 0;
-
- switch (irqline)
- {
- case M68K_IRQ_2:
- data = m_cio->intack_r();
- break;
-
- case M68K_IRQ_5:
- data = m_dart->m1_r();
- break;
-
- case M68K_IRQ_7:
- m_maincpu->set_input_line(M68K_IRQ_7, CLEAR_LINE);
-
- data = M68K_INT_ACK_AUTOVECTOR;
- break;
- }
-
- return data;
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff4, 0xfffff5).lr16("cio int", [this]() -> u16 { return m_cio->intack_r(); });
+ map(0xfffffa, 0xfffffb).lr16("dart int", [this]() -> u16 { return m_dart->m1_r(); });
+ map(0xfffffe, 0xffffff).lr16("hmi int", [this]() -> u16 { m_maincpu->set_input_line(M68K_IRQ_7, CLEAR_LINE); return 0x18+7; });
}
-
void abc1600_state::machine_start()
{
// state saving
@@ -881,7 +860,7 @@ void abc1600_state::abc1600(machine_config &config)
// basic machine hardware
M68008(config, m_maincpu, 64_MHz_XTAL / 8);
m_maincpu->set_addrmap(AS_PROGRAM, &abc1600_state::abc1600_mem);
- m_maincpu->set_irq_acknowledge_callback(FUNC(abc1600_state::abc1600_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &abc1600_state::cpu_space_map);
// video hardware
ABC1600_MOVER(config, ABC1600_MOVER_TAG, 0);
diff --git a/src/mame/drivers/airbustr.cpp b/src/mame/drivers/airbustr.cpp
index 75bbb70c43f..65d7d3e8754 100644
--- a/src/mame/drivers/airbustr.cpp
+++ b/src/mame/drivers/airbustr.cpp
@@ -525,17 +525,17 @@ TIMER_DEVICE_CALLBACK_MEMBER(airbustr_state::airbustr_scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_master->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_master->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
/* Pandora "sprite end dma" irq? TODO: timing is likely off */
if(scanline == 64)
- m_master->set_input_line_and_vector(0, HOLD_LINE, 0xfd);
+ m_master->set_input_line_and_vector(0, HOLD_LINE, 0xfd); // Z80
}
/* Sub Z80 uses IM2 too, but 0xff irq routine just contains an irq ack in it */
INTERRUPT_GEN_MEMBER(airbustr_state::slave_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd);
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd); // Z80
}
/* Machine Initialization */
diff --git a/src/mame/drivers/airraid.cpp b/src/mame/drivers/airraid.cpp
index 8835909b340..c929bb7a1f5 100644
--- a/src/mame/drivers/airraid.cpp
+++ b/src/mame/drivers/airraid.cpp
@@ -209,10 +209,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(airraid_state::cshooter_scanline)
int scanline = param;
if(scanline == 240) // updates scroll resgiters
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* Z80 - RST 10h */
if(scanline == 250) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* Z80 - RST 08h */
}
diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp
index c963688ee98..ed23129f9ff 100644
--- a/src/mame/drivers/amiga.cpp
+++ b/src/mame/drivers/amiga.cpp
@@ -1653,6 +1653,7 @@ void a1000_state::a1000(machine_config &config)
// main cpu
M68000(config, m_maincpu, amiga_state::CLK_7M_PAL);
m_maincpu->set_addrmap(AS_PROGRAM, &a1000_state::a1000_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
ADDRESS_MAP_BANK(config, "overlay").set_map(&a1000_state::a1000_overlay_map).set_options(ENDIANNESS_BIG, 16, 22, 0x200000);
ADDRESS_MAP_BANK(config, "bootrom").set_map(&a1000_state::a1000_bootrom_map).set_options(ENDIANNESS_BIG, 16, 19, 0x40000);
@@ -1689,6 +1690,7 @@ void a2000_state::a2000(machine_config &config)
// main cpu
M68000(config, m_maincpu, amiga_state::CLK_7M_PAL);
m_maincpu->set_addrmap(AS_PROGRAM, &a2000_state::a2000_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
ADDRESS_MAP_BANK(config, "overlay").set_map(&amiga_state::overlay_512kb_map).set_options(ENDIANNESS_BIG, 16, 22, 0x200000);
@@ -1737,6 +1739,7 @@ void a500_state::a500(machine_config &config)
// main cpu
M68000(config, m_maincpu, amiga_state::CLK_7M_PAL);
m_maincpu->set_addrmap(AS_PROGRAM, &a500_state::a500_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
ADDRESS_MAP_BANK(config, "overlay").set_map(&amiga_state::overlay_1mb_map).set_options(ENDIANNESS_BIG, 16, 22, 0x200000);
@@ -1775,6 +1778,7 @@ void cdtv_state::cdtv(machine_config &config)
// main cpu
M68000(config, m_maincpu, amiga_state::CLK_7M_PAL);
m_maincpu->set_addrmap(AS_PROGRAM, &cdtv_state::cdtv_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
// remote control input converter
m6502_device &u75(M6502(config, "u75", XTAL(3'000'000)));
@@ -1848,6 +1852,7 @@ void a3000_state::a3000(machine_config &config)
// main cpu
M68030(config, m_maincpu, XTAL(32'000'000) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &a3000_state::a3000_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
ADDRESS_MAP_BANK(config, "overlay").set_map(&amiga_state::overlay_1mb_map32).set_options(ENDIANNESS_BIG, 32, 22, 0x200000);
@@ -1884,6 +1889,7 @@ void a500p_state::a500p(machine_config &config)
// main cpu
M68000(config, m_maincpu, amiga_state::CLK_7M_PAL);
m_maincpu->set_addrmap(AS_PROGRAM, &a500p_state::a500p_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
ADDRESS_MAP_BANK(config, "overlay").set_map(&amiga_state::overlay_1mb_map).set_options(ENDIANNESS_BIG, 16, 22, 0x200000);
@@ -1923,6 +1929,7 @@ void a600_state::a600(machine_config &config)
// main cpu
M68000(config, m_maincpu, amiga_state::CLK_7M_PAL);
m_maincpu->set_addrmap(AS_PROGRAM, &a600_state::a600_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
ADDRESS_MAP_BANK(config, "overlay").set_map(&amiga_state::overlay_2mb_map16).set_options(ENDIANNESS_BIG, 16, 22, 0x200000);
@@ -1969,6 +1976,7 @@ void a1200_state::a1200(machine_config &config)
// main cpu
M68EC020(config, m_maincpu, amiga_state::CLK_28M_PAL / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &a1200_state::a1200_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
ADDRESS_MAP_BANK(config, "overlay").set_map(&amiga_state::overlay_2mb_map32).set_options(ENDIANNESS_BIG, 32, 22, 0x200000);
@@ -2029,6 +2037,7 @@ void a4000_state::a4000(machine_config &config)
// main cpu
M68040(config, m_maincpu, XTAL(50'000'000) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &a4000_state::a4000_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
ADDRESS_MAP_BANK(config, "overlay").set_map(&amiga_state::overlay_2mb_map32).set_options(ENDIANNESS_BIG, 32, 22, 0x200000);
@@ -2073,6 +2082,7 @@ void a4000_state::a400030(machine_config &config)
// main cpu
M68EC030(config.replace(), m_maincpu, XTAL(50'000'000) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &a4000_state::a400030_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
// todo: ide
}
@@ -2097,6 +2107,7 @@ void cd32_state::cd32(machine_config &config)
// main cpu
M68EC020(config, m_maincpu, amiga_state::CLK_28M_PAL / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &cd32_state::cd32_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
ADDRESS_MAP_BANK(config, "overlay").set_map(&amiga_state::overlay_2mb_map32).set_options(ENDIANNESS_BIG, 32, 22, 0x200000);
@@ -2149,6 +2160,7 @@ void a4000_state::a4000t(machine_config &config)
// main cpu
M68040(config.replace(), m_maincpu, XTAL(50'000'000) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &a4000_state::a4000t_mem);
+ m_maincpu->set_cpu_space(AS_PROGRAM);
// todo: ide, zorro3, scsi, super dmac
}
diff --git a/src/mame/drivers/amust.cpp b/src/mame/drivers/amust.cpp
index 282c61e12f5..a7fc22e98fa 100644
--- a/src/mame/drivers/amust.cpp
+++ b/src/mame/drivers/amust.cpp
@@ -240,7 +240,7 @@ void amust_state::do_int()
|| (BIT(m_port0a, 5) && m_drq)) // when reading from floppy, only do it when DRQ is high.
{
//printf("%X,%X,%X ",m_port0a,sync,m_drq);
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0x00);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0x00); // Z80
}
else
m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
diff --git a/src/mame/drivers/apollo.cpp b/src/mame/drivers/apollo.cpp
index 6398cfbb1f3..c464825e740 100644
--- a/src/mame/drivers/apollo.cpp
+++ b/src/mame/drivers/apollo.cpp
@@ -268,18 +268,21 @@ void apollo_state::apollo_bus_error()
apollo_csr_set_status_register(APOLLO_CSR_SR_CPU_TIMEOUT, APOLLO_CSR_SR_CPU_TIMEOUT);
}
-IRQ_CALLBACK_MEMBER(apollo_state::apollo_irq_acknowledge)
+void apollo_state::cpu_space_map(address_map &map)
{
- int result = M68K_INT_ACK_AUTOVECTOR;
+ map(0xfffff2, 0xffffff).r(FUNC(apollo_state::apollo_irq_acknowledge));
+}
- m_maincpu->set_input_line(irqline, CLEAR_LINE);
+u16 apollo_state::apollo_irq_acknowledge(offs_t offset)
+{
+ m_maincpu->set_input_line(offset+1, CLEAR_LINE);
- MLOG2(("apollo_irq_acknowledge: interrupt level=%d", irqline));
+ MLOG2(("apollo_irq_acknowledge: interrupt level=%d", offset+1));
- if (irqline == 6) {
- result = apollo_pic_acknowledge(device, irqline);
- }
- return result;
+ if (offset+1 == 6)
+ return apollo_pic_get_vector();
+ else
+ return 0x19 + offset;
}
/***************************************************************************
@@ -414,7 +417,7 @@ READ32_MEMBER(apollo_state::ram_with_parity_r){
if (apollo_csr_get_control_register() & APOLLO_CSR_CR_INTERRUPT_ENABLE) {
// force parity error (if NMI is enabled)
- m_maincpu->set_input_line_and_vector(7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(7, ASSERT_LINE);
}
}
@@ -1047,7 +1050,7 @@ void apollo_state::dn3500(machine_config &config)
/* basic machine hardware */
M68030(config, m_maincpu, 25000000); /* 25 MHz 68030 */
m_maincpu->set_addrmap(AS_PROGRAM, &apollo_state::dn3500_map);
- m_maincpu->set_irq_acknowledge_callback(FUNC(apollo_state::apollo_irq_acknowledge));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &apollo_state::cpu_space_map);
config.m_minimum_quantum = attotime::from_hz(60);
@@ -1066,7 +1069,7 @@ void apollo_state::dsp3500(machine_config &config)
{
M68030(config, m_maincpu, 25000000); /* 25 MHz 68030 */
m_maincpu->set_addrmap(AS_PROGRAM, &apollo_state::dsp3500_map);
- m_maincpu->set_irq_acknowledge_callback(FUNC(apollo_state::apollo_irq_acknowledge));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &apollo_state::cpu_space_map);
config.m_minimum_quantum = attotime::from_hz(60);
apollo_terminal(config);
@@ -1102,7 +1105,7 @@ void apollo_state::dn3000(machine_config &config)
{
dn3500(config);
M68020PMMU(config.replace(), m_maincpu, 12000000); /* 12 MHz */
- m_maincpu->set_irq_acknowledge_callback(FUNC(apollo_state::apollo_irq_acknowledge));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &apollo_state::cpu_space_map);
m_maincpu->set_addrmap(AS_PROGRAM, &apollo_state::dn3000_map);
config.device_remove( APOLLO_SIO2_TAG );
m_ram->set_default_size("8M").set_extra_options("4M");
@@ -1114,7 +1117,7 @@ void apollo_state::dn3000(machine_config &config)
void apollo_state::dsp3000(machine_config &config)
{
M68020PMMU(config, m_maincpu, 12000000); /* 12 MHz */
- m_maincpu->set_irq_acknowledge_callback(FUNC(apollo_state::apollo_irq_acknowledge));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &apollo_state::cpu_space_map);
m_maincpu->set_addrmap(AS_PROGRAM, &apollo_state::dsp3000_map);
config.m_minimum_quantum = attotime::from_hz(60);
@@ -1160,7 +1163,7 @@ void apollo_state::dsp5500(machine_config &config)
{
M68040(config, m_maincpu, 25000000); /* 25 MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &apollo_state::dsp5500_map);
- m_maincpu->set_irq_acknowledge_callback(FUNC(apollo_state::apollo_irq_acknowledge));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &apollo_state::cpu_space_map);
config.m_minimum_quantum = attotime::from_hz(60);
apollo_terminal(config);
diff --git a/src/mame/drivers/argus.cpp b/src/mame/drivers/argus.cpp
index 66137ac1f8c..f9d288b02a7 100644
--- a/src/mame/drivers/argus.cpp
+++ b/src/mame/drivers/argus.cpp
@@ -145,10 +145,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(argus_state::scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* Z80 - RST 10h */
if(scanline == 16) // vblank-in irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* Z80 - RST 08h */
}
TIMER_DEVICE_CALLBACK_MEMBER(argus_state::butasan_scanline)
@@ -156,10 +156,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(argus_state::butasan_scanline)
int scanline = param;
if(scanline == 248) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* Z80 - RST 10h */
if(scanline == 8) // vblank-in irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* Z80 - RST 08h */
}
diff --git a/src/mame/drivers/atarist.cpp b/src/mame/drivers/atarist.cpp
index a6eb2d80444..53909852226 100644
--- a/src/mame/drivers/atarist.cpp
+++ b/src/mame/drivers/atarist.cpp
@@ -1213,6 +1213,16 @@ void st_state::ikbd_map(address_map &map)
//-------------------------------------------------
+// ADDRESS_MAP( cpu_space_map )
+//-------------------------------------------------
+
+void st_state::cpu_space_map(address_map &map)
+{
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffffc, 0xfffffd).r(m_mfp, FUNC(mc68901_device::get_vector));
+}
+
+//-------------------------------------------------
// ADDRESS_MAP( st_map )
//-------------------------------------------------
@@ -1787,21 +1797,6 @@ WRITE_LINE_MEMBER( st_state::fdc_drq_w )
//**************************************************************************
//-------------------------------------------------
-// IRQ_CALLBACK_MEMBER( atarist_int_ack )
-//-------------------------------------------------
-
-IRQ_CALLBACK_MEMBER(st_state::atarist_int_ack)
-{
- if (irqline == M68K_IRQ_6)
- {
- return m_mfp->get_vector();
- }
-
- return M68K_INT_ACK_AUTOVECTOR;
-}
-
-
-//-------------------------------------------------
// configure_memory -
//-------------------------------------------------
@@ -1998,7 +1993,7 @@ void st_state::common(machine_config &config)
{
// basic machine hardware
M68000(config, m_maincpu, Y2/4);
- m_maincpu->set_irq_acknowledge_callback(FUNC(st_state::atarist_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &st_state::cpu_space_map);
keyboard(config);
@@ -2206,7 +2201,6 @@ void stbook_state::stbook(machine_config &config)
// basic machine hardware
M68000(config, m_maincpu, U517/2);
m_maincpu->set_addrmap(AS_PROGRAM, &stbook_state::stbook_map);
- m_maincpu->set_irq_acknowledge_callback(FUNC(st_state::atarist_int_ack));
//MCFG_DEVICE_ADD(COP888_TAG, COP888, Y700)
diff --git a/src/mame/drivers/attache.cpp b/src/mame/drivers/attache.cpp
index 71349b6ee7f..aa6d08f171e 100644
--- a/src/mame/drivers/attache.cpp
+++ b/src/mame/drivers/attache.cpp
@@ -906,7 +906,7 @@ WRITE8_MEMBER(attache816_state::z80_comms_ctrl_w)
WRITE_LINE_MEMBER(attache816_state::ppi_irq)
{
if(m_x86_irq_enable & 0x01)
- m_extcpu->set_input_line_and_vector(0,state,0x03);
+ m_extcpu->set_input_line_and_vector(0,state,0x03); // I8086
}
WRITE_LINE_MEMBER(attache816_state::x86_dsr)
diff --git a/src/mame/drivers/battlnts.cpp b/src/mame/drivers/battlnts.cpp
index 10af6e61f14..1d21e0ed5e7 100644
--- a/src/mame/drivers/battlnts.cpp
+++ b/src/mame/drivers/battlnts.cpp
@@ -39,7 +39,7 @@ WRITE_LINE_MEMBER(battlnts_state::vblank_irq)
WRITE8_MEMBER(battlnts_state::battlnts_sh_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE8_MEMBER(battlnts_state::battlnts_bankswitch_w)
diff --git a/src/mame/drivers/berzerk.cpp b/src/mame/drivers/berzerk.cpp
index 18cde8158e8..08afa1c6538 100644
--- a/src/mame/drivers/berzerk.cpp
+++ b/src/mame/drivers/berzerk.cpp
@@ -235,7 +235,7 @@ TIMER_CALLBACK_MEMBER(berzerk_state::irq_callback)
/* set the IRQ line if enabled */
if (m_irq_enabled)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xfc);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xfc); // Z80
/* set up for next interrupt */
next_irq_number = (irq_number + 1) % IRQS_PER_FRAME;
diff --git a/src/mame/drivers/bfm_ad5.cpp b/src/mame/drivers/bfm_ad5.cpp
index b97d231501a..727ac6a2b15 100644
--- a/src/mame/drivers/bfm_ad5.cpp
+++ b/src/mame/drivers/bfm_ad5.cpp
@@ -76,7 +76,7 @@ INPUT_PORTS_END
INTERRUPT_GEN_MEMBER(adder5_state::ad5_fake_timer_int)
{
// this should be coming from the Timer / SIM modules of the Coldfire
-// m_maincpu->set_input_line_and_vector(5, HOLD_LINE, 0x8c);
+// m_maincpu->set_input_line_and_vector(5, HOLD_LINE, 0x8c); // MCF5206E but disabled
}
void adder5_state::bfm_ad5(machine_config &config)
diff --git a/src/mame/drivers/bitgraph.cpp b/src/mame/drivers/bitgraph.cpp
index 4d8c2f6e2c6..06e5d9d2c3b 100644
--- a/src/mame/drivers/bitgraph.cpp
+++ b/src/mame/drivers/bitgraph.cpp
@@ -324,7 +324,7 @@ WRITE_LINE_MEMBER(bitgraph_state::system_clock_write)
}
if (state)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_6, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_6, ASSERT_LINE);
}
else
{
diff --git a/src/mame/drivers/blockout.cpp b/src/mame/drivers/blockout.cpp
index e3a4b9fc722..b35179f0f8f 100644
--- a/src/mame/drivers/blockout.cpp
+++ b/src/mame/drivers/blockout.cpp
@@ -273,7 +273,7 @@ INPUT_PORTS_END
/* handler called by the 2151 emulator when the internal timers cause an IRQ */
WRITE_LINE_MEMBER(blockout_state::irq_handler)
{
- m_audiocpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0xff); // Z80
}
diff --git a/src/mame/drivers/bottom9.cpp b/src/mame/drivers/bottom9.cpp
index a03988f867a..17579e8b007 100644
--- a/src/mame/drivers/bottom9.cpp
+++ b/src/mame/drivers/bottom9.cpp
@@ -131,7 +131,7 @@ WRITE8_MEMBER(bottom9_state::bottom9_1f90_w)
WRITE8_MEMBER(bottom9_state::bottom9_sh_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
INTERRUPT_GEN_MEMBER(bottom9_state::bottom9_sound_interrupt)
diff --git a/src/mame/drivers/cat.cpp b/src/mame/drivers/cat.cpp
index 8fb88335a64..389779d6f54 100644
--- a/src/mame/drivers/cat.cpp
+++ b/src/mame/drivers/cat.cpp
@@ -355,10 +355,11 @@ public:
//TIMER_CALLBACK_MEMBER(keyboard_callback);
TIMER_CALLBACK_MEMBER(counter_6ms_callback);
- IRQ_CALLBACK_MEMBER(cat_int_ack);
void cat(machine_config &config);
void cat_mem(address_map &map);
+ void cpu_space_map(address_map &map);
+
protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
@@ -915,10 +916,10 @@ TIMER_CALLBACK_MEMBER(cat_state::counter_6ms_callback)
m_6ms_counter++;
}
-IRQ_CALLBACK_MEMBER(cat_state::cat_int_ack)
+void cat_state::cpu_space_map(address_map &map)
{
- m_maincpu->set_input_line(M68K_IRQ_1,CLEAR_LINE);
- return M68K_INT_ACK_AUTOVECTOR;
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff2, 0xfffff3).lr16("interrupt 1", [this]() -> u16 { m_maincpu->set_input_line(1, CLEAR_LINE); return 0x19; });
}
MACHINE_START_MEMBER(cat_state,cat)
@@ -983,12 +984,10 @@ uint32_t cat_state::screen_update_cat(screen_device &screen, bitmap_rgb32 &bitma
*/
WRITE_LINE_MEMBER(cat_state::cat_duart_irq_handler)
{
- int irqvector = m_duart->get_irq_vector();
-
#ifdef DEBUG_DUART_IRQ_HANDLER
fprintf(stderr, "Duart IRQ handler called: state: %02X, vector: %06X\n", state, irqvector);
#endif
- m_maincpu->set_input_line_and_vector(M68K_IRQ_1, state, irqvector);
+ m_maincpu->set_input_line(M68K_IRQ_1, state);
}
WRITE_LINE_MEMBER(cat_state::cat_duart_txa) // semit sends stuff here; connects to the serial port on the back
@@ -1059,7 +1058,7 @@ void cat_state::cat(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(19'968'000)/4);
m_maincpu->set_addrmap(AS_PROGRAM, &cat_state::cat_mem);
- m_maincpu->set_irq_acknowledge_callback(FUNC(cat_state::cat_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cat_state::cpu_space_map);
MCFG_MACHINE_START_OVERRIDE(cat_state,cat)
MCFG_MACHINE_RESET_OVERRIDE(cat_state,cat)
diff --git a/src/mame/drivers/cclimber.cpp b/src/mame/drivers/cclimber.cpp
index 803c089a1ba..9bda92aa6f7 100644
--- a/src/mame/drivers/cclimber.cpp
+++ b/src/mame/drivers/cclimber.cpp
@@ -256,7 +256,7 @@ void cclimber_state::machine_start()
WRITE8_MEMBER(cclimber_state::swimmer_sh_soundlatch_w)
{
m_soundlatch->write(data);
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
diff --git a/src/mame/drivers/cgc7900.cpp b/src/mame/drivers/cgc7900.cpp
index 6a9ee61a639..6ac7e730d22 100644
--- a/src/mame/drivers/cgc7900.cpp
+++ b/src/mame/drivers/cgc7900.cpp
@@ -233,6 +233,11 @@ WRITE16_MEMBER( cgc7900_state::interrupt_mask_w )
m_int_mask = data;
}
+void cgc7900_state::cpu_space_map(address_map &map)
+{
+ map(0xfffff2, 0xffffff).lr16("interrupt", [this](offs_t offset) -> u16 { return int_vectors[offset+1]; });
+}
+
void cgc7900_state::irq_encoder(int pin, int state)
{
if (state == ASSERT_LINE)
@@ -242,7 +247,7 @@ void cgc7900_state::irq_encoder(int pin, int state)
if (!BIT(m_int_mask, pin))
{
- m_maincpu->set_input_line_and_vector(int_levels[pin], state, int_vectors[pin]);
+ m_maincpu->set_input_line(int_levels[pin], state);
}
}
@@ -463,6 +468,8 @@ void cgc7900_state::cgc7900(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(28'480'000)/4);
m_maincpu->set_addrmap(AS_PROGRAM, &cgc7900_state::cgc7900_mem);
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cgc7900_state::cpu_space_map);
+
i8035_device &kbmcu(I8035(config, I8035_TAG, 1000000));
kbmcu.set_addrmap(AS_PROGRAM, &cgc7900_state::keyboard_mem);
diff --git a/src/mame/drivers/champbas.cpp b/src/mame/drivers/champbas.cpp
index 8bc7082d3a3..eea94f3ad36 100644
--- a/src/mame/drivers/champbas.cpp
+++ b/src/mame/drivers/champbas.cpp
@@ -113,7 +113,7 @@ WRITE_LINE_MEMBER(champbas_state::irq_enable_w)
TIMER_DEVICE_CALLBACK_MEMBER(exctsccr_state::exctsccr_sound_irq)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
diff --git a/src/mame/drivers/changela.cpp b/src/mame/drivers/changela.cpp
index ba0966fc417..cec4195b595 100644
--- a/src/mame/drivers/changela.cpp
+++ b/src/mame/drivers/changela.cpp
@@ -346,9 +346,9 @@ TIMER_DEVICE_CALLBACK_MEMBER(changela_state::changela_scanline)
int scanline = param;
if(scanline == 256) // vblank irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xdf);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xdf); // Z80
else if(((scanline % 64) == 0)) // timer irq, 3 times per given vblank field
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); // Z80
}
INTERRUPT_GEN_MEMBER(changela_state::chl_mcu_irq)
diff --git a/src/mame/drivers/circusc.cpp b/src/mame/drivers/circusc.cpp
index 111971420a4..dd83abcbc8f 100644
--- a/src/mame/drivers/circusc.cpp
+++ b/src/mame/drivers/circusc.cpp
@@ -100,7 +100,7 @@ READ8_MEMBER(circusc_state::circusc_sh_timer_r)
WRITE8_MEMBER(circusc_state::circusc_sh_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE_LINE_MEMBER(circusc_state::coin_counter_1_w)
diff --git a/src/mame/drivers/combatsc.cpp b/src/mame/drivers/combatsc.cpp
index c1ae7af450b..460f09786a4 100644
--- a/src/mame/drivers/combatsc.cpp
+++ b/src/mame/drivers/combatsc.cpp
@@ -311,7 +311,7 @@ WRITE8_MEMBER(combatsc_state::protection_clock_w)
WRITE8_MEMBER(combatsc_state::combatsc_sh_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
READ8_MEMBER(combatsc_state::combatsc_busy_r)
diff --git a/src/mame/drivers/commando.cpp b/src/mame/drivers/commando.cpp
index 4c310d24464..943db1a3330 100644
--- a/src/mame/drivers/commando.cpp
+++ b/src/mame/drivers/commando.cpp
@@ -232,7 +232,7 @@ GFXDECODE_END
WRITE_LINE_MEMBER(commando_state::vblank_irq)
{
if (state)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); // RST 10h - VBLANK
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); // Z80 - RST 10h - VBLANK
}
/* Machine Driver */
diff --git a/src/mame/drivers/cosmic.cpp b/src/mame/drivers/cosmic.cpp
index 1413d03eb01..484dcbeba1b 100644
--- a/src/mame/drivers/cosmic.cpp
+++ b/src/mame/drivers/cosmic.cpp
@@ -1034,10 +1034,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(cosmic_state::panic_scanline)
int scanline = param;
if(scanline == 224) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* Z80 - RST 10h */
if(scanline == 0) // vblank-in irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* Z80 - RST 08h */
}
diff --git a/src/mame/drivers/cps1.cpp b/src/mame/drivers/cps1.cpp
index 331e605040c..c694bc1438f 100644
--- a/src/mame/drivers/cps1.cpp
+++ b/src/mame/drivers/cps1.cpp
@@ -350,14 +350,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(cps_state::ganbare_interrupt)
m_maincpu->set_input_line(4, ASSERT_LINE);
}
-IRQ_CALLBACK_MEMBER(cps_state::cps1_int_ack)
+void cps_state::cpu_space_map(address_map &map)
{
- // clear the IPL1 and IPL2 flip-flops
- m_maincpu->set_input_line(2, CLEAR_LINE);
- m_maincpu->set_input_line(4, CLEAR_LINE);
-
- // assert VPA
- return M68K_INT_ACK_AUTOVECTOR;
+ // Eventually add the sync to E due to vpa
+ map(0xfffff2, 0xffffff).lr16("autovectors", [this](offs_t offset) -> u16 {
+ // clear the IPL1 and IPL2 flip-flops
+ m_maincpu->set_input_line(2, CLEAR_LINE);
+ m_maincpu->set_input_line(4, CLEAR_LINE);
+ return 0x19+offset; });
}
@@ -3389,7 +3389,7 @@ void cps_state::cps1_10MHz(machine_config &config)
M68000(config, m_maincpu, XTAL(10'000'000)); /* verified on pcb */
m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::main_map);
m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
- m_maincpu->set_irq_acknowledge_callback(FUNC(cps_state::cps1_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */
m_audiocpu->set_addrmap(AS_PROGRAM, &cps_state::sub_map);
diff --git a/src/mame/drivers/cps2.cpp b/src/mame/drivers/cps2.cpp
index 40abe058624..605d14e4ab3 100644
--- a/src/mame/drivers/cps2.cpp
+++ b/src/mame/drivers/cps2.cpp
@@ -657,7 +657,7 @@ Stephh's inputs notes (based on some tests on the "parent" set) :
TIMER_DEVICE_CALLBACK_MEMBER(cps2_state::cps2_interrupt)
{
- /* 2 is vblank, 4 is some sort of scanline interrupt, 6 is both at the same time. */
+ /* direct irq line connection, irq1 is vblank, irq2 is some sort of scanline interrupt. */
if (param == 0)
m_scancalls = 0;
@@ -673,7 +673,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cps2_state::cps2_interrupt)
if (m_scanline1 == param || (m_scanline1 < param && !m_scancalls))
{
m_cps_b_regs[0x10/2] = 0;
- m_maincpu->set_input_line(4, HOLD_LINE);
+ m_maincpu->set_input_line(2, HOLD_LINE);
m_screen->update_partial(param);
m_scancalls++;
// popmessage("IRQ4 scancounter = %04i", param);
@@ -683,7 +683,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cps2_state::cps2_interrupt)
if(m_scanline2 == param || (m_scanline2 < param && !m_scancalls))
{
m_cps_b_regs[0x12 / 2] = 0;
- m_maincpu->set_input_line(4, HOLD_LINE);
+ m_maincpu->set_input_line(2, HOLD_LINE);
m_screen->update_partial(param);
m_scancalls++;
// popmessage("IRQ4 scancounter = %04i", param);
@@ -693,7 +693,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cps2_state::cps2_interrupt)
{
m_cps_b_regs[0x10 / 2] = m_scanline1;
m_cps_b_regs[0x12 / 2] = m_scanline2;
- m_maincpu->set_input_line(2, HOLD_LINE);
+ m_maincpu->set_input_line(1, HOLD_LINE);
cps2_objram_latch();
}
// popmessage("Raster calls = %i", m_scancalls);
@@ -1301,6 +1301,8 @@ void cps2_state::cps2(machine_config &config)
M68000(config, m_maincpu, XTAL(16'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &cps2_state::cps2_map);
m_maincpu->set_addrmap(AS_OPCODES, &cps2_state::decrypted_opcodes_map);
+ m_maincpu->disable_interrupt_mixer();
+
TIMER(config, "scantimer").configure_scanline(FUNC(cps2_state::cps2_interrupt), "screen", 0, 1);
Z80(config, m_audiocpu, XTAL(8'000'000));
diff --git a/src/mame/drivers/dacholer.cpp b/src/mame/drivers/dacholer.cpp
index 26d330b5eab..ccfd15fe060 100644
--- a/src/mame/drivers/dacholer.cpp
+++ b/src/mame/drivers/dacholer.cpp
@@ -586,7 +586,7 @@ INTERRUPT_GEN_MEMBER(dacholer_state::sound_irq)
{
if (m_music_interrupt_enable == 1)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x30);
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x30); // Z80
}
}
@@ -599,7 +599,7 @@ WRITE_LINE_MEMBER(dacholer_state::adpcm_int)
m_msm_toggle ^= 1;
if (m_msm_toggle == 0)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0x38);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0x38); // Z80
}
}
}
diff --git a/src/mame/drivers/darkmist.cpp b/src/mame/drivers/darkmist.cpp
index 58cd566b3e6..a0149a4c0ec 100644
--- a/src/mame/drivers/darkmist.cpp
+++ b/src/mame/drivers/darkmist.cpp
@@ -231,10 +231,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(darkmist_state::scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x10); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x10); /* Z80 - RST 10h */
if(scanline == 0) // vblank-in irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x08); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x08); /* Z80 - RST 08h */
}
diff --git a/src/mame/drivers/ddayjlc.cpp b/src/mame/drivers/ddayjlc.cpp
index 95662ced4bb..1747087b79e 100644
--- a/src/mame/drivers/ddayjlc.cpp
+++ b/src/mame/drivers/ddayjlc.cpp
@@ -350,7 +350,7 @@ WRITE8_MEMBER(ddayjlc_state::bg2_w)
WRITE8_MEMBER(ddayjlc_state::sound_w)
{
m_soundlatch->write(data);
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE8_MEMBER(ddayjlc_state::flip_screen_w)
diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp
index e05af0653f3..85075d5d1a8 100644
--- a/src/mame/drivers/ddenlovr.cpp
+++ b/src/mame/drivers/ddenlovr.cpp
@@ -2378,7 +2378,7 @@ WRITE8_MEMBER(ddenlovr_state::mmpanic_blitter2_w)
WRITE_LINE_MEMBER(ddenlovr_state::mmpanic_blitter_irq)
{
if (state)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xdf); // RST 18
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xdf); // Z80 - RST 18
}
void ddenlovr_state::mmpanic_update_leds()
@@ -2524,7 +2524,7 @@ WRITE8_MEMBER(ddenlovr_state::funkyfig_blitter_w)
WRITE_LINE_MEMBER(ddenlovr_state::funkyfig_blitter_irq)
{
if (0) // this vector looks wrong
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe0);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe0); // Z80
}
WRITE8_MEMBER(ddenlovr_state::funkyfig_rombank_w)
@@ -9896,15 +9896,15 @@ WRITE_LINE_MEMBER(ddenlovr_state::mmpanic_irq)
//if (downcast<cpu_device *>(m_maincpu)->input_state(0))
// return;
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); // RST 08, vblank
- m_soundcpu->set_input_line(0, HOLD_LINE); // NMI by main cpu
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); // Z80 - RST 08, vblank
+ m_soundcpu->set_input_line(0, HOLD_LINE); // Z80 - NMI by main cpu
}
WRITE_LINE_MEMBER(ddenlovr_state::mmpanic_rtc_irq)
{
if (state)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xdf); // RST 18, clock
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xdf); // Z80 - RST 18, clock
}
void ddenlovr_state::mmpanic(machine_config &config)
@@ -9980,7 +9980,7 @@ WRITE_LINE_MEMBER(ddenlovr_state::hanakanz_irq)
//if (downcast<cpu_device *>(m_maincpu)->input_state(0))
// return;
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe0);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe0); // Z80
}
WRITE_LINE_MEMBER(ddenlovr_state::hanakanz_rtc_irq)
@@ -9994,7 +9994,7 @@ WRITE_LINE_MEMBER(ddenlovr_state::hanakanz_rtc_irq)
//if (downcast<cpu_device *>(drvm_maincpu)->input_state(0))
// return;
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe2);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe2); // Z80
}
void ddenlovr_state::hanakanz(machine_config &config)
diff --git a/src/mame/drivers/deadang.cpp b/src/mame/drivers/deadang.cpp
index 8132cb4d8c7..7ea8704e88c 100644
--- a/src/mame/drivers/deadang.cpp
+++ b/src/mame/drivers/deadang.cpp
@@ -325,10 +325,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(deadang_state::main_scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xc4/4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xc4/4); // V30
if(scanline == 0) // vblank-in irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xc8/4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xc8/4); // V30
}
TIMER_DEVICE_CALLBACK_MEMBER(deadang_state::sub_scanline)
@@ -336,10 +336,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(deadang_state::sub_scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_subcpu->set_input_line_and_vector(0, HOLD_LINE,0xc4/4);
+ m_subcpu->set_input_line_and_vector(0, HOLD_LINE,0xc4/4); // V30
if(scanline == 0) // vblank-in irq
- m_subcpu->set_input_line_and_vector(0, HOLD_LINE,0xc8/4);
+ m_subcpu->set_input_line_and_vector(0, HOLD_LINE,0xc8/4); // V30
}
/* Machine Drivers */
diff --git a/src/mame/drivers/dectalk.cpp b/src/mame/drivers/dectalk.cpp
index ee03a4ed2f3..9eec753da43 100644
--- a/src/mame/drivers/dectalk.cpp
+++ b/src/mame/drivers/dectalk.cpp
@@ -335,9 +335,7 @@ private:
/* 2681 DUART */
WRITE_LINE_MEMBER(dectalk_state::duart_irq_handler)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_6, state, M68K_INT_ACK_AUTOVECTOR);
- //drvstate->m_maincpu->set_input_line_and_vector(M68K_IRQ_6, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR);
- //drvstate->m_maincpu->set_input_line_and_vector(M68K_IRQ_6, HOLD_LINE, vector);
+ m_maincpu->set_input_line(M68K_IRQ_6, state);
}
READ8_MEMBER(dectalk_state::duart_input)
@@ -402,10 +400,10 @@ void dectalk_state::dsp_semaphore_w(bool state)
#ifdef VERBOSE
logerror("speech int fired!\n");
#endif
- m_maincpu->set_input_line_and_vector(M68K_IRQ_5, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_5, ASSERT_LINE);
}
else
- m_maincpu->set_input_line_and_vector(M68K_IRQ_5, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_5, CLEAR_LINE);
}
// read the output fifo and set the interrupt line active on the dsp
@@ -602,7 +600,7 @@ WRITE16_MEMBER(dectalk_state::m68k_spcflags_w)// 68k write to the speech flags (
#ifdef SPC_LOG_68K
logerror(" speech int fired!\n");
#endif
- m_maincpu->set_input_line_and_vector(M68K_IRQ_5, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); // set int because semaphore was set
+ m_maincpu->set_input_line(M68K_IRQ_5, ASSERT_LINE); // set int because semaphore was set
}
}
else // data&0x40 == 0
@@ -610,7 +608,7 @@ WRITE16_MEMBER(dectalk_state::m68k_spcflags_w)// 68k write to the speech flags (
#ifdef SPC_LOG_68K
logerror(" | 0x40 = 0: speech int disabled\n");
#endif
- m_maincpu->set_input_line_and_vector(M68K_IRQ_5, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); // clear int because int is now disabled
+ m_maincpu->set_input_line(M68K_IRQ_5, CLEAR_LINE); // clear int because int is now disabled
}
}
@@ -642,7 +640,7 @@ WRITE16_MEMBER(dectalk_state::m68k_tlcflags_w)// dtmf flags write
#ifdef TLC_LOG
logerror(" TLC int fired!\n");
#endif
- m_maincpu->set_input_line_and_vector(M68K_IRQ_4, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); // set int because tone detect was set
+ m_maincpu->set_input_line(M68K_IRQ_4, ASSERT_LINE); // set int because tone detect was set
}
}
else // data&0x40 == 0
@@ -651,7 +649,7 @@ WRITE16_MEMBER(dectalk_state::m68k_tlcflags_w)// dtmf flags write
logerror(" | 0x40 = 0: tone detect int disabled\n");
#endif
if ((!(data&0x4000)) || (!m_tlc_ringdetect)) // check to be sure we don't disable int if both ints fired at once
- m_maincpu->set_input_line_and_vector(M68K_IRQ_4, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); // clear int because int is now disabled
+ m_maincpu->set_input_line(M68K_IRQ_4, CLEAR_LINE); // clear int because int is now disabled
}
if (data&0x100) // bit 8: answer phone relay enable
{
@@ -675,7 +673,7 @@ WRITE16_MEMBER(dectalk_state::m68k_tlcflags_w)// dtmf flags write
#ifdef TLC_LOG
logerror(" TLC int fired!\n");
#endif
- m_maincpu->set_input_line_and_vector(M68K_IRQ_4, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); // set int because tone detect was set
+ m_maincpu->set_input_line(M68K_IRQ_4, ASSERT_LINE); // set int because tone detect was set
}
}
else // data&0x4000 == 0
@@ -684,7 +682,7 @@ WRITE16_MEMBER(dectalk_state::m68k_tlcflags_w)// dtmf flags write
logerror(" | 0x4000 = 0: ring detect int disabled\n");
#endif
if ((!(data&0x40)) || (!m_tlc_tonedetect)) // check to be sure we don't disable int if both ints fired at once
- m_maincpu->set_input_line_and_vector(M68K_IRQ_4, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); // clear int because int is now disabled
+ m_maincpu->set_input_line(M68K_IRQ_4, CLEAR_LINE); // clear int because int is now disabled
}
}
diff --git a/src/mame/drivers/dfruit.cpp b/src/mame/drivers/dfruit.cpp
index 634c4a59914..4b46eb36ffc 100644
--- a/src/mame/drivers/dfruit.cpp
+++ b/src/mame/drivers/dfruit.cpp
@@ -355,17 +355,17 @@ TIMER_DEVICE_CALLBACK_MEMBER(dfruit_state::dfruit_irq_scanline)
if (scanline == 240 && (m_irq_enable & 4))
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[2]);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[2]); // TC0091LVC
}
if (scanline == 0 && (m_irq_enable & 2))
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[1]);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[1]); // TC0091LVC
}
if (scanline == 196 && (m_irq_enable & 1))
{
- //m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[0]);
+ //m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[0]); // TC0091LVC
}
}
diff --git a/src/mame/drivers/djboy.cpp b/src/mame/drivers/djboy.cpp
index c6e8dcdcea1..34a2212fb1b 100644
--- a/src/mame/drivers/djboy.cpp
+++ b/src/mame/drivers/djboy.cpp
@@ -441,11 +441,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(djboy_state::djboy_scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_mastercpu->set_input_line_and_vector(0, HOLD_LINE, 0xfd);
+ m_mastercpu->set_input_line_and_vector(0, HOLD_LINE, 0xfd); // Z80
/* Pandora "sprite end dma" irq? TODO: timing is clearly off, attract mode relies on this */
if(scanline == 64)
- m_mastercpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_mastercpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
void djboy_state::machine_start()
diff --git a/src/mame/drivers/dkong.cpp b/src/mame/drivers/dkong.cpp
index 24617fd7fac..c7df55f11be 100644
--- a/src/mame/drivers/dkong.cpp
+++ b/src/mame/drivers/dkong.cpp
@@ -454,7 +454,7 @@ WRITE8_MEMBER(dkong_state::memory_write_byte)
WRITE_LINE_MEMBER(dkong_state::s2650_interrupt)
{
if (state)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x03);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x03); // Z80
}
/*************************************
diff --git a/src/mame/drivers/dmndrby.cpp b/src/mame/drivers/dmndrby.cpp
index 25b833b0540..e1a46b7172d 100644
--- a/src/mame/drivers/dmndrby.cpp
+++ b/src/mame/drivers/dmndrby.cpp
@@ -527,12 +527,12 @@ void dmndrby_state::dmndrby_palette(palette_device &palette) const
/*Main Z80 is IM 0,HW-latched irqs. */
INTERRUPT_GEN_MEMBER(dmndrby_state::dderby_irq)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h */
}
INTERRUPT_GEN_MEMBER(dmndrby_state::dderby_timer_irq)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* Z80 - RST 08h */
}
void dmndrby_state::dderby(machine_config &config)
diff --git a/src/mame/drivers/dynduke.cpp b/src/mame/drivers/dynduke.cpp
index f0c1486c57b..48a9cefe1ec 100644
--- a/src/mame/drivers/dynduke.cpp
+++ b/src/mame/drivers/dynduke.cpp
@@ -307,8 +307,8 @@ WRITE_LINE_MEMBER(dynduke_state::vblank_irq)
{
if (state)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
- m_slave->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); // V30
+ m_slave->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); // V30
}
}
diff --git a/src/mame/drivers/ecoinfr.cpp b/src/mame/drivers/ecoinfr.cpp
index 5905124d6a1..35590fbb350 100644
--- a/src/mame/drivers/ecoinfr.cpp
+++ b/src/mame/drivers/ecoinfr.cpp
@@ -149,11 +149,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(ecoinfr_state::ecoinfr_irq_timer)
if (irq_toggle==0)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe4); // Z80
}
else
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe0);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xe0); // Z80
}
diff --git a/src/mame/drivers/enigma2.cpp b/src/mame/drivers/enigma2.cpp
index e0f172e9501..f700ea1eacc 100644
--- a/src/mame/drivers/enigma2.cpp
+++ b/src/mame/drivers/enigma2.cpp
@@ -158,7 +158,7 @@ TIMER_CALLBACK_MEMBER(enigma2_state::interrupt_assert_callback)
int vpos = m_screen->vpos();
uint16_t counter = vpos_to_vysnc_chain_counter(vpos);
uint8_t vector = 0xc7 | ((counter & 0x80) >> 3) | ((~counter & 0x80) >> 4);
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector);
+ m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector); // Z80
/* set up for next interrupt */
if (counter == INT_TRIGGER_COUNT_1)
diff --git a/src/mame/drivers/esq5505.cpp b/src/mame/drivers/esq5505.cpp
index 09dc834a0fa..3aa75ca76ab 100644
--- a/src/mame/drivers/esq5505.cpp
+++ b/src/mame/drivers/esq5505.cpp
@@ -194,7 +194,8 @@ public:
void init_sq1();
void init_denib();
DECLARE_INPUT_CHANGED_MEMBER(key_stroke);
- IRQ_CALLBACK_MEMBER(maincpu_irq_acknowledge_callback);
+ void cpu_space_map(address_map &map);
+
DECLARE_WRITE_LINE_MEMBER(esq5505_otis_irq);
private:
@@ -253,20 +254,11 @@ FLOPPY_FORMATS_MEMBER( esq5505_state::floppy_formats )
FLOPPY_ESQIMG_FORMAT
FLOPPY_FORMATS_END
-IRQ_CALLBACK_MEMBER(esq5505_state::maincpu_irq_acknowledge_callback)
+void esq5505_state::cpu_space_map(address_map &map)
{
- switch(irqline)
- {
- case 1:
- return M68K_INT_ACK_AUTOVECTOR;
- case 2:
- return dmac_irq_vector;
- case 3:
- return duart_irq_vector;
- default:
- logerror("\nUnexpected IRQ ACK Callback: IRQ %d\n", irqline);
- return 0;
- }
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff4, 0xfffff5).lr16("dmac irq", [this]() -> u16 { return dmac_irq_vector; });
+ map(0xfffff6, 0xfffff7).lr16("duart irq", [this]() -> u16 { return duart_irq_vector; });
}
void esq5505_state::machine_start()
@@ -320,13 +312,13 @@ void esq5505_state::update_irq_to_maincpu()
{
m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE);
m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
- m_maincpu->set_input_line_and_vector(M68K_IRQ_3, ASSERT_LINE, duart_irq_vector);
+ m_maincpu->set_input_line(M68K_IRQ_3, ASSERT_LINE);
}
else if (dmac_irq_state)
{
m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE);
m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
- m_maincpu->set_input_line_and_vector(M68K_IRQ_2, ASSERT_LINE, dmac_irq_vector);
+ m_maincpu->set_input_line(M68K_IRQ_2, ASSERT_LINE);
}
else if (otis_irq_state)
{
@@ -623,7 +615,7 @@ void esq5505_state::vfx(machine_config &config)
{
M68000(config, m_maincpu, 10_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &esq5505_state::vfx_map);
- m_maincpu->set_irq_acknowledge_callback(FUNC(esq5505_state::maincpu_irq_acknowledge_callback));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &esq5505_state::cpu_space_map);
ES5510(config, m_esp, 10_MHz_XTAL);
m_esp->set_disable();
@@ -714,7 +706,7 @@ void esq5505_state::vfx32(machine_config &config)
{
M68000(config, m_maincpu, 30.4761_MHz_XTAL / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &esq5505_state::vfxsd_map);
- m_maincpu->set_irq_acknowledge_callback(FUNC(esq5505_state::maincpu_irq_acknowledge_callback));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &esq5505_state::cpu_space_map);
ES5510(config, m_esp, 10_MHz_XTAL);
m_esp->set_disable();
diff --git a/src/mame/drivers/exedexes.cpp b/src/mame/drivers/exedexes.cpp
index 66e5701f002..76b0e759f45 100644
--- a/src/mame/drivers/exedexes.cpp
+++ b/src/mame/drivers/exedexes.cpp
@@ -27,10 +27,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(exedexes_state::exedexes_scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h - vblank */
if(scanline == 0) // unknown irq event
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* Z80 - RST 08h */
}
diff --git a/src/mame/drivers/exprraid.cpp b/src/mame/drivers/exprraid.cpp
index 94c766a933e..c424e16ef87 100644
--- a/src/mame/drivers/exprraid.cpp
+++ b/src/mame/drivers/exprraid.cpp
@@ -472,7 +472,7 @@ GFXDECODE_END
/* handler called by the 3812 emulator when the internal timers cause an IRQ */
WRITE_LINE_MEMBER(exprraid_state::irqhandler)
{
- m_slave->set_input_line_and_vector(0, state, 0xff);
+ m_slave->set_input_line_and_vector(0, state, 0xff); // M6809
}
void exprraid_state::machine_start()
diff --git a/src/mame/drivers/fantland.cpp b/src/mame/drivers/fantland.cpp
index 1f1acef77df..77cf05ff9bb 100644
--- a/src/mame/drivers/fantland.cpp
+++ b/src/mame/drivers/fantland.cpp
@@ -805,7 +805,7 @@ WRITE_LINE_MEMBER(fantland_state::vblank_irq)
INTERRUPT_GEN_MEMBER(fantland_state::fantland_sound_irq)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x80 / 4);
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x80 / 4); // I8088
}
void fantland_state::fantland(machine_config &config)
@@ -851,7 +851,7 @@ void fantland_state::fantland(machine_config &config)
WRITE_LINE_MEMBER(fantland_state::galaxygn_sound_irq)
{
- m_audiocpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0x80/4);
+ m_audiocpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0x80/4); // I8088
}
void fantland_state::galaxygn(machine_config &config)
diff --git a/src/mame/drivers/fccpu30.cpp b/src/mame/drivers/fccpu30.cpp
index 9b11636e296..c4b25baae9a 100644
--- a/src/mame/drivers/fccpu30.cpp
+++ b/src/mame/drivers/fccpu30.cpp
@@ -280,7 +280,7 @@ private:
DECLARE_WRITE32_MEMBER (bootvect_w);
/* Interrupt support */
- // IRQ_CALLBACK_MEMBER(maincpu_iack_callback);
+ void cpu_space_map(address_map &map);
DECLARE_WRITE_LINE_MEMBER(fga_irq_callback);
uint8_t fga_irq_state;
// int fga_irq_vector;
@@ -658,12 +658,18 @@ static void fccpu30_vme_cards(device_slot_interface &device)
/*
* Machine configuration
*/
+
+void cpu30_state::cpu_space_map(address_map &map)
+{
+ map(0xfffff2, 0xffffff).lr16("fga002 irq", [this](offs_t offset) -> u16 { return m_fga002->iack(); });
+}
+
void cpu30_state::cpu30(machine_config &config)
{
/* basic machine hardware */
M68030(config, m_maincpu, XTAL(25'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &cpu30_state::cpu30_mem);
- m_maincpu->set_irq_acknowledge_callback("fga002", FUNC(fga002_device::iack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cpu30_state::cpu_space_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
VME(config, "vme", 0);
diff --git a/src/mame/drivers/fcrash.cpp b/src/mame/drivers/fcrash.cpp
index e00e92efb17..554832cd9c7 100644
--- a/src/mame/drivers/fcrash.cpp
+++ b/src/mame/drivers/fcrash.cpp
@@ -1722,7 +1722,7 @@ void cps_state::fcrash(machine_config &config)
M68000(config, m_maincpu, 10000000);
m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::fcrash_map);
m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
- m_maincpu->set_irq_acknowledge_callback(FUNC(cps_state::cps1_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
Z80(config, m_audiocpu, 24000000/6); /* ? */
m_audiocpu->set_addrmap(AS_PROGRAM, &cps_state::sound_map);
@@ -1786,7 +1786,7 @@ void cps_state::kodb(machine_config &config)
M68000(config, m_maincpu, 10000000);
m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::fcrash_map);
m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
- m_maincpu->set_irq_acknowledge_callback(FUNC(cps_state::cps1_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
Z80(config, m_audiocpu, 3579545);
m_audiocpu->set_addrmap(AS_PROGRAM, &cps_state::kodb_sound_map);
@@ -1827,7 +1827,7 @@ void cps_state::mtwinsb(machine_config &config)
M68000(config, m_maincpu, 10000000);
m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::mtwinsb_map);
m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
- m_maincpu->set_irq_acknowledge_callback(FUNC(cps_state::cps1_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
Z80(config, m_audiocpu, 3579545);
m_audiocpu->set_addrmap(AS_PROGRAM, &cps_state::sgyxz_sound_map);
@@ -1919,7 +1919,7 @@ void cps_state::knightsb(machine_config &config)
M68000(config, m_maincpu, 24000000 / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::knightsb_map);
m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
- m_maincpu->set_irq_acknowledge_callback(FUNC(cps_state::cps1_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
Z80(config, m_audiocpu, 29821000 / 8);
m_audiocpu->set_addrmap(AS_PROGRAM, &cps_state::knightsb_z80map);
@@ -2300,7 +2300,7 @@ void cps_state::dinopic(machine_config &config)
M68000(config, m_maincpu, 12000000);
m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::dinopic_map);
m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
- m_maincpu->set_irq_acknowledge_callback(FUNC(cps_state::cps1_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
//PIC16C57(config, m_audiocpu, 12000000).set_disable(); /* no valid dumps .. */
@@ -2489,7 +2489,7 @@ void cps_state::sgyxz(machine_config &config)
M68000(config, m_maincpu, 12000000);
m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::sgyxz_map);
m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
- m_maincpu->set_irq_acknowledge_callback(FUNC(cps_state::cps1_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
Z80(config, m_audiocpu, 3579545);
m_audiocpu->set_addrmap(AS_PROGRAM, &cps_state::sgyxz_sound_map);
@@ -2612,7 +2612,7 @@ void cps_state::punipic(machine_config &config)
M68000(config, m_maincpu, 12000000);
m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::punipic_map);
m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
- m_maincpu->set_irq_acknowledge_callback(FUNC(cps_state::cps1_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
//PIC16C57(config, m_audiocpu, 12000000).set_disable(); /* no valid dumps .. */
@@ -2804,7 +2804,7 @@ void cps_state::sf2m1(machine_config &config)
M68000(config, m_maincpu, XTAL(12'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::sf2m1_map);
m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
- m_maincpu->set_irq_acknowledge_callback(FUNC(cps_state::cps1_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
Z80(config, m_audiocpu, XTAL(3'579'545));
m_audiocpu->set_addrmap(AS_PROGRAM, &cps_state::sgyxz_sound_map);
@@ -3179,7 +3179,7 @@ void cps_state::slampic(machine_config &config)
M68000(config, m_maincpu, 12000000);
m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::slampic_map);
m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
- m_maincpu->set_irq_acknowledge_callback(FUNC(cps_state::cps1_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
//PIC16C57(config, m_audiocpu, 12000000).set_disable(); /* no valid dumps .. */
@@ -3278,7 +3278,7 @@ void cps_state::varthb(machine_config &config)
M68000(config, m_maincpu, 12000000);
m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::varthb_map);
m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt));
- m_maincpu->set_irq_acknowledge_callback(FUNC(cps_state::cps1_int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map);
Z80(config, m_audiocpu, 3579545);
m_audiocpu->set_addrmap(AS_PROGRAM, &cps_state::sgyxz_sound_map);
diff --git a/src/mame/drivers/firetrap.cpp b/src/mame/drivers/firetrap.cpp
index 638303b51ca..84573b9b47b 100644
--- a/src/mame/drivers/firetrap.cpp
+++ b/src/mame/drivers/firetrap.cpp
@@ -256,7 +256,7 @@ WRITE8_MEMBER(firetrap_state::firetrap_8751_w)
{
m_i8751_current_command = 0;
m_i8751_return = 0xff; /* This value is XOR'd and must equal 0 */
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
return;
}
@@ -307,7 +307,7 @@ WRITE8_MEMBER(firetrap_state::firetrap_8751_w)
}
/* Signal main cpu task is complete */
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
m_i8751_current_command=data;
}
@@ -410,7 +410,7 @@ INPUT_CHANGED_MEMBER(firetrap_state::coin_inserted)
if (m_coin_command_pending && !m_i8751_current_command)
{
m_i8751_return = m_coin_command_pending;
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
m_coin_command_pending = 0;
}
}
diff --git a/src/mame/drivers/fp1100.cpp b/src/mame/drivers/fp1100.cpp
index a6dd5521607..2b186ed7ace 100644
--- a/src/mame/drivers/fp1100.cpp
+++ b/src/mame/drivers/fp1100.cpp
@@ -247,7 +247,7 @@ WRITE8_MEMBER( fp1100_state::sub_to_main_w )
{
m_main_latch = data;
LOG("%s: From sub:%X\n",machine().describe_context(),data);
- //m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, 0xf0);
+ //m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, 0xf0); // Z80
}
/*
@@ -344,7 +344,7 @@ WRITE8_MEMBER( fp1100_state::portc_w )
if (BIT(m_irq_mask, 4))
if (!BIT(data, 3))
{
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, 0xf0);
+ m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, 0xf0); // Z80
LOG("%s: PortC:%X\n",machine().describe_context(),data);
}
if (BIT(bits, 5))
@@ -596,7 +596,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( fp1100_state::timer_c )
INTERRUPT_GEN_MEMBER( fp1100_state::vblank_irq )
{
// if (BIT(m_irq_mask, 4))
-// m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xf8);
+// m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xf8); // Z80
}
void fp1100_state::machine_reset()
diff --git a/src/mame/drivers/galaxia.cpp b/src/mame/drivers/galaxia.cpp
index d334e3d4a04..ab3f669d106 100644
--- a/src/mame/drivers/galaxia.cpp
+++ b/src/mame/drivers/galaxia.cpp
@@ -87,7 +87,7 @@ WRITE_LINE_MEMBER(galaxia_state::vblank_irq)
{
if (state)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x03);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x03); // S2650
cvs_scroll_stars();
}
}
diff --git a/src/mame/drivers/goldngam.cpp b/src/mame/drivers/goldngam.cpp
index 5ccc4a504a5..8751597ffd0 100644
--- a/src/mame/drivers/goldngam.cpp
+++ b/src/mame/drivers/goldngam.cpp
@@ -269,7 +269,7 @@ private:
virtual void video_start() override;
void palette_init(palette_device &palette);
uint32_t screen_update_goldngam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- IRQ_CALLBACK_MEMBER(moviecrd_irq_ack);
+ void cpu_space_map(address_map &map);
void moviecrd_map(address_map &map);
void swisspkr_map(address_map &map);
@@ -385,19 +385,11 @@ void goldngam_state::swisspkr_map(address_map &map)
*/
-IRQ_CALLBACK_MEMBER(goldngam_state::moviecrd_irq_ack)
+void goldngam_state::cpu_space_map(address_map &map)
{
- switch (irqline)
- {
- case MOVIECRD_DUART1_IRQ:
- return m_duart[0]->get_irq_vector();
-
- case MOVIECRD_DUART2_IRQ:
- return m_duart[1]->get_irq_vector();
-
- default:
- return M68K_INT_ACK_AUTOVECTOR;
- }
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff4, 0xfffff5).lr16("duart0 int", [this]() -> u16 { return m_duart[0]->get_irq_vector(); });
+ map(0xfffff8, 0xfffff9).lr16("duart0 int", [this]() -> u16 { return m_duart[1]->get_irq_vector(); });
}
void goldngam_state::moviecrd_map(address_map &map)
@@ -638,7 +630,7 @@ void goldngam_state::moviecrd(machine_config &config)
/* basic machine hardware */
m_maincpu->set_addrmap(AS_PROGRAM, &goldngam_state::moviecrd_map);
- m_maincpu->set_irq_acknowledge_callback(FUNC(goldngam_state::moviecrd_irq_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &goldngam_state::cpu_space_map);
m_ptm->irq_callback().set_inputline("maincpu", M68K_IRQ_1);
diff --git a/src/mame/drivers/goodejan.cpp b/src/mame/drivers/goodejan.cpp
index f7054cf22d6..15cccf3795b 100644
--- a/src/mame/drivers/goodejan.cpp
+++ b/src/mame/drivers/goodejan.cpp
@@ -637,7 +637,7 @@ GFXDECODE_END
WRITE_LINE_MEMBER(goodejan_state::vblank_irq)
{
if (state)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x208/4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x208/4); // V30
/* vector 0x00c is just a reti */
}
diff --git a/src/mame/drivers/gradius3.cpp b/src/mame/drivers/gradius3.cpp
index 1b793f364bb..d236fd7c235 100644
--- a/src/mame/drivers/gradius3.cpp
+++ b/src/mame/drivers/gradius3.cpp
@@ -135,7 +135,7 @@ WRITE16_MEMBER(gradius3_state::cpuB_irqtrigger_w)
WRITE16_MEMBER(gradius3_state::sound_irq_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE8_MEMBER(gradius3_state::sound_bank_w)
diff --git a/src/mame/drivers/gundealr.cpp b/src/mame/drivers/gundealr.cpp
index 86e0ca88beb..75ab425506f 100644
--- a/src/mame/drivers/gundealr.cpp
+++ b/src/mame/drivers/gundealr.cpp
@@ -433,9 +433,9 @@ TIMER_DEVICE_CALLBACK_MEMBER(gundealr_state::scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xd7); /* Z80 - RST 10h */
else if((scanline == 0) || (scanline == 120) ) //timer irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* Z80 - RST 10h */
}
void gundealr_state::gundealr(machine_config &config)
diff --git a/src/mame/drivers/gunpey.cpp b/src/mame/drivers/gunpey.cpp
index c90cdc9dd0b..81a8280cf08 100644
--- a/src/mame/drivers/gunpey.cpp
+++ b/src/mame/drivers/gunpey.cpp
@@ -581,9 +581,9 @@ void gunpey_state::irq_check(uint8_t irq_type)
m_irq_cause |= irq_type;
if(m_irq_cause & m_irq_mask)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x200/4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x200/4); // V30
else
- m_maincpu->set_input_line_and_vector(0, CLEAR_LINE, 0x200/4);
+ m_maincpu->set_input_line_and_vector(0, CLEAR_LINE, 0x200/4); // V30
}
WRITE8_MEMBER(gunpey_state::status_w)
diff --git a/src/mame/drivers/gyruss.cpp b/src/mame/drivers/gyruss.cpp
index f6cfa52b263..eb714825d9a 100644
--- a/src/mame/drivers/gyruss.cpp
+++ b/src/mame/drivers/gyruss.cpp
@@ -153,7 +153,7 @@ WRITE8_MEMBER(gyruss_state::gyruss_filter1_w)
WRITE8_MEMBER(gyruss_state::gyruss_sh_irqtrigger_w)
{
/* writing to this register triggers IRQ on the sound CPU */
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE8_MEMBER(gyruss_state::gyruss_i8039_irq_w)
diff --git a/src/mame/drivers/h8.cpp b/src/mame/drivers/h8.cpp
index 928d9f5a76a..b3fb31fa139 100644
--- a/src/mame/drivers/h8.cpp
+++ b/src/mame/drivers/h8.cpp
@@ -113,7 +113,7 @@ private:
TIMER_DEVICE_CALLBACK_MEMBER(h8_state::h8_irq_pulse)
{
if (m_irq_ctl & 1)
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xcf);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xcf); // I8080
}
READ8_MEMBER( h8_state::portf0_r )
@@ -261,7 +261,7 @@ But, all of this can only occur if bit 5 of port F0 is low. */
c = !m_ff_b; // from /Q of 2nd flipflop
m_ff_b = a; // from Q of 1st flipflop
if (c)
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xd7);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xd7); // I8080
}
}
else
diff --git a/src/mame/drivers/h89.cpp b/src/mame/drivers/h89.cpp
index becea35114b..4a0f34baab4 100644
--- a/src/mame/drivers/h89.cpp
+++ b/src/mame/drivers/h89.cpp
@@ -164,7 +164,7 @@ void h89_state::machine_reset()
TIMER_DEVICE_CALLBACK_MEMBER(h89_state::h89_irq_timer)
{
if (m_port_f2 & 0x02)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); // Z80
}
WRITE8_MEMBER( h89_state::port_f2_w )
diff --git a/src/mame/drivers/higemaru.cpp b/src/mame/drivers/higemaru.cpp
index 75c6cc4f052..36d50837204 100644
--- a/src/mame/drivers/higemaru.cpp
+++ b/src/mame/drivers/higemaru.cpp
@@ -26,10 +26,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(higemaru_state::higemaru_scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h - vblank */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* Z80 - RST 08h - vblank */
if(scanline == 0) // unknown irq event, does various stuff like copying the spriteram
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h */
}
diff --git a/src/mame/drivers/hp16500.cpp b/src/mame/drivers/hp16500.cpp
index 4ed4e5bd469..8b4798c5589 100644
--- a/src/mame/drivers/hp16500.cpp
+++ b/src/mame/drivers/hp16500.cpp
@@ -218,7 +218,7 @@ WRITE16_MEMBER(hp16500_state::maskval_w)
WRITE_LINE_MEMBER(hp16500_state::irq_2)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_2, state, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_2, state);
}
void hp16500_state::hp1650_map(address_map &map)
diff --git a/src/mame/drivers/hp9k_3xx.cpp b/src/mame/drivers/hp9k_3xx.cpp
index 5a0d69e4311..cdee08704d2 100644
--- a/src/mame/drivers/hp9k_3xx.cpp
+++ b/src/mame/drivers/hp9k_3xx.cpp
@@ -122,13 +122,13 @@ private:
void add_dio16_bus(machine_config &mconfig);
void add_dio32_bus(machine_config &mconfig);
- DECLARE_WRITE_LINE_MEMBER(dio_irq1_w) { m_maincpu->set_input_line_and_vector(M68K_IRQ_1, state, M68K_INT_ACK_AUTOVECTOR); };
- DECLARE_WRITE_LINE_MEMBER(dio_irq2_w) { m_maincpu->set_input_line_and_vector(M68K_IRQ_2, state, M68K_INT_ACK_AUTOVECTOR); };
- DECLARE_WRITE_LINE_MEMBER(dio_irq3_w) { m_maincpu->set_input_line_and_vector(M68K_IRQ_3, state, M68K_INT_ACK_AUTOVECTOR); };
- DECLARE_WRITE_LINE_MEMBER(dio_irq4_w) { m_maincpu->set_input_line_and_vector(M68K_IRQ_4, state, M68K_INT_ACK_AUTOVECTOR); };
- DECLARE_WRITE_LINE_MEMBER(dio_irq5_w) { m_maincpu->set_input_line_and_vector(M68K_IRQ_5, state, M68K_INT_ACK_AUTOVECTOR); };
- DECLARE_WRITE_LINE_MEMBER(dio_irq6_w) { m_maincpu->set_input_line_and_vector(M68K_IRQ_6, state, M68K_INT_ACK_AUTOVECTOR); };
- DECLARE_WRITE_LINE_MEMBER(dio_irq7_w) { m_maincpu->set_input_line_and_vector(M68K_IRQ_7, state, M68K_INT_ACK_AUTOVECTOR); };
+ DECLARE_WRITE_LINE_MEMBER(dio_irq1_w) { m_maincpu->set_input_line(M68K_IRQ_1, state); };
+ DECLARE_WRITE_LINE_MEMBER(dio_irq2_w) { m_maincpu->set_input_line(M68K_IRQ_2, state); };
+ DECLARE_WRITE_LINE_MEMBER(dio_irq3_w) { m_maincpu->set_input_line(M68K_IRQ_3, state); };
+ DECLARE_WRITE_LINE_MEMBER(dio_irq4_w) { m_maincpu->set_input_line(M68K_IRQ_4, state); };
+ DECLARE_WRITE_LINE_MEMBER(dio_irq5_w) { m_maincpu->set_input_line(M68K_IRQ_5, state); };
+ DECLARE_WRITE_LINE_MEMBER(dio_irq6_w) { m_maincpu->set_input_line(M68K_IRQ_6, state); };
+ DECLARE_WRITE_LINE_MEMBER(dio_irq7_w) { m_maincpu->set_input_line(M68K_IRQ_7, state); };
bool m_bus_error;
emu_timer *m_bus_error_timer;
diff --git a/src/mame/drivers/hp_ipc.cpp b/src/mame/drivers/hp_ipc.cpp
index db082fe1357..7537b7499f1 100644
--- a/src/mame/drivers/hp_ipc.cpp
+++ b/src/mame/drivers/hp_ipc.cpp
@@ -667,37 +667,37 @@ void hp_ipc_state::floppy_id_w(uint8_t data)
WRITE_LINE_MEMBER(hp_ipc_state::irq_1)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_1, state, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_1, state);
}
WRITE_LINE_MEMBER(hp_ipc_state::irq_2)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_2, state, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_2, state);
}
WRITE_LINE_MEMBER(hp_ipc_state::irq_3)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_3, state, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_3, state);
}
WRITE_LINE_MEMBER(hp_ipc_state::irq_4)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_4, state, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_4, state);
}
WRITE_LINE_MEMBER(hp_ipc_state::irq_5)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_5, state, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_5, state);
}
WRITE_LINE_MEMBER(hp_ipc_state::irq_6)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_6, state, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_6, state);
}
WRITE_LINE_MEMBER(hp_ipc_state::irq_7)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_7, state, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_7, state);
}
diff --git a/src/mame/drivers/ht68k.cpp b/src/mame/drivers/ht68k.cpp
index 05c91f9eace..0a7be7127a9 100644
--- a/src/mame/drivers/ht68k.cpp
+++ b/src/mame/drivers/ht68k.cpp
@@ -102,7 +102,7 @@ void ht68k_state::machine_reset()
WRITE_LINE_MEMBER(ht68k_state::duart_irq_handler)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_3, state, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_3, state);
}
WRITE_LINE_MEMBER(ht68k_state::duart_txb)
diff --git a/src/mame/drivers/hvyunit.cpp b/src/mame/drivers/hvyunit.cpp
index fc0b73138ff..5b0743ab271 100644
--- a/src/mame/drivers/hvyunit.cpp
+++ b/src/mame/drivers/hvyunit.cpp
@@ -605,11 +605,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(hvyunit_state::scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_mastercpu->set_input_line_and_vector(0, HOLD_LINE, 0xfd);
+ m_mastercpu->set_input_line_and_vector(0, HOLD_LINE, 0xfd); // Z80
/* Pandora "sprite end dma" irq? TODO: timing is likely off */
if(scanline == 64)
- m_mastercpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_mastercpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
/*************************************
diff --git a/src/mame/drivers/hyperscan.cpp b/src/mame/drivers/hyperscan.cpp
index 99ff480f937..6c89baf2d7f 100644
--- a/src/mame/drivers/hyperscan.cpp
+++ b/src/mame/drivers/hyperscan.cpp
@@ -539,7 +539,7 @@ void hyperscan_state::spg290_timers_update()
if (elem.control & 0x08000000)
{
elem.control |= 0x04000000;
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 56);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 56); // SCORE7
}
}
else
@@ -558,12 +558,12 @@ WRITE_LINE_MEMBER(hyperscan_state::spg290_vblank_irq)
if (state && m_ppu.irq_control & 0x01) // VBlanking Start IRQ
{
m_ppu.irq_status |= 0x01;
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 53);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 53); // SCORE7
}
else if (!state && m_ppu.irq_control & 0x02) // VBlanking End IRQ
{
m_ppu.irq_status |= 0x02;
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 53);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 53); // SCORE7
}
}
@@ -581,7 +581,7 @@ void hyperscan_state::device_timer(emu_timer &timer, device_timer_id id, int par
// TODO: replace with real I2C emulation
m_i2c.rdata = 0;
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 39);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 39); // SCORE7
}
break;
}
diff --git a/src/mame/drivers/icebox.cpp b/src/mame/drivers/icebox.cpp
index 9c2a70ee9ea..c70cca95309 100644
--- a/src/mame/drivers/icebox.cpp
+++ b/src/mame/drivers/icebox.cpp
@@ -290,7 +290,7 @@ void icebox_state::port_f1_w(u8 data)
WRITE_LINE_MEMBER(icebox_state::drq_w)
{
if (BIT(m_f1, 2))
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE, 0x00);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE, 0x00); // Z80
}
static void floppies(device_slot_interface &device)
diff --git a/src/mame/drivers/instruct.cpp b/src/mame/drivers/instruct.cpp
index f283d632037..e1a75ff31c8 100644
--- a/src/mame/drivers/instruct.cpp
+++ b/src/mame/drivers/instruct.cpp
@@ -214,12 +214,12 @@ INTERRUPT_GEN_MEMBER( instruct_state::t2l_int )
// Check INT sw & key
if (BIT(switches, 1))
- device.execute().set_input_line_and_vector(0, BIT(hwkeys, 1) ? ASSERT_LINE : CLEAR_LINE, vector);
+ device.execute().set_input_line_and_vector(0, BIT(hwkeys, 1) ? ASSERT_LINE : CLEAR_LINE, vector); // S2650
else
// process ac input
{
m_irqstate ^= 1;
- device.execute().set_input_line_and_vector(0, m_irqstate ? ASSERT_LINE : CLEAR_LINE, vector);
+ device.execute().set_input_line_and_vector(0, m_irqstate ? ASSERT_LINE : CLEAR_LINE, vector); // S2650
}
}
}
diff --git a/src/mame/drivers/iris3130.cpp b/src/mame/drivers/iris3130.cpp
index f3ee4409123..7b3b2ff858f 100644
--- a/src/mame/drivers/iris3130.cpp
+++ b/src/mame/drivers/iris3130.cpp
@@ -405,12 +405,12 @@ void sgi_ip2_state::sgi_ip2_map(address_map &map)
WRITE_LINE_MEMBER(sgi_ip2_state::duarta_irq_handler)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_6, state, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_6, state);
}
WRITE_LINE_MEMBER(sgi_ip2_state::duartb_irq_handler)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_6, state, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_6, state);
}
static DEVICE_INPUT_DEFAULTS_START( ip2_terminal )
diff --git a/src/mame/drivers/ironhors.cpp b/src/mame/drivers/ironhors.cpp
index a5d64a49be4..c95a55df929 100644
--- a/src/mame/drivers/ironhors.cpp
+++ b/src/mame/drivers/ironhors.cpp
@@ -42,7 +42,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(ironhors_state::ironhors_scanline_tick)
WRITE8_MEMBER(ironhors_state::sh_irqtrigger_w)
{
- m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE8_MEMBER(ironhors_state::filter_w)
diff --git a/src/mame/drivers/junofrst.cpp b/src/mame/drivers/junofrst.cpp
index 5944603fb10..1a7d65d4cb1 100644
--- a/src/mame/drivers/junofrst.cpp
+++ b/src/mame/drivers/junofrst.cpp
@@ -263,7 +263,7 @@ WRITE8_MEMBER(junofrst_state::sh_irqtrigger_w)
if (m_last_irq == 0 && data == 1)
{
/* setting bit 0 low then high triggers IRQ on the sound CPU */
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
m_last_irq = data;
diff --git a/src/mame/drivers/kingobox.cpp b/src/mame/drivers/kingobox.cpp
index 68d6f3776ae..3e7265daf9f 100644
--- a/src/mame/drivers/kingobox.cpp
+++ b/src/mame/drivers/kingobox.cpp
@@ -31,12 +31,12 @@ Main CPU:
void kingofb_state::video_interrupt_w(uint8_t data)
{
- m_video_cpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_video_cpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
void kingofb_state::sprite_interrupt_w(uint8_t data)
{
- m_sprite_cpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_sprite_cpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
void kingofb_state::scroll_interrupt_w(uint8_t data)
@@ -48,7 +48,7 @@ void kingofb_state::scroll_interrupt_w(uint8_t data)
void kingofb_state::sound_command_w(uint8_t data)
{
m_soundlatch->write(data);
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
diff --git a/src/mame/drivers/laserbat.cpp b/src/mame/drivers/laserbat.cpp
index b358a978197..8ccaa320059 100644
--- a/src/mame/drivers/laserbat.cpp
+++ b/src/mame/drivers/laserbat.cpp
@@ -409,7 +409,7 @@ GFXDECODE_END
INTERRUPT_GEN_MEMBER(laserbat_state_base::laserbat_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x0a);
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x0a); // S2650
}
void laserbat_state_base::init_laserbat()
diff --git a/src/mame/drivers/lastbank.cpp b/src/mame/drivers/lastbank.cpp
index c76837381d7..3bae4eb2926 100644
--- a/src/mame/drivers/lastbank.cpp
+++ b/src/mame/drivers/lastbank.cpp
@@ -503,12 +503,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(lastbank_state::irq_scanline)
if (scanline == 240 && (m_irq_enable & 4))
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[2]);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[2]); // Z80
}
if (scanline == 0 && (m_irq_enable & 2))
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[1]);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[1]); // Z80
}
}
diff --git a/src/mame/drivers/lwings.cpp b/src/mame/drivers/lwings.cpp
index cac34b47796..18debe71f32 100644
--- a/src/mame/drivers/lwings.cpp
+++ b/src/mame/drivers/lwings.cpp
@@ -106,7 +106,7 @@ WRITE8_MEMBER(lwings_state::lwings_bankswitch_w)
INTERRUPT_GEN_MEMBER(lwings_state::lwings_interrupt)
{
if(m_nmi_mask)
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h */
}
INTERRUPT_GEN_MEMBER(lwings_state::avengers_interrupt)
diff --git a/src/mame/drivers/lwriter.cpp b/src/mame/drivers/lwriter.cpp
index 551c4f8a89e..f317c7a7b72 100644
--- a/src/mame/drivers/lwriter.cpp
+++ b/src/mame/drivers/lwriter.cpp
@@ -340,7 +340,7 @@ WRITE_LINE_MEMBER(lwriter_state::via_int_w)
{
logerror(" VIA: INT output set to %d!\n", state);
//TODO: this is likely wrong, the VPA pin which controls whether autovector is enabled or not is controlled by PAL U8D, which is not dumped.
- m_maincpu->set_input_line_and_vector(M68K_IRQ_1, (state ? ASSERT_LINE : CLEAR_LINE), M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_1, (state ? ASSERT_LINE : CLEAR_LINE));
}
/* scc stuff */
diff --git a/src/mame/drivers/m79amb.cpp b/src/mame/drivers/m79amb.cpp
index 4dc3beb74cc..377efc3e7e4 100644
--- a/src/mame/drivers/m79amb.cpp
+++ b/src/mame/drivers/m79amb.cpp
@@ -191,7 +191,7 @@ INPUT_PORTS_END
INTERRUPT_GEN_MEMBER(m79amb_state::m79amb_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* Z80 - RST 08h */
}
void m79amb_state::m79amb(machine_config &config)
diff --git a/src/mame/drivers/m90.cpp b/src/mame/drivers/m90.cpp
index b51f058c2a5..e6b27b02fab 100644
--- a/src/mame/drivers/m90.cpp
+++ b/src/mame/drivers/m90.cpp
@@ -718,13 +718,13 @@ INTERRUPT_GEN_MEMBER(m90_state::bomblord_fake_nmi)
WRITE_LINE_MEMBER(m90_state::dynablsb_vblank_int_w)
{
if (state)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x60/4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x60/4); // V35
}
WRITE_LINE_MEMBER(m90_state::bomblord_vblank_int_w)
{
if (state)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x50/4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x50/4); // V35
}
diff --git a/src/mame/drivers/magicard.cpp b/src/mame/drivers/magicard.cpp
index 43dff213718..7fd94a4d1b4 100644
--- a/src/mame/drivers/magicard.cpp
+++ b/src/mame/drivers/magicard.cpp
@@ -435,6 +435,7 @@ public:
void init_magicard();
private:
+ u16 m_vector;
required_shared_ptr<uint16_t> m_magicram;
required_shared_ptr<uint16_t> m_magicramb;
required_shared_ptr<uint16_t> m_pcab_vregs;
@@ -476,6 +477,7 @@ private:
void magicard_mem(address_map &map);
void ramdac_map(address_map &map);
void scc68070_mem(address_map &map);
+ void cpu_space_map(address_map &map);
};
@@ -982,13 +984,25 @@ void magicard_state::machine_reset()
* Machine Drivers *
*************************/
+
/*Probably there's a mask somewhere if it REALLY uses irqs at all...irq vectors dynamically changes after some time.*/
+//In practice, needs a *real* 68070 emu
+void magicard_state::cpu_space_map(address_map &map)
+{
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff2, 0xfffff3).lr16("irq 2", [this]() -> u16 { return m_vector; });
+}
+
INTERRUPT_GEN_MEMBER(magicard_state::magicard_irq)
{
- if(machine().input().code_pressed(KEYCODE_Z)) //vblank?
- device.execute().set_input_line_and_vector(1, HOLD_LINE, 0xe4 / 4);
- if(machine().input().code_pressed(KEYCODE_X)) //uart irq
- device.execute().set_input_line_and_vector(1, HOLD_LINE, 0xf0 / 4);
+ if(machine().input().code_pressed(KEYCODE_Z)) { //vblank?
+ m_vector = 0xe4;
+ device.execute().set_input_line(1, HOLD_LINE);
+ }
+ if(machine().input().code_pressed(KEYCODE_X)) { //uart irq
+ m_vector = 0xf0;
+ device.execute().set_input_line(1, HOLD_LINE);
+ }
}
void magicard_state::ramdac_map(address_map &map)
@@ -1001,6 +1015,7 @@ void magicard_state::magicard(machine_config &config)
{
SCC68070(config, m_maincpu, CLOCK_A / 2); /* SCC-68070 CCA84 datasheet */
m_maincpu->set_addrmap(AS_PROGRAM, &magicard_state::magicard_mem);
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &magicard_state::cpu_space_map);
m_maincpu->set_vblank_int("screen", FUNC(magicard_state::magicard_irq)); /* no interrupts? (it erases the vectors..) */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
diff --git a/src/mame/drivers/mainevt.cpp b/src/mame/drivers/mainevt.cpp
index 73dca657958..8db66284102 100644
--- a/src/mame/drivers/mainevt.cpp
+++ b/src/mame/drivers/mainevt.cpp
@@ -92,7 +92,7 @@ WRITE8_MEMBER(mainevt_state::mainevt_coin_w)
WRITE8_MEMBER(mainevt_state::mainevt_sh_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
READ8_MEMBER(mainevt_state::mainevt_sh_busy_r)
diff --git a/src/mame/drivers/manohman.cpp b/src/mame/drivers/manohman.cpp
index 57c29b77ebe..77bd6d7c3ed 100644
--- a/src/mame/drivers/manohman.cpp
+++ b/src/mame/drivers/manohman.cpp
@@ -156,8 +156,7 @@ public:
private:
virtual void machine_start() override;
void mem_map(address_map &map);
-
- IRQ_CALLBACK_MEMBER(iack_handler);
+ void cpu_space_map(address_map &map);
required_device<cpu_device> m_maincpu;
required_device<mc68681_device> m_duart;
@@ -170,17 +169,6 @@ void manohman_state::machine_start()
}
-IRQ_CALLBACK_MEMBER(manohman_state::iack_handler)
-{
- if (irqline >= M68K_IRQ_4)
- return m_duart->get_irq_vector();
- else if (irqline >= M68K_IRQ_2)
- return m_pit->irq_tiack();
- else
- return M68K_INT_ACK_SPURIOUS; // doesn't really matter
-}
-
-
/*********************************************
* Memory Map Definition *
*********************************************/
@@ -198,6 +186,13 @@ void manohman_state::mem_map(address_map &map)
map(0x600006, 0x600007).noprw(); //(r) is discarded (watchdog?)
}
+void manohman_state::cpu_space_map(address_map &map)
+{
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff4, 0xfffff5).r(m_pit, FUNC(pit68230_device::irq_tiack));
+ map(0xfffff8, 0xfffff9).r(m_duart, FUNC(mc68681_device::get_irq_vector));
+}
+
/*
RW
@@ -246,7 +241,7 @@ void manohman_state::manohman(machine_config &config)
{
M68000(config, m_maincpu, XTAL(8'000'000)); // MC68000P8
m_maincpu->set_addrmap(AS_PROGRAM, &manohman_state::mem_map);
- m_maincpu->set_irq_acknowledge_callback(FUNC(manohman_state::iack_handler));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &manohman_state::cpu_space_map);
PIT68230(config, m_pit, XTAL(8'000'000)); // MC68230P8
m_pit->timer_irq_callback().set_inputline("maincpu", M68K_IRQ_2);
diff --git a/src/mame/drivers/maygayv1.cpp b/src/mame/drivers/maygayv1.cpp
index 5bc77116c26..0090a262c58 100644
--- a/src/mame/drivers/maygayv1.cpp
+++ b/src/mame/drivers/maygayv1.cpp
@@ -250,6 +250,7 @@ private:
void sound_data(address_map &map);
void sound_io(address_map &map);
void sound_prg(address_map &map);
+ void cpu_space_map(address_map &map);
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -824,10 +825,15 @@ INPUT_PORTS_END
***************************************************************************/
+void maygayv1_state::cpu_space_map(address_map &map)
+{
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffffa, 0xfffffb).lr16("duart irq", [this]() -> u16 { return m_duart68681->get_irq_vector(); });
+}
+
WRITE_LINE_MEMBER(maygayv1_state::duart_irq_handler)
{
- m_maincpu->set_input_line_and_vector(5, state, m_duart68681->get_irq_vector());
-// m_maincpu->set_input_line(5, state ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(5, state);
}
@@ -882,6 +888,7 @@ void maygayv1_state::maygayv1(machine_config &config)
{
M68000(config, m_maincpu, MASTER_CLOCK / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &maygayv1_state::main_map);
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &maygayv1_state::cpu_space_map);
I8052(config, m_soundcpu, SOUND_CLOCK);
m_soundcpu->set_addrmap(AS_PROGRAM, &maygayv1_state::sound_prg);
diff --git a/src/mame/drivers/mdisk.cpp b/src/mame/drivers/mdisk.cpp
index 53720cc46e9..308642521f2 100644
--- a/src/mame/drivers/mdisk.cpp
+++ b/src/mame/drivers/mdisk.cpp
@@ -163,7 +163,7 @@ TIMER_CALLBACK_MEMBER(mdisk_state::rom_timer_callback)
void mdisk_state::update_irq(uint8_t vector)
{
if (m_uart1_rxrdy || m_uart1_txrdy || m_fdc_irq)
- m_cpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, vector);
+ m_cpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, vector); // Z80
else
m_cpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/meadows.cpp b/src/mame/drivers/meadows.cpp
index ee4c065045e..54c4d003c0e 100644
--- a/src/mame/drivers/meadows.cpp
+++ b/src/mame/drivers/meadows.cpp
@@ -201,7 +201,7 @@ WRITE8_MEMBER(meadows_state::meadows_audio_w)
INPUT_CHANGED_MEMBER(meadows_state::coin_inserted)
{
- m_maincpu->set_input_line_and_vector(0, (newval ? ASSERT_LINE : CLEAR_LINE), 0x82);
+ m_maincpu->set_input_line_and_vector(0, (newval ? ASSERT_LINE : CLEAR_LINE), 0x82); // S2650
}
diff --git a/src/mame/drivers/metlfrzr.cpp b/src/mame/drivers/metlfrzr.cpp
index 2e5cdbdb68c..b436bdd6686 100644
--- a/src/mame/drivers/metlfrzr.cpp
+++ b/src/mame/drivers/metlfrzr.cpp
@@ -359,11 +359,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(metlfrzr_state::scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x10); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x10); /* Z80 - RST 10h */
// TODO: check this irq.
if(scanline == 0) // vblank-in irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x08); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x08); /* Z80 - RST 08h */
}
void metlfrzr_state::metlfrzr(machine_config &config)
diff --git a/src/mame/drivers/meyc8088.cpp b/src/mame/drivers/meyc8088.cpp
index 056227e3f3c..065ed66487a 100644
--- a/src/mame/drivers/meyc8088.cpp
+++ b/src/mame/drivers/meyc8088.cpp
@@ -173,7 +173,7 @@ WRITE_LINE_MEMBER(meyc8088_state::screen_vblank)
{
// LC255(200ns pulse) rising edge asserts INTR at start and end of vblank
// INTA wired back to INTR to clear it, vector is hardwired to $20
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x20);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x20); // I8088
}
diff --git a/src/mame/drivers/micro3d.cpp b/src/mame/drivers/micro3d.cpp
index 22e780fed92..f195a86007e 100644
--- a/src/mame/drivers/micro3d.cpp
+++ b/src/mame/drivers/micro3d.cpp
@@ -291,6 +291,12 @@ void micro3d_state::soundmem_io(address_map &map)
map(0xff01, 0xff01).w(FUNC(micro3d_state::micro3d_snd_dac_b));
}
+void micro3d_state::cpu_space_map(address_map &map)
+{
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff6, 0xfffff7).lr16("duart irq", [this]() -> u16 { return m_duart->get_irq_vector(); });
+}
+
/*************************************
*
@@ -303,6 +309,7 @@ void micro3d_state::micro3d(machine_config &config)
M68000(config, m_maincpu, 32_MHz_XTAL / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &micro3d_state::hostmem);
m_maincpu->set_vblank_int("screen", FUNC(micro3d_state::micro3d_vblank));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &micro3d_state::cpu_space_map);
TMS34010(config, m_vgb, 40_MHz_XTAL);
m_vgb->set_addrmap(AS_PROGRAM, &micro3d_state::vgbmem);
diff --git a/src/mame/drivers/mikie.cpp b/src/mame/drivers/mikie.cpp
index a8b8cbd3842..0ea82a43983 100644
--- a/src/mame/drivers/mikie.cpp
+++ b/src/mame/drivers/mikie.cpp
@@ -78,7 +78,7 @@ WRITE_LINE_MEMBER(mikie_state::sh_irqtrigger_w)
if (state)
{
// setting bit 0 low then high triggers IRQ on the sound CPU
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
}
diff --git a/src/mame/drivers/mustache.cpp b/src/mame/drivers/mustache.cpp
index 9462c33bf02..f3fdf7c9232 100644
--- a/src/mame/drivers/mustache.cpp
+++ b/src/mame/drivers/mustache.cpp
@@ -171,10 +171,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(mustache_state::scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x10); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x10); /* Z80 - RST 10h */
if(scanline == 0) // vblank-in irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x08); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x08); /* Z80 - RST 08h */
}
diff --git a/src/mame/drivers/mz2500.cpp b/src/mame/drivers/mz2500.cpp
index 514481eb977..3d1f7760ace 100644
--- a/src/mame/drivers/mz2500.cpp
+++ b/src/mame/drivers/mz2500.cpp
@@ -1778,7 +1778,7 @@ WRITE_LINE_MEMBER(mz2500_state::mz2500_rtc_alarm_irq)
{
/* TODO: doesn't work yet */
// if(m_irq_mask[3] && state & 1)
-// m_maincpu->set_input_line_and_vector(0, HOLD_LINE,drvm_irq_vector[3]);
+// m_maincpu->set_input_line_and_vector(0, HOLD_LINE,drvm_irq_vector[3]); // Z80
}
diff --git a/src/mame/drivers/n8080.cpp b/src/mame/drivers/n8080.cpp
index 224b638e527..68dffb80894 100644
--- a/src/mame/drivers/n8080.cpp
+++ b/src/mame/drivers/n8080.cpp
@@ -437,7 +437,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::rst1_tick)
int state = m_inte ? ASSERT_LINE : CLEAR_LINE;
/* V7 = 1, V6 = 0 */
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xcf);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xcf); // I8080
}
TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::rst2_tick)
@@ -445,7 +445,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::rst2_tick)
int state = m_inte ? ASSERT_LINE : CLEAR_LINE;
/* vblank */
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xd7);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xd7); // I8080
}
WRITE_LINE_MEMBER(n8080_state::n8080_inte_callback)
diff --git a/src/mame/drivers/nakajies.cpp b/src/mame/drivers/nakajies.cpp
index f95f0244270..1e903d59218 100644
--- a/src/mame/drivers/nakajies.cpp
+++ b/src/mame/drivers/nakajies.cpp
@@ -440,7 +440,7 @@ void nakajies_state::nakajies_update_irqs()
if ( vector >= 0xf8 )
{
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector );
+ m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector ); // V20
}
else
{
diff --git a/src/mame/drivers/ncdmips.cpp b/src/mame/drivers/ncdmips.cpp
index bf133fd83a1..2dc5edff57d 100644
--- a/src/mame/drivers/ncdmips.cpp
+++ b/src/mame/drivers/ncdmips.cpp
@@ -119,7 +119,7 @@ void ncd_mips_state::hmxpro_map(address_map &map)
WRITE_LINE_MEMBER(ncd_mips_state::duart_irq_handler)
{
- //m_maincpu->set_input_line_and_vector(M68K_IRQ_6, state, M68K_INT_ACK_AUTOVECTOR);
+ //m_maincpu->set_input_line(M68K_IRQ_6, state);
}
void ncd_mips_state::hmxpro(machine_config &config)
diff --git a/src/mame/drivers/nemesis.cpp b/src/mame/drivers/nemesis.cpp
index ef4fd5af181..3111e2a9f2e 100644
--- a/src/mame/drivers/nemesis.cpp
+++ b/src/mame/drivers/nemesis.cpp
@@ -137,7 +137,7 @@ WRITE_LINE_MEMBER(nemesis_state::coin2_lockout_w)
WRITE_LINE_MEMBER(nemesis_state::sound_irq_w)
{
if (state)
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
diff --git a/src/mame/drivers/next.cpp b/src/mame/drivers/next.cpp
index c7fe7db08a9..ace185152d0 100644
--- a/src/mame/drivers/next.cpp
+++ b/src/mame/drivers/next.cpp
@@ -253,7 +253,7 @@ void next_state::irq_check()
if(level != irq_level) {
maincpu->set_input_line(irq_level, CLEAR_LINE);
- maincpu->set_input_line_and_vector(level, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ maincpu->set_input_line(level, ASSERT_LINE);
irq_level = level;
}
}
diff --git a/src/mame/drivers/nichild.cpp b/src/mame/drivers/nichild.cpp
index 7f150a625a7..8ef4109977c 100644
--- a/src/mame/drivers/nichild.cpp
+++ b/src/mame/drivers/nichild.cpp
@@ -226,7 +226,7 @@ static const z80_daisy_config daisy_chain_main[] =
INTERRUPT_GEN_MEMBER(nichild_state::vdp_irq)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x76);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x76); // TMPZ84C011
}
diff --git a/src/mame/drivers/olibochu.cpp b/src/mame/drivers/olibochu.cpp
index 1b54945cdcb..ed2cf4d2120 100644
--- a/src/mame/drivers/olibochu.cpp
+++ b/src/mame/drivers/olibochu.cpp
@@ -453,10 +453,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(olibochu_state::olibochu_scanline)
int scanline = param;
if(scanline == 248) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h - vblank */
if(scanline == 0) // sprite buffer irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* Z80 - RST 08h */
}
void olibochu_state::olibochu(machine_config &config)
diff --git a/src/mame/drivers/pacman.cpp b/src/mame/drivers/pacman.cpp
index ed05527b38f..fecc65b6516 100644
--- a/src/mame/drivers/pacman.cpp
+++ b/src/mame/drivers/pacman.cpp
@@ -728,7 +728,7 @@ READ8_MEMBER(pacman_state::bigbucks_question_r)
WRITE_LINE_MEMBER(pacman_state::s2650_interrupt)
{
if (state)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x03);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x03); // S2650
}
WRITE8_MEMBER(pacman_state::porky_banking_w)
diff --git a/src/mame/drivers/pandoras.cpp b/src/mame/drivers/pandoras.cpp
index c617c02f6c6..026f146dc2d 100644
--- a/src/mame/drivers/pandoras.cpp
+++ b/src/mame/drivers/pandoras.cpp
@@ -98,7 +98,7 @@ WRITE8_MEMBER(pandoras_state::i8039_irqen_and_status_w)
WRITE8_MEMBER(pandoras_state::pandoras_z80_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE_LINE_MEMBER(pandoras_state::coin_counter_1_w)
diff --git a/src/mame/drivers/panicr.cpp b/src/mame/drivers/panicr.cpp
index b22d278d528..09dbedb077b 100644
--- a/src/mame/drivers/panicr.cpp
+++ b/src/mame/drivers/panicr.cpp
@@ -596,10 +596,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(panicr_state::scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc4/4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc4/4); // V20
if(scanline == 0) // <unknown>
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); // V20
}
void panicr_state::panicr(machine_config &config)
diff --git a/src/mame/drivers/parodius.cpp b/src/mame/drivers/parodius.cpp
index 1d4bb5f05ff..ff8e3f9d787 100644
--- a/src/mame/drivers/parodius.cpp
+++ b/src/mame/drivers/parodius.cpp
@@ -60,7 +60,7 @@ WRITE8_MEMBER(parodius_state::parodius_3fc0_w)
WRITE8_MEMBER(parodius_state::parodius_sh_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
#if 0
diff --git a/src/mame/drivers/pc8401a.cpp b/src/mame/drivers/pc8401a.cpp
index 7de2b1b5d45..13a06f1a0a2 100644
--- a/src/mame/drivers/pc8401a.cpp
+++ b/src/mame/drivers/pc8401a.cpp
@@ -57,7 +57,7 @@ void pc8401a_state::scan_keyboard()
if (!m_key_strobe && strobe)
{
/* trigger interrupt */
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0x28);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0x28); // Z80
logerror("INTERRUPT\n");
}
diff --git a/src/mame/drivers/pdp1.cpp b/src/mame/drivers/pdp1.cpp
index 5c8171f6888..3839fcce9b6 100644
--- a/src/mame/drivers/pdp1.cpp
+++ b/src/mame/drivers/pdp1.cpp
@@ -1346,7 +1346,7 @@ static void iot_tyi(device_t *device, int op2, int nac, int mb, int *io, int ac)
{
state->m_io_status &= ~io_st_tyi;
if (USE_SBS)
- state->m_maincpu->set_input_line_and_vector(0, CLEAR_LINE, 0); /* interrupt it, baby */
+ state->m_maincpu->set_input_line_and_vector(0, CLEAR_LINE, 0); /* PDP1 - interrupt it, baby */
}
}
@@ -1705,7 +1705,7 @@ void pdp1_state::pdp1_keyboard()
m_typewriter.tb = (i << 4) + j;
m_io_status |= io_st_tyi;
#if USE_SBS
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, 0); /* interrupt it, baby */
+ m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, 0); /* PDP1 - interrupt it, baby */
#endif
m_maincpu->set_state_int(PDP1_PF1, 1);
pdp1_typewriter_drawchar(m_typewriter.tb); /* we want to echo input */
diff --git a/src/mame/drivers/pokemini.cpp b/src/mame/drivers/pokemini.cpp
index 7b369fe7b87..ceac27a2966 100644
--- a/src/mame/drivers/pokemini.cpp
+++ b/src/mame/drivers/pokemini.cpp
@@ -304,7 +304,7 @@ void pokemini_state::check_irqs()
{
//logerror("Triggering IRQ with vector %02x\n", vector );
/* Trigger interrupt and set vector */
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector );
+ m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector ); // MINX
}
else
{
diff --git a/src/mame/drivers/psychic5.cpp b/src/mame/drivers/psychic5.cpp
index c697838d8f9..161ca68bf1f 100644
--- a/src/mame/drivers/psychic5.cpp
+++ b/src/mame/drivers/psychic5.cpp
@@ -370,10 +370,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(psychic5_state::scanline)
int scanline = param;
if(scanline == 240) // vblank-out irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h - vblank */
if(scanline == 0) // sprite buffer irq
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* Z80 - RST 08h */
}
diff --git a/src/mame/drivers/px4.cpp b/src/mame/drivers/px4.cpp
index 66f62a566cb..2c191086c26 100644
--- a/src/mame/drivers/px4.cpp
+++ b/src/mame/drivers/px4.cpp
@@ -300,16 +300,16 @@ void px4_state::gapnit_interrupt()
if (m_ier & m_isr & INT0_7508)
{
m_isr &= ~INT0_7508;
- m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf0);
+ m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf0); // Z80
}
else if (m_ier & m_isr & INT1_ART)
- m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf2);
+ m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf2); // Z80
else if (m_ier & m_isr & INT2_ICF)
- m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf4);
+ m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf4); // Z80
else if (m_ier & m_isr & INT3_OVF)
- m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf6);
+ m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf6); // Z80
else if (m_ier & m_isr & INT4_EXT)
- m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf8);
+ m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf8); // Z80
else
m_z80->set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/quasar.cpp b/src/mame/drivers/quasar.cpp
index f14c2e4a4ab..c2d192ee433 100644
--- a/src/mame/drivers/quasar.cpp
+++ b/src/mame/drivers/quasar.cpp
@@ -272,7 +272,7 @@ GFXDECODE_END
INTERRUPT_GEN_MEMBER(quasar_state::quasar_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03);
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); // S2650
}
// ****************************************
diff --git a/src/mame/drivers/raiden.cpp b/src/mame/drivers/raiden.cpp
index fcbbf23e00b..4644c7dadb2 100644
--- a/src/mame/drivers/raiden.cpp
+++ b/src/mame/drivers/raiden.cpp
@@ -329,8 +329,8 @@ WRITE_LINE_MEMBER(raiden_state::vblank_irq)
{
if (state)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
- m_subcpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); // V30
+ m_subcpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); // V30
}
}
diff --git a/src/mame/drivers/raiden2.cpp b/src/mame/drivers/raiden2.cpp
index 1b6a0ed49fc..42fc06880d7 100644
--- a/src/mame/drivers/raiden2.cpp
+++ b/src/mame/drivers/raiden2.cpp
@@ -247,7 +247,7 @@ void raiden2_state::combine32(u32 *val, offs_t offset, u16 data, u16 mem_mask)
INTERRUPT_GEN_MEMBER(raiden2_state::interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xc0/4); /* VBL */
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xc0/4); /* V30 - VBL */
}
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index d743b9afad3..e6056310400 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -1374,7 +1374,7 @@ void rainbow_state::update_8088_irqs()
{
if (m_irq_mask & (1 << i))
{
- m_i8088->set_input_line_and_vector(INPUT_LINE_INT0, ASSERT_LINE, vectors[i] | m_irq_high);
+ m_i8088->set_input_line_and_vector(INPUT_LINE_INT0, ASSERT_LINE, vectors[i] | m_irq_high); // I8088
break;
}
}
@@ -2240,7 +2240,7 @@ WRITE8_MEMBER(rainbow_state::i8088_latch_w)
// The interrupt vector address(F7H) placed on the bus is hardwired into the Z80A interrupt vector encoder.
// The F7H interrupt vector address causes the Z80A processor to perform an RST 30 instruction in
// interrupt mode 0
- m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf7);
+ m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf7); // Z80
m_z80_mailbox = data;
m_intz80 = true;
diff --git a/src/mame/drivers/rollerg.cpp b/src/mame/drivers/rollerg.cpp
index 885d6e72f8f..0da4cf9287a 100644
--- a/src/mame/drivers/rollerg.cpp
+++ b/src/mame/drivers/rollerg.cpp
@@ -51,7 +51,7 @@ READ8_MEMBER(rollerg_state::rollerg_k051316_r)
WRITE8_MEMBER(rollerg_state::soundirq_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
void rollerg_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
diff --git a/src/mame/drivers/sbasketb.cpp b/src/mame/drivers/sbasketb.cpp
index 478c314e5fe..ca67ca93144 100644
--- a/src/mame/drivers/sbasketb.cpp
+++ b/src/mame/drivers/sbasketb.cpp
@@ -57,7 +57,7 @@ CPU/Video Board Parts:
WRITE8_MEMBER(sbasketb_state::sbasketb_sh_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE_LINE_MEMBER(sbasketb_state::coin_counter_1_w)
diff --git a/src/mame/drivers/sbowling.cpp b/src/mame/drivers/sbowling.cpp
index dd915396b75..4867ce45458 100644
--- a/src/mame/drivers/sbowling.cpp
+++ b/src/mame/drivers/sbowling.cpp
@@ -198,10 +198,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(sbowling_state::interrupt)
int scanline = param;
if(scanline == 256)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* Z80 - RST 08h */
if(scanline == 128)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h */
}
diff --git a/src/mame/drivers/scyclone.cpp b/src/mame/drivers/scyclone.cpp
index 81e84ef52f0..c85861d269f 100644
--- a/src/mame/drivers/scyclone.cpp
+++ b/src/mame/drivers/scyclone.cpp
@@ -603,7 +603,7 @@ void scyclone_state::machine_reset()
INTERRUPT_GEN_MEMBER(scyclone_state::irq)
{
// CPU runs in IM0
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h */
}
diff --git a/src/mame/drivers/seabattl.cpp b/src/mame/drivers/seabattl.cpp
index 44d69cf4bc0..60bd8b24567 100644
--- a/src/mame/drivers/seabattl.cpp
+++ b/src/mame/drivers/seabattl.cpp
@@ -448,7 +448,7 @@ void seabattl_state::machine_reset()
INTERRUPT_GEN_MEMBER(seabattl_state::seabattl_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03);
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); // S2650
}
static const gfx_layout tiles32x16x3_layout =
diff --git a/src/mame/drivers/segas32.cpp b/src/mame/drivers/segas32.cpp
index c19bcfd4c61..95272bf0984 100644
--- a/src/mame/drivers/segas32.cpp
+++ b/src/mame/drivers/segas32.cpp
@@ -691,7 +691,7 @@ void segas32_state::update_irq_state()
for (vector = 0; vector < 5; vector++)
if (effirq & (1 << vector))
{
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector);
+ m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector); // V60
break;
}
@@ -926,7 +926,7 @@ void segas32_state::update_sound_irq_state()
for (vector = 0; vector < 3; vector++)
if (effirq & (1 << vector))
{
- m_soundcpu->set_input_line_and_vector(0, ASSERT_LINE, 2 * vector);
+ m_soundcpu->set_input_line_and_vector(0, ASSERT_LINE, 2 * vector); // Z80
break;
}
diff --git a/src/mame/drivers/segaybd.cpp b/src/mame/drivers/segaybd.cpp
index fbeee43126d..7c86a773d74 100644
--- a/src/mame/drivers/segaybd.cpp
+++ b/src/mame/drivers/segaybd.cpp
@@ -666,7 +666,7 @@ WRITE_LINE_MEMBER(segaybd_state::mb8421_intl)
WRITE_LINE_MEMBER(segaybd_state::mb8421_intr)
{
// shared ram interrupt request from maincpu side
- m_linkcpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0xef); // RST $28
+ m_linkcpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0xef); // Z80 - RST $28
}
diff --git a/src/mame/drivers/seibuspi.cpp b/src/mame/drivers/seibuspi.cpp
index 3ae437b0598..8bd3621c5b4 100644
--- a/src/mame/drivers/seibuspi.cpp
+++ b/src/mame/drivers/seibuspi.cpp
@@ -1197,7 +1197,7 @@ void seibuspi_state::spi_ymf271_map(address_map &map)
WRITE_LINE_MEMBER(seibuspi_state::ymf_irqhandler)
{
if (state)
- m_audiocpu->set_input_line_and_vector(0, ASSERT_LINE, 0xd7); // IRQ is RST10
+ m_audiocpu->set_input_line_and_vector(0, ASSERT_LINE, 0xd7); // Z80 - IRQ is RST10
else
m_audiocpu->set_input_line(0, CLEAR_LINE);
}
diff --git a/src/mame/drivers/sengokmj.cpp b/src/mame/drivers/sengokmj.cpp
index 47e80655ce3..b66abfed4fe 100644
--- a/src/mame/drivers/sengokmj.cpp
+++ b/src/mame/drivers/sengokmj.cpp
@@ -563,7 +563,7 @@ GFXDECODE_END
WRITE_LINE_MEMBER(sengokmj_state::vblank_irq)
{
if (state)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); // V30
}
WRITE16_MEMBER( sengokmj_state::layer_en_w )
diff --git a/src/mame/drivers/sfkick.cpp b/src/mame/drivers/sfkick.cpp
index 8293d136236..1d1400042f2 100644
--- a/src/mame/drivers/sfkick.cpp
+++ b/src/mame/drivers/sfkick.cpp
@@ -588,7 +588,7 @@ void sfkick_state::machine_reset()
WRITE_LINE_MEMBER(sfkick_state::irqhandler)
{
- m_soundcpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0xff);
+ m_soundcpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0xff); // Z80
}
void sfkick_state::sfkick(machine_config &config)
diff --git a/src/mame/drivers/shanghai.cpp b/src/mame/drivers/shanghai.cpp
index 0493b7b0f53..9c842d4e1d8 100644
--- a/src/mame/drivers/shanghai.cpp
+++ b/src/mame/drivers/shanghai.cpp
@@ -94,7 +94,7 @@ INTERRUPT_GEN_MEMBER(shanghai_state::half_vblank_irq)
{
// definitely running at vblank / 2 (hd63484 irq mask not used)
if(m_screen->frame_number() & 1)
- device.execute().set_input_line_and_vector(0,HOLD_LINE,0x80);
+ device.execute().set_input_line_and_vector(0,HOLD_LINE,0x80); // V30
}
WRITE8_MEMBER(shanghai_state::shanghai_coin_w)
diff --git a/src/mame/drivers/sigmab98.cpp b/src/mame/drivers/sigmab98.cpp
index 5b317cc662f..b8b96f072a6 100644
--- a/src/mame/drivers/sigmab98.cpp
+++ b/src/mame/drivers/sigmab98.cpp
@@ -2838,7 +2838,7 @@ MACHINE_RESET_MEMBER(sigmab98_state,sigmab98)
INTERRUPT_GEN_MEMBER(sigmab98_state::sigmab98_vblank_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x5a);
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x5a); // Z80
}
void sigmab98_state::sigmab98(machine_config &config)
@@ -2921,11 +2921,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(lufykzku_state::lufykzku_irq)
int scanline = param;
if (scanline == 240)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_vblank_vector);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_vblank_vector); // Z80
else if (scanline == 128)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer0_vector);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer0_vector); // Z80
else if ((scanline % 8) == 0)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer1_vector); // this needs to be called often or the state of the door is not read at boot (at least 5 times before bb9 is called)
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer1_vector); // Z*) - this needs to be called often or the state of the door is not read at boot (at least 5 times before bb9 is called)
}
void lufykzku_state::lufykzku(machine_config &config)
@@ -2990,13 +2990,13 @@ TIMER_DEVICE_CALLBACK_MEMBER(sigmab98_state::sammymdl_irq)
int scanline = param;
if (scanline == 240)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_vblank_vector);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_vblank_vector); // Z80
if (scanline == 128)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer0_vector);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer0_vector); // Z80
if (scanline == 32)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer1_vector);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer1_vector); // Z80
}
void sigmab98_state::sammymdl(machine_config &config)
diff --git a/src/mame/drivers/spacefb.cpp b/src/mame/drivers/spacefb.cpp
index 70e88898b1d..6049b8876a3 100644
--- a/src/mame/drivers/spacefb.cpp
+++ b/src/mame/drivers/spacefb.cpp
@@ -147,7 +147,7 @@ TIMER_CALLBACK_MEMBER(spacefb_state::interrupt_callback)
/* compute vector and set the interrupt line */
int vpos = m_screen->vpos();
uint8_t vector = 0xc7 | ((vpos & 0x40) >> 2) | ((~vpos & 0x40) >> 3);
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, vector);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, vector); // Z80
/* set up for next interrupt */
if (vpos == SPACEFB_INT_TRIGGER_COUNT_1)
diff --git a/src/mame/drivers/splash.cpp b/src/mame/drivers/splash.cpp
index 4ad1ea62f4c..5919cdaaa18 100644
--- a/src/mame/drivers/splash.cpp
+++ b/src/mame/drivers/splash.cpp
@@ -138,7 +138,7 @@ WRITE8_MEMBER(splash_state::sound_bank_w)
void splash_state::roldfrog_update_irq( )
{
int irq = (m_sound_irq ? 0x08 : 0) | ((m_vblank_irq) ? 0x18 : 0);
- m_audiocpu->set_input_line_and_vector(0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq);
+ m_audiocpu->set_input_line_and_vector(0, irq ? ASSERT_LINE : CLEAR_LINE, 0xc7 | irq); // Z80
}
WRITE8_MEMBER(splash_state::roldfrog_vblank_ack_w)
@@ -603,7 +603,7 @@ WRITE_LINE_MEMBER(funystrp_state::adpcm_int1)
if (m_msm_toggle1 == 0)
{
m_msm_source|=1;
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0x38);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0x38); // Z80
}
}
}
@@ -618,7 +618,7 @@ WRITE_LINE_MEMBER(funystrp_state::adpcm_int2)
if (m_msm_toggle2 == 0)
{
m_msm_source|=2;
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0x38);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0x38); // Z80
}
}
}
diff --git a/src/mame/drivers/spy.cpp b/src/mame/drivers/spy.cpp
index d3120763e23..da1ff4c630c 100644
--- a/src/mame/drivers/spy.cpp
+++ b/src/mame/drivers/spy.cpp
@@ -332,7 +332,7 @@ WRITE8_MEMBER(spy_state::spy_3f90_w)
WRITE8_MEMBER(spy_state::spy_sh_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE8_MEMBER(spy_state::sound_bank_w)
diff --git a/src/mame/drivers/subhuntr.cpp b/src/mame/drivers/subhuntr.cpp
index d6ed2fa74ba..e657c837d4c 100644
--- a/src/mame/drivers/subhuntr.cpp
+++ b/src/mame/drivers/subhuntr.cpp
@@ -124,7 +124,7 @@ void subhuntr_state::machine_reset()
INTERRUPT_GEN_MEMBER(subhuntr_state::subhuntr_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03);
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); // S2650
}
static const gfx_layout tiles8x8_layout =
diff --git a/src/mame/drivers/sun3x.cpp b/src/mame/drivers/sun3x.cpp
index c2e84f952c2..f0faf273527 100644
--- a/src/mame/drivers/sun3x.cpp
+++ b/src/mame/drivers/sun3x.cpp
@@ -360,7 +360,8 @@ WRITE32_MEMBER(sun3x_state::ramwrite_w)
}
m_bInBusErr = true; // prevent recursion
- m_maincpu->set_input_line_and_vector(M68K_IRQ_7, ASSERT_LINE, 2);
+ m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
+ m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
}
COMBINE_DATA(&pRAM[offset]);
diff --git a/src/mame/drivers/symbolics.cpp b/src/mame/drivers/symbolics.cpp
index 88a3fc628b2..d9e09490cc7 100644
--- a/src/mame/drivers/symbolics.cpp
+++ b/src/mame/drivers/symbolics.cpp
@@ -133,11 +133,11 @@ READ16_MEMBER(symbolics_state::ram_parity_hack_r)
{
uint16_t *ram = (uint16_t *)(memregion("fepdram")->base());
//m_maincpu->set_input_line(M68K_IRQ_7, CLEAR_LINE);
- m_maincpu->set_input_line_and_vector(M68K_IRQ_7, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_7, CLEAR_LINE);
if (!(m_parity_error_has_occurred[offset]))
{
//m_maincpu->set_input_line(M68K_IRQ_7, ASSERT_LINE);
- m_maincpu->set_input_line_and_vector(M68K_IRQ_7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_7, ASSERT_LINE);
m_parity_error_has_occurred[offset] = true;
}
ram += offset;
@@ -147,10 +147,10 @@ READ16_MEMBER(symbolics_state::ram_parity_hack_r)
WRITE16_MEMBER(symbolics_state::ram_parity_hack_w)
{
uint16_t *ram = (uint16_t *)(memregion("fepdram")->base());
- m_maincpu->set_input_line_and_vector(M68K_IRQ_7, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_7, CLEAR_LINE);
if (!(m_parity_error_has_occurred[offset]))
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_7, ASSERT_LINE);
m_parity_error_has_occurred[offset] = true;
}
COMBINE_DATA(&ram[offset]);
diff --git a/src/mame/drivers/taitojc.cpp b/src/mame/drivers/taitojc.cpp
index 43098187073..073d1ccd16c 100644
--- a/src/mame/drivers/taitojc.cpp
+++ b/src/mame/drivers/taitojc.cpp
@@ -521,9 +521,15 @@ WRITE16_MEMBER(taitojc_state::main_to_dsp_7ff_w)
}
}
+void taitojc_state::cpu_space_map(address_map &map)
+{
+ map(0xfffffff0, 0xffffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffffff4, 0xfffffff5).lr16("vblank irq", []() -> u16 { return 0x82; });
+}
+
INTERRUPT_GEN_MEMBER(taitojc_state::taitojc_vblank)
{
- device.execute().set_input_line_and_vector(2, HOLD_LINE, 0x82); // where does it come from?
+ device.execute().set_input_line(2, HOLD_LINE); // where does it come from?
}
WRITE8_MEMBER(taitojc_state::jc_irq_unk_w)
@@ -1083,6 +1089,7 @@ void taitojc_state::taitojc(machine_config &config)
M68040(config, m_maincpu, XTAL(10'000'000)*2); // 20MHz, clock source = CY7C991
m_maincpu->set_addrmap(AS_PROGRAM, &taitojc_state::taitojc_map);
m_maincpu->set_vblank_int("screen", FUNC(taitojc_state::taitojc_vblank));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &taitojc_state::cpu_space_map);
mc68hc11_cpu_device &sub(MC68HC11(config, "sub", XTAL(16'000'000)/2)); // 8MHz, MC68HC11M0
sub.set_addrmap(AS_PROGRAM, &taitojc_state::hc11_pgm_map);
diff --git a/src/mame/drivers/tatsumi.cpp b/src/mame/drivers/tatsumi.cpp
index 431265ca5c0..55164380f5d 100644
--- a/src/mame/drivers/tatsumi.cpp
+++ b/src/mame/drivers/tatsumi.cpp
@@ -847,7 +847,7 @@ GFXDECODE_END
INTERRUPT_GEN_MEMBER(tatsumi_state::v30_interrupt)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); /* VBL */
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); /* V30 - VBL */
}
WRITE_LINE_MEMBER(apache3_state::apache3_68000_reset)
diff --git a/src/mame/drivers/techno.cpp b/src/mame/drivers/techno.cpp
index 46b7715023e..271529bac3b 100644
--- a/src/mame/drivers/techno.cpp
+++ b/src/mame/drivers/techno.cpp
@@ -56,6 +56,7 @@ private:
void techno_map(address_map &map);
void techno_sub_map(address_map &map);
+ void cpu_space_map(address_map &map);
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
virtual void machine_start() override;
@@ -252,6 +253,12 @@ static INPUT_PORTS_START( techno )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Fix top left target middle") PORT_CODE(KEYCODE_EQUALS)
INPUT_PORTS_END
+void techno_state::cpu_space_map(address_map &map)
+{
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff2, 0xfffff3).lr16("timer irq", [this]() -> u16 { return m_vector; });
+}
+
void techno_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
if (id == IRQ_ADVANCE_TIMER)
@@ -266,7 +273,7 @@ void techno_state::device_timer(emu_timer &timer, device_timer_id id, int param,
}
else if (id == IRQ_SET_TIMER)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_1, ASSERT_LINE, m_vector);
+ m_maincpu->set_input_line(M68K_IRQ_1, ASSERT_LINE);
m_irq_advance_timer->adjust(attotime::from_hz(XTAL(8'000'000) / 32));
}
}
@@ -293,6 +300,7 @@ void techno_state::techno(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(8'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &techno_state::techno_map);
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &techno_state::cpu_space_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
diff --git a/src/mame/drivers/thunderx.cpp b/src/mame/drivers/thunderx.cpp
index 90901aea4ef..e5cd945bc95 100644
--- a/src/mame/drivers/thunderx.cpp
+++ b/src/mame/drivers/thunderx.cpp
@@ -362,7 +362,7 @@ WRITE8_MEMBER(thunderx_state::gbusters_videobank_w)
WRITE8_MEMBER(thunderx_state::sh_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE8_MEMBER(thunderx_state::k007232_bankswitch_w)
diff --git a/src/mame/drivers/ti990_10.cpp b/src/mame/drivers/ti990_10.cpp
index baa8a791bab..65b8ec303da 100644
--- a/src/mame/drivers/ti990_10.cpp
+++ b/src/mame/drivers/ti990_10.cpp
@@ -136,7 +136,7 @@ void ti990_10_state::ti990_set_int_line(int line, int state)
{
for (level = 0; ! (m_intlines & (1 << level)); level++)
;
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, level); /* interrupt it, baby */
+ m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, level); /* TI990_10 - interrupt it, baby */
}
else
m_maincpu->set_input_line(0, CLEAR_LINE);
diff --git a/src/mame/drivers/tmaster.cpp b/src/mame/drivers/tmaster.cpp
index 1fbe7c9326b..5fe5883c9fe 100644
--- a/src/mame/drivers/tmaster.cpp
+++ b/src/mame/drivers/tmaster.cpp
@@ -144,6 +144,7 @@ private:
DECLARE_WRITE16_MEMBER(rtc_w);
void tmaster_map(address_map &map);
+ void cpu_space_map(address_map &map);
required_device<cpu_device> m_maincpu;
required_device<screen_device> m_screen;
@@ -208,9 +209,15 @@ WRITE_LINE_MEMBER(tmaster_state::write_oki_bank1)
***************************************************************************/
+void tmaster_state::cpu_space_map(address_map &map)
+{
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff8, 0xfffff9).lr16("irq 2", [this]() -> u16 { return m_duart->get_irq_vector(); });
+}
+
WRITE_LINE_MEMBER(tmaster_state::duart_irq_handler)
{
- m_maincpu->set_input_line_and_vector(4, state, m_duart->get_irq_vector());
+ m_maincpu->set_input_line(4, state);
}
/***************************************************************************
@@ -370,6 +377,7 @@ void tmaster_state::tm(machine_config &config)
{
M68000(config, m_maincpu, XTAL(24'000'000) / 2); /* 12MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &tmaster_state::tmaster_map);
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &tmaster_state::cpu_space_map);
TIMER(config, "scantimer").configure_scanline(FUNC(tmaster_state::scanline_interrupt), "screen", 0, 1);
diff --git a/src/mame/drivers/tmnt.cpp b/src/mame/drivers/tmnt.cpp
index c7421c65bbc..2a206cb76bd 100644
--- a/src/mame/drivers/tmnt.cpp
+++ b/src/mame/drivers/tmnt.cpp
@@ -174,13 +174,13 @@ WRITE8_MEMBER(tmnt_state::glfgreat_sound_w)
m_k053260->main_write(space, offset, data);
if (offset)
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE16_MEMBER(tmnt_state::prmrsocr_sound_irq_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
WRITE8_MEMBER(tmnt_state::prmrsocr_audio_bankswitch_w)
@@ -441,7 +441,7 @@ WRITE16_MEMBER(tmnt_state::thndrx2_eeprom_w)
/* bit 5 triggers IRQ on sound cpu */
if (m_last == 0 && (data & 0x20) != 0)
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
m_last = data & 0x20;
/* bit 6 = enable char ROM reading through the video RAM */
@@ -578,7 +578,7 @@ void tmnt_state::lgtnfght_main_map(address_map &map)
WRITE16_MEMBER(tmnt_state::ssriders_soundkludge_w)
{
/* I think this is more than just a trigger */
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
void tmnt_state::blswhstl_main_map(address_map &map)
diff --git a/src/mame/drivers/toaplan2.cpp b/src/mame/drivers/toaplan2.cpp
index d8b92603e19..a2ba3642c54 100644
--- a/src/mame/drivers/toaplan2.cpp
+++ b/src/mame/drivers/toaplan2.cpp
@@ -522,16 +522,16 @@ void toaplan2_state::init_enmadaio()
Toaplan games
***************************************************************************/
-IRQ_CALLBACK_MEMBER(toaplan2_state::fixeightbl_irq_ack)
+void toaplan2_state::cpu_space_fixeightbl_map(address_map &map)
{
- m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE);
- return M68K_INT_ACK_AUTOVECTOR;
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff4, 0xfffff5).lr16("irq 2", [this]() -> u16 { m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE); return 0x18+2; });
}
-IRQ_CALLBACK_MEMBER(toaplan2_state::pipibibsbl_irq_ack)
+void toaplan2_state::cpu_space_pipibibsbl_map(address_map &map)
{
- m_maincpu->set_input_line(M68K_IRQ_4, CLEAR_LINE);
- return M68K_INT_ACK_AUTOVECTOR;
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff8, 0xfffff9).lr16("irq 4", [this]() -> u16 { m_maincpu->set_input_line(M68K_IRQ_4, CLEAR_LINE); return 0x18+4; });
}
@@ -3549,7 +3549,7 @@ void toaplan2_state::pipibibsbl(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, 12_MHz_XTAL); // ??? (position labeled "68000-12" but 10 MHz-rated parts used)
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::pipibibi_bootleg_68k_mem);
- m_maincpu->set_irq_acknowledge_callback(FUNC(toaplan2_state::pipibibsbl_irq_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &toaplan2_state::cpu_space_pipibibsbl_map);
Z80(config, m_audiocpu, 12_MHz_XTAL / 2); // GoldStar Z8400B; clock source and divider unknown
m_audiocpu->set_addrmap(AS_PROGRAM, &toaplan2_state::pipibibs_sound_z80_mem);
@@ -3667,7 +3667,7 @@ void toaplan2_state::fixeightbl(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(10'000'000)); /* 10MHz Oscillator */
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::fixeightbl_68k_mem);
- m_maincpu->set_irq_acknowledge_callback(FUNC(toaplan2_state::fixeightbl_irq_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &toaplan2_state::cpu_space_fixeightbl_map);
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
diff --git a/src/mame/drivers/tp84.cpp b/src/mame/drivers/tp84.cpp
index ed82130285f..5840e38ef78 100644
--- a/src/mame/drivers/tp84.cpp
+++ b/src/mame/drivers/tp84.cpp
@@ -166,7 +166,7 @@ WRITE8_MEMBER(tp84_state::tp84_filter_w)
WRITE8_MEMBER(tp84_state::tp84_sh_irqtrigger_w)
{
- m_audiocpu->set_input_line_and_vector(0,HOLD_LINE,0xff);
+ m_audiocpu->set_input_line_and_vector(0,HOLD_LINE,0xff); // Z80
}
diff --git a/src/mame/drivers/twin16.cpp b/src/mame/drivers/twin16.cpp
index e880cee9d86..d6d63c5e8d0 100644
--- a/src/mame/drivers/twin16.cpp
+++ b/src/mame/drivers/twin16.cpp
@@ -88,7 +88,7 @@ WRITE16_MEMBER(twin16_state::CPUA_register_w)
int falling_edge = old & ~m_CPUA_register;
if (rising_edge & 0x08)
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
if (falling_edge & 0x40)
spriteram_process();
@@ -136,7 +136,7 @@ WRITE16_MEMBER(fround_state::fround_CPU_register_w)
if (m_CPUA_register != old)
{
if ((old & 0x08) == 0 && (m_CPUA_register & 0x08))
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
machine().bookkeeping().coin_counter_w(0, m_CPUA_register & 0x01);
machine().bookkeeping().coin_counter_w(1, m_CPUA_register & 0x02);
diff --git a/src/mame/drivers/vendetta.cpp b/src/mame/drivers/vendetta.cpp
index abeecc5c06b..0a386618319 100644
--- a/src/mame/drivers/vendetta.cpp
+++ b/src/mame/drivers/vendetta.cpp
@@ -187,12 +187,12 @@ WRITE8_MEMBER(vendetta_state::z80_arm_nmi_w)
WRITE8_MEMBER(vendetta_state::z80_irq_w)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
READ8_MEMBER(vendetta_state::z80_irq_r)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
return 0x00;
}
diff --git a/src/mame/drivers/vulgus.cpp b/src/mame/drivers/vulgus.cpp
index b0ca52d0c8d..da67ca433dd 100644
--- a/src/mame/drivers/vulgus.cpp
+++ b/src/mame/drivers/vulgus.cpp
@@ -55,7 +55,7 @@ All Clocks and Vsync verified by Corrado Tomaselli (August 2012)
INTERRUPT_GEN_MEMBER(vulgus_state::vblank_irq)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h - vblank */
}
void vulgus_state::main_map(address_map &map)
diff --git a/src/mame/drivers/wildpkr.cpp b/src/mame/drivers/wildpkr.cpp
index e83cb7a1d6e..7d7b9ebc872 100644
--- a/src/mame/drivers/wildpkr.cpp
+++ b/src/mame/drivers/wildpkr.cpp
@@ -224,7 +224,8 @@ private:
DECLARE_WRITE16_MEMBER(clock_start_w);
DECLARE_WRITE16_MEMBER(clock_rate_w);
DECLARE_WRITE16_MEMBER(unknown_trigger_w);
- IRQ_CALLBACK_MEMBER(tabpkr_irq_ack);
+ u16 tabpkr_irq_ack(offs_t offset);
+ void cpu_space_map(address_map &map);
void hd63484_map(address_map &map);
void ramdac_map(address_map &map);
void tabpkr_map(address_map &map);
@@ -451,13 +452,19 @@ void wildpkr_state::ramdac_map(address_map &map)
}
-IRQ_CALLBACK_MEMBER(wildpkr_state::tabpkr_irq_ack)
+void wildpkr_state::cpu_space_map(address_map &map)
{
- m_maincpu->set_input_line(irqline, CLEAR_LINE);
- if (irqline == M68K_IRQ_2)
+ map(0xfffff2, 0xffffff).r(FUNC(wildpkr_state::tabpkr_irq_ack));
+}
+
+u16 wildpkr_state::tabpkr_irq_ack(offs_t offset)
+{
+ m_maincpu->set_input_line(offset+1, CLEAR_LINE);
+
+ if (offset+1 == 2)
return m_duart->get_irq_vector();
else
- return M68K_INT_ACK_AUTOVECTOR;
+ return 0x19 + offset;
}
@@ -501,7 +508,7 @@ void wildpkr_state::tabpkr(machine_config &config)
M68000(config, m_maincpu, XTAL(24'000'000) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &wildpkr_state::tabpkr_map);
m_maincpu->set_periodic_int(FUNC(wildpkr_state::irq3_line_assert), attotime::from_hz(60*256));
- m_maincpu->set_irq_acknowledge_callback(FUNC(wildpkr_state::tabpkr_irq_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &wildpkr_state::cpu_space_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); // DS1220Y
diff --git a/src/mame/drivers/x68k.cpp b/src/mame/drivers/x68k.cpp
index bed11f4ea77..7d01fa3a6fa 100644
--- a/src/mame/drivers/x68k.cpp
+++ b/src/mame/drivers/x68k.cpp
@@ -314,7 +314,7 @@ TIMER_CALLBACK_MEMBER(x68k_state::scc_ack)
m_mouse.irqactive = 1;
m_current_vector[5] = 0x54;
m_current_irq_line = 5;
- m_maincpu->set_input_line_and_vector(5,ASSERT_LINE,0x54);
+ m_maincpu->set_input_line(5,ASSERT_LINE);
}
}
}
@@ -682,7 +682,7 @@ WRITE_LINE_MEMBER( x68k_state::fdc_irq )
m_ioc.irqstatus |= 0x80;
m_current_irq_line = 1;
LOGMASKED(LOG_FDC, "FDC: IRQ triggered\n");
- m_maincpu->set_input_line_and_vector(1, ASSERT_LINE, m_current_vector[1]);
+ m_maincpu->set_input_line(1, ASSERT_LINE);
}
else
m_maincpu->set_input_line(1, CLEAR_LINE);
@@ -1003,7 +1003,7 @@ void x68k_state::dma_irq(int channel)
m_current_vector[3] = m_hd63450->get_vector(channel);
m_current_irq_line = 3;
LOGMASKED(LOG_SYS, "DMA#%i: DMA End (vector 0x%02x)\n",channel,m_current_vector[3]);
- m_maincpu->set_input_line_and_vector(3,ASSERT_LINE,m_current_vector[3]);
+ m_maincpu->set_input_line(3,ASSERT_LINE);
}
WRITE8_MEMBER(x68k_state::dma_end)
@@ -1025,7 +1025,7 @@ WRITE8_MEMBER(x68k_state::dma_error)
m_current_vector[3] = m_hd63450->get_error_vector(offset);
m_current_irq_line = 3;
LOGMASKED(LOG_SYS, "DMA#%i: DMA Error (vector 0x%02x)\n",offset,m_current_vector[3]);
- m_maincpu->set_input_line_and_vector(3,ASSERT_LINE,m_current_vector[3]);
+ m_maincpu->set_input_line(3,ASSERT_LINE);
}
}
@@ -1067,19 +1067,25 @@ WRITE_LINE_MEMBER(x68k_state::mfp_irq_callback)
m_mfp_prev = state;
}
-IRQ_CALLBACK_MEMBER(x68k_state::int_ack)
+void x68k_state::cpu_space_map(address_map &map)
{
+ map(0xfffff2, 0xffffff).r(FUNC(x68k_state::int_ack));
+}
+
+u16 x68k_state::int_ack(offs_t offset)
+{
+ int irqline = offset+1;
if(irqline == 6) // MFP
{
if(m_current_vector[6] != 0x4b && m_current_vector[6] != 0x4c)
m_current_vector[6] = m_mfpdev->get_vector();
else
- m_maincpu->set_input_line_and_vector(irqline,CLEAR_LINE,m_current_vector[irqline]);
+ m_maincpu->set_input_line(irqline,CLEAR_LINE);
LOGMASKED(LOG_IRQ, "SYS: IRQ acknowledged (vector=0x%02x, line = %i)\n",m_current_vector[6],irqline);
return m_current_vector[6];
}
- m_maincpu->set_input_line_and_vector(irqline,CLEAR_LINE,m_current_vector[irqline]);
+ m_maincpu->set_input_line(irqline,CLEAR_LINE);
if(irqline == 1) // IOSC
{
m_ioc.irqstatus &= ~0xf0;
@@ -1100,7 +1106,7 @@ WRITE_LINE_MEMBER(x68ksupr_state::scsi_irq)
{
m_current_vector[1] = 0x6c;
m_current_irq_line = 1;
- m_maincpu->set_input_line_and_vector(1,ASSERT_LINE,m_current_vector[1]);
+ m_maincpu->set_input_line(1,ASSERT_LINE);
}
}
@@ -1366,7 +1372,7 @@ void x68k_state::floppy_load_unload(bool load, floppy_image_device *dev)
m_current_vector[1] = 0x61;
m_ioc.irqstatus |= 0x40;
m_current_irq_line = 1;
- m_maincpu->set_input_line_and_vector(1,ASSERT_LINE,m_current_vector[1]); // Disk insert/eject interrupt
+ m_maincpu->set_input_line(1,ASSERT_LINE); // Disk insert/eject interrupt
LOGMASKED(LOG_FDC, "IOC: Disk image inserted\n");
}
}
@@ -1386,7 +1392,7 @@ TIMER_CALLBACK_MEMBER(x68k_state::net_irq)
{
m_current_vector[2] = 0xf9;
m_current_irq_line = 2;
- m_maincpu->set_input_line_and_vector(2,ASSERT_LINE,m_current_vector[2]);
+ m_maincpu->set_input_line(2,ASSERT_LINE);
}
WRITE_LINE_MEMBER(x68k_state::irq2_line)
@@ -1396,7 +1402,7 @@ WRITE_LINE_MEMBER(x68k_state::irq2_line)
m_net_timer->adjust(attotime::from_usec(16));
}
else
- m_maincpu->set_input_line_and_vector(2,CLEAR_LINE,m_current_vector[2]);
+ m_maincpu->set_input_line(2,CLEAR_LINE);
LOGMASKED(LOG_IRQ, "EXP: IRQ2 set to %i\n",state);
}
@@ -1404,7 +1410,7 @@ WRITE_LINE_MEMBER(x68k_state::irq2_line)
WRITE_LINE_MEMBER(x68k_state::irq4_line)
{
m_current_vector[4] = m_expansion->vector();
- m_maincpu->set_input_line_and_vector(4,state,m_current_vector[4]);
+ m_maincpu->set_input_line(4,state);
LOGMASKED(LOG_IRQ, "EXP: IRQ4 set to %i (vector %02x)\n",state,m_current_vector[4]);
}
diff --git a/src/mame/drivers/xxmissio.cpp b/src/mame/drivers/xxmissio.cpp
index f6333035a5f..fc3d551074a 100644
--- a/src/mame/drivers/xxmissio.cpp
+++ b/src/mame/drivers/xxmissio.cpp
@@ -40,7 +40,7 @@ WRITE8_MEMBER(xxmissio_state::status_m_w)
case 0x40:
m_status &= ~0x08;
- m_subcpu->set_input_line_and_vector(0, HOLD_LINE, 0x10);
+ m_subcpu->set_input_line_and_vector(0, HOLD_LINE, 0x10); // Z80
break;
case 0x80:
@@ -63,7 +63,7 @@ WRITE8_MEMBER(xxmissio_state::status_s_w)
case 0x80:
m_status &= ~0x04;
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x10);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x10); // Z80
break;
}
}
diff --git a/src/mame/drivers/zac_1.cpp b/src/mame/drivers/zac_1.cpp
index 8f6bd91309d..bdab90b2c47 100644
--- a/src/mame/drivers/zac_1.cpp
+++ b/src/mame/drivers/zac_1.cpp
@@ -225,7 +225,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(zac_1_state::zac_1_inttimer)
if (m_t_c > 0x40)
{
uint8_t vector = (ioport("TEST")->read() ) ? 0x10 : 0x18;
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, vector);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, vector); // S2650
}
else
m_t_c++;
diff --git a/src/mame/drivers/zerozone.cpp b/src/mame/drivers/zerozone.cpp
index ce2c7c71a35..28f87efbf60 100644
--- a/src/mame/drivers/zerozone.cpp
+++ b/src/mame/drivers/zerozone.cpp
@@ -45,7 +45,7 @@ WRITE16_MEMBER( zerozone_state::sound_w )
if (ACCESSING_BITS_8_15)
{
m_soundlatch->write(data >> 8);
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
}
diff --git a/src/mame/drivers/zorba.cpp b/src/mame/drivers/zorba.cpp
index 2103ab3ac06..4e4f7bc186b 100644
--- a/src/mame/drivers/zorba.cpp
+++ b/src/mame/drivers/zorba.cpp
@@ -372,10 +372,7 @@ template <unsigned N> WRITE_LINE_MEMBER( zorba_state::irq_w )
else if (BIT(m_irq, 3)) vector = 0x88;
else vector = 0x84; // very wrong, need test cases for other things
- m_maincpu->set_input_line_and_vector(
- INPUT_LINE_IRQ0,
- m_irq ? ASSERT_LINE : CLEAR_LINE,
- vector);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, m_irq, vector); // Z80
}
diff --git a/src/mame/includes/abc1600.h b/src/mame/includes/abc1600.h
index 262bdce4cc6..69e1b5dce69 100644
--- a/src/mame/includes/abc1600.h
+++ b/src/mame/includes/abc1600.h
@@ -124,7 +124,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( nmi_w );
- IRQ_CALLBACK_MEMBER( abc1600_int_ack );
+ void cpu_space_map(address_map &map);
DECLARE_WRITE_LINE_MEMBER( fdc_drq_w );
diff --git a/src/mame/includes/apollo.h b/src/mame/includes/apollo.h
index de0ff49865e..269cf13219c 100644
--- a/src/mame/includes/apollo.h
+++ b/src/mame/includes/apollo.h
@@ -216,8 +216,9 @@ public:
DECLARE_MACHINE_RESET(apollo);
DECLARE_MACHINE_START(apollo);
- IRQ_CALLBACK_MEMBER(apollo_irq_acknowledge);
- IRQ_CALLBACK_MEMBER(apollo_pic_acknowledge);
+ void cpu_space_map(address_map &map);
+ u16 apollo_irq_acknowledge(offs_t offset);
+ u16 apollo_pic_get_vector();
void apollo_bus_error();
DECLARE_READ_LINE_MEMBER( apollo_kbd_is_german );
DECLARE_WRITE_LINE_MEMBER( apollo_dma8237_out_eop );
diff --git a/src/mame/includes/atarist.h b/src/mame/includes/atarist.h
index 0add260a05b..2c4d97fac46 100644
--- a/src/mame/includes/atarist.h
+++ b/src/mame/includes/atarist.h
@@ -128,7 +128,7 @@ public:
m_led(*this, "led1")
{ }
- required_device<cpu_device> m_maincpu;
+ required_device<m68000_base_device> m_maincpu;
required_device<wd1772_device> m_fdc;
required_device_array<floppy_connector, 2> m_floppy;
required_device<mc68901_device> m_mfp;
@@ -326,7 +326,6 @@ public:
bitmap_rgb32 m_bitmap;
DECLARE_FLOPPY_FORMATS(floppy_formats);
- IRQ_CALLBACK_MEMBER(atarist_int_ack);
int m_monochrome;
required_device<palette_device> m_palette;
@@ -336,6 +335,7 @@ public:
void common(machine_config &config);
void st(machine_config &config);
void ikbd_map(address_map &map);
+ void cpu_space_map(address_map &map);
void st_map(address_map &map);
protected:
void keyboard(machine_config &config);
diff --git a/src/mame/includes/cgc7900.h b/src/mame/includes/cgc7900.h
index 31468f20fa2..035892acb00 100644
--- a/src/mame/includes/cgc7900.h
+++ b/src/mame/includes/cgc7900.h
@@ -118,6 +118,7 @@ public:
void cgc7900_video(machine_config &config);
void cgc7900_mem(address_map &map);
void keyboard_mem(address_map &map);
+ void cpu_space_map(address_map &map);
private:
u16 kbd_mods;
u8 kbd_data;
diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h
index 2edf51d21d3..1af33d156c5 100644
--- a/src/mame/includes/cps1.h
+++ b/src/mame/includes/cps1.h
@@ -197,7 +197,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(screen_vblank_cps1);
INTERRUPT_GEN_MEMBER(cps1_interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(ganbare_interrupt);
- IRQ_CALLBACK_MEMBER(cps1_int_ack);
+ void cpu_space_map(address_map &map);
void kabuki_setup(void (*decode)(uint8_t *src, uint8_t *dst));
diff --git a/src/mame/includes/micro3d.h b/src/mame/includes/micro3d.h
index 19adb0a5116..96053772ac8 100644
--- a/src/mame/includes/micro3d.h
+++ b/src/mame/includes/micro3d.h
@@ -200,6 +200,7 @@ private:
int clip_triangle(micro3d_vtx *v, micro3d_vtx *vout, int num_vertices, enum planes plane);
void draw_triangles(uint32_t attr);
+ void cpu_space_map(address_map &map);
void drmath_data(address_map &map);
void drmath_prg(address_map &map);
void hostmem(address_map &map);
diff --git a/src/mame/includes/taitojc.h b/src/mame/includes/taitojc.h
index 9625bb89bb2..9d6dd1da67d 100644
--- a/src/mame/includes/taitojc.h
+++ b/src/mame/includes/taitojc.h
@@ -154,4 +154,5 @@ private:
void taitojc_map(address_map &map);
void tms_data_map(address_map &map);
void tms_program_map(address_map &map);
+ void cpu_space_map(address_map &map);
};
diff --git a/src/mame/includes/toaplan2.h b/src/mame/includes/toaplan2.h
index 37b4cc3f557..e0c64a9ff89 100644
--- a/src/mame/includes/toaplan2.h
+++ b/src/mame/includes/toaplan2.h
@@ -184,8 +184,8 @@ private:
uint32_t screen_update_truxton2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_bootleg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
- IRQ_CALLBACK_MEMBER(fixeightbl_irq_ack);
- IRQ_CALLBACK_MEMBER(pipibibsbl_irq_ack);
+ void cpu_space_fixeightbl_map(address_map &map);
+ void cpu_space_pipibibsbl_map(address_map &map);
INTERRUPT_GEN_MEMBER(bbakraid_snd_interrupt);
void create_tx_tilemap(int dx = 0, int dx_flipped = 0);
diff --git a/src/mame/includes/x68k.h b/src/mame/includes/x68k.h
index 4295b9dfca1..ca35f68345f 100644
--- a/src/mame/includes/x68k.h
+++ b/src/mame/includes/x68k.h
@@ -101,7 +101,7 @@ protected:
{
type(config, m_maincpu, std::forward<Clock>(clock));
m_maincpu->set_addrmap(AS_PROGRAM, std::forward<AddrMap>(map));
- m_maincpu->set_irq_acknowledge_callback(FUNC(x68k_state::int_ack));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &x68k_state::cpu_space_map);
}
required_device<m68000_base_device> m_maincpu;
@@ -317,10 +317,11 @@ protected:
DECLARE_WRITE16_MEMBER(tvram_write);
DECLARE_READ16_MEMBER(gvram_read);
DECLARE_WRITE16_MEMBER(gvram_write);
- IRQ_CALLBACK_MEMBER(int_ack);
+ u16 int_ack(offs_t offset);
void x68k_base_map(address_map &map);
void x68k_map(address_map &map);
+ void cpu_space_map(address_map &map);
inline void plot_pixel(bitmap_rgb32 &bitmap, int x, int y, uint32_t color);
void draw_text(bitmap_rgb32 &bitmap, int xscr, int yscr, rectangle rect);
diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp
index 2cdbd251a08..0f26ad3036f 100644
--- a/src/mame/machine/apollo.cpp
+++ b/src/mame/machine/apollo.cpp
@@ -564,7 +564,7 @@ void apollo_state::apollo_pic_set_irq_line(int irq, int state)
}
}
-IRQ_CALLBACK_MEMBER(apollo_state::apollo_pic_acknowledge)
+u16 apollo_state::apollo_pic_get_vector()
{
uint32_t vector = m_pic8259_master->acknowledge();
if ((vector & 0x0f) == APOLLO_IRQ_PIC_SLAVE) {
@@ -612,7 +612,7 @@ WRITE_LINE_MEMBER( apollo_state::apollo_pic8259_master_set_int_line ) {
apollo_set_cache_status_register(this,0x10, state ? 0x10 : 0x00);
}
- m_maincpu->set_input_line_and_vector(M68K_IRQ_6,state ? ASSERT_LINE : CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_6,state ? ASSERT_LINE : CLEAR_LINE);
}
WRITE_LINE_MEMBER( apollo_state::apollo_pic8259_slave_set_int_line ) {
diff --git a/src/mame/machine/concept.cpp b/src/mame/machine/concept.cpp
index 01ef6742d05..06c064aec74 100644
--- a/src/mame/machine/concept.cpp
+++ b/src/mame/machine/concept.cpp
@@ -93,11 +93,11 @@ void concept_state::concept_set_interrupt(int level, int state)
if (final_level)
/* assert interrupt */
- m_maincpu->set_input_line_and_vector(M68K_IRQ_1 + final_level - 1, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_1 + final_level - 1, ASSERT_LINE);
else
{
/* clear all interrupts */
- m_maincpu->set_input_line_and_vector(M68K_IRQ_1 + level - 1, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_1 + level - 1, CLEAR_LINE);
}
}
diff --git a/src/mame/machine/lisa.cpp b/src/mame/machine/lisa.cpp
index bf4244dcb2a..14734386d7c 100644
--- a/src/mame/machine/lisa.cpp
+++ b/src/mame/machine/lisa.cpp
@@ -129,27 +129,27 @@ void lisa_state::field_interrupts()
#if 0
if (RSIR)
// serial interrupt
- m_maincpu->set_input_line_and_vector(M68K_IRQ_6, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_6, ASSERT_LINE);
else if (int0)
// external interrupt
- m_maincpu->set_input_line_and_vector(M68K_IRQ_5, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_5, ASSERT_LINE);
else if (int1)
// external interrupt
- m_maincpu->set_input_line_and_vector(M68K_IRQ_4, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_4, ASSERT_LINE);
else if (int2)
// external interrupt
- m_maincpu->set_input_line_and_vector(M68K_IRQ_3, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_3, ASSERT_LINE);
else
#endif
if (m_KBIR)
/* COPS VIA interrupt */
- m_maincpu->set_input_line_and_vector(M68K_IRQ_2, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_2, ASSERT_LINE);
else if (m_FDIR || m_VTIR)
/* floppy disk or VBl */
- m_maincpu->set_input_line_and_vector(M68K_IRQ_1, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_1, ASSERT_LINE);
else
/* clear all interrupts */
- m_maincpu->set_input_line_and_vector(M68K_IRQ_1, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
}
void lisa_state::set_parity_error_pending(int value)
@@ -159,7 +159,7 @@ void lisa_state::set_parity_error_pending(int value)
m_parity_error_pending = value;
if (m_parity_error_pending)
{
- m_maincpu->set_input_line_and_vector(M68K_IRQ_7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_7, ASSERT_LINE);
}
else
{
@@ -170,7 +170,7 @@ void lisa_state::set_parity_error_pending(int value)
if ((! m_parity_error_pending) && value)
{
m_parity_error_pending = 1;
- m_maincpu->pulse_input_line_and_vector(M68K_IRQ_7, attotime::zero, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->pulse_input_line(M68K_IRQ_7, attotime::zero);
}
else if (m_parity_error_pending && (! value))
{
@@ -293,7 +293,7 @@ void lisa_state::scan_keyboard()
if (keycode == m_NMIcode)
{ /* generate NMI interrupt */
pulse_input_line(M68K_IRQ_7, attotime::zero);
- m_maincpu->set_input_line_vector(M68K_IRQ_7, M68K_INT_ACK_AUTOVECTOR);
+ m_maincpu->set_input_line(M68K_IRQ_7);
}
#endif
COPS_queue_data(&keycode, 1);
diff --git a/src/mame/machine/m1comm.cpp b/src/mame/machine/m1comm.cpp
index 086dc5a0fab..31f3b612dbb 100644
--- a/src/mame/machine/m1comm.cpp
+++ b/src/mame/machine/m1comm.cpp
@@ -210,7 +210,7 @@ WRITE8_MEMBER(m1comm_device::dma_mem_w)
WRITE_LINE_MEMBER(m1comm_device::dlc_int7_w)
{
- m_cpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0xff);
+ m_cpu->set_input_line_and_vector(0, state ? ASSERT_LINE : CLEAR_LINE, 0xff); // Z80
}
READ8_MEMBER(m1comm_device::syn_r)
@@ -303,7 +303,7 @@ void m1comm_device::check_vint_irq()
#ifndef M1COMM_SIMULATION
if (m_syn & 0x02)
{
- m_cpu->set_input_line_and_vector(0, HOLD_LINE, 0xef);
+ m_cpu->set_input_line_and_vector(0, HOLD_LINE, 0xef); // Z80
}
#else
comm_tick();
diff --git a/src/mame/machine/micro3d.cpp b/src/mame/machine/micro3d.cpp
index 8e3f487de3b..4d1c52ddbec 100644
--- a/src/mame/machine/micro3d.cpp
+++ b/src/mame/machine/micro3d.cpp
@@ -34,7 +34,7 @@
WRITE_LINE_MEMBER(micro3d_state::duart_irq_handler)
{
- m_maincpu->set_input_line_and_vector(3, state, m_duart->get_irq_vector());
+ m_maincpu->set_input_line(3, state);
}
WRITE_LINE_MEMBER(micro3d_state::duart_txb)
diff --git a/src/mame/machine/osborne1.cpp b/src/mame/machine/osborne1.cpp
index 40b540f0e78..0eeb5442c31 100644
--- a/src/mame/machine/osborne1.cpp
+++ b/src/mame/machine/osborne1.cpp
@@ -477,13 +477,13 @@ bool osborne1_state::set_bit_9(uint8_t value)
void osborne1_state::update_irq()
{
if (m_pia0->irq_a_state())
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xF0);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xF0); // Z80
else if (m_pia1->irq_a_state())
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xF8);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xF8); // Z80
else if (m_acia_irq_state)
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xFC);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xFC); // Z80
else
- m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, CLEAR_LINE, 0xFE);
+ m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, CLEAR_LINE, 0xFE); // Z80
}
void osborne1_state::update_acia_rxc_txc()
diff --git a/src/mame/machine/saturn.cpp b/src/mame/machine/saturn.cpp
index 5574ed292d6..1f53662b96b 100644
--- a/src/mame/machine/saturn.cpp
+++ b/src/mame/machine/saturn.cpp
@@ -256,9 +256,9 @@ TIMER_DEVICE_CALLBACK_MEMBER(saturn_state::saturn_slave_scanline )
y_step = get_ystep_count();
if(scanline == vblank_line*y_step)
- m_slave->set_input_line_and_vector(0x6, HOLD_LINE, 0x43);
+ m_slave->set_input_line_and_vector(0x6, HOLD_LINE, 0x43); // SH2
else if((scanline % y_step) == 0 && scanline < vblank_line*y_step)
- m_slave->set_input_line_and_vector(0x2, HOLD_LINE, 0x41);
+ m_slave->set_input_line_and_vector(0x2, HOLD_LINE, 0x41); // SH2
}
static const gfx_layout tiles8x8x4_layout =
diff --git a/src/mame/machine/simpsons.cpp b/src/mame/machine/simpsons.cpp
index 63eee71f583..90ee5566cdc 100644
--- a/src/mame/machine/simpsons.cpp
+++ b/src/mame/machine/simpsons.cpp
@@ -45,7 +45,7 @@ WRITE8_MEMBER(simpsons_state::simpsons_coin_counter_w)
READ8_MEMBER(simpsons_state::simpsons_sound_interrupt_r)
{
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff );
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff ); // Z80
return 0x00;
}
diff --git a/src/mame/machine/stfight.cpp b/src/mame/machine/stfight.cpp
index f7b673686b8..18968dcd63e 100644
--- a/src/mame/machine/stfight.cpp
+++ b/src/mame/machine/stfight.cpp
@@ -122,7 +122,7 @@ void stfight_state::device_timer(emu_timer &timer, device_timer_id id, int param
{
case TIMER_STFIGHT_INTERRUPT_1:
// Do a RST08
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); // Z80
break;
default:
assert_always(false, "Unknown id in stfight_state::device_timer");
@@ -132,7 +132,7 @@ void stfight_state::device_timer(emu_timer &timer, device_timer_id id, int param
INTERRUPT_GEN_MEMBER(stfight_state::stfight_vb_interrupt)
{
// Do a RST10
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf);
+ device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); // Z80
m_int1_timer->adjust(attotime::from_hz(120));
}
diff --git a/src/mame/machine/tnzs.cpp b/src/mame/machine/tnzs.cpp
index f55bb847e5c..213063e9e16 100644
--- a/src/mame/machine/tnzs.cpp
+++ b/src/mame/machine/tnzs.cpp
@@ -486,7 +486,7 @@ WRITE8_MEMBER(jpopnics_state::subbankswitch_w)
WRITE8_MEMBER(tnzsb_state::sound_command_w)
{
m_soundlatch->write(data);
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
/* handler called by the 2203 emulator when the internal timers cause an IRQ */
diff --git a/src/mame/machine/wswan.cpp b/src/mame/machine/wswan.cpp
index 08fe0799392..f403b341c1b 100644
--- a/src/mame/machine/wswan.cpp
+++ b/src/mame/machine/wswan.cpp
@@ -86,35 +86,35 @@ void wswan_state::handle_irqs()
{
if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_HBLTMR)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_HBLTMR);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_HBLTMR); // V30MZ
}
else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_VBL)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_VBL);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_VBL); // V30MZ
}
else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_VBLTMR)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_VBLTMR);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_VBLTMR); // V30MZ
}
else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_LCMP)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_LCMP);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_LCMP); // V30MZ
}
else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_SRX)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_SRX);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_SRX); // V30MZ
}
else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_RTC)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_RTC);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_RTC); // V30MZ
}
else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_KEY)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_KEY);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_KEY); // V30MZ
}
else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_STX)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_STX);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_STX); // V30MZ
}
else
{
diff --git a/src/mame/machine/x68k_kbd.cpp b/src/mame/machine/x68k_kbd.cpp
index 4d229a1ddba..6704afad127 100644
--- a/src/mame/machine/x68k_kbd.cpp
+++ b/src/mame/machine/x68k_kbd.cpp
@@ -312,7 +312,7 @@ void x68k_state::x68k_keyboard_push_scancode(unsigned char code)
//if(ioport("options")->read() & 0x01)
//{
// m_current_vector[6] = 0x4c;
- // m_maincpu->set_input_line_and_vector(6,ASSERT_LINE,0x4c);
+ // m_maincpu->set_input_line(6,ASSERT_LINE);
// logerror("MFP: Receive buffer full IRQ sent\n");
//}
}
diff --git a/src/mame/video/astrocde.cpp b/src/mame/video/astrocde.cpp
index 781cee11b18..f1dd0621e99 100644
--- a/src/mame/video/astrocde.cpp
+++ b/src/mame/video/astrocde.cpp
@@ -413,14 +413,14 @@ void astrocde_state::astrocade_trigger_lightpen(uint8_t vfeedback, uint8_t hfeed
/* bit 0 controls the interrupt mode: mode 0 means assert until acknowledged */
if ((m_interrupt_enabl & 0x01) == 0)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_interrupt_vector & 0xf0);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_interrupt_vector & 0xf0); // Z80
m_intoff_timer->adjust(m_screen->time_until_pos(vfeedback));
}
/* mode 1 means assert for 1 instruction */
else
{
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, m_interrupt_vector & 0xf0);
+ m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, m_interrupt_vector & 0xf0); // Z80
m_intoff_timer->adjust(m_maincpu->cycles_to_attotime(1));
}
@@ -453,14 +453,14 @@ TIMER_CALLBACK_MEMBER(astrocde_state::scanline_callback)
/* bit 2 controls the interrupt mode: mode 0 means assert until acknowledged */
if ((m_interrupt_enabl & 0x04) == 0)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_interrupt_vector);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_interrupt_vector); // Z80
m_intoff_timer->adjust(m_screen->time_until_vblank_end());
}
/* mode 1 means assert for 1 instruction */
else
{
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, m_interrupt_vector);
+ m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, m_interrupt_vector); // Z80
m_intoff_timer->adjust(m_maincpu->cycles_to_attotime(1));
}
}
diff --git a/src/mame/video/lockon.cpp b/src/mame/video/lockon.cpp
index 1b8365a4e75..b234716aa32 100644
--- a/src/mame/video/lockon.cpp
+++ b/src/mame/video/lockon.cpp
@@ -67,7 +67,7 @@ WRITE16_MEMBER(lockon_state::lockon_crtc_w)
TIMER_CALLBACK_MEMBER(lockon_state::cursor_callback)
{
if (m_main_inten)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // V30
m_cursor_timer->adjust(m_screen->time_until_pos(CURSOR_YPOS, CURSOR_XPOS));
}
@@ -281,7 +281,7 @@ WRITE16_MEMBER(lockon_state::lockon_ground_ctrl_w)
TIMER_CALLBACK_MEMBER(lockon_state::bufend_callback)
{
- m_ground->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_ground->set_input_line_and_vector(0, HOLD_LINE, 0xff); // V30
m_object->set_input_line(NEC_INPUT_LINE_POLL, ASSERT_LINE);
}
diff --git a/src/mame/video/ninjakd2.cpp b/src/mame/video/ninjakd2.cpp
index 54b8e92d988..f86727520b1 100644
--- a/src/mame/video/ninjakd2.cpp
+++ b/src/mame/video/ninjakd2.cpp
@@ -431,6 +431,6 @@ WRITE_LINE_MEMBER(ninjakd2_state::screen_vblank_ninjakd2)
m_sprites_updated = 0;
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h */
}
}
diff --git a/src/mame/video/tmnt.cpp b/src/mame/video/tmnt.cpp
index 7da27c28eee..f168d9b026c 100644
--- a/src/mame/video/tmnt.cpp
+++ b/src/mame/video/tmnt.cpp
@@ -297,7 +297,7 @@ WRITE16_MEMBER(tmnt_state::tmnt_0a0000_w)
/* bit 3 high then low triggers irq on sound CPU */
if (m_last == 0x08 && (data & 0x08) == 0)
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
m_last = data & 0x08;
@@ -320,7 +320,7 @@ WRITE16_MEMBER(tmnt_state::punkshot_0a0020_w)
/* bit 2 = trigger irq on sound CPU */
if (m_last == 0x04 && (data & 0x04) == 0)
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
m_last = data & 0x04;
@@ -339,7 +339,7 @@ WRITE16_MEMBER(tmnt_state::lgtnfght_0a0018_w)
/* bit 2 = trigger irq on sound CPU */
if (m_last == 0x00 && (data & 0x04) == 0x04)
- m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
m_last = data & 0x04;
diff --git a/src/mame/video/tx1.cpp b/src/mame/video/tx1.cpp
index 537fca8c173..9f1e4a3e327 100644
--- a/src/mame/video/tx1.cpp
+++ b/src/mame/video/tx1.cpp
@@ -37,7 +37,7 @@
*/
TIMER_CALLBACK_MEMBER(tx1_state::interrupt_callback)
{
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // I8086
m_interrupt_timer->adjust(m_screen->time_until_pos(CURSOR_YPOS, CURSOR_XPOS));
}
diff --git a/src/mame/video/vc4000.cpp b/src/mame/video/vc4000.cpp
index c9db96a8b29..63be0c8015c 100644
--- a/src/mame/video/vc4000.cpp
+++ b/src/mame/video/vc4000.cpp
@@ -641,7 +641,7 @@ INTERRUPT_GEN_MEMBER(vc4000_state::vc4000_video_line)
(m_video.sprites[1].finished_now) |
(m_video.sprites[0].finished_now)) && (!m_irq_pause))
{
- m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, 3);
+ m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, 3); // S2650
m_irq_pause=1;
}
}