コード例 #1
0
ファイル: bigevglf.c プロジェクト: LibXenonProject/mame-lx
/* Sub CPU */

static ADDRESS_MAP_START( sub_map, AS_PROGRAM, 8 )
	AM_RANGE(0x0000, 0x3fff) AM_ROM
	AM_RANGE(0x4000, 0x47ff) AM_RAM
	AM_RANGE(0x8000, 0x83ff) AM_RAM AM_SHARE("share1") /* shared with main CPU */
ADDRESS_MAP_END


static READ8_HANDLER( sub_cpu_mcu_coin_port_r )
{
	bigevglf_state *state = space->machine().driver_data<bigevglf_state>();
	/*
            bit 0 and bit 1 = coin inputs
            bit 3 and bit 4 = MCU status
            bit 5           = must toggle, vblank ?

    */
	state->m_mcu_coin_bit5 ^= 0x20;
	return bigevglf_mcu_status_r(space, 0) | (input_port_read(space->machine(), "PORT04") & 3) | state->m_mcu_coin_bit5;	/* bit 0 and bit 1 - coin inputs */
}
コード例 #2
0
ファイル: bigevglf.c プロジェクト: RobinDX/xmame
ADDRESS_MAP_END



static READ8_HANDLER( sub_cpu_mcu_coin_port_r )
{
    static int bit5=0;
    /*
            bit 0 and bit 1 = coin inputs
            bit 3 and bit 4 = MCU status
            bit 5           = must toggle, vblank ?

    */
    bit5 ^= 0x20;
    return bigevglf_mcu_status_r(0) | (readinputport(1) & 3) | bit5; /* bit 0 and bit 1 - coin inputs */
}