Amiga: Add the latest version of EmuTOS to the Amiga 1000 softlist and

fix CIA interrupts getting lost in certain situations. This fixes the
EmuTOS keyboard and potentially more. Also fix a possible issue with
blitter delays.
This commit is contained in:
Dirk Best 2014-09-23 12:19:58 +00:00
parent a1aed6adf4
commit 11e2831405
4 changed files with 62 additions and 33 deletions

View file

@ -157,4 +157,18 @@
</part>
</software>
<!-- EmuTOS -->
<software name="emutos93">
<description>EmuTOS 0.9.3</description>
<year>2014</year>
<publisher>EmuTOS development team</publisher>
<part name="flop1" interface="floppy_3_5">
<feature name="part_id" value="EmuTOS 0.9.3" />
<dataarea name="flop" size="901120">
<rom name="emutos_093.adf" size="901120" crc="96f5cc88" sha1="fa3a3aa314d50e1131a5b65a048519c76c836bd2" offset="0"/>
</dataarea>
</part>
</software>
</softwarelist>

View file

@ -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();

View file

@ -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;

View file

@ -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 )