summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/mirax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/mirax.c')
-rw-r--r--src/mame/drivers/mirax.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/mame/drivers/mirax.c b/src/mame/drivers/mirax.c
index 6165f3cc313..e2d6ed1477a 100644
--- a/src/mame/drivers/mirax.c
+++ b/src/mame/drivers/mirax.c
@@ -110,22 +110,12 @@ static WRITE8_HANDLER(audio_w)
}
-static WRITE8_HANDLER(ay1_sel)
+static WRITE8_DEVICE_HANDLER(ay_sel)
{
- if(cpu_get_previouspc(space->cpu)==0x309)
+ if(cpu_get_previouspc(device->machine->cpu[0])==0x309)
{
- ay8910_control_port_0_w(space,0,nAyCtrl);
- ay8910_write_port_0_w(space,0,nAyData);
- }
-}
-
-static WRITE8_HANDLER(ay2_sel)
-{
-
- if(cpu_get_previouspc(space->cpu)==0x309)
- {
- ay8910_control_port_1_w(space,0,nAyCtrl);
- ay8910_write_port_1_w(space,0,nAyData);
+ ay8910_address_w(device,0,nAyCtrl);
+ ay8910_data_w(device,0,nAyData);
}
}
@@ -134,11 +124,11 @@ static ADDRESS_MAP_START( memory_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0xa000, 0xa000) AM_READ(snd_read)
- AM_RANGE(0xe000, 0xe000) AM_WRITE(ay1_sel) //1st ay ?
+ AM_RANGE(0xe000, 0xe000) AM_DEVWRITE(SOUND, "ay1", ay_sel) //1st ay ?
AM_RANGE(0xe001, 0xe001) AM_WRITENOP
AM_RANGE(0xe003, 0xe003) AM_WRITENOP
- AM_RANGE(0xe400, 0xe400) AM_WRITE(ay2_sel) //2nd ay ?
+ AM_RANGE(0xe400, 0xe400) AM_DEVWRITE(SOUND, "ay2", ay_sel) //2nd ay ?
AM_RANGE(0xe401, 0xe401) AM_WRITENOP
AM_RANGE(0xe403, 0xe403) AM_WRITENOP