当前位置: 首页>>代码示例>>C++>>正文


C++ SCREEN函数代码示例

本文整理汇总了C++中SCREEN函数的典型用法代码示例。如果您正苦于以下问题:C++ SCREEN函数的具体用法?C++ SCREEN怎么用?C++ SCREEN使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SCREEN函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Z80

void dday_state::dday(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, 2000000);     /* 2 MHz ? */
	m_maincpu->set_addrmap(AS_PROGRAM, &dday_state::dday_map);


	/* video hardware */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_refresh_hz(60);
	m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
	m_screen->set_size(32*8, 32*8);
	m_screen->set_visarea(0*8, 32*8-1, 0*8, 28*8-1);
	m_screen->set_screen_update(FUNC(dday_state::screen_update_dday));
	m_screen->set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_dday);
	PALETTE(config, m_palette, FUNC(dday_state::dday_palette), 256).enable_shadows();
	m_palette->set_indirect_entries(256); // HACK!!!

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

	AY8910(config, m_ay1, 1000000).add_route(ALL_OUTPUTS, "mono", 0.25);
	AY8910(config, "ay2", 1000000).add_route(ALL_OUTPUTS, "mono", 0.25);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:26,代码来源:dday.cpp

示例2: subScreenPublish

void
subScreenPublish(void)
{
  int i;
  long *views = NULL;

  assert(subtle);

  /* EWMH: Views per screen */
  views = (long *)subSharedMemoryAlloc(subtle->screens->ndata,
    sizeof(long));

  /* Collect views */
  for(i = 0; i < subtle->screens->ndata; i++)
    views[i] = SCREEN(subtle->screens->data[i])->vid;

  subEwmhSetCardinals(ROOT, SUB_EWMH_SUBTLE_SCREEN_VIEWS,
    views, subtle->screens->ndata);

  free(views);

  XSync(subtle->dpy, False); ///< Sync all changes

  subSharedLogDebugSubtle("publish=screen, screens=%d\n",
    subtle->screens->ndata);
} /* }}} */
开发者ID:guns,项目名称:subtle,代码行数:26,代码来源:screen.c

示例3: M6502

INPUT_PORTS_END

void superga2_state::kuzmich(machine_config &config)
{
	/* basic machine hardware */
	M6502(config, m_maincpu, 1021800);
	m_maincpu->set_addrmap(AS_PROGRAM, &superga2_state::kuzmich_map);

	APPLE2_VIDEO(config, m_video, XTAL(14'318'181));
	APPLE2_COMMON(config, m_a2common, XTAL(14'318'181));

	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_raw(1021800*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192);
	m_screen->set_screen_update(FUNC(superga2_state::screen_update));
	m_screen->set_palette(m_video);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();
	SPEAKER_SOUND(config, A2_SPEAKER_TAG).add_route(ALL_OUTPUTS, "mono", 1.00);

	/* soft switches */
	F9334(config, m_softlatch); // F14 (labeled 74LS259 on some boards and in the Apple ][ Reference Manual)
	m_softlatch->q_out_cb<0>().set(FUNC(superga2_state::txt_w));
	m_softlatch->q_out_cb<1>().set(FUNC(superga2_state::mix_w));
	m_softlatch->q_out_cb<2>().set(FUNC(superga2_state::scr_w));
	m_softlatch->q_out_cb<3>().set(FUNC(superga2_state::res_w));
	m_softlatch->q_out_cb<6>().set(FUNC(superga2_state::an2_w));

	RAM(config, RAM_TAG).set_default_size("48K").set_default_value(0x00);
}
开发者ID:rfka01,项目名称:mame,代码行数:30,代码来源:superga2.cpp

示例4: TMP68301

