diff --git a/src/emu/cpu/tms0980/tms0980.c b/src/emu/cpu/tms0980/tms0980.c index 11e0d0550b3..025c0a7a575 100644 --- a/src/emu/cpu/tms0980/tms0980.c +++ b/src/emu/cpu/tms0980/tms0980.c @@ -638,7 +638,6 @@ void tms1400_cpu_device::device_reset() tms1100_cpu_device::device_reset(); // small differences in 00-3f area - m_fixed_decode[0x09] = F_COMX; m_fixed_decode[0x0b] = F_TPC; } diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c index e9651110ecc..1b34b86518e 100644 --- a/src/emu/emuopts.c +++ b/src/emu/emuopts.c @@ -278,6 +278,8 @@ void emu_options::update_slot_options() } } } + while (add_slot_options(false)); + add_device_options(false); } @@ -365,8 +367,6 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], astring &error_stri do { num = options_count(); update_slot_options(); - while (add_slot_options(false)); - add_device_options(false); result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); } while (num != options_count()); @@ -502,8 +502,6 @@ void emu_options::set_system_name(const char *name) do { num = options_count(); update_slot_options(); - while (add_slot_options(false)); - add_device_options(false); } while(num != options_count()); } } diff --git a/src/emu/machine/6522via.c b/src/emu/machine/6522via.c index fb7cb911b2e..16f63a9211f 100644 --- a/src/emu/machine/6522via.c +++ b/src/emu/machine/6522via.c @@ -223,8 +223,10 @@ void via6522_device::device_start() save_item(NAME(m_acr)); save_item(NAME(m_ier)); save_item(NAME(m_ifr)); + save_item(NAME(m_time1)); save_item(NAME(m_t1_active)); save_item(NAME(m_t1_pb7)); + save_item(NAME(m_time2)); save_item(NAME(m_t2_active)); save_item(NAME(m_shift_counter)); } diff --git a/src/emu/ui/ui.c b/src/emu/ui/ui.c index 125c66859fa..acb29f49aed 100644 --- a/src/emu/ui/ui.c +++ b/src/emu/ui/ui.c @@ -310,13 +310,13 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) const int maxstate = 4; int str = machine().options().seconds_to_run(); bool show_gameinfo = !machine().options().skip_gameinfo(); - bool show_warnings = true; + bool show_warnings = true, show_mandatory_fileman = true; int state; // disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver, // or if we are debugging if (!first_time || (str > 0 && str < 60*5) || &machine().system() == &GAME_NAME(___empty) || (machine().debug_flags & DEBUG_FLAG_ENABLED) != 0) - show_gameinfo = show_warnings = show_disclaimer = FALSE; + show_gameinfo = show_warnings = show_disclaimer = show_mandatory_fileman = FALSE; #ifdef SDLMAME_EMSCRIPTEN // also disable for the JavaScript port since the startup screens do not run asynchronously @@ -355,7 +355,7 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) break; case 3: - if (image_mandatory_scan(machine(), messagebox_text).len() > 0) + if (show_mandatory_fileman && image_mandatory_scan(machine(), messagebox_text).len() > 0) { astring warning; warning.cpy("This driver requires images to be loaded in the following device(s): ").cat(messagebox_text.substr(0, messagebox_text.len() - 2)); diff --git a/src/mame/drivers/bogeyman.c b/src/mame/drivers/bogeyman.c index 7cabb0a7918..000e719ca39 100644 --- a/src/mame/drivers/bogeyman.c +++ b/src/mame/drivers/bogeyman.c @@ -13,7 +13,6 @@ #include "emu.h" #include "cpu/m6502/m6502.h" -#include "sound/ay8910.h" #include "includes/bogeyman.h" @@ -21,23 +20,23 @@ // Sound section is copied from Mysterious Stones driver by Nicola, Mike, Brad -WRITE8_MEMBER(bogeyman_state::bogeyman_8910_latch_w) +WRITE8_MEMBER(bogeyman_state::ay8910_latch_w) { m_psg_latch = data; } -WRITE8_MEMBER(bogeyman_state::bogeyman_8910_control_w) +WRITE8_MEMBER(bogeyman_state::ay8910_control_w) { // bit 0 is flipscreen flip_screen_set(data & 0x01); // bit 5 goes to 8910 #0 BDIR pin if ((m_last_write & 0x20) == 0x20 && (data & 0x20) == 0x00) - machine().device("ay1")->data_address_w(space, m_last_write >> 4, m_psg_latch); + m_ay1->data_address_w(space, m_last_write >> 4, m_psg_latch); // bit 7 goes to 8910 #1 BDIR pin if ((m_last_write & 0x80) == 0x80 && (data & 0x80) == 0x00) - machine().device("ay2")->data_address_w(space, m_last_write >> 6, m_psg_latch); + m_ay2->data_address_w(space, m_last_write >> 6, m_psg_latch); m_last_write = data; } @@ -46,14 +45,14 @@ WRITE8_MEMBER(bogeyman_state::bogeyman_8910_control_w) static ADDRESS_MAP_START( bogeyman_map, AS_PROGRAM, 8, bogeyman_state ) AM_RANGE(0x0000, 0x17ff) AM_RAM - AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(bogeyman_videoram2_w) AM_SHARE("videoram2") - AM_RANGE(0x1c00, 0x1fff) AM_RAM_WRITE(bogeyman_colorram2_w) AM_SHARE("colorram2") - AM_RANGE(0x2000, 0x20ff) AM_RAM_WRITE(bogeyman_videoram_w) AM_SHARE("videoram") - AM_RANGE(0x2100, 0x21ff) AM_RAM_WRITE(bogeyman_colorram_w) AM_SHARE("colorram") + AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(videoram2_w) AM_SHARE("videoram2") + AM_RANGE(0x1c00, 0x1fff) AM_RAM_WRITE(colorram2_w) AM_SHARE("colorram2") + AM_RANGE(0x2000, 0x20ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") + AM_RANGE(0x2100, 0x21ff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") AM_RANGE(0x2800, 0x2bff) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0x3000, 0x300f) AM_RAM_WRITE(bogeyman_paletteram_w) AM_SHARE("palette") - AM_RANGE(0x3800, 0x3800) AM_READ_PORT("P1") AM_WRITE(bogeyman_8910_control_w) - AM_RANGE(0x3801, 0x3801) AM_READ_PORT("P2") AM_WRITE(bogeyman_8910_latch_w) + AM_RANGE(0x3000, 0x300f) AM_RAM_WRITE(paletteram_w) AM_SHARE("palette") + AM_RANGE(0x3800, 0x3800) AM_READ_PORT("P1") AM_WRITE(ay8910_control_w) + AM_RANGE(0x3801, 0x3801) AM_READ_PORT("P2") AM_WRITE(ay8910_latch_w) AM_RANGE(0x3802, 0x3802) AM_READ_PORT("DSW1") AM_RANGE(0x3803, 0x3803) AM_READ_PORT("DSW2") AM_WRITENOP // ??? sound AM_RANGE(0x4000, 0xffff) AM_ROM @@ -205,15 +204,17 @@ void bogeyman_state::machine_start() { save_item(NAME(m_psg_latch)); save_item(NAME(m_last_write)); + save_item(NAME(m_colbank)); } void bogeyman_state::machine_reset() { m_psg_latch = 0; m_last_write = 0; + m_colbank = 0; } -WRITE8_MEMBER(bogeyman_state::bogeyman_colbank_w) +WRITE8_MEMBER(bogeyman_state::colbank_w) { if((data & 1) != (m_colbank & 1)) { @@ -237,7 +238,7 @@ static MACHINE_CONFIG_START( bogeyman, bogeyman_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) - MCFG_SCREEN_UPDATE_DRIVER(bogeyman_state, screen_update_bogeyman) + MCFG_SCREEN_UPDATE_DRIVER(bogeyman_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", bogeyman) @@ -249,7 +250,7 @@ static MACHINE_CONFIG_START( bogeyman, bogeyman_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("ay1", AY8910, 1500000) /* Verified */ - MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(bogeyman_state, bogeyman_colbank_w)) + MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(bogeyman_state, colbank_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) MCFG_SOUND_ADD("ay2", AY8910, 1500000) /* Verified */ diff --git a/src/mame/drivers/hikaru.c b/src/mame/drivers/hikaru.c index d7199755e6f..5d6c98001a5 100644 --- a/src/mame/drivers/hikaru.c +++ b/src/mame/drivers/hikaru.c @@ -738,6 +738,11 @@ ROM_START( sgnascar ) ROM_LOAD32_WORD( "mpr-23483.ic32", 0xc000002, 0x1000000, CRC(c37adebe) SHA1(e84f6d2cc364c743f7f3b73d8c8d0271952bb093) ) ROM_LOAD32_WORD( "mpr-23480.ic33", 0xe000000, 0x1000000, CRC(f517b8b3) SHA1(c04740adb612473c4c9f8186e7e93d2f73d1bb1a) ) ROM_LOAD32_WORD( "mpr-23484.ic34", 0xe000002, 0x1000000, CRC(2ebe1aa1) SHA1(16b39f7422da1a334dde27169c2949e1d95bddb3) ) + + // 317-0283-COM Actel A54SX32 + // ID 0x4252 + ROM_REGION( 4, "rom_key", 0 ) + ROM_LOAD( "sgnascar-key.bin", 0x000000, 0x000004, CRC(f1452f9e) SHA1(86fb0f278a2eb0aba66a24032fb683f7a516b32b) ) ROM_END GAME( 2000, hikaru, 0, hikaru, hikaru, driver_device, 0, ROT0, "Sega", "Hikaru Bios", GAME_NO_SOUND|GAME_NOT_WORKING|GAME_IS_BIOS_ROOT ) diff --git a/src/mame/drivers/m58.c b/src/mame/drivers/m58.c index 88d6296b1d7..c6708512702 100644 --- a/src/mame/drivers/m58.c +++ b/src/mame/drivers/m58.c @@ -26,15 +26,15 @@ static ADDRESS_MAP_START( yard_map, AS_PROGRAM, 8, m58_state ) AM_RANGE(0x0000, 0x5fff) AM_ROM - AM_RANGE(0x8000, 0x8fff) AM_RAM_WRITE(yard_videoram_w) AM_SHARE("videoram") - AM_RANGE(0x9000, 0x9fff) AM_WRITE(yard_scroll_panel_w) + AM_RANGE(0x8000, 0x8fff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") + AM_RANGE(0x9000, 0x9fff) AM_WRITE(scroll_panel_w) AM_RANGE(0xc820, 0xc87f) AM_RAM AM_SHARE("spriteram") AM_RANGE(0xa000, 0xa000) AM_RAM AM_SHARE("scroll_x_low") AM_RANGE(0xa200, 0xa200) AM_RAM AM_SHARE("scroll_x_high") AM_RANGE(0xa400, 0xa400) AM_RAM AM_SHARE("scroll_y_low") AM_RANGE(0xa800, 0xa800) AM_RAM AM_SHARE("score_disable") AM_RANGE(0xd000, 0xd000) AM_DEVWRITE("irem_audio", irem_audio_device, cmd_w) - AM_RANGE(0xd001, 0xd001) AM_WRITE(yard_flipscreen_w) /* + coin counters */ + AM_RANGE(0xd001, 0xd001) AM_WRITE(flipscreen_w) /* + coin counters */ AM_RANGE(0xd000, 0xd000) AM_READ_PORT("IN0") AM_RANGE(0xd001, 0xd001) AM_READ_PORT("IN1") AM_RANGE(0xd002, 0xd002) AM_READ_PORT("IN2") @@ -203,7 +203,7 @@ static MACHINE_CONFIG_START( yard, m58_state ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/3, 384, 0, 256, 282, 42, 266) - MCFG_SCREEN_UPDATE_DRIVER(m58_state, screen_update_yard) + MCFG_SCREEN_UPDATE_DRIVER(m58_state, screen_update) MCFG_SCREEN_PALETTE("palette") /* sound hardware */ diff --git a/src/mame/drivers/mappy.c b/src/mame/drivers/mappy.c index 6c2516170cc..8440da0b48a 100644 --- a/src/mame/drivers/mappy.c +++ b/src/mame/drivers/mappy.c @@ -2462,7 +2462,7 @@ GAME( 1984, grobda3, grobda, grobda, grobda, mappy_state, grobda, ROT90 /* 3x6809, static tilemap, 2bpp sprites (Gaplus type) */ GAME( 1983, phozon, 0, phozon, phozon, mappy_state, phozon, ROT90, "Namco", "Phozon (Japan)", GAME_SUPPORTS_SAVE ) -GAME( 1983, phozons, phozon, phozon, phozon, mappy_state, phozon, ROT90, "bootleg? (Sidam)", "Phozon (Sidam)", GAME_SUPPORTS_SAVE ) +GAME( 1983, phozons, phozon, phozon, phozon, mappy_state, phozon, ROT90, "Namco (Sidam license)", "Phozon (Sidam)", GAME_SUPPORTS_SAVE ) /* 2x6809, scroling tilemap, 4bpp sprites (Super Pacman type) */ GAME( 1983, mappy, 0, mappy, mappy, mappy_state, mappy, ROT90, "Namco", "Mappy (US)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/pacman.c b/src/mame/drivers/pacman.c index 0e510864c13..66fb72143f4 100644 --- a/src/mame/drivers/pacman.c +++ b/src/mame/drivers/pacman.c @@ -6616,6 +6616,11 @@ DRIVER_INIT_MEMBER(pacman_state,mspacman) membank("bank1")->set_entry(1); } +DRIVER_INIT_MEMBER(pacman_state, mschamp) +{ + save_item(NAME(m_counter)); +} + DRIVER_INIT_MEMBER(pacman_state,woodpek) { int i, len; @@ -6844,8 +6849,8 @@ GAME( 1981, mspacii, mspacman, woodpek, mspacman, pacman_state, mspacii, ROT GAME( 1981, mspacii2, mspacman, woodpek, mspacman, pacman_state, mspacii, ROT90, "bootleg (Orca)", "Ms. Pac-Man II (Orca bootleg set 2)", GAME_SUPPORTS_SAVE ) GAME( 1981, pacgal, mspacman, woodpek, mspacman, driver_device, 0, ROT90, "hack", "Pac-Gal", GAME_SUPPORTS_SAVE ) GAME( 1981, mspacpls, mspacman, woodpek, mspacpls, driver_device, 0, ROT90, "hack", "Ms. Pac-Man Plus", GAME_SUPPORTS_SAVE ) -GAME( 1992, mschamp, mspacman, mschamp, mschamp, driver_device, 0, ROT90, "hack", "Ms. Pacman Champion Edition / Zola-Puc Gal", GAME_SUPPORTS_SAVE ) /* Rayglo version */ -GAME( 1995, mschamps, mspacman, mschamp, mschamp, driver_device, 0, ROT90, "hack", "Ms. Pacman Champion Edition / Super Zola-Puc Gal", GAME_SUPPORTS_SAVE ) +GAME( 1992, mschamp, mspacman, mschamp, mschamp, pacman_state, mschamp, ROT90, "hack", "Ms. Pacman Champion Edition / Zola-Puc Gal", GAME_SUPPORTS_SAVE ) /* Rayglo version */ +GAME( 1995, mschamps, mspacman, mschamp, mschamp, pacman_state, mschamp, ROT90, "hack", "Ms. Pacman Champion Edition / Super Zola-Puc Gal", GAME_SUPPORTS_SAVE ) // These bootlegs have MADE IN GREECE clearly visible and etched into the PCBs. They were very common in Spain with several operators having their own versions. // Based on the PCBs and copyright dates shown they were produced late 80s / early 90s. Usually they run a version of Ms. Pacman, but were sometimes converted back to regular Pac-Man diff --git a/src/mame/includes/bogeyman.h b/src/mame/includes/bogeyman.h index 1f2f6b2f497..46e65975120 100644 --- a/src/mame/includes/bogeyman.h +++ b/src/mame/includes/bogeyman.h @@ -4,20 +4,31 @@ *************************************************************************/ +#include "sound/ay8910.h" + class bogeyman_state : public driver_device { public: bogeyman_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), + m_ay1(*this, "ay1"), + m_ay2(*this, "ay2"), m_videoram(*this, "videoram"), m_videoram2(*this, "videoram2"), m_colorram(*this, "colorram"), m_colorram2(*this, "colorram2"), - m_spriteram(*this, "spriteram"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - + m_spriteram(*this, "spriteram") { } + + /* devices */ + required_device m_maincpu; + required_device m_gfxdecode; + required_device m_palette; + required_device m_ay1; + required_device m_ay2; + /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_videoram2; @@ -34,23 +45,24 @@ public: int m_psg_latch; int m_last_write; int m_colbank; - DECLARE_WRITE8_MEMBER(bogeyman_8910_latch_w); - DECLARE_WRITE8_MEMBER(bogeyman_8910_control_w); - DECLARE_WRITE8_MEMBER(bogeyman_videoram_w); - DECLARE_WRITE8_MEMBER(bogeyman_colorram_w); - DECLARE_WRITE8_MEMBER(bogeyman_videoram2_w); - DECLARE_WRITE8_MEMBER(bogeyman_colorram2_w); - DECLARE_WRITE8_MEMBER(bogeyman_paletteram_w); - DECLARE_WRITE8_MEMBER(bogeyman_colbank_w); + + DECLARE_WRITE8_MEMBER(ay8910_latch_w); + DECLARE_WRITE8_MEMBER(ay8910_control_w); + DECLARE_WRITE8_MEMBER(videoram_w); + DECLARE_WRITE8_MEMBER(colorram_w); + DECLARE_WRITE8_MEMBER(videoram2_w); + DECLARE_WRITE8_MEMBER(colorram2_w); + DECLARE_WRITE8_MEMBER(paletteram_w); + DECLARE_WRITE8_MEMBER(colbank_w); + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); + DECLARE_PALETTE_INIT(bogeyman); - UINT32 screen_update_bogeyman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/includes/m58.h b/src/mame/includes/m58.h index 83b9d2a92f9..08e33088ff9 100644 --- a/src/mame/includes/m58.h +++ b/src/mame/includes/m58.h @@ -3,42 +3,47 @@ class m58_state : public driver_device public: m58_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), - m_spriteram(*this, "spriteram"), - m_yard_scroll_x_low(*this, "scroll_x_low"), - m_yard_scroll_x_high(*this, "scroll_x_high"), - m_yard_scroll_y_low(*this, "scroll_y_low"), - m_yard_score_panel_disabled(*this, "score_disable"), m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette") { } - - /* memory pointers */ - required_shared_ptr m_videoram; - required_shared_ptr m_spriteram; - - /* video-related */ - tilemap_t* m_bg_tilemap; - - required_shared_ptr m_yard_scroll_x_low; - required_shared_ptr m_yard_scroll_x_high; - required_shared_ptr m_yard_scroll_y_low; - required_shared_ptr m_yard_score_panel_disabled; - bitmap_ind16 *m_scroll_panel_bitmap; - DECLARE_WRITE8_MEMBER(yard_videoram_w); - DECLARE_WRITE8_MEMBER(yard_scroll_panel_w); - DECLARE_WRITE8_MEMBER(yard_flipscreen_w); - DECLARE_DRIVER_INIT(yard85); - TILE_GET_INFO_MEMBER(yard_get_bg_tile_info); - TILEMAP_MAPPER_MEMBER(yard_tilemap_scan_rows); - virtual void video_start(); - DECLARE_PALETTE_INIT(m58); - UINT32 screen_update_yard(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); - void draw_panel( bitmap_ind16 &bitmap, const rectangle &cliprect ); + m_palette(*this, "palette"), + m_videoram(*this, "videoram"), + m_spriteram(*this, "spriteram"), + m_scroll_x_low(*this, "scroll_x_low"), + m_scroll_x_high(*this, "scroll_x_high"), + m_scroll_y_low(*this, "scroll_y_low"), + m_score_panel_disabled(*this, "score_disable") { } + + /* devices */ required_device m_maincpu; required_device m_gfxdecode; required_device m_screen; required_device m_palette; + + /* memory pointers */ + required_shared_ptr m_videoram; + required_shared_ptr m_spriteram; + required_shared_ptr m_scroll_x_low; + required_shared_ptr m_scroll_x_high; + required_shared_ptr m_scroll_y_low; + required_shared_ptr m_score_panel_disabled; + + /* video-related */ + tilemap_t* m_bg_tilemap; + bitmap_ind16 m_scroll_panel_bitmap; + + DECLARE_WRITE8_MEMBER(videoram_w); + DECLARE_WRITE8_MEMBER(scroll_panel_w); + DECLARE_WRITE8_MEMBER(flipscreen_w); + + DECLARE_DRIVER_INIT(yard85); + virtual void video_start(); + DECLARE_PALETTE_INIT(m58); + + TILE_GET_INFO_MEMBER(get_bg_tile_info); + TILEMAP_MAPPER_MEMBER(tilemap_scan_rows); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); + void draw_panel( bitmap_ind16 &bitmap, const rectangle &cliprect ); }; diff --git a/src/mame/includes/pacman.h b/src/mame/includes/pacman.h index 999a5222c22..b21721dbb46 100644 --- a/src/mame/includes/pacman.h +++ b/src/mame/includes/pacman.h @@ -125,6 +125,7 @@ public: DECLARE_DRIVER_INIT(8bpm); DECLARE_DRIVER_INIT(porky); DECLARE_DRIVER_INIT(mspacman); + DECLARE_DRIVER_INIT(mschamp); TILEMAP_MAPPER_MEMBER(pacman_scan_rows); TILE_GET_INFO_MEMBER(pacman_get_tile_info); TILE_GET_INFO_MEMBER(s2650_get_tile_info); diff --git a/src/mame/video/bogeyman.c b/src/mame/video/bogeyman.c index ea605ebb2c9..c2ef0d14024 100644 --- a/src/mame/video/bogeyman.c +++ b/src/mame/video/bogeyman.c @@ -36,31 +36,31 @@ PALETTE_INIT_MEMBER(bogeyman_state, bogeyman) } } -WRITE8_MEMBER(bogeyman_state::bogeyman_videoram_w) +WRITE8_MEMBER(bogeyman_state::videoram_w) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(bogeyman_state::bogeyman_colorram_w) +WRITE8_MEMBER(bogeyman_state::colorram_w) { m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(bogeyman_state::bogeyman_videoram2_w) +WRITE8_MEMBER(bogeyman_state::videoram2_w) { m_videoram2[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(bogeyman_state::bogeyman_colorram2_w) +WRITE8_MEMBER(bogeyman_state::colorram2_w) { m_colorram2[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(bogeyman_state::bogeyman_paletteram_w) +WRITE8_MEMBER(bogeyman_state::paletteram_w) { /* RGB output is inverted */ m_palette->write(space, offset, UINT8(~data)); @@ -94,11 +94,9 @@ void bogeyman_state::video_start() m_fg_tilemap->set_transparent_pen(0); } -void bogeyman_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ) +void bogeyman_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) { - int offs; - - for (offs = 0; offs < m_spriteram.bytes(); offs += 4) + for (int offs = 0; offs < m_spriteram.bytes(); offs += 4) { int attr = m_spriteram[offs]; @@ -139,7 +137,7 @@ void bogeyman_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipre } } -UINT32 bogeyman_state::screen_update_bogeyman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 bogeyman_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); draw_sprites(bitmap, cliprect); diff --git a/src/mame/video/m58.c b/src/mame/video/m58.c index 8da503c3369..6f7dd9c03be 100644 --- a/src/mame/video/m58.c +++ b/src/mame/video/m58.c @@ -102,14 +102,14 @@ PALETTE_INIT_MEMBER(m58_state, m58) * *************************************/ -WRITE8_MEMBER(m58_state::yard_videoram_w) +WRITE8_MEMBER(m58_state::videoram_w) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset / 2); } -WRITE8_MEMBER(m58_state::yard_scroll_panel_w) +WRITE8_MEMBER(m58_state::scroll_panel_w) { int sx,sy,i; @@ -128,7 +128,7 @@ WRITE8_MEMBER(m58_state::yard_scroll_panel_w) col = (data >> i) & 0x11; col = ((col >> 3) | col) & 3; - m_scroll_panel_bitmap->pix16(sy, sx + i) = RADAR_PALETTE_BASE + (sy & 0xfc) + col; + m_scroll_panel_bitmap.pix16(sy, sx + i) = RADAR_PALETTE_BASE + (sy & 0xfc) + col; } } @@ -140,7 +140,7 @@ WRITE8_MEMBER(m58_state::yard_scroll_panel_w) * *************************************/ -TILE_GET_INFO_MEMBER(m58_state::yard_get_bg_tile_info) +TILE_GET_INFO_MEMBER(m58_state::get_bg_tile_info) { int offs = tile_index * 2; int attr = m_videoram[offs + 1]; @@ -152,7 +152,7 @@ TILE_GET_INFO_MEMBER(m58_state::yard_get_bg_tile_info) } -TILEMAP_MAPPER_MEMBER(m58_state::yard_tilemap_scan_rows) +TILEMAP_MAPPER_MEMBER(m58_state::tilemap_scan_rows) { /* logical (col,row) -> memory offset */ if (col >= 32) @@ -175,11 +175,13 @@ void m58_state::video_start() int height = m_screen->height(); const rectangle &visarea = m_screen->visible_area(); - m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(m58_state::yard_get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(m58_state::yard_tilemap_scan_rows),this), 8, 8, 64, 32); + m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(m58_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(m58_state::tilemap_scan_rows),this), 8, 8, 64, 32); m_bg_tilemap->set_scrolldx(visarea.min_x, width - (visarea.max_x + 1)); m_bg_tilemap->set_scrolldy(visarea.min_y - 8, height + 16 - (visarea.max_y + 1)); - m_scroll_panel_bitmap = auto_bitmap_ind16_alloc(machine(), SCROLL_PANEL_WIDTH, height); + //m_scroll_panel_bitmap = auto_bitmap_ind16_alloc(machine(), SCROLL_PANEL_WIDTH, height); + m_screen->register_screen_bitmap(m_scroll_panel_bitmap); + save_item(NAME(m_scroll_panel_bitmap)); } @@ -190,7 +192,7 @@ void m58_state::video_start() * *************************************/ -WRITE8_MEMBER(m58_state::yard_flipscreen_w) +WRITE8_MEMBER(m58_state::flipscreen_w) { /* screen flip is handled both by software and hardware */ flip_screen_set((data & 0x01) ^ (~ioport("DSW2")->read() & 0x01)); @@ -265,7 +267,7 @@ void m58_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ) void m58_state::draw_panel( bitmap_ind16 &bitmap, const rectangle &cliprect ) { - if (!*m_yard_score_panel_disabled) + if (!*m_score_panel_disabled) { const rectangle clippanel(26*8, 32*8-1, 1*8, 31*8-1); const rectangle clippanelflip(0*8, 6*8-1, 1*8, 31*8-1); @@ -278,7 +280,7 @@ void m58_state::draw_panel( bitmap_ind16 &bitmap, const rectangle &cliprect ) clip.max_y += visarea.max_y + yoffs; clip &= cliprect; - copybitmap(bitmap, *m_scroll_panel_bitmap, flip_screen(), flip_screen(), + copybitmap(bitmap, m_scroll_panel_bitmap, flip_screen(), flip_screen(), sx, visarea.min_y + yoffs, clip); } } @@ -291,10 +293,10 @@ void m58_state::draw_panel( bitmap_ind16 &bitmap, const rectangle &cliprect ) * *************************************/ -UINT32 m58_state::screen_update_yard(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 m58_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - m_bg_tilemap->set_scrollx(0, (*m_yard_scroll_x_high * 0x100) + *m_yard_scroll_x_low); - m_bg_tilemap->set_scrolly(0, *m_yard_scroll_y_low); + m_bg_tilemap->set_scrollx(0, (*m_scroll_x_high * 0x100) + *m_scroll_x_low); + m_bg_tilemap->set_scrolly(0, *m_scroll_y_low); m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); draw_sprites(bitmap, cliprect); diff --git a/src/mess/drivers/ngen.c b/src/mess/drivers/ngen.c index 9bfbf0120c2..ab2d3249c0f 100644 --- a/src/mess/drivers/ngen.c +++ b/src/mess/drivers/ngen.c @@ -67,9 +67,11 @@ #include "machine/pit8253.h" #include "machine/z80dart.h" #include "machine/wd_fdc.h" +#include "machine/wd2010.h" #include "bus/rs232/rs232.h" #include "machine/ngen_kb.h" #include "machine/clock.h" +#include "imagedev/harddriv.h" class ngen_state : public driver_device { @@ -89,7 +91,9 @@ public: m_fdc(*this,"fdc"), m_fd0(*this,"fdc:0"), m_fdc_timer(*this,"fdc_timer"), - m_hdc_timer(*this,"hdc_timer") + m_hdc(*this,"hdc"), + m_hdc_timer(*this,"hdc_timer"), + m_hd_buffer(*this,"hd_buffer_ram") {} DECLARE_WRITE_LINE_MEMBER(pit_out0_w); @@ -129,9 +133,12 @@ public: DECLARE_READ8_MEMBER(irq_cb); DECLARE_WRITE8_MEMBER(hdc_control_w); DECLARE_WRITE8_MEMBER(disk_addr_ext); + DECLARE_READ8_MEMBER(hd_buffer_r); + DECLARE_WRITE8_MEMBER(hd_buffer_w); protected: virtual void machine_reset(); + virtual void machine_start(); private: required_device m_maincpu; @@ -147,7 +154,9 @@ private: optional_device m_fdc; optional_device m_fd0; optional_device m_fdc_timer; + optional_device m_hdc; optional_device m_hdc_timer; + optional_shared_ptr m_hd_buffer; void set_dma_channel(int channel, int state); @@ -470,7 +479,7 @@ WRITE16_MEMBER(ngen_state::hfd_w) case 0x0a: case 0x0b: if(mem_mask & 0x00ff) - m_fdc_timer->write(space,offset,data & 0xff); + m_fdc_timer->write(space,offset-0x08,data & 0xff); break; case 0x10: case 0x11: @@ -480,6 +489,8 @@ WRITE16_MEMBER(ngen_state::hfd_w) case 0x15: case 0x16: case 0x17: + if(mem_mask & 0x00ff) + m_hdc->write(space,offset-0x10,data & 0xff); logerror("WD1010 register %i write %02x mask %04x\n",offset-0x10,data & 0xff,mem_mask); break; case 0x18: @@ -487,7 +498,7 @@ WRITE16_MEMBER(ngen_state::hfd_w) case 0x1a: case 0x1b: if(mem_mask & 0x00ff) - m_hdc_timer->write(space,offset,data & 0xff); + m_hdc_timer->write(space,offset-0x18,data & 0xff); break; } } @@ -510,7 +521,7 @@ READ16_MEMBER(ngen_state::fhd_r) case 0x0a: case 0x0b: if(mem_mask & 0x00ff) - ret = m_fdc_timer->read(space,offset); + ret = m_fdc_timer->read(space,offset-0x08); break; case 0x10: case 0x11: @@ -520,6 +531,8 @@ READ16_MEMBER(ngen_state::fhd_r) case 0x15: case 0x16: case 0x17: + if(mem_mask & 0x00ff) + ret = m_hdc->read(space,offset-0x10); logerror("WD1010 register %i read, mask %04x\n",offset-0x10,mem_mask); break; case 0x18: @@ -527,7 +540,7 @@ READ16_MEMBER(ngen_state::fhd_r) case 0x1a: case 0x1b: if(mem_mask & 0x00ff) - ret = m_hdc_timer->read(space,offset); + ret = m_hdc_timer->read(space,offset-0x18); break; } @@ -585,6 +598,16 @@ WRITE8_MEMBER(ngen_state::disk_addr_ext) m_disk_page = data & 0x7f; } +READ8_MEMBER(ngen_state::hd_buffer_r) +{ + return m_hd_buffer[offset]; +} + +WRITE8_MEMBER(ngen_state::hd_buffer_w) +{ + m_hd_buffer[offset] = data; +} + WRITE_LINE_MEMBER( ngen_state::dma_hrq_changed ) { m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); @@ -603,7 +626,7 @@ WRITE_LINE_MEMBER( ngen_state::dma_eop_changed ) { if(state) { - if(m_hdc_control & 0x04) // ROM transfer? + if(m_hdc_control & 0x04) // ROM transfer m_hdc_control &= ~0x04; // switch it off when done } } @@ -689,6 +712,11 @@ READ8_MEMBER( ngen_state::irq_cb ) return m_pic->acknowledge(); } +void ngen_state::machine_start() +{ + m_hd_buffer.allocate(1024*8); // 8kB buffer RAM for HD controller +} + void ngen_state::machine_reset() { m_port00 = 0; @@ -837,15 +865,25 @@ static MACHINE_CONFIG_START( ngen, ngen_state ) MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu",i80186_cpu_device,drq1_w)) MCFG_WD_FDC_FORCE_READY MCFG_DEVICE_ADD("fdc_timer", PIT8253, 0) - MCFG_PIT8253_CLK0(XTAL_20MHz / 20) - MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic",pic8259_device,ir7_w)) + MCFG_PIT8253_CLK0(XTAL_20MHz / 20) + MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic",pic8259_device,ir7_w)) // clocked on FDC data register access MCFG_PIT8253_CLK1(XTAL_20MHz / 20) - MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("pic",pic8259_device,ir7_w)) - MCFG_PIT8253_CLK2(XTAL_20MHz / 20) - MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic",pic8259_device,ir7_w)) - // TODO: WD1010 HDC (not implemented) + MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("pic",pic8259_device,ir7_w)) // 1MHz + MCFG_PIT8253_CLK2(XTAL_20MHz / 10) + MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic",pic8259_device,ir7_w)) + // TODO: WD1010 HDC (not implemented), use WD2010 for now + MCFG_DEVICE_ADD("hdc", WD2010, XTAL_20MHz / 4) + MCFG_WD2010_IN_BCS_CB(READ8(ngen_state,hd_buffer_r)) + MCFG_WD2010_OUT_BCS_CB(WRITE8(ngen_state,hd_buffer_w)) + MCFG_WD2010_IN_DRDY_CB(VCC) + MCFG_WD2010_IN_INDEX_CB(VCC) + MCFG_WD2010_IN_WF_CB(VCC) + MCFG_WD2010_IN_TK000_CB(VCC) + MCFG_WD2010_IN_SC_CB(VCC) MCFG_DEVICE_ADD("hdc_timer", PIT8253, 0) + MCFG_PIT8253_CLK2(XTAL_20MHz / 10) // 2MHz MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525qd", floppy_image_device::default_floppy_formats) + MCFG_HARDDISK_ADD("hard0") MACHINE_CONFIG_END diff --git a/src/mess/drivers/pasogo.c b/src/mess/drivers/pasogo.c index c2ad1c0218a..99f83dc1abf 100644 --- a/src/mess/drivers/pasogo.c +++ b/src/mess/drivers/pasogo.c @@ -679,8 +679,10 @@ INTERRUPT_GEN_MEMBER(pasogo_state::pasogo_interrupt) void pasogo_state::machine_reset() { astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG)); m_maincpu_rom = memregion("maincpu"); + m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG)); + if (!m_cart_rom) // this should never happen, since we make carts mandatory! + m_cart_rom = memregion("maincpu"); membank("bank27")->set_base(m_cart_rom->base()); membank("bank28")->set_base(m_maincpu_rom->base() + 0xb8000/*?*/); diff --git a/src/mess/drivers/splitsec.c b/src/mess/drivers/splitsec.c index 30ed07f08cf..05a4d70149a 100644 --- a/src/mess/drivers/splitsec.c +++ b/src/mess/drivers/splitsec.c @@ -4,8 +4,21 @@ Parker Brothers Split Second * TMS1400NLL MP7314-N2 (die labeled MP7314) + + This is an electronic handheld reflex gaming device, it's straightforward + to use. The included mini-games are: + 1, 2, 3: Mad Maze* + 4, 5: Space Attack* + 6: Auto Cross + 7: Stomp + 8: Speedball + + *: higher number indicates harder difficulty + TODO: + - MCU clock is unknown + ***************************************************************************/ #include "emu.h" @@ -14,9 +27,13 @@ #include "splitsec.lh" -// master clock is a single stage RC oscillator: R=24K, C=100pf, -// according to the TMS 1000 series data manual this is around 375kHz -#define MASTER_CLOCK (375000) +// The master clock is a single stage RC oscillator: R=24K, C=100pf, +// according to the TMS 1000 series data manual this is around 375kHz. +// However, this sounds too low-pitched and runs too slow when compared +// to recordings, maybe the RC osc curve is different for TMS1400? + +// so for now, the value below is an approximation +#define MASTER_CLOCK (485000) class splitsec_state : public driver_device @@ -160,13 +177,13 @@ WRITE16_MEMBER(splitsec_state::write_o) static INPUT_PORTS_START( splitsec ) PORT_START("IN.0") // R9 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.1") // R10 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Select") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) @@ -230,7 +247,7 @@ MACHINE_CONFIG_END ROM_START( splitsec ) ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD( "tms1400nll_mp7314", 0x0000, 0x1000, CRC(0cccdf59) SHA1(06a533134a433aaf856b80f0ca239d0498b98d5f) ) + ROM_LOAD( "tms1400nll_mp7314", 0x0000, 0x1000, CRC(e94b2098) SHA1(f0fc1f56a829252185592a2508740354c50bedf8) ) ROM_REGION( 867, "maincpu:mpla", 0 ) ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) @@ -239,4 +256,4 @@ ROM_START( splitsec ) ROM_END -CONS( 1980, splitsec, 0, 0, splitsec, splitsec, driver_device, 0, "Parker Brothers", "Split Second", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) +CONS( 1980, splitsec, 0, 0, splitsec, splitsec, driver_device, 0, "Parker Brothers", "Split Second", GAME_SUPPORTS_SAVE ) diff --git a/src/mess/layout/splitsec.lay b/src/mess/layout/splitsec.lay index a6151599d87..80bc61a60ab 100644 --- a/src/mess/layout/splitsec.lay +++ b/src/mess/layout/splitsec.lay @@ -25,69 +25,69 @@ - - - + + + - - - + + + - - - + + + - + - + - - - + + + - - - + + + - + - + - - - + + + - - - + + + - + - + - - - + + + - - - + + + - + - + - - - - - - - + + + + + + + - - - + + + diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c index 5954bb90682..8c692622488 100644 --- a/src/mess/machine/amstrad.c +++ b/src/mess/machine/amstrad.c @@ -2842,7 +2842,7 @@ void amstrad_state::enumerate_roms() int i; bool slot3 = false,slot7 = false; - if(m_system_type == SYSTEM_PLUS || m_system_type == SYSTEM_GX4000) + if (m_system_type == SYSTEM_PLUS || m_system_type == SYSTEM_GX4000) { UINT8 *crt = m_region_cart->base(); int bank_mask = (m_cart->get_rom_size() / 0x4000) - 1; @@ -3034,6 +3034,8 @@ MACHINE_START_MEMBER(amstrad_state,plus) astring region_tag; m_region_cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG)); + if (!m_region_cart) // this should never happen, since we make carts mandatory! + m_region_cart = memregion("maincpu"); } @@ -3076,6 +3078,8 @@ MACHINE_START_MEMBER(amstrad_state,gx4000) astring region_tag; m_region_cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG)); + if (!m_region_cart) // this should never happen, since we make carts mandatory! + m_region_cart = memregion("maincpu"); } MACHINE_RESET_MEMBER(amstrad_state,gx4000)