示例#1
0
static WRITE8_DEVICE_HANDLER(ppi0_b_w)
{
	output_set_lamp_value(8, !BIT(data,7)); /* Stand Light */
	output_set_lamp_value(9, !BIT(data,6)); /* Cancel Light */

	coin_counter_w(device->machine, 0, BIT(data,1));
	coin_lockout_w(device->machine, 0, BIT(data,5));
	coin_lockout_w(device->machine, 1, BIT(data,4));
}
示例#2
0
文件: chexx.c 项目: JensGrabner/mame
ADDRESS_MAP_END

// Face-Off Memory Map

WRITE8_MEMBER(chexx_state::lamp_w)
{
    m_lamp = data;
    output_set_lamp_value(0, BIT(m_lamp,0));
    output_set_lamp_value(1, BIT(m_lamp,1));
}
示例#3
0
文件: sderby.c 项目: kkalmaz/psmame
static WRITE16_HANDLER( roulette_out_w )
{
/*
  -----------------------------------
  --- Croupier (Roulette) Outputs ---
  -----------------------------------

  0x708006 - 0x708007
  ===================

  0x0000 - Normal State (lamps off).
  0x0001 - Start lamp.
  0x0002 - Bet lamp.
  0x0008 - Unknown (always activated).


    - Lbits -
    7654 3210
    =========
    ---- ---x  Start lamp.
    ---- --x-  Bet lamp.
    ---- x---  Unknown (always activated).

*/
	output_set_lamp_value(1, (data & 1));			/* Lamp 1 - START */
	output_set_lamp_value(2, (data >> 1) & 1);		/* Lamp 2 - BET   */
}
示例#4
0
void device_output_interface::set_lamp_value(int value)
{
	if (m_output_name)
		output_set_value(m_output_name, value);
	else
		output_set_lamp_value(m_output_index, value);
}
示例#5
0
文件: kas89.c 项目: coinhelper/jsmess
void kas89_state::machine_start()
{
	m_maincpu = machine().device<cpu_device>("maincpu");
	m_audiocpu = machine().device<cpu_device>("audiocpu");

	output_set_lamp_value(37, 0);	/* turning off the operator led */
}
示例#6
0
static MACHINE_START( kas89 )
{
	kas89_state *state = machine.driver_data<kas89_state>();
	state->m_maincpu = machine.device("maincpu");
	state->m_audiocpu = machine.device("audiocpu");

	output_set_lamp_value(37, 0);	/* turning off the operator led */
}
示例#7
0
文件: snookr10.c 项目: kkalmaz/psmame
static WRITE8_HANDLER( output_port_1_w )
{
	snookr10_state *state = space->machine().driver_data<snookr10_state>();
/*
   ----------------------------
    PORT 0x5001 ;OUTPUT PORT B
   ----------------------------
    BIT 0 = Lamps matrix, state->m_bit4
    BIT 1 = Lamps matrix, state->m_bit5
    BIT 2 =
    BIT 3 =
    BIT 4 =
    BIT 5 =
    BIT 6 =
    BIT 7 =
   ----------------------------
*/
	state->m_outporth = data << 8;

	state->m_bit0 = (state->m_outportl >> 1) & 1;
	state->m_bit1 = (state->m_outportl >> 3) & 1;
	state->m_bit2 = (state->m_outportl >> 5) & 1;
	state->m_bit3 = (state->m_outportl >> 7) & 1;
	state->m_bit4 = data & 1;
	state->m_bit5 = (data >> 1) & 1;

	output_set_lamp_value(0, state->m_bit5);	/* Lamp 0 - START  */
	output_set_lamp_value(1, state->m_bit2);	/* Lamp 1 - CANCEL */
	output_set_lamp_value(2, state->m_bit0);	/* Lamp 2 - STOP1  */
	output_set_lamp_value(3, state->m_bit1);	/* Lamp 3 - STOP2  */
	output_set_lamp_value(4, state->m_bit0);	/* Lamp 4 - STOP3  */
	output_set_lamp_value(5, state->m_bit3);	/* Lamp 5 - STOP4  */
	output_set_lamp_value(6, state->m_bit4);	/* Lamp 6 - STOP5  */
}
示例#8
0
static WRITE8_HANDLER( output_port_0_w )
{
/*  ---------------
    Pull Tabs lamps
    ---------------

    0x00 - Default State.
    0x01 - Hold3.
    0x04 - Hold5.
    0x08 - Ante/Bet.

    - bits -
    7654 3210
    ---------
    .... ...x ---> Hold3.
    .... .x.. ---> Hold5.
    .... x... ---> Ante/Bet.

    Tab1 = Hold1
    Tab2 = Hold3
    Tab3 = Hold5


    ---------------
    Poker 4-1 lamps
    ---------------

    0x00 - Default State.
    0x01 - Hold3.
    0x02 - Hold4.
    0x04 - Hold5/DDown.
    0x08 - Ante/Bet.
    0x10 - Start.
    0x20 - Deal/Hit.
    0x40 - Stand/FreeBonusDraw.

    - bits -
    7654 3210
    ---------
    .... ...x --> Hold3.
    .... ..x. --> Hold4.
    .... .x.. --> Hold5/DDown.
    .... x... --> Ante/Bet.
    ...x .... --> Start.
    ..x. .... --> Deal/Hit.
    .x.. .... --> Stand/FreeBonusDraw.

*/
	output_set_lamp_value(0, (data) & 1);		/* hold3 lamp */
	output_set_lamp_value(1, (data >> 1) & 1);	/* hold4 lamp */
	output_set_lamp_value(2, (data >> 2) & 1);	/* hold5 lamp */
	output_set_lamp_value(3, (data >> 3) & 1);	/* ante/bet lamp */
	output_set_lamp_value(4, (data >> 4) & 1);	/* start lamp */
	output_set_lamp_value(5, (data >> 5) & 1);	/* deal/hit lamp */
	output_set_lamp_value(6, (data >> 6) & 1);	/* stand/fbdraw lamp */
}
示例#9
0
static WRITE8_DEVICE_HANDLER(ppi0_a_w)
{
	//popmessage("Lamps: %d %d %d %d %d %d %d", BIT(data,7), BIT(data,6), BIT(data,5), BIT(data,4), BIT(data,3), BIT(data,2), BIT(data,1) );
	output_set_lamp_value(0, !BIT(data,7));	/* Display Light 1 */
	output_set_lamp_value(1, !BIT(data,6)); /* Display Light 2 */
	output_set_lamp_value(2, !BIT(data,5)); /* Display Light 3 */
	output_set_lamp_value(3, !BIT(data,4)); /* Display Light 4 */
	output_set_lamp_value(4, !BIT(data,3)); /* Display Light 5 */
	output_set_lamp_value(5, !BIT(data,2)); /* Bet Light */
	output_set_lamp_value(6, !BIT(data,1)); /* Deal Light */
	output_set_lamp_value(7, !BIT(data,0)); /* Draw Light */
}
示例#10
0
void cc40_state::update_lcd_indicator(UINT8 y, UINT8 x, int state)
{
	// reference _________________...
	// output#  |10  11     12     13     14      0      1      2      3   4
	// above    | <  SHIFT  CTL    FN     DEG    RAD    GRAD   I/O    UCL  >
	// ---- raw lcd screen here ----
	// under    |    ERROR   v      v      v      v      v      v    _LOW
	// output#  |    60     61     62     63     50     51     52     53
	output_set_lamp_value(y * 10 + x, state);
}
示例#11
0
文件: ti74.cpp 项目: ursine/mame
void ti74_state::update_lcd_indicator(UINT8 y, UINT8 x, int state)
{
	// TI-74 ref._________________...
	// output#  |10     11     12     13     14      2      3      4
	// above    | <    SHIFT   CTL    FN     I/O    UCL    _LOW    >
	// ---- raw lcd screen here ----
	// under    |      BASIC   CALC   DEG    RAD    GRAD   STAT
	// output#  |       63     64      1     62     53     54
	//
	// TI-95 ref._________________...
	// output#  |  40   43     41   44   42     12  11  10/13/14  0    1    2
	// above    | _LOW _ERROR  2nd  INV  ALPHA  LC  INS  DEGRAD  HEX  OCT  I/O
	// screen-  | _P{70} <{71}                                             RUN{3}
	//   area   .                                                          SYS{4}
	output_set_lamp_value(y * 10 + x, state);
}
示例#12
0
文件: sderby.c 项目: kkalmaz/psmame
static WRITE16_HANDLER( scmatto_out_w )
{
/*
  ----------------------------------------
  --- Scacco Matto / Space Win Outputs ---
  ----------------------------------------

  0x0000 - Normal State (lamps off).
  0x0001 - Hold 1 lamp.
  0x0002 - Hold 2 lamp.
  0x0004 - Hold 3 lamp.
  0x0008 - Hold 4 lamp.
  0x0010 - Hold 5 lamp.
  0x0020 - Start lamp.
  0x0040 - Bet lamp.
  0x1000 - Hopper out.
  0x2000 - Coin counter.


    - Lbits -
    7654 3210
    =========
    ---- ---x  Hold1 lamp.
    ---- --x-  Hold2 lamp.
    ---- -x--  Hold3 lamp.
    ---- x---  Hold4 lamp.
    ---x ----  Hold5 lamp.
    --x- ----  Start lamp.
    -x-- ----  Bet lamp.

    - Hbits -
    7654 3210
    =========
    ---x ----  Hopper out.
    --x- ----  Coin counter.

*/
	output_set_lamp_value(1, (data & 1));			/* Lamp 1 - HOLD 1 */
	output_set_lamp_value(2, (data >> 1) & 1);		/* Lamp 2 - HOLD 2 */
	output_set_lamp_value(3, (data >> 2) & 1);		/* Lamp 3 - HOLD 3 */
	output_set_lamp_value(4, (data >> 3) & 1);		/* Lamp 4 - HOLD 4 */
	output_set_lamp_value(5, (data >> 4) & 1);		/* Lamp 5 - HOLD 5 */
	output_set_lamp_value(6, (data >> 5) & 1);		/* Lamp 6 - START  */
	output_set_lamp_value(7, (data >> 6) & 1);		/* Lamp 7 - BET    */

	coin_counter_w(space->machine(), 0, data & 0x2000);
}
示例#13
0
/*
    --x- ---- ---- ---- Coin Counter
    ---- ---- -x-- ---- Prize
    ---- ---- --x- ---- Start
    ---- ---- ---x ---- Hold 5
    ---- ---- ---- x--- Hold 4
    ---- ---- ---- -x-- Hold 3
    ---- ---- ---- --x- Hold 2
    ---- ---- ---- ---x Hold 1
*/
static WRITE16_HANDLER( output_w )
{
	int i;

	for(i=0;i<3;i++)
		coin_counter_w(space->machine(), i, data & 0x2000);

	output_set_lamp_value(0, (data) & 1);		/* HOLD1 */
	output_set_lamp_value(1, (data >> 1) & 1);	/* HOLD2 */
	output_set_lamp_value(2, (data >> 2) & 1);	/* HOLD3 */
	output_set_lamp_value(3, (data >> 3) & 1);	/* HOLD4 */
	output_set_lamp_value(4, (data >> 4) & 1);	/* HOLD5 */
	output_set_lamp_value(5, (data >> 5) & 1);	/* START */
	output_set_lamp_value(6, (data >> 6) & 1);	/* PREMIO */

//  popmessage("%04x\n",data);
}
示例#14
0
static WRITE8_DEVICE_HANDLER( output_port_1_w )
{
/*  ----------------
    Lamps & Counters
    ----------------

    - bits -
    7654 3210
    ---------
    .... ...x --> Hold2 lamp.
    .... ..x. --> Hold1 lamp.
    .x.. .... --> Coin counter (inverted).
    x... .... --> Inverted pulse. Related to counters.

*/
	output_set_lamp_value(7, (data) & 1);		/* hold2 lamp */
	output_set_lamp_value(8, (data >> 1) & 1);	/* hold1 lamp */
}
示例#15
0
文件: sderby.c 项目: kkalmaz/psmame
static WRITE16_HANDLER( sderby_out_w )
{
/*
  ---------------------------
  --- Super Derby Outputs ---
  ---------------------------

  0x0000 - Normal State (lamps off).
  0x0001 - Start lamp.
  0x0002 - Bet lamp.

  0x0100 - Ticket dispenser out.
  0x0800 - Unknown (always activated).
  0x1000 - Hopper out.
  0x2000 - Coin counter.
  0x4000 - Unknown.
  0x8000 - End of Race lamp.


    - Lbits -
    7654 3210
    =========
    ---- ---x  Start lamp.
    ---- --x-  Bet lamp.

    - Hbits -
    7654 3210
    =========
    ---- ---x  Ticket dispenser out.
    ---- x---  unknown (always activated).
    ---x ----  Hopper out.
    --x- ----  Coin counter.
    -x-- ----  unknown.
    x--- ----  End of Race lamp.

*/
	output_set_lamp_value(1, (data & 1));			/* Lamp 1 - START */
	output_set_lamp_value(2, (data >> 1) & 1);		/* Lamp 2 - BET */
	output_set_lamp_value(3, (data >> 15) & 1);		/* Lamp 3 - END OF RACE */

	coin_counter_w(space->machine(), 0, data & 0x2000);
}
示例#16
0
static WRITE8_HANDLER( sound_comm_w )
{
/*  This port is used mainly for sound latch, but bit6 activates a
    sort of output port (maybe for a sign?)

    bit6 = 0 ; sound latch.
    bit6 = 1 ; outport data.

    Once the ball is landed, the outport writes the winner number
    14 times (as an intermitent way).

    When the attract starts, just before the game title appear, $3f
    is written to the outport... (maybe to clear the possible sign).

*/
	kas89_state *state = space->machine().driver_data<kas89_state>();

	if (data & 0x40)
	{
		state->m_outdata = (data ^ 0x40);	/* Pure data. Without the activator bit */

		if (state->m_outdata == 0x3f)
		{
			UINT8 i;
			for ( i = 0; i < 37; i++ )
			{
				output_set_lamp_value(i, 0);	/* All roulette LEDs OFF */
			}
		}

		logerror("Outdata: Write %02x\n", state->m_outdata);
	}

	else
	{
		soundlatch_w(space, 0, data);
		device_set_input_line(state->m_audiocpu, 0, ASSERT_LINE );
	}
}
示例#17
0
文件: snookr10.c 项目: kkalmaz/psmame
static WRITE8_HANDLER( output_port_0_w )
{
	snookr10_state *state = space->machine().driver_data<snookr10_state>();
/*
   ----------------------------
    PORT 0x5000 ;OUTPUT PORT A
   ----------------------------
    BIT 0 = Coin counter.
    BIT 1 = Lamps matrix, state->m_bit0.
    BIT 2 = Payout x10.
    BIT 3 = Lamps matrix, state->m_bit1.
    BIT 4 = Key in.
    BIT 5 = Lamps matrix, state->m_bit2.
    BIT 6 =
    BIT 7 = Lamps matrix, state->m_bit3.
   ----------------------------
*/
	state->m_outportl = data;

	state->m_bit0 = (data >> 1) & 1;
	state->m_bit1 = (data >> 3) & 1;
	state->m_bit2 = (data >> 5) & 1;
	state->m_bit3 = (data >> 7) & 1;
	state->m_bit4 = state->m_outporth & 1;
	state->m_bit5 = (state->m_outporth >> 1) & 1;

	output_set_lamp_value(0, state->m_bit5);	/* Lamp 0 - START  */
	output_set_lamp_value(1, state->m_bit2);	/* Lamp 1 - CANCEL */
	output_set_lamp_value(2, state->m_bit0);	/* Lamp 2 - STOP1  */
	output_set_lamp_value(3, state->m_bit1);	/* Lamp 3 - STOP2  */
	output_set_lamp_value(4, state->m_bit0);	/* Lamp 4 - STOP3  */
	output_set_lamp_value(5, state->m_bit3);	/* Lamp 5 - STOP4  */
	output_set_lamp_value(6, state->m_bit4);	/* Lamp 6 - STOP5  */

	coin_counter_w(space->machine(), 0, data & 0x01);	/* Coin in */
	coin_counter_w(space->machine(), 1, data & 0x10);	/* Key in */
	coin_counter_w(space->machine(), 2, data & 0x04);	/* Payout x10 */

//  logerror("high: %04x - low: %X \n", state->m_outporth, state->m_outportl);
//  popmessage("written : %02X", data);
}
示例#18
0
static WRITE16_HANDLER( galaxi_500004_w )
{
	galaxi_state *state = space->machine().driver_data<galaxi_state>();

	if (ACCESSING_BITS_0_7)
	{
	/*
        - Lbits -
        7654 3210
        =========
        ---- ---x  Hold1 lamp.
        ---- --x-  Hold2 lamp.
        ---- -x--  Hold3 lamp.
        ---- x---  Hold4 lamp.
        ---x ----  Hold5 lamp.
        --x- ----  Start lamp.
        -x-- ----  Payout.

    */
		output_set_lamp_value(1, (data & 1));			/* Lamp 1 - HOLD 1 */
		output_set_lamp_value(2, (data >> 1) & 1);		/* Lamp 2 - HOLD 2 */
		output_set_lamp_value(3, (data >> 2) & 1);		/* Lamp 3 - HOLD 3 */
		output_set_lamp_value(4, (data >> 3) & 1);		/* Lamp 4 - HOLD 4 */
		output_set_lamp_value(5, (data >> 4) & 1);		/* Lamp 5 - HOLD 5 */
		output_set_lamp_value(6, (data >> 5) & 1);		/* Lamp 6 - START  */
	}
	if (ACCESSING_BITS_8_15)
	{
		state->m_ticket = data & 0x0100;
		state->m_hopper = data & 0x1000;
		coin_counter_w(space->machine(), 0, data & 0x2000);	// coins
	}

	COMBINE_DATA(&state->m_out[2]);
	show_out(space->machine());
}
示例#19
0
/*  CRTC address: $3E01; register: $3E03
    CRTC registers: 2f 20 25 64 26 00 20 23 00 07 00 00 00
    screen total: (0x2f+1)*8 (0x26+1)*(0x07+1) ---> 384 x 312
    visible area: 0x20 0x20  ---------------------> 256 x 256
*/
ADDRESS_MAP_END