void csplayh5_state::csplayh5(machine_config &config)
{
	/* basic machine hardware */
	TMP68301(config, m_maincpu, 16000000); /* TMP68301-16 */
	m_maincpu->set_addrmap(AS_PROGRAM, &csplayh5_state::csplayh5_map);
	m_maincpu->out_parallel_callback().set(FUNC(csplayh5_state::tmp68301_parallel_port_w));

	TIMER(config, "scantimer", 0).configure_scanline(timer_device::expired_delegate(FUNC(csplayh5_state::csplayh5_irq), this), "screen", 0, 1);

#if USE_H8
	h830002_device &subcpu(H83002(config, "subcpu", DVD_CLOCK/2));    /* unknown divider */
	subcpu.set_addrmap(AS_PROGRAM, &csplayh5_state::csplayh5_sub_map);
	subcpu.set_addrmap(AS_IO, &csplayh5_state::csplayh5_sub_io_map);

	ide_controller_device &ide(IDE_CONTROLLER(config, "ide").options(ata_devices, "hdd", nullptr, true)); // dvd
	ide.irq_handler().set(FUNC(csplayh5_state::ide_irq));
#endif

	NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);

	/* video hardware */
	v9958_device &v9958(V9958(config, "v9958", XTAL(21'477'272))); // typical 9958 clock, not verified
	v9958.set_screen_ntsc("screen");
	v9958.set_vram_size(0x20000);
	v9958.int_cb().set(FUNC(csplayh5_state::csplayh5_vdp0_interrupt));
	SCREEN(config, "screen", SCREEN_TYPE_RASTER);

	/* sound hardware */
	NICHISND(config, m_nichisnd, 0);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:30,代码来源:csplayh5.cpp

示例5: subScreenCurrent

SubScreen *
subScreenCurrent(int *sid)
{
  SubScreen *ret = NULL;

  /* Check if there is only one screen */
  if(1 == subtle->screens->ndata)
    {
      if(sid) *sid = 0;

      ret = SCREEN(subtle->screens->data[0]);
    }
  else
    {
      int rx = 0, ry = 0, x = 0, y = 0;
      Window root = None, win = None;
      unsigned int mask = 0;

      /* Get current screen */
      XQueryPointer(subtle->dpy, ROOT, &root, &win, &rx, &ry, &x, &y, &mask);

      ret = subScreenFind(rx, ry, sid);
    }

  return ret;
} /* }}} */
开发者ID:guns,项目名称:subtle,代码行数:26,代码来源:screen.c

示例6: M6800

GFXDECODE_END


void sprint8_state::sprint8(machine_config &config)
{
	/* basic machine hardware */
	M6800(config, m_maincpu, 11055000 / 11); /* ? */
	m_maincpu->set_addrmap(AS_PROGRAM, &sprint8_state::sprint8_map);

	TIMER(config, "input_timer").configure_periodic(FUNC(sprint8_state::input_callback), attotime::from_hz(60));

	/* video hardware */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_refresh_hz(60);
	m_screen->set_size(512, 261);
	m_screen->set_visarea(0, 495, 0, 231);
	m_screen->set_screen_update(FUNC(sprint8_state::screen_update));
	m_screen->screen_vblank().set(FUNC(sprint8_state::screen_vblank));
	m_screen->set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_sprint8);
	PALETTE(config, m_palette, FUNC(sprint8_state::sprint8_palette), 36, 18);

	sprint8_audio(config);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:25,代码来源:sprint8.cpp

示例7: Z80

