void deadang_state::deadang(machine_config &config) { /* basic machine hardware */ V30(config, m_maincpu, XTAL(16'000'000)/2); /* Sony 8623h9 CXQ70116D-8 (V30 compatible) */ m_maincpu->set_addrmap(AS_PROGRAM, &deadang_state::main_map); TIMER(config, "scantimer1").configure_scanline(FUNC(deadang_state::main_scanline), "screen", 0, 1); V30(config, m_subcpu, XTAL(16'000'000)/2); /* Sony 8623h9 CXQ70116D-8 (V30 compatible) */ m_subcpu->set_addrmap(AS_PROGRAM, &deadang_state::sub_map); TIMER(config, "scantimer2").configure_scanline(FUNC(deadang_state::sub_scanline), "screen", 0, 1); Z80(config, m_audiocpu, XTAL(14'318'181)/4); m_audiocpu->set_addrmap(AS_PROGRAM, &deadang_state::sound_map); m_audiocpu->set_addrmap(AS_OPCODES, &deadang_state::sound_decrypted_opcodes_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); SEI80BU(config, "sei80bu", 0).set_device_rom_tag("audiocpu"); config.m_minimum_quantum = attotime::from_hz(60); // the game stops working with higher interleave rates.. WATCHDOG_TIMER(config, "watchdog"); /* 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, 2*8, 30*8-1); m_screen->set_screen_update(FUNC(deadang_state::screen_update)); m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_deadang); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 2048); /* sound hardware */ SPEAKER(config, "mono").front_center(); SEIBU_SOUND(config, m_seibu_sound, 0); m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); m_seibu_sound->ym_read_callback().set("ym1", FUNC(ym2203_device::read)); m_seibu_sound->ym_write_callback().set("ym1", FUNC(ym2203_device::write)); ym2203_device &ym1(YM2203(config, "ym1", XTAL(14'318'181)/4)); ym1.irq_handler().set("seibu_sound", FUNC(seibu_sound_device::fm_irqhandler)); ym1.add_route(ALL_OUTPUTS, "mono", 0.15); ym2203_device &ym2(YM2203(config, "ym2", XTAL(14'318'181)/4)); ym2.add_route(ALL_OUTPUTS, "mono", 0.15); SEIBU_ADPCM(config, m_adpcm1, 8000).add_route(ALL_OUTPUTS, "mono", 0.40); SEIBU_ADPCM(config, m_adpcm2, 8000).add_route(ALL_OUTPUTS, "mono", 0.40); }
void angelkds_state::angelkds(machine_config &config) { Z80(config, m_maincpu, XTAL(6'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &angelkds_state::main_map); m_maincpu->set_addrmap(AS_IO, &angelkds_state::main_portmap); m_maincpu->set_vblank_int("screen", FUNC(angelkds_state::irq0_line_hold)); Z80(config, m_subcpu, XTAL(4'000'000)); m_subcpu->set_addrmap(AS_PROGRAM, &angelkds_state::sub_map); m_subcpu->set_addrmap(AS_IO, &angelkds_state::sub_portmap); i8255_device &ppi0(I8255A(config, "ppi8255_0")); ppi0.in_pa_callback().set_ioport("I40"); ppi0.in_pb_callback().set_ioport("I41"); ppi0.in_pc_callback().set(FUNC(angelkds_state::angeklds_ff_r)); // or left inputs don't work ppi0.out_pc_callback().set(FUNC(angelkds_state::angelkds_cpu_bank_write)); i8255_device &ppi1(I8255A(config, "ppi8255_1")); ppi1.in_pa_callback().set_ioport("I80"); ppi1.in_pb_callback().set_ioport("I81"); ppi1.in_pc_callback().set_ioport("I82"); config.m_minimum_quantum = attotime::from_hz(6000); /* 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, 1*8, 31*8-1); screen.set_screen_update(FUNC(angelkds_state::screen_update_angelkds)); screen.set_palette("palette"); GFXDECODE(config, m_gfxdecode, "palette", gfx_angelkds); PALETTE(config, "palette").set_format(palette_device::xBGR_444, 0x100); SPEAKER(config, "mono").front_center(); ym2203_device &ym1(YM2203(config, "ym1", XTAL(4'000'000))); ym1.irq_handler().set_inputline(m_subcpu, 0); ym1.add_route(0, "mono", 0.65); ym1.add_route(1, "mono", 0.65); ym1.add_route(2, "mono", 0.65); ym1.add_route(3, "mono", 0.45); ym2203_device &ym2(YM2203(config, "ym2", XTAL(4'000'000))); ym2.add_route(0, "mono", 0.65); ym2.add_route(1, "mono", 0.65); ym2.add_route(2, "mono", 0.65); ym2.add_route(3, "mono", 0.45); }
GFXDECODE_END void psychic5_state::psychic5(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, XTAL(12'000'000)/2); m_maincpu->set_addrmap(AS_PROGRAM, &psychic5_state::psychic5_main_map); TIMER(config, "scantimer").configure_scanline(FUNC(psychic5_state::scanline), "screen", 0, 1); ADDRESS_MAP_BANK(config, "vrambank").set_map(&psychic5_state::psychic5_vrambank_map).set_options(ENDIANNESS_LITTLE, 8, 14, 0x2000); Z80(config, m_audiocpu, XTAL(5'000'000)); m_audiocpu->set_addrmap(AS_PROGRAM, &psychic5_state::psychic5_sound_map); m_audiocpu->set_addrmap(AS_IO, &psychic5_state::psychic5_soundport_map); config.m_minimum_quantum = attotime::from_hz(600); /* Allow time for 2nd cpu to interleave */ MCFG_MACHINE_START_OVERRIDE(psychic5_state,psychic5) /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(XTAL(12'000'000)/2,394, 0, 256, 282, 16, 240); // was 53.8 Hz before, assume same as Bombs Away screen.set_screen_update(FUNC(psychic5_state::screen_update_psychic5)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_psychic5); PALETTE(config, m_palette).set_entries(768); JALECO_BLEND(config, m_blend, 0); MCFG_VIDEO_START_OVERRIDE(psychic5_state,psychic5) MCFG_VIDEO_RESET_OVERRIDE(psychic5_state,psychic5) /* sound hardware */ SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, "soundlatch"); ym2203_device &ym1(YM2203(config, "ym1", XTAL(12'000'000)/8)); ym1.irq_handler().set_inputline(m_audiocpu, 0); ym1.add_route(0, "mono", 0.15); ym1.add_route(1, "mono", 0.15); ym1.add_route(2, "mono", 0.15); ym1.add_route(3, "mono", 0.50); ym2203_device &ym2(YM2203(config, "ym2", XTAL(12'000'000)/8)); ym2.add_route(0, "mono", 0.15); ym2.add_route(1, "mono", 0.15); ym2.add_route(2, "mono", 0.15); ym2.add_route(3, "mono", 0.50); }
void goindol_state::goindol(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, XTAL(12'000'000)/2); /* XTAL confirmed, divisor is not */ m_maincpu->set_addrmap(AS_PROGRAM, &goindol_state::goindol_map); m_maincpu->set_vblank_int("screen", FUNC(goindol_state::irq0_line_hold)); z80_device &audiocpu(Z80(config, "audiocpu", XTAL(12'000'000)/2)); /* XTAL confirmed, divisor is not */ audiocpu.set_addrmap(AS_PROGRAM, &goindol_state::sound_map); audiocpu.set_periodic_int(FUNC(goindol_state::irq0_line_hold), attotime::from_hz(4*60)); /* 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(goindol_state::screen_update_goindol)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_goindol); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); /* sound hardware */ SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, "soundlatch"); YM2203(config, "ymsnd", XTAL(12'000'000)/8).add_route(ALL_OUTPUTS, "mono", 0.25); /* Confirmed pitch from recording */ }
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!? */ }
void psychic5_state::bombsa(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, XTAL(12'000'000)/2); /* 6 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &psychic5_state::bombsa_main_map); TIMER(config, "scantimer").configure_scanline(FUNC(psychic5_state::scanline), "screen", 0, 1); ADDRESS_MAP_BANK(config, "vrambank").set_map(&psychic5_state::bombsa_vrambank_map).set_options(ENDIANNESS_LITTLE, 8, 14, 0x2000); Z80(config, m_audiocpu, XTAL(5'000'000)); m_audiocpu->set_addrmap(AS_PROGRAM, &psychic5_state::bombsa_sound_map); m_audiocpu->set_addrmap(AS_IO, &psychic5_state::bombsa_soundport_map); config.m_minimum_quantum = attotime::from_hz(600); MCFG_MACHINE_START_OVERRIDE(psychic5_state,bombsa) /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(XTAL(12'000'000)/2,394, 0, 256, 282, 16, 240); /* Measured as: VSync 54Hz, HSync 15.25kHz */ screen.set_screen_update(FUNC(psychic5_state::screen_update_bombsa)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_bombsa); PALETTE(config, m_palette).set_entries(768); MCFG_VIDEO_START_OVERRIDE(psychic5_state,bombsa) MCFG_VIDEO_RESET_OVERRIDE(psychic5_state,psychic5) /* sound hardware */ SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, "soundlatch"); ym2203_device &ym1(YM2203(config, "ym1", XTAL(12'000'000)/8)); ym1.irq_handler().set_inputline(m_audiocpu, 0); ym1.add_route(0, "mono", 0.30); ym1.add_route(1, "mono", 0.30); ym1.add_route(2, "mono", 0.30); ym1.add_route(3, "mono", 1.0); ym2203_device &ym2(YM2203(config, "ym2", XTAL(12'000'000)/8)); ym2.add_route(0, "mono", 0.30); ym2.add_route(1, "mono", 0.30); ym2.add_route(2, "mono", 0.30); ym2.add_route(3, "mono", 1.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); }
/* Note: lsasquad clock values are not verified */ void lsasquad_state::lsasquad(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, MASTER_CLOCK / 4); m_maincpu->set_addrmap(AS_PROGRAM, &lsasquad_state::lsasquad_map); m_maincpu->set_vblank_int("screen", FUNC(lsasquad_state::irq0_line_hold)); Z80(config, m_audiocpu, MASTER_CLOCK / 8); m_audiocpu->set_addrmap(AS_PROGRAM, &lsasquad_state::lsasquad_sound_map); /* IRQs are triggered by the YM2203 */ TAITO68705_MCU(config, m_bmcu, MASTER_CLOCK / 8); config.m_minimum_quantum = attotime::from_hz(30000); /* 500 CPU slices per frame - a high value to ensure proper */ /* synchronization of the CPUs */ /* main<->sound synchronization depends on this */ MCFG_MACHINE_START_OVERRIDE(lsasquad_state,lsasquad) MCFG_MACHINE_RESET_OVERRIDE(lsasquad_state,lsasquad) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>)); INPUT_MERGER_ALL_HIGH(config, "soundnmi").output_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI); GENERIC_LATCH_8(config, m_soundlatch2); /* 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, 32*8-1, 2*8, 30*8-1); screen.set_screen_update(FUNC(lsasquad_state::screen_update_lsasquad)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_lsasquad); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 512); /* sound hardware */ SPEAKER(config, "mono").front_center(); YM2149(config, "aysnd", MASTER_CLOCK / 8).add_route(ALL_OUTPUTS, "mono", 0.12); ym2203_device &ymsnd(YM2203(config, "ymsnd", MASTER_CLOCK / 8)); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.port_a_write_callback().set(FUNC(lsasquad_state::unk)); ymsnd.port_b_write_callback().set(FUNC(lsasquad_state::unk)); ymsnd.add_route(0, "mono", 0.12); ymsnd.add_route(1, "mono", 0.12); ymsnd.add_route(2, "mono", 0.12); ymsnd.add_route(3, "mono", 0.63); }
GFXDECODE_END /*************************************************************************** Machine Drivers ***************************************************************************/ void quizpun2_state::quizpun2_base(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, XTAL(8'000'000) / 2); // 4 MHz m_maincpu->set_addrmap(AS_PROGRAM, &quizpun2_state::quizpun2_map); m_maincpu->set_addrmap(AS_IO, &quizpun2_state::quizpun2_io_map); m_maincpu->set_vblank_int("screen", FUNC(quizpun2_state::irq0_line_hold)); Z80(config, m_audiocpu, XTAL(8'000'000) / 2); // 4 MHz m_audiocpu->set_addrmap(AS_PROGRAM, &quizpun2_state::quizpun2_sound_map); m_audiocpu->set_addrmap(AS_IO, &quizpun2_state::quizpun2_sound_io_map); m_audiocpu->set_vblank_int("screen", FUNC(quizpun2_state::irq0_line_hold)); // NMI generated by main CPU EEPROM_93C46_16BIT(config, "eeprom"); /* 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(384, 256); screen.set_visarea(0, 384-1, 0, 256-1); screen.set_screen_update(FUNC(quizpun2_state::screen_update_quizpun2)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_quizpun2); PALETTE(config, m_palette, 0x200).set_format(PALETTE_FORMAT_xRRRRRGGGGGBBBBB); /* sound hardware */ SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, m_soundlatch); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(8'000'000) / 2)); // 4 MHz ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); }
void pokechmp_state::pokechmp(machine_config &config) { /* basic machine hardware */ M6502(config, m_maincpu, 4_MHz_XTAL/4); m_maincpu->set_addrmap(AS_PROGRAM, &pokechmp_state::pokechmp_map); M6502(config, m_audiocpu, 4_MHz_XTAL/4); m_audiocpu->set_addrmap(AS_PROGRAM, &pokechmp_state::pokechmp_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(32*8, 32*8); screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); screen.set_screen_update(FUNC(pokechmp_state::screen_update_pokechmp)); screen.set_palette(m_palette); screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); screen.screen_vblank().append(FUNC(pokechmp_state::sound_irq)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_pokechmp); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x400); /* sound hardware */ SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, m_soundlatch); YM2203(config, "ym1", XTAL(4'000'000)/4).add_route(ALL_OUTPUTS, "mono", 0.60); YM3812(config, "ym2", XTAL(24'000'000)/16).add_route(ALL_OUTPUTS, "mono", 1.0); okim6295_device &oki(OKIM6295(config, "oki", XTAL(24'000'000)/16, okim6295_device::PIN7_LOW)); oki.add_route(ALL_OUTPUTS, "mono", 0.50); /* sound fx */ oki.add_route(ALL_OUTPUTS, "mono", 0.50); oki.set_addrmap(0, &pokechmp_state::pokechmp_oki_map); }
void metlclsh_state::metlclsh(machine_config &config) { /* basic machine hardware */ M6809(config, m_maincpu, 1500000); // ? m_maincpu->set_addrmap(AS_PROGRAM, &metlclsh_state::metlclsh_master_map); // IRQ by YM3526, NMI by CPU #2 M6809(config, m_subcpu, 1500000); // ? m_subcpu->set_addrmap(AS_PROGRAM, &metlclsh_state::metlclsh_slave_map); // IRQ by CPU #1, NMI by coin insertion /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(58); screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ // we're using PORT_VBLANK screen.set_size(32*8, 32*8); screen.set_visarea(0*8, 32*8-1, 1*8, 30*8-1); screen.set_screen_update(FUNC(metlclsh_state::screen_update_metlclsh)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_metlclsh); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 3 * 16); /* sound hardware */ SPEAKER(config, "mono").front_center(); ym2203_device &ym1(YM2203(config, "ym1", 1500000)); ym1.add_route(0, "mono", 0.10); ym1.add_route(1, "mono", 0.10); ym1.add_route(2, "mono", 0.10); ym1.add_route(3, "mono", 0.50); ym3526_device &ym2(YM3526(config, "ym2", 3000000)); ym2.irq_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); ym2.add_route(ALL_OUTPUTS, "mono", 0.50); }
void sshangha_state::sshangha(machine_config &config) { /* basic machine hardware */ M68000(config, m_maincpu, 16_MHz_XTAL); /* CPU marked as 16MHz part */ m_maincpu->set_addrmap(AS_PROGRAM, &sshangha_state::sshangha_map); m_maincpu->set_vblank_int("screen", FUNC(sshangha_state::irq6_line_hold)); Z80(config, m_audiocpu, 16_MHz_XTAL / 4); m_audiocpu->set_addrmap(AS_PROGRAM, &sshangha_state::sound_map); config.m_minimum_quantum = attotime::from_hz(6000); screen_device& screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(529)); screen.set_size(40*8, 32*8); screen.set_visarea(0*8, 40*8-1, 1*8, 31*8-1); screen.set_screen_update(FUNC(sshangha_state::screen_update)); GFXDECODE(config, "gfxdecode", m_palette, gfx_sshangha); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 0x4000); DECO16IC(config, m_tilegen, 0); m_tilegen->set_pf1_size(DECO_64x32); m_tilegen->set_pf2_size(DECO_64x32); m_tilegen->set_pf1_trans_mask(0x0f); m_tilegen->set_pf2_trans_mask(0x0f); m_tilegen->set_pf1_col_bank(0x30); m_tilegen->set_pf2_col_bank(0x20); m_tilegen->set_pf1_col_mask(0x0f); m_tilegen->set_pf2_col_mask(0x0f); m_tilegen->set_bank1_callback(FUNC(sshangha_state::bank_callback), this); m_tilegen->set_bank2_callback(FUNC(sshangha_state::bank_callback), this); m_tilegen->set_pf12_8x8_bank(0); m_tilegen->set_pf12_16x16_bank(1); m_tilegen->set_gfxdecode_tag("gfxdecode"); DECO_SPRITE(config, m_sprgen1, 0); m_sprgen1->set_gfx_region(2); m_sprgen1->set_gfxdecode_tag("gfxdecode"); DECO_SPRITE(config, m_sprgen2, 0); m_sprgen2->set_gfx_region(3); m_sprgen2->set_gfxdecode_tag("gfxdecode"); DECO146PROT(config, m_deco146, 0); m_deco146->port_a_cb().set_ioport("INPUTS"); m_deco146->port_b_cb().set_ioport("SYSTEM"); m_deco146->port_c_cb().set_ioport("DSW"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); // sure it's stereo? SPEAKER(config, "rspeaker").front_right(); ym2203_device &ymsnd(YM2203(config, "ymsnd", 16_MHz_XTAL / 4)); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(ALL_OUTPUTS, "lspeaker", 0.33); ymsnd.add_route(ALL_OUTPUTS, "rspeaker", 0.33); okim6295_device &oki(OKIM6295(config, "oki", 16_MHz_XTAL / 8, okim6295_device::PIN7_LOW)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "lspeaker", 0.27); oki.add_route(ALL_OUTPUTS, "rspeaker", 0.27); }
void witch_state::witch(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, CPU_CLOCK); /* 3 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &witch_state::witch_main_map); m_maincpu->set_vblank_int("screen", FUNC(witch_state::irq0_line_assert)); /* 2nd z80 */ Z80(config, m_subcpu, CPU_CLOCK); /* 3 MHz */ m_subcpu->set_addrmap(AS_PROGRAM, &witch_state::witch_sub_map); m_subcpu->set_vblank_int("screen", FUNC(witch_state::irq0_line_assert)); config.m_minimum_quantum = attotime::from_hz(6000); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); TICKET_DISPENSER(config, m_hopper, attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); // 82C255 (actual chip on PCB) is equivalent to two 8255s I8255(config, m_ppi[0]); m_ppi[0]->in_pa_callback().set(FUNC(witch_state::read_a000)); m_ppi[0]->in_pb_callback().set_ioport("UNK"); m_ppi[0]->out_pc_callback().set(FUNC(witch_state::write_a002)); I8255(config, m_ppi[1]); m_ppi[1]->in_pa_callback().set_ioport("A004"); m_ppi[1]->in_pb_callback().set_ioport("A005"); m_ppi[1]->out_pc_callback().set(FUNC(witch_state::write_a006)); /* 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(8, 256-1-8, 8*4, 256-8*4-1); screen.set_screen_update(FUNC(witch_state::screen_update)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_witch); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x800); /* sound hardware */ SPEAKER(config, "mono").front_center(); es8712_device &essnd(ES8712(config, "essnd", 0)); essnd.msm_write_handler().set("msm", FUNC(msm5205_device::data_w)); essnd.set_msm_tag("msm"); msm5205_device &msm(MSM5205(config, "msm", MSM5202_CLOCK)); /* actually MSM5202 */ msm.vck_legacy_callback().set("essnd", FUNC(es8712_device::msm_int)); msm.set_prescaler_selector(msm5205_device::S48_4B); /* 8 kHz */ msm.add_route(ALL_OUTPUTS, "mono", 1.0); ym2203_device &ym1(YM2203(config, "ym1", YM2203_CLOCK)); /* 3 MHz */ ym1.port_a_read_callback().set_ioport("YM_PortA"); ym1.port_b_read_callback().set_ioport("YM_PortB"); ym1.add_route(ALL_OUTPUTS, "mono", 0.5); ym2203_device &ym2(YM2203(config, "ym2", YM2203_CLOCK)); /* 3 MHz */ ym2.port_a_write_callback().set(FUNC(witch_state::xscroll_w)); ym2.port_b_write_callback().set(FUNC(witch_state::yscroll_w)); ym2.add_route(ALL_OUTPUTS, "mono", 0.5); }
MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(256, 256) MCFG_SCREEN_VISIBLE_AREA(1*8, 32*8-1, 1*8, 31*8-1) MCFG_SCREEN_UPDATE_DRIVER(compgolf_state, screen_update_compgolf) MCFG_SCREEN_PALETTE("palette") MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI)) MCFG_PALETTE_ADD("palette", 0x100) MCFG_PALETTE_INIT_OWNER(compgolf_state, compgolf) MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_compgolf) SPEAKER(config, "mono").front_center(); ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); ymsnd.irq_handler().set_inputline(m_maincpu, 0); ymsnd.port_a_write_callback().set(FUNC(compgolf_state::compgolf_scrollx_lo_w)); ymsnd.port_b_write_callback().set(FUNC(compgolf_state::compgolf_scrolly_lo_w)); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); MACHINE_CONFIG_END /************************************* * * ROM definition(s) * *************************************/ ROM_START( compgolf ) ROM_REGION( 0x10000, "maincpu", 0 )
/* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) // MCFG_SCREEN_REFRESH_RATE(60) // MCFG_SCREEN_SIZE(256, 256) // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 30*8-1) MCFG_SCREEN_RAW_PARAMS(XTAL(20'000'000)/4,328,0,256,253,0,240) MCFG_SCREEN_UPDATE_DRIVER(homerun_state, screen_update_homerun) MCFG_SCREEN_PALETTE("palette") MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_homerun) MCFG_PALETTE_ADD("palette", 16*4) /* sound hardware */ SPEAKER(config, "mono").front_center(); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(20'000'000)/8)); ymsnd.port_a_read_callback().set_ioport("DSW"); ymsnd.port_b_write_callback().set(FUNC(homerun_state::homerun_banking_w)); ymsnd.add_route(ALL_OUTPUTS, "mono", 0.50); MACHINE_CONFIG_END MACHINE_CONFIG_START(homerun_state::homerun) dynashot(config); /* sound hardware */ MCFG_DEVICE_ADD("d7756", UPD7756) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) MCFG_DEVICE_ADD("samples", SAMPLES) MCFG_SAMPLES_CHANNELS(1) MCFG_SAMPLES_NAMES(homerun_sample_names)
MCFG_SCREEN_PALETTE("palette") MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dfruit ) MCFG_PALETTE_ADD("palette", 0x100) TC0091LVC(config, m_vdp, 0); m_vdp->set_gfxdecode_tag("gfxdecode"); i8255_device &ppi(I8255A(config, "ppi8255_0")); ppi.in_pa_callback().set_ioport("IN0"); ppi.in_pb_callback().set_ioport("IN1"); ppi.in_pc_callback().set_ioport("IN2"); /* sound hardware */ SPEAKER(config, "mono").front_center(); ym2203_device &opn(YM2203(config, "opn", MASTER_CLOCK/4)); opn.port_a_read_callback().set_ioport("IN4"); opn.port_b_read_callback().set_ioport("IN5"); opn.add_route(ALL_OUTPUTS, "mono", 0.30); MACHINE_CONFIG_END /*************************************************************************** Game driver(s) ***************************************************************************/ ROM_START( dfruit ) ROM_REGION( 0x40000, "maincpu", 0 ) ROM_LOAD( "n-3800ii_ver.1.20.ic2", 0x00000, 0x40000, CRC(4e7c3700) SHA1(17bc731a91460d8f67c2b2b6e038641d57cf93be) )
void vaportra_state::vaportra(machine_config &config) { /* basic machine hardware */ M68000(config, m_maincpu, XTAL(24'000'000)/2); /* Custom chip 59 */ m_maincpu->set_addrmap(AS_PROGRAM, &vaportra_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(vaportra_state::irq6_line_assert)); H6280(config, m_audiocpu, XTAL(24'000'000)/4); /* Custom chip 45; Audio section crystal is 32.220 MHz but CPU clock is confirmed as coming from the 24MHz crystal (6Mhz exactly on the CPU) */ m_audiocpu->set_addrmap(AS_PROGRAM, &vaportra_state::sound_map); m_audiocpu->add_route(ALL_OUTPUTS, "mono", 0); // internal sound unused /* video hardware */ BUFFERED_SPRITERAM16(config, m_spriteram); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(58); screen.set_vblank_time(ATTOSECONDS_IN_USEC(529)); screen.set_size(32*8, 32*8); screen.set_visarea(0*8, 32*8-1, 1*8, 31*8-1); screen.set_screen_update(FUNC(vaportra_state::screen_update)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_vaportra); PALETTE(config, m_palette).set_entries(1280); DECO16IC(config, m_deco_tilegen[0], 0); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_trans_mask(0x0f); m_deco_tilegen[0]->set_pf2_trans_mask(0x0f); m_deco_tilegen[0]->set_pf1_col_bank(0x00); m_deco_tilegen[0]->set_pf2_col_bank(0x20); m_deco_tilegen[0]->set_pf1_col_mask(0x0f); m_deco_tilegen[0]->set_pf2_col_mask(0x0f); m_deco_tilegen[0]->set_bank1_callback(FUNC(vaportra_state::bank_callback), this); m_deco_tilegen[0]->set_bank2_callback(FUNC(vaportra_state::bank_callback), this); m_deco_tilegen[0]->set_pf12_8x8_bank(0); m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); DECO16IC(config, m_deco_tilegen[1], 0); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_trans_mask(0x0f); m_deco_tilegen[1]->set_pf2_trans_mask(0x0f); m_deco_tilegen[1]->set_pf1_col_bank(0x30); m_deco_tilegen[1]->set_pf2_col_bank(0x40); m_deco_tilegen[1]->set_pf1_col_mask(0x0f); m_deco_tilegen[1]->set_pf2_col_mask(0x0f); m_deco_tilegen[1]->set_bank1_callback(FUNC(vaportra_state::bank_callback), this); m_deco_tilegen[1]->set_bank2_callback(FUNC(vaportra_state::bank_callback), this); m_deco_tilegen[1]->set_pf12_8x8_bank(2); m_deco_tilegen[1]->set_pf12_16x16_bank(3); m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); DECO_MXC06(config, m_spritegen, 0); m_spritegen->set_colpri_callback(FUNC(vaportra_state::vaportra_colpri_cb), this); /* sound hardware */ SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0); YM2203(config, "ym1", XTAL(32'220'000)/8).add_route(ALL_OUTPUTS, "mono", 0.60); ym2151_device &ym2(YM2151(config, "ym2", XTAL(32'220'000)/9)); // uses a preset LS163 to force the odd speed ym2.irq_handler().set_inputline(m_audiocpu, 1); /* IRQ2 */ ym2.add_route(0, "mono", 0.60); ym2.add_route(1, "mono", 0.60); OKIM6295(config, "oki1", XTAL(32'220'000)/32, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75); OKIM6295(config, "oki2", XTAL(32'220'000)/16, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.60); }