vectrex: Pass the new value with the timer param, so it ends up in the y integrator. (#10074)

* Param now holds a value and a destination, so that we write the
value that existed at send time, rather than whatever's in PORTA
when receipt occurs.  Fixes 45° vectors in Thrust and Moon Lander (and presumably others).
This commit is contained in:
Andrew Green 2022-07-23 10:43:28 -05:00 committed by GitHub
parent c90a16481d
commit c2c4a2dd13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -49,7 +49,10 @@ static const double unknown_game_angles[3] = {0,0.16666666, 0.33333333};
TIMER_CALLBACK_MEMBER(vectrex_base_state::update_analog)
{
update_vector();
m_analog[param] = m_via_out[PORTA];
if (param & 0x100)
m_analog[param & 0xff] = param >> 9;
else
m_analog[param] = m_via_out[PORTA];
}
TIMER_CALLBACK_MEMBER(vectrex_base_state::update_blank)

View File

@ -275,7 +275,7 @@ void vectrex_state::video_start()
void vectrex_base_state::multiplexer(int mux)
{
machine().scheduler().timer_set(attotime::from_nsec(ANALOG_DELAY), timer_expired_delegate(FUNC(vectrex_base_state::update_analog), this), mux);
machine().scheduler().timer_set(attotime::from_nsec(ANALOG_DELAY), timer_expired_delegate(FUNC(vectrex_base_state::update_analog), this), m_via_out[PORTA] << 9 | 0x100 | mux);
if (mux == A_AUDIO)
m_dac->write(m_via_out[PORTA] ^ 0x80); // not gate shown on schematic