diff options
author | 2008-09-09 16:10:11 +0000 | |
---|---|---|
committer | 2008-09-09 16:10:11 +0000 | |
commit | 9b4e46fad5b2d290ffec5c0d2ee94176a4fdf33c (patch) | |
tree | 493e2f720f23bd2d1c39abd22ef7481dc6250812 /src/ldplayer | |
parent | bd8c06c155fe4cc1f9584a6fe86d08b96dc5bd77 (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')
-rw-r--r-- | src/ldplayer/layout/pr8210.lay | 121 | ||||
-rw-r--r-- | src/ldplayer/ldplayer.c | 29 | ||||
-rw-r--r-- | src/ldplayer/ldplayer.mak | 10 |
3 files changed, 139 insertions, 21 deletions
diff --git a/src/ldplayer/layout/pr8210.lay b/src/ldplayer/layout/pr8210.lay new file mode 100644 index 00000000000..709d1346039 --- /dev/null +++ b/src/ldplayer/layout/pr8210.lay @@ -0,0 +1,121 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + <element name="audio1" defstate="0"> + <text string="AUDIO1" state="0"> + <color red="0.1" green="0.1" blue="0.1" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + <text string="AUDIO1" state="1"> + <color red="1.0" green="1.0" blue="1.0" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + </element> + + <element name="audio2" defstate="0"> + <text string="AUDIO2" state="0"> + <color red="0.1" green="0.1" blue="0.1" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + <text string="AUDIO2" state="1"> + <color red="1.0" green="1.0" blue="1.0" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + </element> + + <element name="clv" defstate="0"> + <text string="CLV" state="0"> + <color red="0.1" green="0.1" blue="0.1" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + <text string="CLV" state="1"> + <color red="1.0" green="1.0" blue="1.0" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + </element> + + <element name="cav" defstate="0"> + <text string="CAV" state="0"> + <color red="0.1" green="0.1" blue="0.1" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + <text string="CAV" state="1"> + <color red="1.0" green="1.0" blue="1.0" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + </element> + + <element name="led1" defstate="0"> + <text string="LED1" state="0"> + <color red="0.1" green="0.1" blue="0.1" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + <text string="LED1" state="1"> + <color red="1.0" green="1.0" blue="1.0" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + </element> + + <element name="led2" defstate="0"> + <text string="LED2" state="0"> + <color red="0.1" green="0.1" blue="0.1" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + <text string="LED2" state="1"> + <color red="1.0" green="1.0" blue="1.0" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + </element> + + <element name="led3" defstate="0"> + <text string="LED3" state="0"> + <color red="0.1" green="0.1" blue="0.1" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + <text string="LED3" state="1"> + <color red="1.0" green="1.0" blue="1.0" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + </element> + + <element name="standby" defstate="0"> + <text string="STANDBY" state="0"> + <color red="0.1" green="0.1" blue="0.1" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + <text string="STANDBY" state="1"> + <color red="1.0" green="1.0" blue="1.0" /> + <bounds x="0" y="0.1" width="1" height="0.8" /> + </text> + </element> + + + <view name="Lamps"> + <screen index="0"> + <bounds left="0" top="0" right="4" bottom="3" /> + </screen> + <bezel name="pr8210_standby" element="standby"> + <bounds x="0" y="3.1" width="0.4" height="0.1" /> + </bezel> + <bezel name="pr8210_clv" element="clv"> + <bounds x="0.5" y="3.1" width="0.4" height="0.1" /> + </bezel> + <bezel name="pr8210_cav" element="cav"> + <bounds x="1.0" y="3.1" width="0.4" height="0.1" /> + </bezel> + <bezel name="pr8210_audio1" element="audio1"> + <bounds x="1.5" y="3.1" width="0.4" height="0.1" /> + </bezel> + <bezel name="pr8210_audio2" element="audio2"> + <bounds x="2.0" y="3.1" width="0.4" height="0.1" /> + </bezel> + <bezel name="pr8210_led1" element="led1"> + <bounds x="2.5" y="3.1" width="0.4" height="0.1" /> + </bezel> + <bezel name="pr8210_led2" element="led2"> + <bounds x="3.0" y="3.1" width="0.4" height="0.1" /> + </bezel> + <bezel name="pr8210_led3" element="led3"> + <bounds x="3.5" y="3.1" width="0.4" height="0.1" /> + </bezel> + </view> +</mamelayout> 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 ) diff --git a/src/ldplayer/ldplayer.mak b/src/ldplayer/ldplayer.mak index b388a60e978..c3344034e26 100644 --- a/src/ldplayer/ldplayer.mak +++ b/src/ldplayer/ldplayer.mak @@ -13,8 +13,11 @@ LDPSRC = $(SRC)/ldplayer LDPOBJ = $(OBJ)/ldplayer +LAYOUT = $(LDPOBJ)/layout + OBJDIRS += \ $(LDPOBJ) \ + $(LAYOUT) \ @@ -42,3 +45,10 @@ SOUNDS += CUSTOM DRVLIBS = \ $(LDPOBJ)/ldpdriv.o \ $(LDPOBJ)/ldplayer.o \ + + +#------------------------------------------------- +# layout dependencies +#------------------------------------------------- + +$(LDPOBJ)/ldplayer.o: $(LAYOUT)/pr8210.lh \ |