WRITE8_MEMBER(jubilee_state::unk_w)
{
/*  In particular, the interrupt from above must be cleared. We assume that
    this is done by one of the output lines, and from the 32 lines that are
    set right after an interrupt is serviced, all are set to 0, and only one
    is set to one. Maybe this one clears the interrupt.
    TODO: Check the schematics.
*/
	if (((offset<<1)==0x0ce2)&&(data==1))
	{
		m_maincpu->set_input_line(INT_9980A_LEVEL1, CLEAR_LINE);
	}

/*  Inputs Multiplexion...

    Should be 0CC0 added as selector?
    Was tested and didn't see any input driven by its state.
    This doesn't mean that couln't be possible.
*/

	if (((offset<<1)==0x0cc2)&&(data==1))
	{
		mux_sel = 1;
	}

	if (((offset<<1)==0x0cc4)&&(data==1))
	{
		mux_sel = 2;
	}

	if (((offset<<1)==0x0cc6)&&(data==1))
	{
		mux_sel = 3;
	}


/*  Lamps, sounds and other writes:

    0CD0 = HOLD3 lamp.
    0CD2 = HOLD2 lamp.
    0CD4 = HOLD1 lamp.

    Can't find more. Could be a kind of multiplexion.
    The input selectors don't seems to be completely involved,
    but 0CC6 is set to 1 when hold 1-2-3 turn on, thing that
    could be normal due to the end value for the state routine.

    Writes to analize:
    0CC0 (write too often... maybe input selector)
    0CCC (write a bit less often...)

    0CE6 = could be either a 'Insert Coin' lamp,
    or coin lockout (inverted), since is active
    low during the game. when the game is over,
    is set to 1.

    Also...

    Pressing cancel ---> writes 1 to 0CE8
    Pressing bet ------> writes 1 to 0CEA
    Pressing hold4 ----> writes 1 to 0CEC
    Pressing hold5 ----> writes 1 to 0CEE
    Pressing hand pay -> writes 1 to 0CF0
    Pressing hold1 ----> writes 1 to 0CF2
    Pressing hold2 ----> writes 1 to 0CF4
    Pressing hold3 ----> writes 1 to 0CF6
    Pressing reset ----> writes 1 to 0CF8
    Pressing deal -----> writes 1 to 0D00

    (See below, in sound writes...)
*/

	if (((offset<<1)==0x0ccc)&&(data==1))
	{
		muxlamps = 1;
	}
	if (((offset<<1)==0x0ccc)&&(data==0))
	{
		muxlamps = 2;
	}

/*  the following structure has 3 states, because I tested the inputs
    selectors 0CC2-0CC4-0CC6 as lamps multiplexers unsuccessfuly.
*/
	if (((offset<<1)==0x0cd0)&&(data==1))
	{
		if (muxlamps == 1)
			{
				output_set_lamp_value(0, (data & 1));  /* lamp */
				logerror("CRU: LAAAAAAMP 0 write to address %04x: %d\n", offset<<1, data & 1);
//              popmessage("LAMP 0");
			}
		if (muxlamps == 2)
			{
				output_set_lamp_value(3, (data & 1));  /* lamp */
				logerror("CRU: LAAAAAAMP 3 write to address %04x: %d\n", offset<<1, data & 1);
//              popmessage("LAMP 3");
			}
		if (muxlamps == 3)
			{
				output_set_lamp_value(6, (data & 1));  /* lamp */
				logerror("CRU: LAAAAAAMP 6 write to address %04x: %d\n", offset<<1, data & 1);
//              popmessage("LAMP 6");
			}
	}

	if (((offset<<1)==0x0cd2)&&(data==1))
	{
		if (muxlamps == 1)
			{
				output_set_lamp_value(1, (data & 1));  /* lamp */
				logerror("CRU: LAAAAAAMP 1 write to address %04x: %d\n", offset<<1, data & 1);
//              popmessage("LAMP 1");
			}
		if (muxlamps == 2)
			{
				output_set_lamp_value(4, (data & 1));  /* lamp */
				logerror("CRU: LAAAAAAMP 4 write to address %04x: %d\n", offset<<1, data & 1);
//              popmessage("LAMP 4");
			}
		if (muxlamps == 3)
			{
				output_set_lamp_value(7, (data & 1));  /* lamp */
				logerror("CRU: LAAAAAAMP 7 write to address %04x: %d\n", offset<<1, data & 1);
//              popmessage("LAMP 7");
			}
	}

	if (((offset<<1)==0x0cd4)&&(data==1))
	{
		if (muxlamps == 1)
			{
				output_set_lamp_value(2, (data & 1));  /* lamp */
				logerror("CRU: LAAAAAAMP 2 write to address %04x: %d\n", offset<<1, data & 1);
//              popmessage("LAMP 2");
			}
		if (muxlamps == 2)
			{
				output_set_lamp_value(5, (data & 1));  /* lamp */
				logerror("CRU: LAAAAAAMP 5 write to address %04x: %d\n", offset<<1, data & 1);
//              popmessage("LAMP 5");
			}
		if (muxlamps == 3)
			{
				output_set_lamp_value(8, (data & 1));  /* lamp */
				logerror("CRU: LAAAAAAMP 8 write to address %04x: %d\n", offset<<1, data & 1);
//              popmessage("LAMP 8");
			}
	}

/*  Sound writes?...

    In case of discrete circuitry, the following writes
    could be the trigger for each sound.

    Pressing cancel ---> writes 1 to 0CE8
    Pressing bet ------> writes 1 to 0CEA
    Pressing hold4 ----> writes 1 to 0CEC
    Pressing hold5 ----> writes 1 to 0CEE
    Pressing hand pay -> writes 1 to 0CF0
    Pressing hold1 ----> writes 1 to 0CF2
    Pressing hold2 ----> writes 1 to 0CF4
    Pressing hold3 ----> writes 1 to 0CF6
    Pressing reset ----> writes 1 to 0CF8
    Pressing deal -----> writes 1 to 0D00
*/

	if (((offset<<1)==0x0ce8)&&(data==1))
	{
		logerror("CRU: SOUND 'CANCEL' write to address %04x: %d\n", offset<<1, data & 1);
//      popmessage("SOUND 'CANCEL': %04x", offset<<1);
	}

	if (((offset<<1)==0x0cea)&&(data==1))
	{
		logerror("CRU: SOUND 'BET' write to address %04x: %d\n", offset<<1, data & 1);
//      popmessage("SOUND 'BET': %04x", offset<<1);
	}

	if (((offset<<1)==0x0cec)&&(data==1))
	{
		logerror("CRU: SOUND 'HOLD4' write to address %04x: %d\n", offset<<1, data & 1);
//      popmessage("SOUND 'HOLD 4': %04x", offset<<1);
	}

	if (((offset<<1)==0x0cee)&&(data==1))
	{
		logerror("CRU: SOUND 'HOLD5' write to address %04x: %d\n", offset<<1, data & 1);
//      popmessage("SOUND 'HOLD 5': %04x", offset<<1);
	}

	if (((offset<<1)==0x0cf0)&&(data==1))
	{
		logerror("CRU: SOUND 'HAND PAY' write to address %04x: %d\n", offset<<1, data & 1);
//      popmessage("SOUND 'HAND PAY': %04x", offset<<1);
	}

	if (((offset<<1)==0x0cf2)&&(data==1))
	{
		logerror("CRU: SOUND 'HOLD1' write to address %04x: %d\n", offset<<1, data & 1);
//      popmessage("SOUND 'HOLD 1': %04x", offset<<1);
	}

	if (((offset<<1)==0x0cf4)&&(data==1))
	{
		logerror("CRU: SOUND 'HOLD2' write to address %04x: %d\n", offset<<1, data & 1);
//      popmessage("SOUND 'HOLD 2': %04x", offset<<1);
	}

	if (((offset<<1)==0x0cf6)&&(data==1))
	{
		logerror("CRU: SOUND 'HOLD3' write to address %04x: %d\n", offset<<1, data & 1);
//      popmessage("SOUND 'HOLD 3': %04x", offset<<1);
	}

	if (((offset<<1)==0x0cf8)&&(data==1))
	{
		logerror("CRU: SOUND 'RESET' write to address %04x: %d\n", offset<<1, data & 1);
//      popmessage("SOUND 'RESET': %04x", offset<<1);
	}

	if (((offset<<1)==0x0d00)&&(data==1))
	{
		logerror("CRU: SOUND 'DEAL' write to address %04x: %d\n", offset<<1, data & 1);
//      popmessage("SOUND 'DEAL': %04x", offset<<1);
	}


	/* for debug purposes */

	logerror("CRU write to address %04x: %d\n", offset<<1, data & 1);
}
示例#20
0
void kas89_state::machine_start()
{
	output_set_lamp_value(37, 0);   /* turning off the operator led */
}
示例#21
0
static WRITE8_HANDLER( led_mux_select_w )
{
/*  - bits -
    7654 3210
    ---x xxxx   LEDs Set selector.
*/
	kas89_state *state = space->machine().driver_data<kas89_state>();
	state->m_leds_mux_selector = data;

	UINT8 i;
	for ( i = 0; i < 37; i++ )
	{
		output_set_lamp_value(i, 0);	/* All LEDs OFF */
	}

	switch(data)
	{
		case 0x00:
		{
			for ( i = 0; i < 37; i++ )
			{
				output_set_lamp_value(i, 0);	/* All LEDs OFF */
			}
		}

		case 0x01:
		{
			output_set_lamp_value(11, (state->m_leds_mux_data >> 0) & 1);	/* Number 11 LED */
			output_set_lamp_value(36, (state->m_leds_mux_data >> 1) & 1);	/* Number 36 LED */
			output_set_lamp_value(13, (state->m_leds_mux_data >> 2) & 1);	/* Number 13 LED */
			output_set_lamp_value(27, (state->m_leds_mux_data >> 3) & 1);	/* Number 27 LED */
			output_set_lamp_value(06, (state->m_leds_mux_data >> 4) & 1);	/* Number  6 LED */
			output_set_lamp_value(34, (state->m_leds_mux_data >> 5) & 1);	/* Number 34 LED */
			output_set_lamp_value(17, (state->m_leds_mux_data >> 6) & 1);	/* Number 17 LED */
			output_set_lamp_value(25, (state->m_leds_mux_data >> 7) & 1);	/* Number 25 LED */
			break;
		}

		case 0x02:
		{
			output_set_lamp_value( 2, (state->m_leds_mux_data >> 0) & 1);	/* Number  2 LED */
			output_set_lamp_value(21, (state->m_leds_mux_data >> 1) & 1);	/* Number 21 LED */
			output_set_lamp_value( 4, (state->m_leds_mux_data >> 2) & 1);	/* Number  4 LED */
			output_set_lamp_value(19, (state->m_leds_mux_data >> 3) & 1);	/* Number 19 LED */
			output_set_lamp_value(15, (state->m_leds_mux_data >> 4) & 1);	/* Number 15 LED */
			output_set_lamp_value(32, (state->m_leds_mux_data >> 5) & 1);	/* Number 32 LED */
			output_set_lamp_value( 0, (state->m_leds_mux_data >> 6) & 1);	/* Number  0 LED */
			output_set_lamp_value(26, (state->m_leds_mux_data >> 7) & 1);	/* Number 26 LED */
			break;
		}

		case 0x04:
		{
			output_set_lamp_value( 3, (state->m_leds_mux_data >> 0) & 1);	/* Number  3 LED */
			output_set_lamp_value(35, (state->m_leds_mux_data >> 1) & 1);	/* Number 35 LED */
			output_set_lamp_value(12, (state->m_leds_mux_data >> 2) & 1);	/* Number 12 LED */
			output_set_lamp_value(28, (state->m_leds_mux_data >> 3) & 1);	/* Number 28 LED */
			output_set_lamp_value( 7, (state->m_leds_mux_data >> 4) & 1);	/* Number  7 LED */
			output_set_lamp_value(29, (state->m_leds_mux_data >> 5) & 1);	/* Number 29 LED */
			output_set_lamp_value(18, (state->m_leds_mux_data >> 6) & 1);	/* Number 18 LED */
			break;
		}

		case 0x08:
		{
			output_set_lamp_value(22, (state->m_leds_mux_data >> 0) & 1);	/* Number 22 LED */
			output_set_lamp_value( 9, (state->m_leds_mux_data >> 1) & 1);	/* Number  9 LED */
			output_set_lamp_value(31, (state->m_leds_mux_data >> 2) & 1);	/* Number 31 LED */
			output_set_lamp_value(14, (state->m_leds_mux_data >> 3) & 1);	/* Number 14 LED */
			output_set_lamp_value(20, (state->m_leds_mux_data >> 4) & 1);	/* Number 20 LED */
			output_set_lamp_value( 1, (state->m_leds_mux_data >> 5) & 1);	/* Number  1 LED */
			output_set_lamp_value(33, (state->m_leds_mux_data >> 6) & 1);	/* Number 33 LED */
			break;
		}

		case 0x10:
		{
			output_set_lamp_value(16, (state->m_leds_mux_data >> 0) & 1);	/* Number 16 LED */
			output_set_lamp_value(24, (state->m_leds_mux_data >> 1) & 1);	/* Number 24 LED */
			output_set_lamp_value( 5, (state->m_leds_mux_data >> 2) & 1);	/* Number  5 LED */
			output_set_lamp_value(10, (state->m_leds_mux_data >> 3) & 1);	/* Number 10 LED */
			output_set_lamp_value(23, (state->m_leds_mux_data >> 4) & 1);	/* Number 23 LED */
			output_set_lamp_value( 8, (state->m_leds_mux_data >> 5) & 1);	/* Number  8 LED */
			output_set_lamp_value(30, (state->m_leds_mux_data >> 6) & 1);	/* Number 30 LED */
			break;
		}

		case 0xff:
		{
			for ( i = 0; i < 37; i++ )
			{
				output_set_lamp_value(i, 1);	/* All LEDs ON */
			}
		}
	}
}
示例#22
0
void kenseim_state::set_leds(UINT32 ledstates)
{
	for (int i=0; i<20; i++)
		output_set_lamp_value(i+1, ((ledstates & (1 << i)) != 0));
}