This commit is contained in:
briantro 2016-10-06 18:17:25 -05:00
commit ad43319814
10 changed files with 83 additions and 39 deletions

View File

@ -41,9 +41,22 @@ WRITE_LINE_MEMBER(isa16_ide_device::ide_interrupt)
}
}
static MACHINE_CONFIG_FRAGMENT(cdrom_headphones)
MCFG_DEVICE_MODIFY("cdda")
MCFG_SOUND_ROUTE(0, "lheadphone", 1.0)
MCFG_SOUND_ROUTE(1, "rheadphone", 1.0)
MCFG_SPEAKER_STANDARD_STEREO("lheadphone", "rheadphone")
MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( ide )
MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(isa16_ide_device, ide_interrupt))
MCFG_DEVICE_MODIFY("ide:0")
MCFG_SLOT_OPTION_MACHINE_CONFIG("cdrom", cdrom_headphones)
MCFG_DEVICE_MODIFY("ide:1")
MCFG_SLOT_OPTION_MACHINE_CONFIG("cdrom", cdrom_headphones)
MACHINE_CONFIG_END
static INPUT_PORTS_START( ide )

View File

@ -329,7 +329,7 @@ READ8_MEMBER(southbridge_device::pc_dma_read_byte)
if(m_dma_channel == -1)
return 0xff;
UINT8 result;
offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) & 0xFF0000;
offs_t page_offset = ((offs_t) m_dma_offset[0][m_dma_channel]) << 16;
result = prog_space.read_byte(page_offset + offset);
return result;
@ -341,7 +341,7 @@ WRITE8_MEMBER(southbridge_device::pc_dma_write_byte)
address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
if(m_dma_channel == -1)
return;
offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) & 0xFF0000;
offs_t page_offset = ((offs_t) m_dma_offset[0][m_dma_channel]) << 16;
prog_space.write_byte(page_offset + offset, data);
}
@ -353,9 +353,9 @@ READ8_MEMBER(southbridge_device::pc_dma_read_word)
if(m_dma_channel == -1)
return 0xff;
UINT16 result;
offs_t page_offset = (((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16) & 0xFE0000;
offs_t page_offset = ((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16;
result = prog_space.read_word(page_offset + ( offset << 1 ) );
result = prog_space.read_word((page_offset & 0xfe0000) | (offset << 1));
m_dma_high_byte = result & 0xFF00;
return result & 0xFF;
@ -367,9 +367,9 @@ WRITE8_MEMBER(southbridge_device::pc_dma_write_word)
address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
if(m_dma_channel == -1)
return;
offs_t page_offset = (((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16) & 0xFE0000;
offs_t page_offset = ((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16;
prog_space.write_word(page_offset + ( offset << 1 ), m_dma_high_byte | data);
prog_space.write_word((page_offset & 0xfe0000) | (offset << 1), m_dma_high_byte | data);
}

View File

@ -362,7 +362,7 @@ READ8_MEMBER( cs4031_device::dma_read_word )
if (m_dma_channel == -1)
return 0xff;
UINT16 result = m_space->read_word(page_offset() + (offset << 1));
UINT16 result = m_space->read_word((page_offset() & 0xfe0000) | (offset << 1));
m_dma_high_byte = result >> 8;
return result;
@ -373,7 +373,7 @@ WRITE8_MEMBER( cs4031_device::dma_write_word )
if (m_dma_channel == -1)
return;
m_space->write_word(page_offset() + (offset << 1), (m_dma_high_byte << 8) | data);
m_space->write_word((page_offset() & 0xfe0000) | (offset << 1), (m_dma_high_byte << 8) | data);
}
WRITE_LINE_MEMBER( cs4031_device::dma2_dack0_w )

View File

@ -372,7 +372,7 @@ READ8_MEMBER( wd7600_device::dma_read_word )
if (m_dma_channel == -1)
return 0xff;
UINT16 result = m_space->read_word(page_offset() + (offset << 1));
UINT16 result = m_space->read_word((page_offset() & 0xfe0000) | (offset << 1));
m_dma_high_byte = result >> 8;
return result;
@ -383,7 +383,7 @@ WRITE8_MEMBER( wd7600_device::dma_write_word )
if (m_dma_channel == -1)
return;
m_space->write_word(page_offset() + (offset << 1), (m_dma_high_byte << 8) | data);
m_space->write_word((page_offset() & 0xfe0000) | (offset << 1), (m_dma_high_byte << 8) | data);
}
WRITE_LINE_MEMBER( wd7600_device::dma2_dack0_w )

View File

@ -148,6 +148,7 @@ int cdda_device::audio_paused()
int cdda_device::audio_ended()
{
m_stream->update();
return m_audio_ended_normally;
}

View File

@ -48,5 +48,6 @@ void filter_volume_device::sound_stream_update(sound_stream &stream, stream_samp
void filter_volume_device::flt_volume_set_volume(float volume)
{
m_stream->update();
m_gain = (int)(volume * 256);
}

View File

@ -363,7 +363,7 @@ READ16_MEMBER(cischeat_state::wildplt_xy_r)
return 0xffff;
}
// buttons & sensors are
// buttons & sensors are muxed. bit 0 routes to coin chute (single according to test mode)
READ16_MEMBER(cischeat_state::wildplt_mux_r)
{
UINT16 split_in = 0xffff;
@ -409,7 +409,7 @@ static ADDRESS_MAP_START( wildplt_map, AS_PROGRAM, 16, cischeat_state )
AM_RANGE(0x090000, 0x097fff) AM_RAM AM_SHARE("share2") // Sharedram with sub CPU#2
AM_RANGE(0x098000, 0x09ffff) AM_RAM AM_SHARE("share1") // Sharedram with sub CPU#1
/* Only writes to the first 0x40000 bytes affect the tilemaps: */
/* either these games support larger tilemaps or have more ram than needed */
AM_RANGE(0x0a0000, 0x0a7fff) AM_RAM_DEVWRITE("scroll0", megasys1_tilemap_device, write) AM_SHARE("scroll0") // Scroll ram 0

View File

@ -234,28 +234,56 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( mjsenpu )
PORT_START("MUX_8F") // in joystick mode?
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_START1 ) // or button1? seems to have multiple uses
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0x000000ff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("MUX_9E")
PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x0000003f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("MUX_9D")
PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x0000003f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("MUX_9B")
PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x0000003f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("MUX_97")
PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08)
PORT_BIT( 0x0000003f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00)
PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 ) // or maybe service?
@ -272,7 +300,8 @@ static INPUT_PORTS_START( mjsenpu )
PORT_DIPNAME( 0x00000020, 0x00000020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00000020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // not on the mahjong panel? used when in Joystick mode
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("DSW3", 0x08,EQUALS,0x00)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08)
PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
@ -337,7 +366,7 @@ static INPUT_PORTS_START( mjsenpu )
PORT_DIPNAME( 0x00000004, 0x00000004, "Symbol 3" )
PORT_DIPSETTING( 0x00000004, "0" )
PORT_DIPSETTING( 0x00000000, "1" )
PORT_DIPNAME( 0x00000008, 0x00000000, "Control Type" )
PORT_DIPNAME( 0x00000008, 0x00000008, "Control Type" )
PORT_DIPSETTING( 0x00000008, "Mahjong Panel" )
PORT_DIPSETTING( 0x00000000, "Joystick" )
PORT_DIPNAME( 0x00000010, 0x00000010, "Symbol 5" )

View File

@ -713,11 +713,11 @@ READ8_MEMBER(ngen_state::dma_read_word)
if(m_dma_channel == -1)
return 0xff;
offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0xFE0000;
offs_t page_offset = ((offs_t) m_dma_offset[m_dma_channel]) << 16;
result = prog_space.read_word(page_offset + (offset << 1));
result = prog_space.read_word((page_offset & 0xfe0000) | (offset << 1));
m_dma_high_byte = result & 0xFF00;
popmessage("DMA byte address %06x read %04x\n",page_offset+(offset<<1),result);
popmessage("DMA byte address %06x read %04x\n", (page_offset & 0xfe0000) | (offset << 1),result);
return result & 0xff;
}
@ -734,10 +734,10 @@ WRITE8_MEMBER(ngen_state::dma_write_word)
if(m_dma_channel == -1)
return;
offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0xFE0000;
offs_t page_offset = ((offs_t) m_dma_offset[m_dma_channel]) << 16;
prog_space.write_word(page_offset + (offset << 1), data);
popmessage("DMA byte address %06x write %04x\n",page_offset+(offset<<1), m_dma_high_byte | data);
prog_space.write_word((page_offset & 0xfe0000) | (offset << 1), data);
popmessage("DMA byte address %06x write %04x\n", (page_offset & 0xfe0000) | (offset << 1), m_dma_high_byte | data);
}

View File

@ -266,7 +266,7 @@ READ8_MEMBER(at_mb_device::dma_read_byte)
if(m_dma_channel == -1)
return 0xff;
UINT8 result;
offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) & 0xFF0000;
offs_t page_offset = ((offs_t) m_dma_offset[0][m_dma_channel]) << 16;
result = prog_space.read_byte(page_offset + offset);
return result;
@ -278,7 +278,7 @@ WRITE8_MEMBER(at_mb_device::dma_write_byte)
address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
if(m_dma_channel == -1)
return;
offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) & 0xFF0000;
offs_t page_offset = ((offs_t) m_dma_offset[0][m_dma_channel]) << 16;
prog_space.write_byte(page_offset + offset, data);
}
@ -290,9 +290,9 @@ READ8_MEMBER(at_mb_device::dma_read_word)
if(m_dma_channel == -1)
return 0xff;
UINT16 result;
offs_t page_offset = (((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16) & 0xFE0000;
offs_t page_offset = ((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16;
result = prog_space.read_word(page_offset + ( offset << 1 ) );
result = prog_space.read_word((page_offset & 0xfe0000) | (offset << 1));
m_dma_high_byte = result & 0xFF00;
return result & 0xFF;
@ -304,9 +304,9 @@ WRITE8_MEMBER(at_mb_device::dma_write_word)
address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
if(m_dma_channel == -1)
return;
offs_t page_offset = (((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16) & 0xFE0000;
offs_t page_offset = ((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16;
prog_space.write_word(page_offset + ( offset << 1 ), m_dma_high_byte | data);
prog_space.write_word((page_offset & 0xfe0000) | (offset << 1), m_dma_high_byte | data);
}
READ8_MEMBER( at_mb_device::dma8237_0_dack_r ) { return m_isabus->dack_r(0); }