void ettrivia_state::ettrivia(machine_config &config)
{
	Z80(config, m_maincpu, 12000000/4-48000); //should be ok, it gives the 300 interrupts expected
	m_maincpu->set_addrmap(AS_PROGRAM, &ettrivia_state::cpu_map);
	m_maincpu->set_addrmap(AS_IO, &ettrivia_state::io_map);
	m_maincpu->set_vblank_int("screen", FUNC(ettrivia_state::ettrivia_interrupt));

	NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);

	/* 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(256, 256);
	screen.set_visarea(0*8, 32*8-1, 0*8, 28*8-1);
	screen.set_screen_update(FUNC(ettrivia_state::screen_update_ettrivia));
	screen.set_palette("palette");

	GFXDECODE(config, m_gfxdecode, "palette", gfx_ettrivia);
	PALETTE(config, "palette", FUNC(ettrivia_state::ettrivia_palette), 256);

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

	AY8912(config, m_ay[0], 1500000).add_route(ALL_OUTPUTS, "mono", 0.25);

	AY8912(config, m_ay[1], 1500000);
	m_ay[1]->port_a_read_callback().set_ioport("IN1");
	m_ay[1]->add_route(ALL_OUTPUTS, "mono", 0.25);

	AY8912(config, m_ay[2], 1500000);
	m_ay[2]->port_a_read_callback().set_ioport("IN0");
	m_ay[2]->add_route(ALL_OUTPUTS, "mono", 0.25);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:34,代码来源:ettrivia.cpp

示例8: M68000

void zerozone_state::zerozone(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, 10000000);   /* 10 MHz */
	m_maincpu->set_addrmap(AS_PROGRAM, &zerozone_state::main_map);

	Z80(config, m_audiocpu, 1000000);  /* 1 MHz ??? */
	m_audiocpu->set_addrmap(AS_PROGRAM, &zerozone_state::sound_map);

	config.m_minimum_quantum = attotime::from_hz(600);

	/* 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(1*8, 47*8-1, 2*8, 30*8-1);
	screen.set_palette("palette");
	screen.set_screen_update(FUNC(zerozone_state::screen_update));
	screen.screen_vblank().set(FUNC(zerozone_state::vblank_w));

	GFXDECODE(config, m_gfxdecode, "palette", gfx_zerozone);

	PALETTE(config, "palette").set_format(palette_device::RRRRGGGGBBBBRGBx, 256);

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

	GENERIC_LATCH_8(config, m_soundlatch);

	okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified
	oki.add_route(ALL_OUTPUTS, "mono", 1.0);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:33,代码来源:zerozone.cpp

示例9: Z80

GFXDECODE_END


void gomoku_state::gomoku(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, XTAL(18'432'000)/12);      /* 1.536 MHz ? */
	m_maincpu->set_addrmap(AS_PROGRAM, &gomoku_state::gomoku_map);
	m_maincpu->set_vblank_int("screen", FUNC(gomoku_state::irq0_line_hold));

	ls259_device &latch(LS259(config, "latch")); // 7J
	latch.q_out_cb<1>().set(FUNC(gomoku_state::flipscreen_w));
	latch.q_out_cb<2>().set(FUNC(gomoku_state::bg_dispsw_w));
	latch.q_out_cb<7>().set_nop(); // start LED?

	/* video hardware */
	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
	m_screen->set_refresh_hz(60);
	m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
	m_screen->set_size(256, 256);
	m_screen->set_visarea(0, 256-1, 16, 256-16-1);
	m_screen->set_screen_update(FUNC(gomoku_state::screen_update_gomoku));
	m_screen->set_palette("palette");

	GFXDECODE(config, m_gfxdecode, "palette", gfx_gomoku);
	PALETTE(config, "palette", FUNC(gomoku_state::gomoku_palette), 64);

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

	GOMOKU_SOUND(config, "gomoku").add_route(ALL_OUTPUTS, "mono", 1.0);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:32,代码来源:gomoku.cpp

示例10: M68000

GFXDECODE_END


/*************************
*    Machine Drivers     *
*************************/

void goldngam_state::base(machine_config &config)
{
	/* basic machine hardware */
	M68000(config, m_maincpu, MASTER_CLOCK);
	m_maincpu->set_addrmap(AS_PROGRAM, &goldngam_state::swisspkr_map);

	PTM6840(config, m_ptm, 2'000'000);
	m_ptm->irq_callback().set_inputline("maincpu", M68K_IRQ_2);

	/* 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, 64*8);
	screen.set_visarea(4*8, 43*8-1, 1*8, 37*8-1); // 312x288
	screen.set_screen_update(FUNC(goldngam_state::screen_update_goldngam));
	screen.set_palette("palette");

	GFXDECODE(config, "gfxdecode", "palette", gfx_goldngam);

	PALETTE(config, "palette", FUNC(goldngam_state::palette_init), 512);

	/* sound hardware */
	SPEAKER(config, "mono").front_center();
}
开发者ID:PugsyMAME,项目名称:mame,代码行数:32,代码来源:goldngam.cpp

示例11: M68000

INPUT_PORTS_END

void tr175_state::tr175(machine_config &config)
{
	M68000(config, m_maincpu, 12'000'000);
	m_maincpu->set_addrmap(AS_PROGRAM, &tr175_state::mem_map);

	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_raw(28.322_MHz_XTAL, 900, 0, 720, 449, 0, 416); // guess
	screen.set_screen_update("avdc", FUNC(scn2674_device::screen_update));

	scn2674_device &avdc(SCN2674(config, "avdc", 28.322_MHz_XTAL / 18)); // guess
	avdc.intr_callback().set_inputline("maincpu", M68K_IRQ_2);
	avdc.set_character_width(18); // guess
	avdc.set_display_callback(FUNC(tr175_state::draw_character));
	avdc.set_addrmap(0, &tr175_state::vram_map);
	avdc.set_screen("screen");

	scn2681_device &duart(SCN2681(config, "duart", 11.0592_MHz_XTAL / 3)); // is this the right clock?
	duart.irq_cb().set_inputline("maincpu", M68K_IRQ_1);

	PALETTE(config, "palette", 0x100);
	ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette"));
	ramdac.set_addrmap(0, &tr175_state::ramdac_map);
}
开发者ID:MASHinfo,项目名称:mame,代码行数:25,代码来源:tr175.cpp

