diff --git a/hash/amiga_a1000.xml b/hash/amiga_a1000.xml
index 81c37eee6fe..96dba6c4c62 100644
--- a/hash/amiga_a1000.xml
+++ b/hash/amiga_a1000.xml
@@ -154,7 +154,21 @@
-
+
-
+
+
+
+
+ EmuTOS 0.9.3
+ 2014
+ EmuTOS development team
+
+
+
+
+
+
+
+
diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h
index 423b315ae60..99d3bb08905 100644
--- a/src/mame/includes/amiga.h
+++ b/src/mame/includes/amiga.h
@@ -535,8 +535,10 @@ protected:
// interrupts
void set_interrupt(int interrupt);
- virtual void update_int2();
- virtual void update_int6();
+ virtual bool int2_pending();
+ virtual bool int6_pending();
+ void update_int2();
+ void update_int6();
virtual void vblank();
diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c
index 47c515db50e..42f365c7b1b 100644
--- a/src/mame/machine/amiga.c
+++ b/src/mame/machine/amiga.c
@@ -398,19 +398,37 @@ void amiga_state::set_interrupt(int interrupt)
custom_chip_w(m_maincpu->space(AS_PROGRAM), REG_INTREQ, interrupt, 0xffff);
}
+bool amiga_state::int2_pending()
+{
+ return m_cia_0_irq;
+}
+
+bool amiga_state::int6_pending()
+{
+ return m_cia_1_irq;
+}
+
void amiga_state::update_int2()
{
- set_interrupt((m_cia_0_irq ? INTENA_SETCLR : 0x0000) | INTENA_PORTS);
+ set_interrupt((int2_pending() ? INTENA_SETCLR : 0x0000) | INTENA_PORTS);
}
void amiga_state::update_int6()
{
- set_interrupt((m_cia_1_irq ? INTENA_SETCLR : 0x0000) | INTENA_EXTER);
+ set_interrupt((int6_pending() ? INTENA_SETCLR : 0x0000) | INTENA_EXTER);
}
void amiga_state::update_irqs()
{
amiga_state *state = this;
+
+ // if the external interrupt line is still active, set the interrupt request bit
+ if (int2_pending())
+ CUSTOM_REG(REG_INTREQ) |= INTENA_PORTS;
+
+ if (int6_pending())
+ CUSTOM_REG(REG_INTREQ) |= INTENA_EXTER;
+
int ints = CUSTOM_REG(REG_INTENA) & CUSTOM_REG(REG_INTREQ);
// master interrupt switch
@@ -1429,7 +1447,7 @@ WRITE16_MEMBER( amiga_state::custom_chip_w )
CUSTOM_REG(REG_BLTSIZH) = data & 0x3f;
if ( CUSTOM_REG(REG_BLTSIZV) == 0 ) CUSTOM_REG(REG_BLTSIZV) = 0x400;
if ( CUSTOM_REG(REG_BLTSIZH) == 0 ) CUSTOM_REG(REG_BLTSIZH) = 0x40;
- blitter_setup(space);
+ blitter_setup(m_maincpu->space(AS_PROGRAM));
break;
case REG_BLTSIZV:
@@ -1445,7 +1463,7 @@ WRITE16_MEMBER( amiga_state::custom_chip_w )
{
CUSTOM_REG(REG_BLTSIZH) = data & 0x7ff;
if ( CUSTOM_REG(REG_BLTSIZH) == 0 ) CUSTOM_REG(REG_BLTSIZH) = 0x800;
- blitter_setup(space);
+ blitter_setup(m_maincpu->space(AS_PROGRAM));
}
break;
@@ -1479,7 +1497,8 @@ WRITE16_MEMBER( amiga_state::custom_chip_w )
amiga_sprite_enable_comparitor(space.machine(), (offset - REG_SPR0DATA) / 4, TRUE);
break;
- case REG_COP1LCH: case REG_COP2LCH:
+ case REG_COP1LCH:
+ case REG_COP2LCH:
data &= ( state->m_chip_ram_mask >> 16 );
break;
diff --git a/src/mess/drivers/amiga.c b/src/mess/drivers/amiga.c
index 7cca03eb133..d6dc91cbada 100644
--- a/src/mess/drivers/amiga.c
+++ b/src/mess/drivers/amiga.c
@@ -75,8 +75,8 @@ public:
protected:
// amiga_state overrides
- virtual void update_int2();
- virtual void update_int6();
+ virtual bool int2_pending();
+ virtual bool int6_pending();
private:
// devices
@@ -140,8 +140,8 @@ protected:
virtual void machine_start();
// amiga_state overrides
- virtual void update_int2();
- virtual void update_int6();
+ virtual bool int2_pending();
+ virtual bool int6_pending();
private:
// devices
@@ -218,7 +218,7 @@ public:
static const UINT8 GAYLE_ID = 0xd0;
protected:
- virtual void update_int2();
+ virtual bool int2_pending();
private:
int m_gayle_int2;
@@ -240,7 +240,7 @@ public:
static const UINT8 GAYLE_ID = 0xd1;
protected:
- virtual void update_int2();
+ virtual bool int2_pending();
private:
int m_gayle_int2;
@@ -569,16 +569,14 @@ WRITE_LINE_MEMBER( a2000_state::zorro2_int6_w )
update_int6();
}
-void a2000_state::update_int2()
+bool a2000_state::int2_pending()
{
- int state = (m_cia_0_irq || m_zorro2_int2);
- set_interrupt((state ? INTENA_SETCLR : 0x0000) | INTENA_PORTS);
+ return m_cia_0_irq || m_zorro2_int2;
}
-void a2000_state::update_int6()
+bool a2000_state::int6_pending()
{
- int state = (m_cia_1_irq || m_zorro2_int6);
- set_interrupt((state ? INTENA_SETCLR : 0x0000) | INTENA_EXTER);
+ return m_cia_1_irq || m_zorro2_int6;
}
void cdtv_state::machine_start()
@@ -591,16 +589,14 @@ void cdtv_state::machine_start()
m_dmac->ramsz_w(0);
}
-void cdtv_state::update_int2()
+bool cdtv_state::int2_pending()
{
- int state = (m_cia_0_irq || m_dmac_irq || m_tpi_irq);
- set_interrupt((state ? INTENA_SETCLR : 0x0000) | INTENA_PORTS);
+ return m_cia_0_irq || m_dmac_irq || m_tpi_irq;
}
-void cdtv_state::update_int6()
+bool cdtv_state::int6_pending()
{
- int state = (m_cia_1_irq);
- set_interrupt((state ? INTENA_SETCLR : 0x0000) | INTENA_EXTER);
+ return m_cia_1_irq;
}
READ32_MEMBER( a3000_state::scsi_r )
@@ -627,10 +623,9 @@ WRITE32_MEMBER( a3000_state::motherboard_w )
logerror("motherboard_w(%06x): %08x & %08x\n", offset, data, mem_mask);
}
-void a600_state::update_int2()
+bool a600_state::int2_pending()
{
- int state = (m_cia_0_irq || m_gayle_int2);
- set_interrupt((state ? INTENA_SETCLR : 0x0000) | INTENA_PORTS);
+ return m_cia_0_irq || m_gayle_int2;
}
WRITE_LINE_MEMBER( a600_state::gayle_int2_w )
@@ -639,10 +634,9 @@ WRITE_LINE_MEMBER( a600_state::gayle_int2_w )
update_int2();
}
-void a1200_state::update_int2()
+bool a1200_state::int2_pending()
{
- int state = (m_cia_0_irq || m_gayle_int2);
- set_interrupt((state ? INTENA_SETCLR : 0x0000) | INTENA_PORTS);
+ return m_cia_0_irq || m_gayle_int2;
}
WRITE_LINE_MEMBER( a1200_state::gayle_int2_w )