Previous 199869 Revisions Next

r21230 Wednesday 20th February, 2013 at 20:06:48 UTC by Wilbert Pol
sp0256.c:  [Wilbert Pol]
- Added a little delay before settling LRQ when resetting the device. Fixes MT05103.
- When reading the LRQ signal, force an update of the stream. This fixes support for
 'The Voice' in 'Turtles' for the odyssey2.
[src/emu/sound]sp0256.c sp0256.h
[src/mess/drivers]odyssey2.c

trunk/src/emu/sound/sp0256.c
r21229r21230
12751275{
12761276   sp0256_state *sp = get_safe_token(device);
12771277
1278   // force stream update
1279   sp->stream->update();
1280
12781281   return sp->lrq == 0x8000;
12791282}
12801283
r21229r21230
12821285{
12831286   sp0256_state *sp = get_safe_token(device);
12841287
1288   // TODO: force stream update??
1289
12851290   return sp->sby_line;
12861291}
12871292
r21229r21230
13901395void sp0256_device::device_start()
13911396{
13921397   DEVICE_START_NAME( sp0256 )(this);
1398
1399   m_lrq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sp0256_device::set_lrq_timer_proc),this));
13931400}
13941401
1402TIMER_CALLBACK_MEMBER(sp0256_device::set_lrq_timer_proc)
1403{
1404   sp0256_state *sp = get_safe_token(this);
1405
1406   sp->lrq = 0x8000;
1407}
1408
1409
13951410//-------------------------------------------------
13961411//  device_reset - device-specific reset
13971412//-------------------------------------------------
r21229r21230
13991414void sp0256_device::device_reset()
14001415{
14011416   DEVICE_RESET_NAME( sp0256 )(this);
1417
1418   sp0256_state *sp = get_safe_token(this);
1419   sp->lrq = 0;
1420   m_lrq_timer->adjust( attotime::from_ticks( 50, m_clock ) );
14021421}
14031422
14041423//-------------------------------------------------
trunk/src/emu/sound/sp0256.h
r21229r21230
7979
8080   // access to legacy token
8181   void *token() const { assert(m_token != NULL); return m_token; }
82
83   TIMER_CALLBACK_MEMBER(set_lrq_timer_proc);
84
8285protected:
8386   // device-level overrides
8487   virtual void device_config_complete();
r21229r21230
9093private:
9194   // internal state
9295   void *m_token;
96   emu_timer *m_lrq_timer;
9397};
9498
9599extern const device_type SP0256;
trunk/src/mess/drivers/odyssey2.c
r21229r21230
333333
334334READ8_MEMBER(odyssey2_state::t0_read)
335335{
336   return sp0256_lrq_r( m_sp0256 ) ? 1 : 0;
336   return sp0256_lrq_r( m_sp0256 ) ? 0 : 1;
337337}
338338
339339
r21229r21230
438438         }
439439         else
440440         {
441            /* TODO: Reset sp0256 in this case */
442441            m_sp0256->reset();
443442         }
444443      }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team