diff options
author | Angelo Salese <angelosa@users.noreply.github.com> | 2011-11-29 17:08:30 +0000 |
---|---|---|
committer | Angelo Salese <angelosa@users.noreply.github.com> | 2011-11-29 17:08:30 +0000 |
commit | 02203fedfa63a97b93be754d3e0d820e01f6bd9f (patch) | |
tree | daef2bed3715662797549eb082334247cc168c03 /src/mame/drivers/tp84.c | |
parent | 24ee0f0d2f651465a37b54f1127148de90bc339b (diff) |
Removed ugly function interrupt_enable_w from the core, and updated all the drivers that used it accordingly [Angelo Salese]
Fixed scratchy sound in Birdiy, unlike all other Pac-Man HW games irq mask is at $5001 instead of $5000, so fixing that fixed the sound as well [Angelo Salese]
Fixed bogus irq/nmi mask bit in Yie Ar Kung-Fu (IRQ mask bit was masking BOTH lines before) [Angelo Salese]
Fixed bogus irq mask to sound CPU in Syusse Oozumou [Angelo Salese]
Fixed bogus irq mask bit in SNK6502 HW games (IRQ mask bit was masking BOTH lines before) [Angelo Salese]
Marked Truco Clemente as GNW since it never really worked (coin chutes stops working after one play), nw
Out of whatsnew:
And then I've realized that there's also cpu_interrupt_enable() function, another 19 instances to kill ... -.-"
Diffstat (limited to 'src/mame/drivers/tp84.c')
-rw-r--r-- | src/mame/drivers/tp84.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c index 4ab0c28ee05..545368791f4 100644 --- a/src/mame/drivers/tp84.c +++ b/src/mame/drivers/tp84.c @@ -169,10 +169,18 @@ static ADDRESS_MAP_START( tp84b_cpu1_map, AS_PROGRAM, 8 ) ADDRESS_MAP_END +static WRITE8_HANDLER( sub_irq_mask_w ) +{ + tp84_state *state = space->machine().driver_data<tp84_state>(); + + state->m_sub_irq_mask = data & 1; +} + + static ADDRESS_MAP_START( cpu2_map, AS_PROGRAM, 8 ) // AM_RANGE(0x0000, 0x0000) AM_RAM /* Watch dog ?*/ AM_RANGE(0x2000, 0x2000) AM_READ(tp84_scanline_r) /* beam position */ - AM_RANGE(0x4000, 0x4000) AM_WRITE(interrupt_enable_w) + AM_RANGE(0x4000, 0x4000) AM_WRITE(sub_irq_mask_w) AM_RANGE(0x6000, 0x679f) AM_RAM AM_RANGE(0x67a0, 0x67ff) AM_RAM_WRITE(tp84_spriteram_w) AM_BASE_MEMBER(tp84_state, m_spriteram) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("share1") @@ -273,6 +281,13 @@ static GFXDECODE_START( tp84 ) GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 64*4*8, 16*8 ) GFXDECODE_END +static INTERRUPT_GEN( sub_vblank_irq ) +{ + tp84_state *state = device->machine().driver_data<tp84_state>(); + + if(state->m_sub_irq_mask) + device_set_input_line(device, 0, HOLD_LINE); +} static MACHINE_CONFIG_START( tp84, tp84_state ) @@ -284,7 +299,7 @@ static MACHINE_CONFIG_START( tp84, tp84_state ) MCFG_CPU_ADD("sub", M6809, XTAL_18_432MHz/12) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(cpu2_map) - MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) + MCFG_CPU_VBLANK_INT("screen", sub_vblank_irq) MCFG_CPU_ADD("audiocpu", Z80,XTAL_14_31818MHz/4) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(audio_map) |