Esempio n. 1
0
void isa8_pc1640_iga_device::device_start()
{
	astring tempstring;

	set_isa_device();

	for (int i = 0; i < 64; i++ )
	{
		UINT8 r = ( ( i & 0x04 ) ? 0xAA : 0x00 ) + ( ( i & 0x20 ) ? 0x55 : 0x00 );
		UINT8 g = ( ( i & 0x02 ) ? 0xAA : 0x00 ) + ( ( i & 0x10 ) ? 0x55 : 0x00 );
		UINT8 b = ( ( i & 0x01 ) ? 0xAA : 0x00 ) + ( ( i & 0x08 ) ? 0x55 : 0x00 );

		palette_set_color_rgb( machine(), i, r, g, b );
	}

	/* Install 256KB Video ram on our EGA card */
	m_vram = machine().memory().region_alloc(subtag(tempstring,"vram"), 256*1024, 1, ENDIANNESS_LITTLE);

	m_videoram = m_vram->base();
	m_plane[0] = m_videoram + 0x00000;
	memset(m_plane[0], 0, sizeof(UINT8) * 0x10000);
	m_plane[1] = m_videoram + 0x10000;
	memset(m_plane[1], 0, sizeof(UINT8) * 0x10000);
	m_plane[2] = m_videoram + 0x20000;
	memset(m_plane[2], 0, sizeof(UINT8) * 0x10000);
	m_plane[3] = m_videoram + 0x30000;
	memset(m_plane[3], 0, sizeof(UINT8) * 0x10000);

	m_crtc_ega = subdevice<crtc_ega_device>(EGA_CRTC_NAME);

	m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "ega", "iga");
	m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_w), this));
	m_isa->install_device(0x3c0, 0x3cf, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_w), this));
	m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_w), this));
}
Esempio n. 2
0
void isa8_hercules_device::device_reset()
{
	isa8_mda_device::device_reset();
	m_configuration_switch = 0;

	m_chr_gen = memregion(subtag("gfx1").c_str())->base();
}
Esempio n. 3
0
void isa8_hercules_device::device_reset()
{
	isa8_mda_device::device_reset();
	m_configuration_switch = 0;

	astring tempstring;
	m_chr_gen = memregion(subtag(tempstring, "gfx1"))->base();
}
Esempio n. 4
0
void isa8_ega_device::device_start()
{
	if (m_palette != nullptr && !m_palette->started())
		throw device_missing_dependencies();

	set_isa_device();

	for (int i = 0; i < 64; i++ )
	{
		uint8_t r = ( ( i & 0x04 ) ? 0xAA : 0x00 ) + ( ( i & 0x20 ) ? 0x55 : 0x00 );
		uint8_t g = ( ( i & 0x02 ) ? 0xAA : 0x00 ) + ( ( i & 0x10 ) ? 0x55 : 0x00 );
		uint8_t b = ( ( i & 0x01 ) ? 0xAA : 0x00 ) + ( ( i & 0x08 ) ? 0x55 : 0x00 );

		m_palette->set_pen_color( i, r, g, b );
	}

	if(m_default_bios_tag != "iskr3104")
	{
		uint8_t   *dst = memregion(subtag("user2").c_str())->base() + 0x0000;
		uint8_t   *src = memregion(subtag("user1").c_str())->base() + 0x3fff;
		int     i;

		/* Perform the EGA bios address line swaps */
		for( i = 0; i < 0x4000; i++ )
		{
			*dst++ = *src--;
		}
	}
	else
		memcpy(memregion(subtag("user2").c_str())->base(), memregion(subtag("user1").c_str())->base(), 0x4000);

	/* Install 256KB Video ram on our EGA card */
	m_vram = make_unique_clear<uint8_t[]>(256 * 1024);

	m_videoram = m_vram.get();
	m_plane[0] = m_videoram + 0x00000;
	m_plane[1] = m_videoram + 0x10000;
	m_plane[2] = m_videoram + 0x20000;
	m_plane[3] = m_videoram + 0x30000;

	m_isa->install_rom(this, 0xc0000, 0xc3fff, "ega", "user2");
	m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_w), this));
	m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_w), this));
	m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_w), this));
}
Esempio n. 5
0
void isa8_mda_device::device_reset()
{
	m_framecnt = 0;
	m_mode_control = 0;
	m_vsync = 0;
	m_hsync = 0;
	m_pixel = 0;

	m_chr_gen = memregion(subtag("gfx1").c_str())->base();
}
Esempio n. 6
0
void isa8_mda_device::device_reset()
{
	m_framecnt = 0;
	m_mode_control = 0;
	m_vsync = 0;
	m_hsync = 0;
	m_pixel = 0;

	astring tempstring;
	m_chr_gen = memregion(subtag(tempstring, "gfx1"))->base();
}
Esempio n. 7
0
void x68k_scsiext_device::device_start()
{
	device_t* cpu = machine().device("maincpu");
	uint8_t* ROM;
	address_space& space = cpu->memory().space(AS_PROGRAM);
	m_slot = dynamic_cast<x68k_expansion_slot_device *>(owner());
	space.install_read_bank(0xea0020,0xea1fff,"scsi_ext");
	space.unmap_write(0xea0020,0xea1fff);
	ROM = machine().root_device().memregion(subtag("scsiexrom").c_str())->base();
	machine().root_device().membank("scsi_ext")->set_base(ROM);
	space.install_readwrite_handler(0xea0000,0xea001f,read8_delegate(FUNC(x68k_scsiext_device::register_r),this),write8_delegate(FUNC(x68k_scsiext_device::register_w),this),0x00ff00ff);
}
Esempio n. 8
0
void macpci_state::pippin(machine_config &config)
{
	/* basic machine hardware */
	PPC603(config, m_maincpu, 66000000);
	m_maincpu->set_addrmap(AS_PROGRAM, &macpci_state::pippin_mem);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
	screen.set_size(640, 480);
	screen.set_visarea(0, 640-1, 0, 480-1);
	screen.set_screen_update(FUNC(macpci_state::screen_update_pippin));
	screen.set_palette("palette");

	palette_device &palette(PALETTE(config, "palette", 2));
	palette.set_init("palette", FUNC(palette_device::palette_init_monochrome));

	/* sound hardware */
	SPEAKER(config, "lspeaker").front_left();
	SPEAKER(config, "rspeaker").front_right();

	cdda_device &cdda(CDDA(config, "cdda"));
	cdda.add_route(0, "lspeaker", 1.00);
	cdda.add_route(1, "rspeaker", 1.00);

	cdrom_image_device &cdrom(CDROM(config, "cdrom", 0));
	cdrom.set_interface("pippin_cdrom");
	SOFTWARE_LIST(config, "cd_list").set_type("pippin", SOFTWARE_LIST_ORIGINAL_SYSTEM);

	RAM(config, m_ram);
	m_ram->set_default_size("32M");

	VIA6522(config, m_via1, C7M/10);
	m_via1->readpa_handler().set(FUNC(macpci_state::mac_via_in_a));
	m_via1->readpb_handler().set(FUNC(macpci_state::mac_via_in_b));
	m_via1->writepa_handler().set(FUNC(macpci_state::mac_via_out_a));
	m_via1->writepb_handler().set(FUNC(macpci_state::mac_via_out_b));
	m_via1->cb2_handler().set(FUNC(macpci_state::mac_adb_via_out_cb2));
	m_via1->irq_handler().set(FUNC(macpci_state::mac_via_irq));

	//scc8530_t &scc(SCC8530(config, "scc", C7M));
	//scc.intrq_callback().set(FUNC(macpci_state::set_scc_interrupt));
	CUDA(config, m_cuda, 0);
	m_cuda->set_type(CUDA_341S0060);
	m_cuda->reset_callback().set(FUNC(macpci_state::cuda_reset_w));
	m_cuda->linechange_callback().set(FUNC(macpci_state::cuda_adb_linechange_w));
	m_cuda->via_clock_callback().set(m_via1, FUNC(via6522_device::write_cb1));
	m_cuda->via_data_callback().set(m_via1, FUNC(via6522_device::write_cb2));
	config.m_perfect_cpu_quantum = subtag("maincpu");
}
Esempio n. 9
0
void ata_flash_pccard_device::device_start()
{
	UINT32 metalength;
	memset(m_cis, 0xff, 512);

	astring drive_tag;
	subtag(drive_tag, "drive_0");

	m_chd_file = get_disk_handle(machine(), drive_tag);
	if(m_chd_file != NULL)
	{
		m_chd_file->read_metadata(PCMCIA_CIS_METADATA_TAG, 0, m_cis, 512, metalength);
	}
}
Esempio n. 10
0
void xain_state::xsleena(machine_config &config)
{
	// basic machine hardware
	MC6809E(config, m_maincpu, CPU_CLOCK); // 68B09E
	m_maincpu->set_addrmap(AS_PROGRAM, &xain_state::main_map);

	TIMER(config, "scantimer").configure_scanline(FUNC(xain_state::scanline), "screen", 0, 1);

	MC6809E(config, m_subcpu, CPU_CLOCK); // 68B09E
	m_subcpu->set_addrmap(AS_PROGRAM, &xain_state::cpu_map_B);

	MC6809(config, m_audiocpu, PIXEL_CLOCK); // 68A09
	m_audiocpu->set_addrmap(AS_PROGRAM, &xain_state::sound_map);

	TAITO68705_MCU(config, m_mcu, MCU_CLOCK);

	config.m_perfect_cpu_quantum = subtag("maincpu");

	// video hardware
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_raw(PIXEL_CLOCK, 384, 0, 256, 272, 8, 248);   // based on ddragon driver
	m_screen->set_screen_update(FUNC(xain_state::screen_update));
	m_screen->set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_xain);
	PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 512);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();

	GENERIC_LATCH_8(config, m_soundlatch).data_pending_callback().set_inputline(m_audiocpu, M6809_IRQ_LINE);

	ym2203_device &ym1(YM2203(config, "ym1", MCU_CLOCK));
	ym1.irq_handler().set_inputline(m_audiocpu, M6809_FIRQ_LINE);
	ym1.add_route(0, "mono", 0.50);
	ym1.add_route(1, "mono", 0.50);
	ym1.add_route(2, "mono", 0.50);
	ym1.add_route(3, "mono", 0.40);

	ym2203_device &ym2(YM2203(config, "ym2", MCU_CLOCK));
	ym2.add_route(0, "mono", 0.50);
	ym2.add_route(1, "mono", 0.50);
	ym2.add_route(2, "mono", 0.50);
	ym2.add_route(3, "mono", 0.40);
}
Esempio n. 11
0
void kickgoal_state::kickgoal(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, XTAL(12'000'000));   /* 12 MHz */
	m_maincpu->set_addrmap(AS_PROGRAM, &kickgoal_state::program_map);
	m_maincpu->set_vblank_int("screen", FUNC(kickgoal_state::irq6_line_hold));

	PIC16C57(config, m_audiocpu, XTAL(12'000'000)/3);  /* 4MHz ? */
	m_audiocpu->write_a().set(FUNC(kickgoal_state::soundio_port_a_w));
	m_audiocpu->read_b().set(FUNC(kickgoal_state::soundio_port_b_r));
	m_audiocpu->write_b().set(FUNC(kickgoal_state::soundio_port_b_w));
	m_audiocpu->read_c().set(FUNC(kickgoal_state::soundio_port_c_r));
	m_audiocpu->write_c().set(FUNC(kickgoal_state::soundio_port_c_w));

	config.m_perfect_cpu_quantum = subtag("maincpu");

	EEPROM_93C46_16BIT(config, "eeprom").default_data(kickgoal_default_eeprom_type1, 128);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(60);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
	screen.set_size(64*8, 32*8);
	screen.set_visarea(9*8, 55*8-1, 2*8, 30*8-1);
	screen.set_screen_update(FUNC(kickgoal_state::screen_update));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_kickgoal);
	PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 1024);

	MCFG_VIDEO_START_OVERRIDE(kickgoal_state,kickgoal)

	/* sound hardware */
	SPEAKER(config, "mono").front_center();

	GENERIC_LATCH_8(config, "soundlatch");

	OKIM6295(config, m_oki, XTAL(12'000'000)/12, okim6295_device::PIN7_LOW);
	m_oki->set_addrmap(0, &kickgoal_state::oki_map);
	m_oki->add_route(ALL_OUTPUTS, "mono", 0.80);
}
Esempio n. 12
0
void ibm_vga_device::device_start()
{
	int buswidth;
	astring tempstring;
	address_space *spaceio = machine().firstcpu->memory().space(AS_IO);
	address_space *space = machine().firstcpu->memory().space(AS_PROGRAM);
	space->install_rom(0xc0000, 0xc5fff, machine().region(subtag(tempstring, "vga"))->base());
	buswidth = machine().firstcpu->memory().space_config(AS_PROGRAM)->m_databus_width;
	switch(buswidth)
	{
		case 8:
			spaceio->install_readwrite_handler(0x3b0, 0x3bf, read8_delegate(FUNC(ibm_vga_device::vga_port_03b0_r), this), write8_delegate(FUNC(ibm_vga_device::vga_port_03b0_w), this));
			spaceio->install_readwrite_handler(0x3c0, 0x3cf, read8_delegate(FUNC(ibm_vga_device::vga_port_03c0_r), this), write8_delegate(FUNC(ibm_vga_device::vga_port_03c0_w), this));
			spaceio->install_readwrite_handler(0x3d0, 0x3df, read8_delegate(FUNC(ibm_vga_device::vga_port_03d0_r), this), write8_delegate(FUNC(ibm_vga_device::vga_port_03d0_w), this));
			break;

		case 16:
			spaceio->install_readwrite_handler(0x3b0, 0x3bf, read8_delegate(FUNC(ibm_vga_device::vga_port_03b0_r), this), write8_delegate(FUNC(ibm_vga_device::vga_port_03b0_w), this), 0xffff);
			spaceio->install_readwrite_handler(0x3c0, 0x3cf, read8_delegate(FUNC(ibm_vga_device::vga_port_03c0_r), this), write8_delegate(FUNC(ibm_vga_device::vga_port_03c0_w), this), 0xffff);
			spaceio->install_readwrite_handler(0x3d0, 0x3df, read8_delegate(FUNC(ibm_vga_device::vga_port_03d0_r), this), write8_delegate(FUNC(ibm_vga_device::vga_port_03d0_w), this), 0xffff);
			break;

		case 32:
			break;

		case 64:
			break;

		default:
			fatalerror("VGA: Bus width %d not supported", buswidth);
			break;
	}
	m_videoram = auto_alloc_array(machine(), UINT8, 0x40000);
	space->install_readwrite_bank(0xa0000, 0xbffff, "vga_bank" );
	memory_set_bankptr(machine(),"vga_bank", m_videoram);
}
Esempio n. 13
0
		bit2 = BIT(color_prom[i], 7);
		int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		palette.set_pen_color(i, rgb_t(r, g, b));
	}
}

MACHINE_CONFIG_START(progolf_state::progolf)
	/* basic machine hardware */
	MCFG_DEVICE_ADD("maincpu", DECO_222, 3000000/2) /* guess, 3 Mhz makes the game to behave worse? */
	MCFG_DEVICE_PROGRAM_MAP(main_cpu)

	MCFG_DEVICE_ADD("audiocpu", M6502, 500000)
	MCFG_DEVICE_PROGRAM_MAP(sound_cpu)

	config.m_perfect_cpu_quantum = subtag("maincpu");

	generic_latch_8_device &soundlatch(GENERIC_LATCH_8(config, "soundlatch"));
	soundlatch.data_pending_callback().set_inputline(m_audiocpu, 0);
	soundlatch.set_separate_acknowledge(true);

	/* video hardware */
	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_REFRESH_RATE(57)
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(3072))
	MCFG_SCREEN_SIZE(256, 256)
	MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
	MCFG_SCREEN_UPDATE_DRIVER(progolf_state, screen_update)
	MCFG_SCREEN_PALETTE(m_palette)

	MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_progolf)