コード例 #1
0
ファイル: laser3k.cpp プロジェクト: SailorSat/cabmame
void laser3k_state::laser3k(machine_config &config)
{
	/* basic machine hardware */
	M6502(config, m_maincpu, 1021800);
	m_maincpu->set_addrmap(AS_PROGRAM, &laser3k_state::laser3k_map);

	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_refresh_hz(50);
	m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
	m_screen->set_size(300*2, 192);
	m_screen->set_visarea(0, (280*2)-1,0,192-1);
	m_screen->set_screen_update(FUNC(laser3k_state::screen_update));
	m_screen->set_palette("palette");

	PALETTE(config, "palette", FUNC(laser3k_state::laser3k_palette), ARRAY_LENGTH(laser3k_pens));

	/* memory banking */
	ADDRESS_MAP_BANK(config, "bank0").set_map(&laser3k_state::banks_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
	ADDRESS_MAP_BANK(config, "bank1").set_map(&laser3k_state::banks_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
	ADDRESS_MAP_BANK(config, "bank2").set_map(&laser3k_state::banks_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
	ADDRESS_MAP_BANK(config, "bank3").set_map(&laser3k_state::banks_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);

	RAM(config, "mainram").set_default_size("192K");

	/* the 8048 isn't dumped, so substitute modified real Apple II h/w */
	AY3600(config, m_ay3600, 0);
	m_ay3600->x0().set_ioport("X0");
	m_ay3600->x1().set_ioport("X1");
	m_ay3600->x2().set_ioport("X2");
	m_ay3600->x3().set_ioport("X3");
	m_ay3600->x4().set_ioport("X4");
	m_ay3600->x5().set_ioport("X5");
	m_ay3600->x6().set_ioport("X6");
	m_ay3600->x7().set_ioport("X7");
	m_ay3600->x8().set_ioport("X8");
	m_ay3600->shift().set(FUNC(laser3k_state::ay3600_shift_r));
	m_ay3600->control().set(FUNC(laser3k_state::ay3600_control_r));
	m_ay3600->data_ready().set(FUNC(laser3k_state::ay3600_data_ready_w));

	/* sound hardware */
	SPEAKER(config, "mono").front_center();
	SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
	SN76489(config, m_sn, 1020484).add_route(ALL_OUTPUTS, "mono", 0.50);
}