Example #1
0
void by133_state::granny(machine_config &config)
{
	babypac(config);

	MC6809(config.replace(), m_videocpu, XTAL(8'000'000)); // MC68B09P (XTAL value hard to read)
	m_videocpu->set_addrmap(AS_PROGRAM, &by133_state::granny_map);

	TMS9928A(config, m_crtc2, XTAL(10'738'635)).set_screen("screen");
	m_crtc2->set_vram_size(0x4000);
	m_crtc2->int_callback().set_inputline(m_videocpu, M6809_IRQ_LINE);

	subdevice<screen_device>("screen")->set_screen_update(FUNC(by133_state::screen_update_granny));
}
Example #2
0
UINT32 zr107_state::screen_update_zr107(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	bitmap.fill(machine().pens[0], cliprect);

	m_k056832->tilemap_draw(screen, bitmap, cliprect, 1, 0, 0);
	K001005_draw(bitmap, cliprect);
	m_k056832->tilemap_draw(screen, bitmap, cliprect, 0, 0, 0);

	draw_7segment_led(bitmap, 3, 3, m_led_reg0);
	draw_7segment_led(bitmap, 9, 3, m_led_reg1);

	sharc_set_flag_input(machine().device("dsp"), 1, ASSERT_LINE);
	return 0;
}
Example #3
0
void pb1000_state::machine_start()
{
	std::string region_tag;
	m_rom_reg = memregion("rom");
	if (m_card1)
		m_card1_reg = memregion(region_tag.assign(m_card1->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
	if (m_card2)
		m_card2_reg = memregion(region_tag.assign(m_card2->tag()).append(GENERIC_ROM_REGION_TAG).c_str());

	membank("bank1")->set_base(m_rom_reg->base());

	m_kb_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pb1000_state::keyboard_timer),this));
	m_kb_timer->adjust(attotime::from_hz(192), 0, attotime::from_hz(192));
}
Example #4
0
uint32_t deco156_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	// sprites are flipped relative to tilemaps
	m_sprgen->set_flip_screen(true);

	screen.priority().fill(0);
	bitmap.fill(0);

	m_deco_tilegen->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);

	m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
	m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram.get(), 0x800);
	m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
	return 0;
}
Example #5
0
void bfmsys85_state::machine_reset()
{
	m_alpha_clock       = 0;
	m_mmtr_latch        = 0;
	m_triac_latch       = 0;
	m_irq_status        = 0;
	m_is_timer_enabled  = 1;
	m_coin_inhibits     = 0;
	m_mux_output_strobe = 0;
	m_mux_input_strobe  = 0;
	m_mux_input         = 0;

	m_vfd->reset();	// reset display1

// reset stepper motors ///////////////////////////////////////////////////
	{
		int pattern =0, i;

		for ( i = 0; i < 6; i++)
		{
			stepper_reset_position(i);
			if ( stepper_optic_state(i) ) pattern |= 1<<i;
		}
	m_optic_pattern = pattern;
	}
	m_locked		  = 0x00; // hardware is open
}
Example #6
0
UINT32 speglsht_state::screen_update_speglsht(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
    int x,y,dy;

    dy=(m_videoreg&0x20)?(256*512):0; //visible frame

    for(y=0; y<256; y++)
    {
        for(x=0; x<512; x++)
        {
            int tmp=dy+y*512+x;
            PLOT_PIXEL_RGB(x-67,y-5,(m_framebuffer[tmp]>>0)&0xff,(m_framebuffer[tmp]>>8)&0xff,(m_framebuffer[tmp]>>16)&0xff);
        }
    }

    //draw st0016 gfx to temporary bitmap (indexed 16)
    m_bitmap->fill(0);
    m_maincpu->st0016_draw_screen(screen, *m_bitmap, cliprect);

    //copy temporary bitmap to rgb 32 bit bitmap
    for(y=cliprect.min_y; y<cliprect.max_y; y++)
    {
        UINT16 *srcline = &m_bitmap->pix16(y);
        for(x=cliprect.min_x; x<cliprect.max_x; x++)
        {
            if(srcline[x])
            {
                rgb_t color=m_maincpu->m_palette->pen_color(srcline[x]);
                PLOT_PIXEL_RGB(x,y,color.r(),color.g(),color.b());
            }
        }
    }

    return 0;
}
Example #7
0
void apf_state::machine_start()
{
    m_apf_ints = 0;

    if (m_cass) // apfimag only
        m_cass->change_state(CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
}
Example #8
0
void tispellb_state::power_off()
{
	hh_tms1k_state::power_off();

	if (m_subcpu)
		m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
Example #9
0
UINT32 zr107_state::screen_update_jetwave(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	bitmap.fill(machine().pens[0], cliprect);

	m_k001604->draw_back_layer(bitmap, cliprect);

	K001005_draw(bitmap, cliprect);

	m_k001604->draw_front_layer(screen, bitmap, cliprect);

	draw_7segment_led(bitmap, 3, 3, m_led_reg0);
	draw_7segment_led(bitmap, 9, 3, m_led_reg1);

	sharc_set_flag_input(machine().device("dsp"), 1, ASSERT_LINE);
	return 0;
}
Example #10
0
File: byvid.cpp Project: Fulg/mame
UINT32 by133_state::screen_update_granny(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	//bitmap.fill(0xff000000, cliprect);
	copybitmap(bitmap, m_crtc->get_bitmap(), 0, 0, 0, 0, cliprect);
	copybitmap_trans(bitmap, m_crtc2->get_bitmap(), 0, 0, 0, 0, cliprect, 0xff000000);
	return 0;
}
Example #11
0
void mu100_state::regs_int_read_tap(offs_t address, u16 data, u16 mem_mask)
{
	offs_t pc = m_maincpu->pc();
	offs_t reg = (address - 0x214ca2-0x320)/2;
	if(pc != 0x729c6)
		logerror("regs_int_r %03x, %04x @ %04x (%06x)\n", reg, data, mem_mask, pc);
}
Example #12
0
void mu100_state::regs_s6_write_tap(offs_t address, u16 data, u16 mem_mask)
{
	offs_t pc = m_maincpu->pc();
	offs_t reg = (address - 0x214ca2-0x510)/2;
	if(pc != 0x72912)
		logerror("regs_s6_w %03x, %04x @ %04x (%06x)\n", reg, data, mem_mask, pc);
}
Example #13
0
void tispellb_state::power_off()
{
	m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
	if (m_subcpu)
		m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);

	m_power_on = false;
}
Example #14
0
UINT32 sandscrp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	bitmap.fill(0, cliprect);

	screen.priority().fill(0, cliprect);

	m_view2_0->kaneko16_prepare(bitmap, cliprect);

	for ( int i = 0; i < 8; i++ )
	{
		m_view2_0->render_tilemap_chip(screen,bitmap,cliprect,i);
	}

	// copy sprite bitmap to screen
	m_pandora->update(bitmap, cliprect);
	return 0;
}
Example #15
0
File: ngen.cpp Project: RalfVB/mame
void ngen_state::machine_reset()
{
	m_port00 = 0;
	m_control = 0;
	m_xbus_current = 0;
	m_viduart->write_dsr(0);
	m_viduart->write_cts(0);
	m_fd0->get_device()->set_rpm(300);
}
Example #16
0
bool mc10_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
	if (m_mc6847)		//mc10, alice
		return mc6847_update(m_mc6847, &bitmap, &cliprect);
	else if (m_ef9345)	//alice32
		m_ef9345->video_update(&bitmap, &cliprect);

	return 0;
}
Example #17
0
void fastinvaders_state::fastinvaders_8275(machine_config &config)
{
	fastinvaders(config);
	m_maincpu->set_addrmap(AS_IO, &fastinvaders_state::fastinvaders_8275_io);

	I8275(config, m_crtc8275, 10000000); /* guess */ // does not configure a very useful resolution(!)
	m_crtc8275->set_character_width(16);
//  m_crtc8275->set_display_callback(FUNC(apogee_state::display_pixels));
//  m_crtc8275->drq_wr_callback().set("dma8257", FUNC(i8257_device::dreq2_w));
}
Example #18
0
UINT32 miragemi_state::screen_update_mirage(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	address_space &space = machine().driver_data()->generic_space();
	UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff);

	flip_screen_set(BIT(flip, 7));

	m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400);

	deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll);

	bitmap.fill(256, cliprect); /* not verified */

	deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
	m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x200, 0x1ff);
	deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
	m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x200, 0x1ff);

	return 0;
}
Example #19
0
void s4_state::s4a(machine_config &config)
{
	s4(config);
	/* Add the soundcard */
	M6808(config, m_audiocpu, 3580000);
	m_audiocpu->set_addrmap(AS_PROGRAM, &s4_state::s4_audio_map);
	MCFG_MACHINE_RESET_OVERRIDE(s4_state, s4a)

	SPEAKER(config, "speaker").front_center();
	MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
	voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
	vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
	vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);

	PIA6821(config, m_pias, 0);
	m_pias->readpb_handler().set(FUNC(s4_state::sound_r));
	m_pias->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
	m_pias->irqa_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
	m_pias->irqb_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
}
Example #20
0
void m24_state::machine_reset()
{
	m_sysctl = 0;
	m_pa = 0x40;
	m_kbcibf = false;
	m_kbdata = true;
	m_i86_halt = false;
	m_i86_halt_perm = false;
	if(m_z8000_apb)
		m_z8000_apb->halt_w(ASSERT_LINE);
}
Example #21
0
UINT32 sandscrp_state::screen_update_sandscrp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
    device_t *pandora = machine().device("pandora");
    bitmap.fill(0, cliprect);

    int i;

    machine().priority_bitmap.fill(0, cliprect);

    m_view2_0->kaneko16_prepare(bitmap, cliprect);

    for ( i = 0; i < 8; i++ )
    {
        m_view2_0->render_tilemap_chip(bitmap,cliprect,i);
    }

    // copy sprite bitmap to screen
    pandora_update(pandora, bitmap, cliprect);
    return 0;
}
Example #22
0
void bitgraph_state::bitgrpha(machine_config &config)
{
	M68000(config, m_maincpu, XTAL(6'900'000));
	m_maincpu->set_addrmap(AS_PROGRAM, &bitgraph_state::bitgrapha_mem);

	bg_motherboard(config);

	CLOCK(config, "system_clock", 40).signal_handler().set(FUNC(bitgraph_state::system_clock_write));

	ACIA6850(config, m_acia3, 0);
	m_acia3->txd_handler().set(RS232_M_TAG, FUNC(rs232_port_device::write_txd));
	m_acia3->rts_handler().set(RS232_M_TAG, FUNC(rs232_port_device::write_rts));
	m_acia3->irq_handler().set_inputline(M68K_TAG, M68K_IRQ_1);

	rs232_port_device &rs232m(RS232_PORT(config, RS232_M_TAG, default_rs232_devices, nullptr));
	rs232m.rxd_handler().set(m_acia3, FUNC(acia6850_device::write_rxd));
	rs232m.dcd_handler().set(m_acia3, FUNC(acia6850_device::write_dcd));
	rs232m.cts_handler().set(m_acia3, FUNC(acia6850_device::write_cts));

	RAM(config, RAM_TAG).set_default_size("128K");
}
Example #23
0
UINT32 mt32_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	bitmap.fill(0);
	const UINT8 *data = lcd->render();
	for(int c=0; c<20; c++)
		for(int y=0; y<8; y++) {
			UINT8 v = data[c*8+y];
			for(int x=0; x<5; x++)
				bitmap.pix16(y == 7 ? 8 : y, c*6+x) = v & (0x10 >> x) ? 1 : 0;
		}
	return 0;
}
Example #24
0
void acrnsys_state::kbd_put_pb(uint8_t data)
{
	data &= 0x7f;
	/* allow backspace to work */
	if (data == 8) data = 0x7f;

	m_via6522->write_pb0(BIT(data, 0));
	m_via6522->write_pb1(BIT(data, 1));
	m_via6522->write_pb2(BIT(data, 2));
	m_via6522->write_pb3(BIT(data, 3));
	m_via6522->write_pb4(BIT(data, 4));
	m_via6522->write_pb5(BIT(data, 5));
	m_via6522->write_pb6(BIT(data, 6));
	/* assert strobe */
	m_via6522->write_cb1(1);
	/* clear strobe */
	m_via6522->write_cb1(0);
}
Example #25
0
INPUT_PORTS_END

