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/popper.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/popper.c')
-rw-r--r-- | src/mame/drivers/popper.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/mame/drivers/popper.c b/src/mame/drivers/popper.c index dc08f3dc5a0..037db1f971e 100644 --- a/src/mame/drivers/popper.c +++ b/src/mame/drivers/popper.c @@ -145,6 +145,14 @@ static READ8_HANDLER( popper_soundcpu_nmi_r ) return 0; } +static WRITE8_HANDLER( nmi_mask_w ) +{ + popper_state *state = space->machine().driver_data<popper_state>(); + + state->m_nmi_mask = data & 1; +} + + /************************************* * * Memory maps @@ -163,7 +171,7 @@ static ADDRESS_MAP_START( popper_map, AS_PROGRAM, 8 ) AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_BASE_SIZE_MEMBER(popper_state, m_spriteram, m_spriteram_size) AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE("share1") AM_RANGE(0xe000, 0xe007) AM_READ(popper_input_ports_r) - AM_RANGE(0xe000, 0xe000) AM_WRITE(interrupt_enable_w) + AM_RANGE(0xe000, 0xe000) AM_WRITE(nmi_mask_w) AM_RANGE(0xe001, 0xe001) AM_WRITE(popper_flipscreen_w) AM_RANGE(0xe002, 0xe002) AM_WRITE(popper_e002_w) //?? seems to be graphic related AM_RANGE(0xe003, 0xe003) AM_WRITE(popper_gfx_bank_w) @@ -324,12 +332,21 @@ static MACHINE_RESET( popper ) state->m_gfx_bank = 0; } +static INTERRUPT_GEN( vblank_irq ) +{ + popper_state *state = device->machine().driver_data<popper_state>(); + + if(state->m_nmi_mask) + device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); +} + + static MACHINE_CONFIG_START( popper, popper_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80,18432000/6) MCFG_CPU_PROGRAM_MAP(popper_map) - MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) + MCFG_CPU_VBLANK_INT("screen", vblank_irq) MCFG_CPU_ADD("audiocpu", Z80,18432000/12) MCFG_CPU_PROGRAM_MAP(popper_sound_map) |