本文整理汇总了C++中PALETTE函数的典型用法代码示例。如果您正苦于以下问题:C++ PALETTE函数的具体用法?C++ PALETTE怎么用?C++ PALETTE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PALETTE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ST0016_CPU
void speglsht_state::speglsht(machine_config &config)
{
/* basic machine hardware */
ST0016_CPU(config, m_maincpu, 8000000); /* 8 MHz ? */
m_maincpu->set_addrmap(AS_PROGRAM, &speglsht_state::st0016_mem);
m_maincpu->set_addrmap(AS_IO, &speglsht_state::st0016_io);
m_maincpu->set_vblank_int("screen", FUNC(speglsht_state::irq0_line_hold));
R3051(config, m_subcpu, 25000000);
m_subcpu->set_endianness(ENDIANNESS_LITTLE);
m_subcpu->set_addrmap(AS_PROGRAM, &speglsht_state::speglsht_mem);
m_subcpu->set_vblank_int("screen", FUNC(speglsht_state::irq4_line_assert));
config.m_minimum_quantum = attotime::from_hz(6000);
MCFG_MACHINE_RESET_OVERRIDE(speglsht_state,speglsht)
/* 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, 319, 8, 239-8);
screen.set_screen_update(FUNC(speglsht_state::screen_update_speglsht));
GFXDECODE(config, "gfxdecode", m_palette, gfx_speglsht);
PALETTE(config, m_palette).set_entries(16*16*4+1);
MCFG_VIDEO_START_OVERRIDE(speglsht_state,speglsht)
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:29,代码来源:speglsht.cpp
示例2: APEXC
void apexc_state::apexc(machine_config &config)
{
/* basic machine hardware */
/* APEXC CPU @ 2.0 kHz (memory word clock frequency) */
APEXC(config, m_maincpu, 2000);
m_maincpu->set_addrmap(AS_PROGRAM, &apexc_state::mem);
m_maincpu->tape_read().set(m_tape_reader, FUNC(apexc_tape_reader_image_device::read));
m_maincpu->tape_punch().set(FUNC(apexc_state::tape_write));
/* video hardware does not exist, but we display a control panel and the typewriter output */
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(256, 192);
m_screen->set_visarea(0, 256-1, 0, 192-1);
m_screen->set_palette(m_palette);
m_screen->set_screen_update(FUNC(apexc_state::screen_update_apexc));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_apexc);
PALETTE(config, m_palette, FUNC(apexc_state::apexc_palette), ARRAY_LENGTH(palette_table));
APEXC_CYLINDER(config, m_cylinder);
APEXC_TAPE_PUNCHER(config, m_tape_puncher);
APEXC_TAPE_READER(config, m_tape_reader);
}
开发者ID:PugsyMAME,项目名称:mame,代码行数:26,代码来源:apexc.cpp
示例3: V30
INPUT_PORTS_END
void twins_state::twinsed1(machine_config &config)
{
/* basic machine hardware */
V30(config, m_maincpu, 8000000);
m_maincpu->set_addrmap(AS_PROGRAM, &twins_state::twins_map);
m_maincpu->set_addrmap(AS_IO, &twins_state::twinsed1_io);
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(8000000, 512, 0, 320, 312, 0, 200); // 15.625 kHz horizontal???
screen.set_screen_update(FUNC(twins_state::screen_update_twins));
screen.set_palette(m_palette);
screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
I2C_24C02(config, m_i2cmem);
PALETTE(config, m_palette).set_entries(0x100);
/* sound hardware */
SPEAKER(config, "mono").front_center();
ay8910_device &aysnd(AY8910(config, "aysnd", 2000000));
aysnd.port_a_read_callback().set_ioport("P1");
aysnd.port_b_read_callback().set_ioport("P2");
aysnd.add_route(ALL_OUTPUTS, "mono", 1.0);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:29,代码来源:twins.cpp
示例4: PALETTE
void gmaster_state::gmaster(machine_config &config)
{
upd7810_device &upd(UPD7810(config, m_maincpu, 12_MHz_XTAL/2/*?*/)); // µPD78C11 in the unit
upd.set_addrmap(AS_PROGRAM, &gmaster_state::gmaster_mem);
upd.pa_in_cb().set_ioport("JOY");
upd.pb_in_cb().set(FUNC(gmaster_state::gmaster_portb_r));
upd.pc_in_cb().set(FUNC(gmaster_state::gmaster_portc_r));
upd.pd_in_cb().set(FUNC(gmaster_state::gmaster_portd_r));
upd.pf_in_cb().set(FUNC(gmaster_state::gmaster_portf_r));
upd.pa_out_cb().set(FUNC(gmaster_state::gmaster_porta_w));
upd.pb_out_cb().set(FUNC(gmaster_state::gmaster_portb_w));
upd.pc_out_cb().set(FUNC(gmaster_state::gmaster_portc_w));
upd.pd_out_cb().set(FUNC(gmaster_state::gmaster_portd_w));
upd.pf_out_cb().set(FUNC(gmaster_state::gmaster_portf_w));
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
screen.set_refresh_hz(60);
screen.set_size(64, 64);
screen.set_visarea(0, 64-1-3, 0, 64-1);
screen.set_screen_update(FUNC(gmaster_state::screen_update_gmaster));
screen.set_palette("palette");
PALETTE(config, "palette", FUNC(gmaster_state::gmaster_palette), ARRAY_LENGTH(gmaster_pens));
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, m_speaker).add_route(0, "mono", 0.50);
GENERIC_CARTSLOT(config, m_cart, generic_linear_slot, "gmaster_cart").set_must_be_loaded(true);
SOFTWARE_LIST(config, "cart_list").set_original("gmaster");
}
开发者ID:k2-git,项目名称:mame,代码行数:32,代码来源:gmaster.cpp
示例5: Z8001
GFXDECODE_END
void c900_state::c900(machine_config &config)
{
/* basic machine hardware */
Z8001(config, m_maincpu, 12_MHz_XTAL / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &c900_state::mem_map);
m_maincpu->set_addrmap(AS_DATA, &c900_state::data_map);
m_maincpu->set_addrmap(AS_IO, &c900_state::io_map);
m_maincpu->set_addrmap(z8001_device::AS_SIO, &c900_state::special_io_map);
M6508(config, m_fdcpu, 12_MHz_XTAL / 8); // PH1/PH2 = 1.5 MHz
m_fdcpu->set_addrmap(AS_PROGRAM, &c900_state::fdc_map);
GFXDECODE(config, "gfxdecode", "palette", gfx_c900);
PALETTE(config, "palette", palette_device::MONOCHROME);
z8036_device &cio(Z8036(config, "cio", 12_MHz_XTAL / 16)); // SNDCLK = 750kHz
cio.pb_wr_cb().set(FUNC(c900_state::sound_pb_w));
scc8030_device &scc(SCC8030(config, "scc", 12_MHz_XTAL / 2)); // 5'850'000 is the ideal figure
/* Port B */
scc.out_txdb_callback().set("rs232", FUNC(rs232_port_device::write_txd));
scc.out_dtrb_callback().set("rs232", FUNC(rs232_port_device::write_dtr));
scc.out_rtsb_callback().set("rs232", FUNC(rs232_port_device::write_rts));
//scc.out_int_callback().set("rs232", FUNC(c900_state::scc_int));
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
rs232.rxd_handler().set("scc", FUNC(scc8030_device::rxb_w));
rs232.cts_handler().set("scc", FUNC(scc8030_device::ctsb_w));
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, m_spkrdev).add_route(ALL_OUTPUTS, "mono", 0.05);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:34,代码来源:c900.cpp
示例6: witch
void keirinou_state::keirinou(machine_config &config)
{
witch(config);
m_maincpu->set_addrmap(AS_PROGRAM, &keirinou_state::keirinou_main_map);
m_subcpu->set_addrmap(AS_PROGRAM, &keirinou_state::keirinou_sub_map);
PALETTE(config.replace(), m_palette).set_entries(0x200+0x80);
m_gfxdecode->set_info(gfx_keirinou);
// MCFG_PALETTE_FORMAT(IIBBGGRR)
// Keirin Ou does have two individual PPIs (NEC D8255AC-2)
m_ppi[0]->out_pc_callback().set(FUNC(keirinou_state::write_keirinou_a002));
ay8910_device &ay1(AY8910(config, "ay1", AY8910_CLOCK));
ay1.port_a_read_callback().set_ioport("YM_PortA");
ay1.port_b_read_callback().set_ioport("YM_PortB");
ay1.add_route(ALL_OUTPUTS, "mono", 0.5);
ay8910_device &ay2(AY8910(config, "ay2", AY8910_CLOCK));
ay2.port_a_write_callback().set(FUNC(witch_state::xscroll_w));
ay2.port_b_write_callback().set(FUNC(witch_state::yscroll_w));
ay2.add_route(ALL_OUTPUTS, "mono", 0.5);
config.device_remove("essnd");
config.device_remove("msm");
config.device_remove("ym1");
config.device_remove("ym2");
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:31,代码来源:witch.cpp
示例7: ARM
void ertictac_state::ertictac(machine_config &config)
{
ARM(config, m_maincpu, XTAL(24'000'000)/3); /* guess, 12MHz 8MHz or 6MHz, what's the correct divider 2, 3 or 4? */
m_maincpu->set_addrmap(AS_PROGRAM, &ertictac_state::ertictac_map);
m_maincpu->set_periodic_int(FUNC(ertictac_state::ertictac_podule_irq), attotime::from_hz(60)); // FIXME: timing of this
I2CMEM(config, "i2cmem", 0).set_page_size(NVRAM_PAGE_SIZE).set_data_size(NVRAM_SIZE);
// AAKART(config, m_kart, XTAL(24'000'000)/3); // TODO: frequency
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_raw(XTAL(16'000'000), 1024,0,735, 624/2,0,292); // RiscOS 3 default screen settings
m_screen->set_screen_update(FUNC(archimedes_state::screen_update));
PALETTE(config, m_palette).set_entries(0x200);
SPEAKER(config, "speaker").front_center();
for (int i = 0; i < 8; i++)
{
DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac[i], 0).add_route(0, "speaker", 0.05); // unknown DAC
}
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
vref.add_route(0, "dac0", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac0", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac3", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "dac4", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac4", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "dac5", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac5", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "dac6", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac6", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "dac7", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac7", -1.0, DAC_VREF_NEG_INPUT);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:31,代码来源:ertictac.cpp
示例8: 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
示例9: LR35902
void megaduck_state::megaduck(machine_config &config)
{
/* basic machine hardware */
LR35902(config, m_maincpu, XTAL(4'194'304)); /* 4.194304 MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &megaduck_state::megaduck_map);
m_maincpu->timer_cb().set(FUNC(gb_state::gb_timer_callback));
m_maincpu->set_halt_bug(true);
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
screen.set_refresh_hz(DMG_FRAMES_PER_SECOND);
screen.set_vblank_time(0);
screen.set_screen_update("ppu", FUNC(dmg_ppu_device::screen_update));
screen.set_palette(m_palette);
screen.set_size(20*8, 18*8);
screen.set_visarea(0*8, 20*8-1, 0*8, 18*8-1);
GFXDECODE(config, "gfxdecode", m_palette, gfxdecode_device::empty);
PALETTE(config, m_palette, FUNC(megaduck_state::megaduck_palette), 4);
DMG_PPU(config, m_ppu, m_maincpu);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
DMG_APU(config, m_apu, XTAL(4'194'304));
m_apu->add_route(0, "lspeaker", 0.50);
m_apu->add_route(1, "rspeaker", 0.50);
/* cartslot */
MEGADUCK_CART_SLOT(config, m_cartslot, megaduck_cart, nullptr);
SOFTWARE_LIST(config, "cart_list").set_original("megaduck");
}
开发者ID:PugsyMAME,项目名称:mame,代码行数:33,代码来源:gb.cpp
示例10: 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
示例11: I80C31
GFXDECODE_END
void ti630_state::ti630(machine_config &config)
{
/* basic machine hardware */
I80C31(config, m_maincpu, XTAL(10'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &ti630_state::i80c31_prg);
m_maincpu->set_addrmap(AS_IO, &ti630_state::i80c31_io);
m_maincpu->port_in_cb<1>().set(FUNC(ti630_state::i80c31_p1_r));
m_maincpu->port_out_cb<1>().set(FUNC(ti630_state::i80c31_p1_w));
m_maincpu->port_out_cb<3>().set(FUNC(ti630_state::i80c31_p3_w));
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
screen.set_refresh_hz(50);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
screen.set_screen_update("hd44780", FUNC(hd44780_device::screen_update));
screen.set_size(6*16, 9*2);
screen.set_visarea(0, 6*16-1, 0, 9*2-1);
screen.set_palette("palette");
PALETTE(config, "palette", 2).set_init(FUNC(ti630_state::palette_init_ti630));
GFXDECODE(config, "gfxdecode", "palette", gfx_ti630);
HD44780(config, m_lcdc, 0);
m_lcdc->set_lcd_size(2, 16);
}
开发者ID:Octocontrabass,项目名称:mame,代码行数:28,代码来源:ti630.cpp
示例12: M68000
void blockout_state::blockout(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, MAIN_CLOCK); /* MRH - 8.76 makes gfx/adpcm samples sync better -- but 10 is correct speed*/
m_maincpu->set_addrmap(AS_PROGRAM, &blockout_state::main_map);
TIMER(config, "scantimer").configure_scanline(FUNC(blockout_state::blockout_scanline), "screen", 0, 1);
Z80(config, m_audiocpu, AUDIO_CLOCK); /* 3.579545 MHz */
m_audiocpu->set_addrmap(AS_PROGRAM, &blockout_state::audio_map);
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
/* assume same as ddragon3 with adjusted visible display area */
m_screen->set_raw(XTAL(28'000'000) / 4, 448, 0, 320, 272, 10, 250);
m_screen->set_screen_update(FUNC(blockout_state::screen_update));
m_screen->set_palette(m_palette);
PALETTE(config, m_palette).set_format(2, &blockout_state::blockout_xBGR_444, 513);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
GENERIC_LATCH_8(config, m_soundlatch);
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI);
ym2151_device &ymsnd(YM2151(config, "ymsnd", AUDIO_CLOCK));
ymsnd.irq_handler().set(FUNC(blockout_state::irq_handler));
ymsnd.add_route(0, "lspeaker", 0.60);
ymsnd.add_route(1, "rspeaker", 0.60);
okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH));
oki.add_route(ALL_OUTPUTS, "lspeaker", 0.50);
oki.add_route(ALL_OUTPUTS, "rspeaker", 0.50);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:35,代码来源:blockout.cpp
示例13: M68000
void konmedal68k_state::kzaurus(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(33'868'800)/4); // 33.8688 MHz crystal verified on PCB
m_maincpu->set_addrmap(AS_PROGRAM, &konmedal68k_state::kzaurus_main);
TIMER(config, "scantimer").configure_scanline(FUNC(konmedal68k_state::scanline), "screen", 0, 1);
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(59.62); /* verified on pcb */
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size(64*8, 32*8);
screen.set_visarea(40, 400-1, 16, 240-1);
screen.set_screen_update(FUNC(konmedal68k_state::screen_update_konmedal68k));
screen.set_palette("palette");
PALETTE(config, "palette").set_format(palette_device::xBGR_888, 8192).enable_shadows();
K056832(config, m_k056832, 0);
m_k056832->set_tile_callback(FUNC(konmedal68k_state::tile_callback), this);
m_k056832->set_config("gfx1", K056832_BPP_4dj, 1, 0);
m_k056832->set_palette(m_palette);
K055555(config, m_k055555, 0);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
YMZ280B(config, m_ymz, XTAL(33'868'800)/2); // 33.8688 MHz xtal verified on PCB
m_ymz->add_route(0, "lspeaker", 1.0);
m_ymz->add_route(1, "rspeaker", 1.0);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:33,代码来源:konmedal68k.cpp
示例14: M68000
void drtomy_state::drtomy(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, 24000000/2); /* ? MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &drtomy_state::drtomy_map);
m_maincpu->set_vblank_int("screen", FUNC(drtomy_state::irq6_line_hold));
/* 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(32*16, 32*16);
screen.set_visarea(0, 320-1, 16, 256-1);
screen.set_screen_update(FUNC(drtomy_state::screen_update_drtomy));
screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_drtomy);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 1024);
/* sound hardware */
SPEAKER(config, "mono").front_center();
OKIM6295(config, m_oki, 26000000/16, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.8);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:25,代码来源:drtomy.cpp
示例15: M68000
void powerbal_state::magicstk(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, 12000000); /* 12 MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &powerbal_state::magicstk_main_map);
m_maincpu->set_vblank_int("screen", FUNC(powerbal_state::irq2_line_hold));
EEPROM_93C46_16BIT(config, "eeprom").default_value(0);
MCFG_MACHINE_START_OVERRIDE(powerbal_state,powerbal)
MCFG_MACHINE_RESET_OVERRIDE(powerbal_state,powerbal)
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(61);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
screen.set_size(128*8, 64*8);
screen.set_visarea(0*8, 40*8-1, 0*8, 30*8-1);
screen.set_screen_update(FUNC(powerbal_state::screen_update_powerbal));
screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_powerbal);
PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 512);
MCFG_VIDEO_START_OVERRIDE(powerbal_state,powerbal)
/* sound hardware */
SPEAKER(config, "mono").front_center();
OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH);
m_oki->add_route(ALL_OUTPUTS, "mono", 1.0);
m_oki->set_addrmap(0, &powerbal_state::oki_map);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:33,代码来源:powerbal.cpp
示例16: 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
示例17: 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.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
}
开发者ID:k2-git,项目名称:mame,代码行数:30,代码来源:galeb.cpp
示例18: MB8877
void mtx_sdxcpm_device::device_add_mconfig(machine_config &config)
{
/* fdc */
MB8877(config, m_fdc, 8_MHz_XTAL / 8);
m_fdc->hld_wr_callback().set(FUNC(mtx_sdx_device::motor_w));
FLOPPY_CONNECTOR(config, "fdc:0", sdx_floppies, "525qd", mtx_sdx_device::floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, "fdc:1", sdx_floppies, "525qd", mtx_sdx_device::floppy_formats).enable_sound(true);
/* 80 column video card - required to be installed in MTX internally */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
m_screen->set_refresh_hz(50);
m_screen->set_size(960, 313);
m_screen->set_visarea(00, 640 - 1, 0, 240 - 1);
m_screen->set_screen_update("crtc", FUNC(mc6845_device::screen_update));
GFXDECODE(config, "gfxdecode", "palette", gfx_mtx_sdx);
PALETTE(config, "palette", palette_device::RGB_3BIT);
MC6845(config, m_crtc, 15_MHz_XTAL / 8);
m_crtc->set_screen("screen");
m_crtc->set_show_border_area(false);
m_crtc->set_char_width(8);
m_crtc->set_update_row_callback(FUNC(mtx_sdxcpm_device::crtc_update_row), this);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:26,代码来源:sdx.cpp
示例19: FUNC
GFXDECODE_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
void tk02_device::device_add_mconfig(machine_config &config)
{
screen_device &screen(SCREEN(config, "mono", SCREEN_TYPE_RASTER));
screen.set_color(rgb_t::green());
screen.set_raw(XTAL(8'000'000) * 2, 1024, 0, 640, 312, 0, 250);
screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
PALETTE(config, m_palette, palette_device::MONOCHROME);
GFXDECODE(config, "gfxdecode", "palette", gfx_tk02);
MC6845(config, m_crtc, XTAL(8'000'000) / 4);
m_crtc->set_screen("mono");
m_crtc->set_show_border_area(false);
m_crtc->set_char_width(8);
m_crtc->set_update_row_callback(FUNC(tk02_device::crtc_update_row), this);
m_crtc->out_de_callback().set(FUNC(tk02_device::de_w));
TATUNG_PIPE(config, m_pipe, DERIVED_CLOCK(1, 1), tatung_pipe_cards, nullptr);
}
开发者ID:MoochMcGee,项目名称:mame,代码行数:26,代码来源:tk02.cpp
示例20: SDL_AllocPalette
void EmuinoSDL::postsetup()
{
TileLayerInfo layer_info;
// set up the palettes
for (int i = 0; i < NUM_PALETTES; i++) {
palettes[i] = SDL_AllocPalette(NUM_PALETTE_ENTRIES);
SDL_Color colors[NUM_PALETTE_ENTRIES];
SharedRAM.read(PALETTE(i) | 0x8000, colors, NUM_PALETTE_ENTRIES * 4);
for (int z = 0; z < NUM_PALETTE_ENTRIES; z++)
colors[z].a = 255;
SDL_SetPaletteColors(palettes[i], colors, 0, NUM_PALETTE_ENTRIES);
}
screenSurface = SDL_CreateRGBSurface(0, 320, 240, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
screenTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, 320, 240);
// create the tile textures
for (int i = 0; i < NUM_TILE_LAYERS; i++) {
tileMapSurfaces[i] = SDL_CreateRGBSurface(0, 32 * 16, 32 * 16, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
tileMapTextures[i] = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, 32 * 16, 32 * 16);
SDL_SetTextureBlendMode(tileMapTextures[i], SDL_BLENDMODE_BLEND);
}
setup = true;
}
开发者ID:qwook,项目名称:emuinocube,代码行数:29,代码来源:EmuinoSDL.cpp
注:本文中的PALETTE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论