trunk/src/emu/sound/sp0256.c
| r21229 | r21230 | |
| 1275 | 1275 | { |
| 1276 | 1276 | sp0256_state *sp = get_safe_token(device); |
| 1277 | 1277 | |
| 1278 | // force stream update |
| 1279 | sp->stream->update(); |
| 1280 | |
| 1278 | 1281 | return sp->lrq == 0x8000; |
| 1279 | 1282 | } |
| 1280 | 1283 | |
| r21229 | r21230 | |
| 1282 | 1285 | { |
| 1283 | 1286 | sp0256_state *sp = get_safe_token(device); |
| 1284 | 1287 | |
| 1288 | // TODO: force stream update?? |
| 1289 | |
| 1285 | 1290 | return sp->sby_line; |
| 1286 | 1291 | } |
| 1287 | 1292 | |
| r21229 | r21230 | |
| 1390 | 1395 | void sp0256_device::device_start() |
| 1391 | 1396 | { |
| 1392 | 1397 | 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)); |
| 1393 | 1400 | } |
| 1394 | 1401 | |
| 1402 | TIMER_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 | |
| 1395 | 1410 | //------------------------------------------------- |
| 1396 | 1411 | // device_reset - device-specific reset |
| 1397 | 1412 | //------------------------------------------------- |
| r21229 | r21230 | |
| 1399 | 1414 | void sp0256_device::device_reset() |
| 1400 | 1415 | { |
| 1401 | 1416 | 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 ) ); |
| 1402 | 1421 | } |
| 1403 | 1422 | |
| 1404 | 1423 | //------------------------------------------------- |