Fixed bill validator hookup in Time Traveler (#9470)

* -timetrv: Replaced IPT_COIN2 with IPT_BILL1, as it is the bill-validator input. [Ryan Holtz]

* -laserdsc: Added savestate registration. [Ryan Holtz]

Co-authored-by: MooglyGuy <mog@home>
This commit is contained in:
MooglyGuy 2022-03-26 20:31:31 +01:00 committed by GitHub
parent 2a4e772943
commit dd62ad8808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 77 additions and 8 deletions

View File

@ -54,6 +54,9 @@ const uint32_t VIRTUAL_LEAD_OUT_TRACKS = LEAD_OUT_MIN_SIZE_IN_UM * 1000 / NOMINA
// CORE IMPLEMENTATION
//**************************************************************************
ALLOW_SAVE_TYPE(laserdisc_device::player_state);
ALLOW_SAVE_TYPE(laserdisc_device::slider_position);
//-------------------------------------------------
// laserdisc_device - constructor
//-------------------------------------------------
@ -228,6 +231,73 @@ void laserdisc_device::device_start()
"laserdisc",
configuration_manager::load_delegate(&laserdisc_device::config_load, this),
configuration_manager::save_delegate(&laserdisc_device::config_save, this));
// register state
save_item(NAME(m_player_state.m_state));
save_item(NAME(m_player_state.m_substate));
save_item(NAME(m_player_state.m_param));
save_item(NAME(m_player_state.m_endtime));
save_item(NAME(m_saved_state.m_state));
save_item(NAME(m_saved_state.m_substate));
save_item(NAME(m_saved_state.m_param));
save_item(NAME(m_saved_state.m_endtime));
save_item(NAME(m_overposx));
save_item(NAME(m_overposy));
save_item(NAME(m_overscalex));
save_item(NAME(m_overscaley));
save_item(NAME(m_orig_config.m_overposx));
save_item(NAME(m_orig_config.m_overposy));
save_item(NAME(m_orig_config.m_overscalex));
save_item(NAME(m_orig_config.m_overscaley));
save_item(NAME(m_overwidth));
save_item(NAME(m_overheight));
save_item(NAME(m_overclip.min_x));
save_item(NAME(m_overclip.max_x));
save_item(NAME(m_overclip.min_y));
save_item(NAME(m_overclip.max_y));
save_item(NAME(m_vbidata));
save_item(NAME(m_is_cav_disc));
save_item(NAME(m_width));
save_item(NAME(m_height));
save_item(NAME(m_fps_times_1million));
save_item(NAME(m_samplerate));
save_item(NAME(m_chdtracks));
save_item(NAME(m_audiosquelch));
save_item(NAME(m_videosquelch));
save_item(NAME(m_fieldnum));
save_item(NAME(m_curtrack));
save_item(NAME(m_maxtrack));
save_item(NAME(m_attospertrack));
save_item(NAME(m_sliderupdate));
save_item(STRUCT_MEMBER(m_frame, m_numfields));
save_item(STRUCT_MEMBER(m_frame, m_lastfield));
save_item(NAME(m_videoindex));
save_item(NAME(m_audiobuffer[0]));
save_item(NAME(m_audiobuffer[1]));
save_item(NAME(m_audiobufsize));
save_item(NAME(m_audiobufin));
save_item(NAME(m_audiobufout));
save_item(NAME(m_audiocursamples));
save_item(NAME(m_audiomaxsamples));
save_item(STRUCT_MEMBER(m_metadata, white));
save_item(STRUCT_MEMBER(m_metadata, line16));
save_item(STRUCT_MEMBER(m_metadata, line17));
save_item(STRUCT_MEMBER(m_metadata, line18));
save_item(STRUCT_MEMBER(m_metadata, line1718));
save_item(NAME(m_videoenable));
save_item(NAME(m_overenable));
save_item(NAME(m_overindex));
}

View File

@ -158,7 +158,7 @@ protected:
};
// common laserdisc states
enum player_state
enum player_state : uint32_t
{
LDSTATE_NONE, // unspecified state
LDSTATE_EJECTING, // in the process of ejecting
@ -190,7 +190,7 @@ protected:
};
// slider position
enum slider_position
enum slider_position : uint32_t
{
SLIDER_MINIMUM, // at the minimum value
SLIDER_VIRTUAL_LEADIN, // within the virtual lead-in area
@ -204,8 +204,8 @@ protected:
struct player_state_info
{
player_state m_state; // current state
int32_t m_substate; // internal sub-state; starts at 0 on any state change
int32_t m_param; // parameter for current state
int32_t m_substate; // internal sub-state; starts at 0 on any state change
int32_t m_param; // parameter for current state
attotime m_endtime; // minimum ending time for current state
};

View File

@ -10,7 +10,6 @@ LaserDisc and artwork hookup by Ryan Holtz
TODO:
- Unemulated Sony LDP-1450 player, and Pioneer LD-V4200 is HLE; needs a dump of the BIOSes and
proper hook-up.
- Unknown how the bill validator is hooked up.
==================================================================================================
@ -223,7 +222,7 @@ static INPUT_PORTS_START( timetrv )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BILL1 )
PORT_START("IN1")
PORT_BIT( 0x8f, IP_ACTIVE_LOW, IPT_UNUSED )
@ -354,5 +353,5 @@ ROM_END
GAMEL( 1991, timetrv, 0, timetrv, timetrv, timetrv_state, empty_init, ORIENTATION_FLIP_Y, "Virtual Image Productions (Sega license)", "Time Traveler (set 1)", MACHINE_IMPERFECT_SOUND, layout_timetrv )
GAMEL( 1991, timetrv2, timetrv, timetrv, timetrv, timetrv_state, empty_init, ORIENTATION_FLIP_Y, "Virtual Image Productions (Sega license)", "Time Traveler (set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND, layout_timetrv ) // Different frame indices; Europe?
GAMEL( 1991, timetrv, 0, timetrv, timetrv, timetrv_state, empty_init, ORIENTATION_FLIP_Y, "Virtual Image Productions (Sega license)", "Time Traveler (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND, layout_timetrv )
GAMEL( 1991, timetrv2, timetrv, timetrv, timetrv, timetrv_state, empty_init, ORIENTATION_FLIP_Y, "Virtual Image Productions (Sega license)", "Time Traveler (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND, layout_timetrv ) // Different frame indices; Europe?