summaryrefslogtreecommitdiffstatshomepage
path: root/src/ldplayer/ldplayer.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-09-09 16:10:11 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-09-09 16:10:11 +0000
commit9b4e46fad5b2d290ffec5c0d2ee94176a4fdf33c (patch)
tree493e2f720f23bd2d1c39abd22ef7481dc6250812 /src/ldplayer/ldplayer.c
parentbd8c06c155fe4cc1f9584a6fe86d08b96dc5bd77 (diff)
Changed DEVICE_START functions to return an error code. Currently this
is either DEVICE_START_OK or DEVICE_START_MISSING_DEPENDENCY. The latter should be returned by a device if there is another device it depends on which hasn't been started yet. Added new flag in the device interface to indicate whether a device has been started. Changed laserdisc interface to explicitly specify the screen and sound devices it should route to. Drivers no longer have to manually call laserdisc_vsync(). Instead, the laserdisc code connects up to the routed screen device and works based on that screen's VBLANK timing. Removed all existing calls to laserdisc_vsync(). Changed laserdisc behavior so that it completes the previous video read and initiates the next read at the end of VBLANK instead of the beginning. This gives player logic time during VBLANK to alter the slider position prior to fetching the next frame. Added new laserdisc callback for vsync begin and changed the update callback to be called at the end of VBLANK. Also added functions to set the slider speed, advance the slider, and directly control the video/ audio squelch. In addition, there is a new status function to get the slider position in general terms. Added parameter to the VBLANK callbacks supported in emu/video.c. Updated all callers to provide a callback value. Fixed bug that would cause watchpoints to trigger if you had a memory window open to the watchpoint address. Further updates to the PR-8210 ROM simulation. Still not quite there but the system is much better understood now. Added layout to the PR-8210 which displays the state of the front-panel LEDs.
Diffstat (limited to 'src/ldplayer/ldplayer.c')
-rw-r--r--src/ldplayer/ldplayer.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/ldplayer/ldplayer.c b/src/ldplayer/ldplayer.c
index f7d49cd3f90..e533ee485ae 100644
--- a/src/ldplayer/ldplayer.c
+++ b/src/ldplayer/ldplayer.c
@@ -15,6 +15,9 @@
#include "machine/laserdsc.h"
#include <ctype.h>
+#include "pr8210.lh"
+
+
/*************************************
*
@@ -59,7 +62,6 @@ static input_port_value last_controls;
static UINT8 playing;
static UINT8 displaying;
-static UINT8 pr8210_last_was_number;
static emu_timer *pr8210_bit_timer;
static UINT32 pr8210_command_buffer_in, pr8210_command_buffer_out;
static UINT8 pr8210_command_buffer[10];
@@ -138,13 +140,8 @@ static TIMER_CALLBACK( vsync_update )
/* handle commands */
if (!param)
- {
process_commands(laserdisc);
- /* update the laserdisc */
- laserdisc_vsync(laserdisc);
- }
-
/* set a timer to go off on the next VBLANK */
vblank_scanline = video_screen_get_visible_area(machine->primary_screen)->max_y + 1;
target = video_screen_get_time_until_pos(machine->primary_screen, vblank_scanline, 0);
@@ -251,9 +248,7 @@ static MACHINE_RESET( pr8210 )
static void pr8210_execute(const device_config *laserdisc, int command)
{
static const UINT8 digits[10] = { 0x01, 0x11, 0x09, 0x19, 0x05, 0x15, 0x0d, 0x1d, 0x03, 0x13 };
- int prev_was_number = pr8210_last_was_number;
- pr8210_last_was_number = FALSE;
switch (command)
{
case CMD_SCAN_REVERSE:
@@ -293,13 +288,8 @@ static void pr8210_execute(const device_config *laserdisc, int command)
break;
case CMD_DISPLAY_ON:
-// pr8210_add_command(digits[1]);
-// pr8210_add_command(0xf1);
- break;
-
case CMD_DISPLAY_OFF:
-// pr8210_add_command(digits[0]);
-// pr8210_add_command(0xf1);
+ pr8210_add_command(0x0b);
break;
case CMD_0:
@@ -312,10 +302,7 @@ static void pr8210_execute(const device_config *laserdisc, int command)
case CMD_7:
case CMD_8:
case CMD_9:
- if (!prev_was_number)
- pr8210_add_command(0x1a);
pr8210_add_command(digits[command - CMD_0]);
- pr8210_last_was_number = TRUE;
break;
case CMD_SEARCH:
@@ -443,7 +430,7 @@ static MACHINE_DRIVER_START( ldplayer_core )
/* audio hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
- MDRV_SOUND_ADD("laserdisc", CUSTOM, 0)
+ MDRV_SOUND_ADD("ldsound", CUSTOM, 0)
MDRV_SOUND_CONFIG(laserdisc_custom_interface)
MDRV_SOUND_ROUTE(0, "left", 1.0)
MDRV_SOUND_ROUTE(1, "right", 1.0)
@@ -458,7 +445,7 @@ MACHINE_DRIVER_END
static MACHINE_DRIVER_START( ldv1000 )
MDRV_IMPORT_FROM(ldplayer_ntsc)
- MDRV_LASERDISC_ADD("laserdisc", PIONEER_LDV1000)
+ MDRV_LASERDISC_ADD("laserdisc", PIONEER_LDV1000, "main", "ldsound")
MACHINE_DRIVER_END
@@ -466,7 +453,7 @@ static MACHINE_DRIVER_START( pr8210 )
MDRV_IMPORT_FROM(ldplayer_ntsc)
MDRV_MACHINE_START(pr8210)
MDRV_MACHINE_RESET(pr8210)
- MDRV_LASERDISC_ADD("laserdisc", PIONEER_PR8210)
+ MDRV_LASERDISC_ADD("laserdisc", PIONEER_PR8210, "main", "ldsound")
MACHINE_DRIVER_END
@@ -569,4 +556,4 @@ static DRIVER_INIT( pr8210 ) { execute_command = pr8210_execute; DRIVER_INIT_CA
*************************************/
GAME( 2008, ldv1000, 0, ldv1000, ldplayer, ldv1000, ROT0, "MAME", "Pioneer LDV-1000 Simulator", 0 )
-GAME( 2008, pr8210, 0, pr8210, ldplayer, pr8210, ROT0, "MAME", "Pioneer PR-8210 Simulator", 0 )
+GAMEL( 2008, pr8210, 0, pr8210, ldplayer, pr8210, ROT0, "MAME", "Pioneer PR-8210 Simulator", 0, layout_pr8210 )