void play_2_state::machine_reset()
{
	m_resetcnt = 0;
	m_4013b->d_w(1);
	m_kbdrow = 0;
	m_disp_sw = 0;
	m_port06 = 0;
	for (uint8_t i = 0; i < 5; i++)
		m_segment[i] = 0;
	m_1863->oe_w(1);
}
Example #26
0
File: byvid.cpp Project: Fulg/mame
void by133_state::machine_reset()
{
	m_u7_a = 0;
	m_u7_b = 1; // select mode 2 of mc6803 on /reset
	m_u10_a = 0;
	m_u10_b = 0;
	m_u10_cb2 = 0;
	m_u11_a = 0;
	m_u11_b = 0;
	m_mpu_to_vid = 0;
	m_vid_to_mpu = 0;
	m_beep->set_state(0);
}
Example #27
0
void bitgraph_state::bg_ppu(machine_config &config)
{
	i8035_device &ppu(I8035(config, PPU_TAG, XTAL(6'900'000)));
	ppu.set_addrmap(AS_IO, &bitgraph_state::ppu_io);
//  ppu.t0_in_cb().set(FUNC(bitgraph_state::ppu_t0_r));
	ppu.prog_out_cb().set("i8243", FUNC(i8243_device::prog_w));

	i8243_device &i8243(I8243(config, "i8243"));
	i8243.read_handler().set_nop();
	i8243.write_handler().set(FUNC(bitgraph_state::ppu_i8243_w));

	CENTRONICS(config, m_centronics, centronics_devices, "printer");
	m_centronics->ack_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit6));
	m_centronics->busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit7));
	m_centronics->fault_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit4));
	m_centronics->perror_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit5));

	INPUT_BUFFER(config, "cent_status_in");

	output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
	m_centronics->set_output_latch(cent_data_out);
}
Example #28
0
void mazerbla_state::machine_reset()
{
	int i;

	m_zpu_int_vector = 0xff;

	m_gfx_rom_bank = 0xff;

	m_port02_status = 0;
	m_bcd_7445 = 0;
	m_vsb_ls273 = 0;

	if (m_soundlatch.found())
	{
		m_soundlatch->clear_w();
		m_soundlatch->acknowledge_w();
	}

	for (i = 0; i < 4; i++)
	{
		m_ls670_0[i] = 0;
		m_ls670_1[i] = 0;
	}
}
Example #29
0
void mu100_state::voice_write_tap(offs_t address, u16 data, u16 mem_mask)
{
	offs_t pc = m_maincpu->pc();
	offs_t off = address - 0x20f03e;
	int voice = off / 0x92;
	int slot = off % 0x92;
	if(mem_mask == 0xffff) {
		logerror("voice_w %02x:%02x, %04x (%06x)\n", voice, slot, data, pc);
	} else {
		if(mem_mask == 0xff00)
			data >>= 8;
		else
			slot++;
		logerror("voice_w %02x:%02x, %02x (%06x)\n", voice, slot, data, pc);
	}
Example #30
0
UINT32 deco156_state::screen_update_wcvol95(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	//FIXME: flip_screen_x should not be written!
	flip_screen_set_no_update(1);

	screen.priority().fill(0);
	bitmap.fill(0);

	m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);

	m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
	m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x800);
	m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
	return 0;
}