summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/brkthru.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-04-04 15:08:19 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-04-04 15:08:19 +0000
commit7dabd8b524510582d7f6ee96f430395d2f60cb78 (patch)
tree9641ea5111636c5963ac77e7130ace2773ddd1a3 /src/mame/drivers/brkthru.c
parent62d9c8ba4fd4be6fc3225e8a3850526db7d78357 (diff)
MAME going modern part 5 (no whatsnew)
Tomorrow and next days just bug fixing from my side, no big changes
Diffstat (limited to 'src/mame/drivers/brkthru.c')
-rw-r--r--src/mame/drivers/brkthru.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/mame/drivers/brkthru.c b/src/mame/drivers/brkthru.c
index ea8a7874285..cafff15615e 100644
--- a/src/mame/drivers/brkthru.c
+++ b/src/mame/drivers/brkthru.c
@@ -65,38 +65,35 @@
*
*************************************/
-static WRITE8_HANDLER( brkthru_1803_w )
+WRITE8_MEMBER(brkthru_state::brkthru_1803_w)
{
- brkthru_state *state = space->machine().driver_data<brkthru_state>();
/* bit 0 = NMI enable */
- state->m_nmi_mask = ~data & 1;
+ m_nmi_mask = ~data & 1;
if(data & 2)
- device_set_input_line(state->m_maincpu, 0, CLEAR_LINE);
+ device_set_input_line(m_maincpu, 0, CLEAR_LINE);
/* bit 1 = ? maybe IRQ acknowledge */
}
-static WRITE8_HANDLER( darwin_0803_w )
+WRITE8_MEMBER(brkthru_state::darwin_0803_w)
{
- brkthru_state *state = space->machine().driver_data<brkthru_state>();
/* bit 0 = NMI enable */
- state->m_nmi_mask = data & 1;
+ m_nmi_mask = data & 1;
logerror("0803 %02X\n",data);
if(data & 2)
- device_set_input_line(state->m_maincpu, 0, CLEAR_LINE);
+ device_set_input_line(m_maincpu, 0, CLEAR_LINE);
/* bit 1 = ? maybe IRQ acknowledge */
}
-static WRITE8_HANDLER( brkthru_soundlatch_w )
+WRITE8_MEMBER(brkthru_state::brkthru_soundlatch_w)
{
- brkthru_state *state = space->machine().driver_data<brkthru_state>();
soundlatch_w(space, offset, data);
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
+ device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
}
static INPUT_CHANGED( coin_inserted )
@@ -126,8 +123,8 @@ static ADDRESS_MAP_START( brkthru_map, AS_PROGRAM, 8, brkthru_state )
AM_RANGE(0x1802, 0x1802) AM_READ_PORT("DSW1")
AM_RANGE(0x1803, 0x1803) AM_READ_PORT("DSW2/COIN")
AM_RANGE(0x1800, 0x1801) AM_WRITE_LEGACY(brkthru_1800_w) /* bg scroll and color, ROM bank selection, flip screen */
- AM_RANGE(0x1802, 0x1802) AM_WRITE_LEGACY(brkthru_soundlatch_w)
- AM_RANGE(0x1803, 0x1803) AM_WRITE_LEGACY(brkthru_1803_w) /* NMI enable, + ? */
+ AM_RANGE(0x1802, 0x1802) AM_WRITE(brkthru_soundlatch_w)
+ AM_RANGE(0x1803, 0x1803) AM_WRITE(brkthru_1803_w) /* NMI enable, + ? */
AM_RANGE(0x2000, 0x3fff) AM_ROMBANK("bank1")
AM_RANGE(0x4000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -144,8 +141,8 @@ static ADDRESS_MAP_START( darwin_map, AS_PROGRAM, 8, brkthru_state )
AM_RANGE(0x0802, 0x0802) AM_READ_PORT("DSW1")
AM_RANGE(0x0803, 0x0803) AM_READ_PORT("DSW2/COIN")
AM_RANGE(0x0800, 0x0801) AM_WRITE_LEGACY(brkthru_1800_w) /* bg scroll and color, ROM bank selection, flip screen */
- AM_RANGE(0x0802, 0x0802) AM_WRITE_LEGACY(brkthru_soundlatch_w)
- AM_RANGE(0x0803, 0x0803) AM_WRITE_LEGACY(darwin_0803_w) /* NMI enable, + ? */
+ AM_RANGE(0x0802, 0x0802) AM_WRITE(brkthru_soundlatch_w)
+ AM_RANGE(0x0803, 0x0803) AM_WRITE(darwin_0803_w) /* NMI enable, + ? */
AM_RANGE(0x2000, 0x3fff) AM_ROMBANK("bank1")
AM_RANGE(0x4000, 0xffff) AM_ROM
ADDRESS_MAP_END