Beispiel #1
0
static WRITE16_HANDLER( eeprom_control_w )
{
    /* toggles bit $0100 very frequently while waiting for things */
    /* bits $0080-$0010 are probably lamps */
    if (ACCESSING_BITS_0_7)
    {
        input_port_write(space->machine(), "EEPROMOUT", data, 0xff);
        ticket_dispenser_w(space->machine().device("ticket"), 0, (data & 1) << 7);
    }
}
Beispiel #2
0
	AM_RANGE(0xf800, 0xf800) AM_WRITENOP
ADDRESS_MAP_END



static WRITE8_HANDLER( doraemon_outputs_w )
{
	coin_counter_w(space->machine(), 0, data & 1);	// coin in counter
	coin_counter_w(space->machine(), 1, data & 2);	// gift out counter

	coin_lockout_w(space->machine(), 0, ~data & 8);	// coin lockout
	ticket_dispenser_w(space->machine().device("hopper"), 0, (data & 0x04) ? 0x00 : 0x80);	// gift out motor

	memory_set_bank(space->machine(), "bank1", (data & 0x30) >> 4);

//  popmessage("%02x", data);
}
Beispiel #3
0
static WRITE8_DEVICE_HANDLER( sound_w )
{
	const address_space *space = cputag_get_address_space(device->machine, "cpu", ADDRESS_SPACE_PROGRAM);

	/* bit 3 - coin lockout, lamp10 in poker / lamp6 in trivia test modes */
	coin_lockout_global_w(~data & 0x08);
	set_led_status(9,data & 0x08);

	/* bit 5 - ticket out in trivia games */
	ticket_dispenser_w(space, 0, (data & 0x20)<< 2);

	/* bit 6 enables NMI */
	interrupt_enable_w(space, 0, data & 0x40);

	/* bit 7 goes directly to the sound amplifier */
	dac_data_w(devtag_get_device(device->machine, "dac"), ((data & 0x80) >> 7) * 255);
}