summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/esh.c
diff options
context:
space:
mode:
authorGravatarGravatar Aaron Giles <aaron@aarongiles.com>2008-07-21 17:02:59 +0000
committerGravatarGravatar Aaron Giles <aaron@aarongiles.com>2008-07-21 17:02:59 +0000
commit2f823ff24f1bed7cc230facbb5c9a72b83dbb8c2 (patch) (github)
tree8ad51d3812d5e6c3e5fef66ea907f6eb63c8db52 /src/mame/drivers/esh.c
parentde171027cc96c85200bdd6fc321f703c52b4ad18 (diff)
downloadmame-2f823ff24f1bed7cc230facbb5c9a72b83dbb8c2.tar.bz2
mame-2f823ff24f1bed7cc230facbb5c9a72b83dbb8c2.zip
Laserdiscs are now devices. Updated all drivers accordingly.
Diffstat (limited to 'src/mame/drivers/esh.c')
-rw-r--r--src/mame/drivers/esh.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c
index 7901ec59e1b..3a0a85bf030 100644
--- a/src/mame/drivers/esh.c
+++ b/src/mame/drivers/esh.c
@@ -30,7 +30,7 @@ Todo:
/* Misc variables */
-static laserdisc_info *discinfo;
+static const device_config *laserdisc;
static UINT8 *tile_ram;
static UINT8 *tile_control_ram;
@@ -46,8 +46,8 @@ static VIDEO_UPDATE( esh )
fillbitmap(bitmap, 0, cliprect);
/* display disc information */
- if (discinfo != NULL && ld_video_visible)
- popmessage("%s", laserdisc_describe_state(discinfo));
+ if (ld_video_visible)
+ popmessage("%s", laserdisc_describe_state(laserdisc));
/* Draw tiles */
for (charx = 0; charx < 32; charx++)
@@ -77,12 +77,12 @@ static VIDEO_UPDATE( esh )
/* MEMORY HANDLERS */
static READ8_HANDLER(ldp_read)
{
- return laserdisc_data_r(discinfo);
+ return laserdisc_data_r(laserdisc);
}
static WRITE8_HANDLER(ldp_write)
{
- laserdisc_data_w(discinfo,data);
+ laserdisc_data_w(laserdisc,data);
}
static WRITE8_HANDLER(misc_write)
@@ -258,12 +258,6 @@ static GFXDECODE_START( esh )
GFXDECODE_ENTRY(REGION_GFX1, 0, esh_gfx_layout, 0x0, 0x100)
GFXDECODE_END
-static MACHINE_START( esh )
-{
- discinfo = laserdisc_init(machine, LASERDISC_TYPE_LDV1000, get_disk_handle(0), 0);
- return;
-}
-
static TIMER_CALLBACK( irq_stop )
{
cpunum_set_input_line(machine, 0, 0, CLEAR_LINE);
@@ -275,7 +269,12 @@ static INTERRUPT_GEN( vblank_callback_esh )
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
timer_set(ATTOTIME_IN_USEC(50), NULL, 0, irq_stop);
- laserdisc_vsync(discinfo);
+ laserdisc_vsync(laserdisc);
+}
+
+static MACHINE_START( esh )
+{
+ laserdisc = device_list_find_by_tag(machine->config->devicelist, LASERDISC, "laserdisc");
}
@@ -287,8 +286,11 @@ static MACHINE_DRIVER_START( esh )
MDRV_CPU_IO_MAP(z80_0_io,0)
MDRV_CPU_VBLANK_INT("main", vblank_callback_esh)
- MDRV_MACHINE_START(esh)
MDRV_NVRAM_HANDLER(generic_0fill)
+
+ MDRV_MACHINE_START(esh)
+
+ MDRV_LASERDISC_ADD("laserdisc", PIONEER_LDV1000, 0, "laserdisc")
/* video */
@@ -306,6 +308,12 @@ static MACHINE_DRIVER_START( esh )
MDRV_VIDEO_UPDATE(esh)
/* sound */
+ MDRV_SPEAKER_STANDARD_STEREO("left", "right")
+
+ MDRV_SOUND_ADD("laserdisc", CUSTOM, 0)
+ MDRV_SOUND_CONFIG(laserdisc_custom_interface)
+ MDRV_SOUND_ROUTE(0, "left", 1.0)
+ MDRV_SOUND_ROUTE(1, "right", 1.0)
MACHINE_DRIVER_END