Skip to content

Commit 65d890a

Browse files
committed
rfslotsmcs48.cpp driver: Fix conditional requesting ay8910 data.
1 parent 1e7e1c3 commit 65d890a

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

src/mame/misc/rfslotsmcs48.cpp

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -369,29 +369,28 @@ void rfslotsmcs48_state::main_p2_w(u8 data)
369369
u8 rfslotsmcs48_state::sound_io_r(offs_t offset)
370370
{
371371
logerror("%s: Audio I/O Read Offs:%02X\n", machine().describe_context(), offset);
372-
m_aysnd1->address_w(offset);
373-
if(!BIT(m_sndbfcpu->p1_r(),0))
372+
if(!BIT(m_sndbfcpu->p1_r(), 0))
374373
{
375374
m_aysnd1->address_w(offset);
376375
return m_aysnd1->data_r();
377376
}
378-
if(!BIT(m_sndbfcpu->p1_r(),1))
377+
if(!BIT(m_sndbfcpu->p1_r(), 1))
379378
{
380379
m_aysnd2->address_w(offset);
381-
return m_aysnd1->data_r();
380+
return m_aysnd2->data_r();
382381
}
383382
return 0xff;
384383
}
385384

386385
void rfslotsmcs48_state::sound_io_w(offs_t offset, u8 data)
387386
{
388-
if(!BIT(m_sndbfcpu->p1_r(),0))
387+
if(!BIT(m_sndbfcpu->p1_r(), 0))
389388
{
390389
m_aysnd1->address_w(offset);
391390
m_aysnd1->data_w(data);
392391
// logerror("%s:m_aysnd1: read:%02X\n", machine().describe_context(), m_aysnd1->data_r());
393392
}
394-
if(!BIT(m_sndbfcpu->p1_r(),1))
393+
if(!BIT(m_sndbfcpu->p1_r(), 1))
395394
{
396395
m_aysnd2->address_w(offset);
397396
m_aysnd2->data_w(data);
@@ -403,7 +402,7 @@ void rfslotsmcs48_state::sound_io_w(offs_t offset, u8 data)
403402

404403
void rfslotsmcs48_state::sound_p1_w(u8 data)
405404
{
406-
if(!BIT(data,2))
405+
if(!BIT(data, 2))
407406
{
408407
m_aysnd1->reset_w();
409408
m_aysnd2->reset_w();
@@ -470,10 +469,10 @@ void rfslotsmcs48_state::aj_exp5_p6_w(u8 data) // sound reset + int
470469

471470
void rfslotsmcs48_state::exp2_p4_w(u8 data) // coils and emcounters
472471
{
473-
m_outbit[3] = !BIT(data,0); // coin lock
474-
m_outbit[4] = BIT(data,1); // unused
475-
m_outbit[5] = BIT(data,2); // coin-in counter
476-
m_outbit[6] = BIT(data,3); // coin-out counter
472+
m_outbit[3] = !BIT(data, 0); // coin lock
473+
m_outbit[4] = BIT(data, 1); // unused
474+
m_outbit[5] = BIT(data, 2); // coin-in counter
475+
m_outbit[6] = BIT(data, 3); // coin-out counter
477476

478477
machine().bookkeeping().coin_counter_w(0, BIT(data, 2)); // EM counter: Coin In
479478
machine().bookkeeping().coin_counter_w(1, BIT(data, 3)); // EM counter: Coin Out
@@ -484,18 +483,18 @@ void rfslotsmcs48_state::exp2_p4_w(u8 data) // coils and emcounters
484483

485484
void rfslotsmcs48_state::exp2_p5_w(u8 data) // game lights
486485
{
487-
m_outbit[7] = BIT(data,0); // insert coin lamp
488-
m_outbit[8] = BIT(data,1); // fault lamp
489-
m_outbit[9] = BIT(data,2); // start lamp
490-
m_outbit[10] = BIT(data,3); // unused
486+
m_outbit[7] = BIT(data, 0); // insert coin lamp
487+
m_outbit[8] = BIT(data, 1); // fault lamp
488+
m_outbit[9] = BIT(data, 2); // start lamp
489+
m_outbit[10] = BIT(data, 3); // unused
491490
}
492491

493492
void rfslotsmcs48_state::exp2_p6_w(u8 data) // push buttons lights
494493
{
495-
m_outbit[11] = BIT(data,0); // stop left lamp
496-
m_outbit[12] = BIT(data,1); // stop center lamp
497-
m_outbit[13] = BIT(data,2); // stop right lamp
498-
m_outbit[14] = BIT(data,3); // unused
494+
m_outbit[11] = BIT(data, 0); // stop left lamp
495+
m_outbit[12] = BIT(data, 1); // stop center lamp
496+
m_outbit[13] = BIT(data, 2); // stop right lamp
497+
m_outbit[14] = BIT(data, 3); // unused
499498
}
500499

501500
void rfslotsmcs48_state::exp2_p7_w(u8 data) // sound codes

0 commit comments

Comments
 (0)