예제 #1
0
static void YM2151_IRQ(int irq)
{
	if (irq)
	{
		update_irq_lines(RST28_ASSERT);
	}
	else
	{
		update_irq_lines(RST28_CLEAR);
	}
}
예제 #2
0
static READ_HANDLER( z80_in_sh )
{
	unsigned char *ROM;
	int port = offset & 0xff;

	switch (port)
	{
		case 1:
		case 0x41:
			return YM2151ReadStatus(0);
			break;

		case 2:		// M72 cmd latch
		case 0x42:	// M97 cmd latch
		case 0x80:	// M84 cmd latch
			update_irq_lines(RST18_CLEAR);
			return cmd_latch&0xff;
			break;

		case 0x84:	// DAC memory read
			ROM = rom_getregion(RGN_SAMP1);
			if (!ROM) return 0;
			return ROM[sample_addr];
			break;
	}

//	printf("Unknown read from port %x (PC=%x)\n", port, _z80_get_reg(Z80_REG_PC));
	return 0;
}
예제 #3
0
파일: seibu.cpp 프로젝트: MASHinfo/mame
// used only by NMK16 bootlegs
void seibu_sound_device::main_mustb_w(offs_t, u16 data, u16 mem_mask)
{
	if (ACCESSING_BITS_0_7)
		m_main2sub[0] = data & 0xff;
	if (ACCESSING_BITS_8_15)
		m_main2sub[1] = data >> 8;

//  logerror("seibu_main_mustb_w: %x -> %x %x\n", data, main2sub[0], main2sub[1]);

	update_irq_lines(RST18_ASSERT);
}
예제 #4
0
void seibu_sound_device::device_reset()
{
	int romlength = machine().root_device().memregion("audiocpu")->bytes();
	UINT8 *rom = machine().root_device().memregion("audiocpu")->base();

	m_sound_cpu = machine().device("audiocpu");
	update_irq_lines(VECTOR_INIT);
	if (romlength > 0x10000)
	{
		machine().root_device().membank("bank1")->configure_entries(0, (romlength - 0x10000) / 0x8000, rom + 0x10000, 0x8000);

		/* Denjin Makai definitely needs this at start-up, it never writes to the bankswitch */
		machine().root_device().membank("bank1")->set_entry(0);
	}
}
예제 #5
0
파일: seibu.cpp 프로젝트: MASHinfo/mame
void seibu_sound_device::main_w(offs_t offset, u8 data)
{
	switch (offset)
	{
		case 0:
		case 1:
			m_main2sub[offset] = data;
			break;
		case 4:
			update_irq_lines(RST18_ASSERT);
			break;
		case 2: //Sengoku Mahjong writes here
		case 6:
			/* just a guess */
			m_sub2main_pending = 0;
			m_main2sub_pending = 1;
			break;
		default:
			//logerror("%s: seibu_main_w(%x,%02x)\n",machine().describe_context(),offset,data);
			break;
	}
}
예제 #6
0
파일: seibu.cpp 프로젝트: MASHinfo/mame
void seibu_sound_device::rst18_ack_w(u8)
{
	update_irq_lines(RST18_CLEAR);
}
예제 #7
0
파일: seibu.cpp 프로젝트: MASHinfo/mame
void seibu_sound_device::device_reset()
{
	update_irq_lines(VECTOR_INIT);
}
예제 #8
0
파일: seibu.c 프로젝트: Eduardop/mame
void seibu_sound_device::ym2203_irqhandler(int linestate)
{
	update_irq_lines(linestate ? RST10_ASSERT : RST10_CLEAR);
}
예제 #9
0
파일: seibu.cpp 프로젝트: ursine/mame
void seibu_sound_device::device_reset()
{
    m_sound_cpu = machine().device(":audiocpu");
    update_irq_lines(VECTOR_INIT);
}