示例12: Z80

void gundealr_state::gundealr(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, XTAL(12'000'000)/2);   /* 6 MHz verified for Yam! Yam!? */
	m_maincpu->set_addrmap(AS_PROGRAM, &gundealr_state::gundealr_main_map);
	m_maincpu->set_addrmap(AS_IO, &gundealr_state::main_portmap);
	TIMER(config, "scantimer").configure_scanline(FUNC(gundealr_state::scanline), "screen", 0, 1);

	/* 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(32*8, 32*8);
	screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
	screen.set_screen_update(FUNC(gundealr_state::screen_update));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_gundealr);
	PALETTE(config, m_palette).set_entries(512);

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

	YM2203(config, "ymsnd", XTAL(12'000'000)/8).add_route(ALL_OUTPUTS, "mono", 0.25); /* 1.5Mhz verified for Yam! Yam!? */
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:25,代码来源:gundealr.cpp

示例13: Z80

void egghunt_state::egghunt(machine_config &config)
{
	/* basic machine hardware */
	Z80(config, m_maincpu, 12000000/2);      /* 6 MHz ?*/
	m_maincpu->set_addrmap(AS_PROGRAM, &egghunt_state::egghunt_map);
	m_maincpu->set_addrmap(AS_IO, &egghunt_state::io_map);
	m_maincpu->set_vblank_int("screen", FUNC(egghunt_state::irq0_line_hold)); // or 2 like mitchell.cpp?

	Z80(config, m_audiocpu, 12000000/2);         /* 6 MHz ?*/
	m_audiocpu->set_addrmap(AS_PROGRAM, &egghunt_state::sound_map);


	/* 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(8*8, 56*8-1, 1*8, 31*8-1);
	screen.set_screen_update(FUNC(egghunt_state::screen_update_egghunt));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_egghunt);

	PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x400);

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

	GENERIC_LATCH_8(config, m_soundlatch);

	OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:32,代码来源:egghunt.cpp

示例14: M6502

INPUT_PORTS_END

/* Machine driver */
void galeb_state::galeb(machine_config &config)
{
	/* basic machine hardware */
	M6502(config, m_maincpu, 1000000);
	m_maincpu->set_addrmap(AS_PROGRAM, &galeb_state::galeb_mem);

	/* video hardware */
	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
	screen.set_refresh_hz(50);
	screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
	screen.set_size(48*8, 16*8);
	screen.set_visarea(0, 48*8-1, 0, 16*8-1);
	screen.set_screen_update(FUNC(galeb_state::screen_update_galeb));
	screen.set_palette(m_palette);

	GFXDECODE(config, m_gfxdecode, m_palette, gfx_galeb);

	PALETTE(config, m_palette, palette_device::MONOCHROME);

	/* audio hardware */
	SPEAKER(config, "speaker").front_center();
	DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.0625); // unknown DAC
	voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
	vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:28,代码来源:galeb.cpp

示例15: I80188

	// 0x80 eeprom read bit
INPUT_PORTS_END

void timetrv_state::timetrv(machine_config &config)
{
	/* basic machine hardware */
	I80188(config, m_maincpu, 20000000); //???
	m_maincpu->set_addrmap(AS_PROGRAM, &timetrv_state::timetrv_map);
	m_maincpu->set_addrmap(AS_IO, &timetrv_state::timetrv_io);
	// interrupts are generated by internally-driven timers

	EEPROM_2816(config, "eeprom");

	i8255_device &ppi1(I8255(config, "ppi1"));
	ppi1.in_pa_callback().set(FUNC(timetrv_state::test1_r)); //inputs
	ppi1.in_pb_callback().set(FUNC(timetrv_state::test2_r)); //eeprom read bit + inputs

	i8255_device &ppi2(I8255(config, "ppi2"));
	ppi2.in_pa_callback().set(FUNC(timetrv_state::in_r)); //dsw
	ppi2.in_pb_callback().set(FUNC(timetrv_state::in_r)); //dsw
	ppi2.in_pc_callback().set(FUNC(timetrv_state::in_r)); //dsw

	NS16450(config, "uart", 1843200); // P82050 (serial interface for laserdisc)

	/* 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(512, 512);
	screen.set_visarea(0*8, 512-1, 0*8, 512-1);
	screen.set_screen_update(FUNC(timetrv_state::screen_update_timetrv));

	PALETTE(config, "palette").set_entries(512);

	/* sound hardware */
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:36,代码来源:timetrv.cpp


注:本文中的SCREEN函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。