diff --git a/src/mame/drivers/gameplan.cpp b/src/mame/drivers/gameplan.cpp index fbb59b0cd2b..4659a5134e8 100644 --- a/src/mame/drivers/gameplan.cpp +++ b/src/mame/drivers/gameplan.cpp @@ -930,7 +930,7 @@ INPUT_PORTS_END * *************************************/ -MACHINE_START_MEMBER(gameplan_state,gameplan) +void gameplan_state::machine_start() { /* register for save states */ save_item(NAME(m_current_port)); @@ -938,13 +938,10 @@ MACHINE_START_MEMBER(gameplan_state,gameplan) save_item(NAME(m_video_y)); save_item(NAME(m_video_command)); save_item(NAME(m_video_data)); - - /* this is needed for trivia quest */ - m_via_0->write_pb5(1); } -MACHINE_RESET_MEMBER(gameplan_state,gameplan) +void gameplan_state::machine_reset() { m_current_port = 0; m_video_x = 0; diff --git a/src/mame/drivers/jr100.cpp b/src/mame/drivers/jr100.cpp index f7758b8786f..3e750b71a52 100644 --- a/src/mame/drivers/jr100.cpp +++ b/src/mame/drivers/jr100.cpp @@ -65,6 +65,8 @@ TODO: #include "speaker.h" +namespace { + class jr100_state : public driver_device { public: @@ -80,16 +82,19 @@ public: , m_region_maincpu(*this, "maincpu") , m_io_keyboard(*this, "LINE%u", 0) , m_maincpu(*this, "maincpu") + , m_sound_timer(nullptr) { } void jr100(machine_config &config); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + private: uint8_t m_keyboard_line; bool m_use_pcg; bool m_pb7; - virtual void machine_start() override; - virtual void machine_reset() override; uint32_t screen_update_jr100(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(sound_tick); uint8_t pb_r(); @@ -422,6 +427,9 @@ ROM_START( jr100u ) ROM_LOAD( "jr100u.ic5", 0x0000, 0x2000, CRC(f589dd8d) SHA1(78a51f2ae055bf4dc1b0887a6277f5dbbd8ba512)) ROM_END +} // Anonymous namespace + + /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS diff --git a/src/mame/drivers/model1.cpp b/src/mame/drivers/model1.cpp index 4a3244a53b5..6ba2ea2148e 100644 --- a/src/mame/drivers/model1.cpp +++ b/src/mame/drivers/model1.cpp @@ -867,6 +867,9 @@ void model1_state::machine_reset() irq_init(); copro_reset(); + m_irq_status = 0; + m_last_irq = 0; + if (!strcmp(machine().system().name, "swa") || !strcmp(machine().system().name, "swaj")) { diff --git a/src/mame/drivers/opwolf.cpp b/src/mame/drivers/opwolf.cpp index 36337783bbf..67cb7cb239e 100644 --- a/src/mame/drivers/opwolf.cpp +++ b/src/mame/drivers/opwolf.cpp @@ -271,11 +271,6 @@ register. So what is controlling priority. ***************************************************************************/ -/* Define clocks based on actual OSC on the PCB */ - -#define CPU_CLOCK (XTAL(16'000'000) / 2) /* clock for 68000 */ -#define SOUND_CPU_CLOCK (XTAL(8'000'000) / 2) /* clock for Z80 sound CPU */ - #include "emu.h" #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" @@ -292,6 +287,13 @@ register. So what is controlling priority. #include "speaker.h" +namespace { + +/* Define clocks based on actual OSC on the PCB */ + +#define CPU_CLOCK (XTAL(16'000'000) / 2) /* clock for 68000 */ +#define SOUND_CPU_CLOCK (XTAL(8'000'000) / 2) /* clock for Z80 sound CPU */ + //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -326,6 +328,7 @@ public: protected: virtual void machine_start() override; + virtual void machine_reset() override; private: uint16_t cchip_r(offs_t offset); @@ -341,7 +344,6 @@ private: INTERRUPT_GEN_MEMBER(interrupt); TIMER_DEVICE_CALLBACK_MEMBER(cchip_irq_clear_cb); - DECLARE_MACHINE_RESET(opwolf); void opwolf_colpri_cb(u32 &sprite_colbank, u32 &pri_mask, u16 sprite_ctrl); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void opwolf_msm5205_vck(msm5205_device *device, int chip); @@ -847,7 +849,7 @@ void opwolf_state::machine_start() save_item(NAME(m_adpcm_end)); } -MACHINE_RESET_MEMBER(opwolf_state,opwolf) +void opwolf_state::machine_reset() { m_adpcm_b[0] = m_adpcm_b[1] = 0; m_adpcm_c[0] = m_adpcm_c[1] = 0; @@ -910,8 +912,6 @@ void opwolf_state::opwolf(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); /* 10 CPU slices per frame - enough for the sound CPU to read all commands */ - MCFG_MACHINE_RESET_OVERRIDE(opwolf_state,opwolf) - /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -1228,6 +1228,8 @@ ROM_START( opwolfb ) ROM_LOAD16_BYTE( "opwlfb.22", 0x60001, 0x10000, CRC(9228481f) SHA1(8160f919f5e6a347c915a2bd7488b488fe2401bc) ) ROM_END +} // Anonymous namespace + //************************************************************************** // SYSTEM DRIVERS diff --git a/src/mame/drivers/peyper.cpp b/src/mame/drivers/peyper.cpp index 24acee3f1d5..7add042009a 100644 --- a/src/mame/drivers/peyper.cpp +++ b/src/mame/drivers/peyper.cpp @@ -42,6 +42,8 @@ ToDo: #include "peyper.lh" +namespace { + class peyper_state : public genpin_class { public: @@ -60,6 +62,10 @@ public: void peyper(machine_config &config); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + private: uint8_t sw_r(); void col_w(uint8_t data); @@ -72,9 +78,6 @@ private: void p2a_w(uint8_t data) { } // more lamps void p2b_w(uint8_t data) { } // more lamps - virtual void machine_start() override; - virtual void machine_reset() override; - void peyper_io(address_map &map); void peyper_map(address_map &map); @@ -588,6 +591,9 @@ void peyper_state::machine_start() { genpin_class::machine_start(); + m_digit = 0; + std::fill(std::begin(m_disp_layout), std::end(m_disp_layout), 0); + m_leds.resolve(); m_dpl.resolve(); @@ -882,6 +888,8 @@ ROM_START(lancelot) ROM_LOAD("snd_u5.bin", 0x00000, 0x20000, CRC(bf141441) SHA1(630b852bb3bba0fcdae13ae548b1e9810bc64d7d)) ROM_END +} // Anonymous namespace + GAME( 1985, odin, 0, peyper, odin_dlx, peyper_state, init_odin, ROT0, "Peyper", "Odin", MACHINE_MECHANICAL | MACHINE_NOT_WORKING ) GAME( 1985, odin_dlx, 0, peyper, odin_dlx, peyper_state, init_odin, ROT0, "Sonic", "Odin De Luxe", MACHINE_MECHANICAL | MACHINE_NOT_WORKING ) GAME( 1986, solarwap, 0, peyper, solarwap, peyper_state, init_peyper, ROT0, "Sonic", "Solar Wars (Sonic)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/pinball2k.cpp b/src/mame/drivers/pinball2k.cpp index fe6160b1543..f99f1dbd9c4 100644 --- a/src/mame/drivers/pinball2k.cpp +++ b/src/mame/drivers/pinball2k.cpp @@ -30,6 +30,8 @@ #include "speaker.h" +namespace { + class pinball2k_state : public pcat_base_state { public: @@ -49,6 +51,11 @@ public: void init_mediagx(); void init_pinball2k(); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + private: required_shared_ptr m_main_ram; required_shared_ptr m_cga_ram; @@ -98,9 +105,6 @@ private: uint32_t port800_r(); void port800_w(uint32_t data); - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; uint32_t screen_update_mediagx(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_char(bitmap_rgb32 &bitmap, const rectangle &cliprect, gfx_element *gfx, int ch, int att, int x, int y); void draw_framebuffer(bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -583,6 +587,8 @@ INPUT_PORTS_END void pinball2k_state::machine_start() { + std::fill(std::begin(m_disp_ctrl_reg), std::end(m_disp_ctrl_reg), 0); + std::fill(std::begin(m_biu_ctrl_reg), std::end(m_biu_ctrl_reg), 0); } void pinball2k_state::machine_reset() @@ -703,6 +709,8 @@ ROM_START( rfmpbr2 ) ROM_LOAD("cga.chr", 0x00000, 0x01000, CRC(42009069) SHA1(ed08559ce2d7f97f68b9f540bddad5b6295294dd)) ROM_END +} // Anonymous namespace + /*****************************************************************************/ GAME( 1999, swe1pb, 0 , mediagx, mediagx, pinball2k_state, init_pinball2k, ROT0, "Midway", "Pinball 2000: Star Wars Episode 1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_MECHANICAL ) diff --git a/src/mame/drivers/poly.cpp b/src/mame/drivers/poly.cpp index 06d9be0e9cf..7b4245ddfd7 100644 --- a/src/mame/drivers/poly.cpp +++ b/src/mame/drivers/poly.cpp @@ -195,6 +195,7 @@ INPUT_PORTS_END void poly_state::machine_start() { + m_dat_bank = 0; } diff --git a/src/mame/drivers/trvquest.cpp b/src/mame/drivers/trvquest.cpp index e8a4c9db208..303ac7fc8b7 100644 --- a/src/mame/drivers/trvquest.cpp +++ b/src/mame/drivers/trvquest.cpp @@ -46,22 +46,22 @@ Notes: #include "speaker.h" -uint8_t gameplan_state::trvquest_question_r(offs_t offset) +uint8_t trvquest_state::question_r(offs_t offset) { - return memregion("questions")->base()[*m_trvquest_question * 0x2000 + offset]; + return m_questions_region[*m_question * 0x2000 + offset]; } -WRITE_LINE_MEMBER(gameplan_state::trvquest_coin_w) +WRITE_LINE_MEMBER(trvquest_state::coin_w) { machine().bookkeeping().coin_counter_w(0, ~state & 1); } -WRITE_LINE_MEMBER(gameplan_state::trvquest_misc_w) +WRITE_LINE_MEMBER(trvquest_state::misc_w) { // data & 1 -> led on/off ? } -void gameplan_state::cpu_map(address_map &map) +void trvquest_state::cpu_map(address_map &map) { map(0x0000, 0x1fff).ram().share("nvram"); // cmos ram map(0x2000, 0x27ff).ram(); // main ram @@ -71,8 +71,8 @@ void gameplan_state::cpu_map(address_map &map) map(0x3830, 0x3831).w("ay1", FUNC(ay8910_device::address_data_w)); map(0x3840, 0x3841).w("ay2", FUNC(ay8910_device::address_data_w)); map(0x3850, 0x3850).nopr(); //watchdog_reset_r ? - map(0x8000, 0x9fff).r(FUNC(gameplan_state::trvquest_question_r)); - map(0xa000, 0xa000).writeonly().share("trvquest_q"); + map(0x8000, 0x9fff).r(FUNC(trvquest_state::question_r)); + map(0xa000, 0xa000).writeonly().share(m_question); map(0xa000, 0xa000).nopr(); // bogus read from the game code when reads question roms map(0xb000, 0xffff).rom(); } @@ -152,36 +152,21 @@ static INPUT_PORTS_START( trvquest ) INPUT_PORTS_END -MACHINE_START_MEMBER(gameplan_state,trvquest) +void trvquest_state::machine_start() { - /* register for save states */ - save_item(NAME(m_video_x)); - save_item(NAME(m_video_y)); - save_item(NAME(m_video_command)); - save_item(NAME(m_video_data)); + gameplan_state::machine_start(); - /* this is needed for trivia quest */ m_via_0->write_pb5(1); } -MACHINE_RESET_MEMBER(gameplan_state,trvquest) -{ - m_video_x = 0; - m_video_y = 0; - m_video_command = 0; - m_video_data = 0; -} -void gameplan_state::trvquest(machine_config &config) +void trvquest_state::trvquest(machine_config &config) { M6809(config, m_maincpu, XTAL(6'000'000)/4); - m_maincpu->set_addrmap(AS_PROGRAM, &gameplan_state::cpu_map); + m_maincpu->set_addrmap(AS_PROGRAM, &trvquest_state::cpu_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); - MCFG_MACHINE_START_OVERRIDE(gameplan_state,trvquest) - MCFG_MACHINE_RESET_OVERRIDE(gameplan_state,trvquest) - /* video hardware */ trvquest_video(config); @@ -193,20 +178,20 @@ void gameplan_state::trvquest(machine_config &config) /* via */ VIA6522(config, m_via_0, XTAL(6'000'000)/4); - m_via_0->writepa_handler().set(FUNC(gameplan_state::video_data_w)); - m_via_0->writepb_handler().set(FUNC(gameplan_state::gameplan_video_command_w)); - m_via_0->ca2_handler().set(FUNC(gameplan_state::video_command_trigger_w)); + m_via_0->writepa_handler().set(FUNC(trvquest_state::video_data_w)); + m_via_0->writepb_handler().set(FUNC(trvquest_state::gameplan_video_command_w)); + m_via_0->ca2_handler().set(FUNC(trvquest_state::video_command_trigger_w)); VIA6522(config, m_via_1, XTAL(6'000'000)/4); m_via_1->readpa_handler().set_ioport("IN0"); m_via_1->readpb_handler().set_ioport("IN1"); - m_via_1->ca2_handler().set(FUNC(gameplan_state::trvquest_coin_w)); + m_via_1->ca2_handler().set(FUNC(trvquest_state::coin_w)); VIA6522(config, m_via_2, XTAL(6'000'000)/4); m_via_2->readpa_handler().set_ioport("UNK"); m_via_2->readpb_handler().set_ioport("DSW"); - m_via_2->ca2_handler().set(FUNC(gameplan_state::trvquest_misc_w)); - m_via_2->irq_handler().set(FUNC(gameplan_state::via_irq)); + m_via_2->ca2_handler().set(FUNC(trvquest_state::misc_w)); + m_via_2->irq_handler().set(FUNC(trvquest_state::via_irq)); } ROM_START( trvquest ) @@ -230,4 +215,4 @@ ROM_START( trvquest ) ROM_LOAD( "roma", 0x16000, 0x2000, CRC(b4bcaf33) SHA1(c6b08fb8d55b2834d0c6c5baff9f544c795e4c15) ) ROM_END -GAME( 1984, trvquest, 0, trvquest, trvquest, gameplan_state, empty_init, ROT90, "Sunn / Techstar", "Trivia Quest", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, trvquest, 0, trvquest, trvquest, trvquest_state, empty_init, ROT90, "Sunn / Techstar", "Trivia Quest", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/vega.cpp b/src/mame/drivers/vega.cpp index 97794b09d00..7f09e828336 100644 --- a/src/mame/drivers/vega.cpp +++ b/src/mame/drivers/vega.cpp @@ -85,6 +85,8 @@ TODO: #include "speaker.h" +namespace { + class vega_state : public driver_device { public: @@ -778,6 +780,11 @@ uint8_t vega_state::randomizer() void vega_state::machine_start() { + m_p2_data = 0; + m_ext_offset_w = 0; + m_ext_offset_r = 0; + + m_tilemap_offset_x = m_tilemap_offset_y = m_tilemap_flags = m_tilemap_top = 0; } @@ -873,4 +880,6 @@ void vega_state::init_vega() membank("bank1")->configure_entries(0, 2, &ROM[0], 0x800); } +} // anonymous namespace + GAME( 1982, vega, 0, vega, vega, vega_state, init_vega, ROT270, "Olympia", "Vega", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/drivers/x68k.cpp b/src/mame/drivers/x68k.cpp index 972cf24fa5f..831025f8c19 100644 --- a/src/mame/drivers/x68k.cpp +++ b/src/mame/drivers/x68k.cpp @@ -1550,6 +1550,7 @@ void x68k_state::machine_start() m_ioc.irqstatus = 0; m_mouse.irqactive = false; m_current_ipl = 0; + m_adpcm.rate = 0; } void x68k_state::driver_init() diff --git a/src/mame/drivers/xtom3d.cpp b/src/mame/drivers/xtom3d.cpp index 5be72e7dca1..4c12934d4fe 100644 --- a/src/mame/drivers/xtom3d.cpp +++ b/src/mame/drivers/xtom3d.cpp @@ -49,6 +49,8 @@ MX29F1610MC 16M FlashROM (x7) #include "video/pc_vga.h" +namespace { + class xtom3d_state : public pcat_base_state { public: @@ -60,6 +62,10 @@ public: void xtom3d(machine_config &config); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + private: std::unique_ptr m_bios_ram; std::unique_ptr m_bios_ext1_ram; @@ -80,8 +86,6 @@ private: void bios_ext4_ram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); void bios_ram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); - virtual void machine_start() override; - virtual void machine_reset() override; void intel82439tx_init(); void xtom3d_io(address_map &map); @@ -397,6 +401,9 @@ void xtom3d_state::machine_start() m_isa_ram1 = std::make_unique(0x4000/4); m_isa_ram2 = std::make_unique(0x4000/4); + for (int i = 0; i < 4; i++) + std::fill(std::begin(m_piix4_config_reg[i]), std::end(m_piix4_config_reg[i]), 0); + intel82439tx_init(); } @@ -448,5 +455,7 @@ ROM_START( xtom3d ) ROM_LOAD( "u20", 0xc00000, 0x200000, CRC(452131d9) SHA1(f62a0f1a7da9025ac1f7d5de4df90166871ac1e5) ) ROM_END +} // Anonymous namespace + GAME(1999, xtom3d, 0, xtom3d, 0, xtom3d_state, empty_init, ROT0, "Jamie System Development", "X Tom 3D", MACHINE_IS_SKELETON) diff --git a/src/mame/includes/gameplan.h b/src/mame/includes/gameplan.h index e0583a5e643..ed399a51857 100644 --- a/src/mame/includes/gameplan.h +++ b/src/mame/includes/gameplan.h @@ -38,31 +38,41 @@ public: gameplan_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_trvquest_question(*this, "trvquest_q"), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_riot(*this, "riot"), m_via_0(*this, "via6522_0"), m_via_1(*this, "via6522_1"), m_via_2(*this, "via6522_2"), m_screen(*this, "screen"), + m_audiocpu(*this, "audiocpu"), + m_riot(*this, "riot"), m_soundlatch(*this, "soundlatch") { } void gameplan(machine_config &config); void gameplan_video(machine_config &config); void leprechn(machine_config &config); void leprechn_video(machine_config &config); - void trvquest(machine_config &config); - void trvquest_video(machine_config &config); protected: + virtual void machine_start() override; + virtual void machine_reset() override; virtual void video_start() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + required_device m_maincpu; + required_device m_via_0; + required_device m_via_1; + required_device m_via_2; + required_device m_screen; + + void video_data_w(uint8_t data); + void gameplan_video_command_w(uint8_t data); + DECLARE_WRITE_LINE_MEMBER(video_command_trigger_w); + DECLARE_WRITE_LINE_MEMBER(via_irq); + uint32_t screen_update_gameplan(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + private: /* machine state */ uint8_t m_current_port; - optional_shared_ptr m_trvquest_question; /* video state */ std::unique_ptr m_videoram; @@ -73,13 +83,8 @@ private: uint8_t m_video_data; /* devices */ - required_device m_maincpu; optional_device m_audiocpu; optional_device m_riot; - required_device m_via_0; - required_device m_via_1; - required_device m_via_2; - required_device m_screen; optional_device m_soundlatch; @@ -90,28 +95,41 @@ private: void audio_cmd_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(audio_trigger_w); DECLARE_WRITE_LINE_MEMBER(r6532_irq); - DECLARE_MACHINE_START(gameplan); - DECLARE_MACHINE_RESET(gameplan); - DECLARE_MACHINE_START(trvquest); - DECLARE_MACHINE_RESET(trvquest); - uint32_t screen_update_gameplan(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t screen_update_leprechn(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(clear_screen_done_callback); TIMER_CALLBACK_MEMBER(via_irq_delayed); - void video_data_w(uint8_t data); - void gameplan_video_command_w(uint8_t data); void leprechn_video_command_w(uint8_t data); uint8_t leprechn_videoram_r(); - DECLARE_WRITE_LINE_MEMBER(video_command_trigger_w); void gameplan_get_pens( pen_t *pens ); void leprechn_get_pens( pen_t *pens ); - DECLARE_WRITE_LINE_MEMBER(via_irq); - uint8_t trvquest_question_r(offs_t offset); - DECLARE_WRITE_LINE_MEMBER(trvquest_coin_w); - DECLARE_WRITE_LINE_MEMBER(trvquest_misc_w); - void cpu_map(address_map &map); void gameplan_audio_map(address_map &map); void gameplan_main_map(address_map &map); void leprechn_audio_map(address_map &map); }; + +class trvquest_state : public gameplan_state +{ +public: + trvquest_state(const machine_config &mconfig, device_type type, const char *tag) : + gameplan_state(mconfig, type, tag), + m_question(*this, "question"), + m_questions_region(*this, "questions") { } + + void trvquest(machine_config &config); + void trvquest_video(machine_config &config); + +protected: + virtual void machine_start() override; + +private: + required_shared_ptr m_question; + required_region_ptr m_questions_region; + + uint8_t question_r(offs_t offset); + DECLARE_WRITE_LINE_MEMBER(coin_w); + DECLARE_WRITE_LINE_MEMBER(misc_w); + + void cpu_map(address_map &map); +}; diff --git a/src/mame/includes/pcw.h b/src/mame/includes/pcw.h index 77337c91bbc..cf19973d851 100644 --- a/src/mame/includes/pcw.h +++ b/src/mame/includes/pcw.h @@ -51,6 +51,22 @@ public: , m_iptlines(*this, "LINE%u", 0U) { } + void pcw(machine_config &config); + void pcw8256(machine_config &config); + void pcw8512(machine_config &config); + void pcw9512(machine_config &config); + void pcw9256(machine_config &config); + void pcw9512p(machine_config &config); + void pcw10(machine_config &config); + + void init_pcw(); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + +private: int m_boot; int m_system_status; int m_fdc_interrupt_code; @@ -112,10 +128,7 @@ public: uint8_t pcw9512_parallel_r(offs_t offset); void pcw9512_parallel_w(offs_t offset, uint8_t data); void mcu_transmit_serial(uint8_t bit); - void init_pcw(); - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; + void set_8xxx_palette(palette_device &palette) const; void set_9xxx_palette(palette_device &palette) const; void set_printer_palette(palette_device &palette) const; @@ -151,13 +164,6 @@ public: void pcw_update_mem(int block, int data); int pcw_get_sys_status(); void pcw_printer_fire_pins(uint16_t pins); - void pcw(machine_config &config); - void pcw8256(machine_config &config); - void pcw8512(machine_config &config); - void pcw9512(machine_config &config); - void pcw9256(machine_config &config); - void pcw9512p(machine_config &config); - void pcw10(machine_config &config); void pcw9512_io(address_map &map); void pcw_io(address_map &map); void pcw_map(address_map &map); diff --git a/src/mame/machine/lisa.cpp b/src/mame/machine/lisa.cpp index 32f5f77cb9b..86f472ee854 100644 --- a/src/mame/machine/lisa.cpp +++ b/src/mame/machine/lisa.cpp @@ -941,6 +941,9 @@ void lisa_state::machine_start() m_cops_ready_timer->adjust(attotime::from_msec(1), 0, attotime::from_msec(1)); m_nvram->set_base(m_fdc_ram, 1024); + + m_fifo_tail = 0; + m_videoROM_address = 0; } void lisa_state::machine_reset() diff --git a/src/mame/video/eolith.cpp b/src/mame/video/eolith.cpp index fa18bbb3709..eae182abec2 100644 --- a/src/mame/video/eolith.cpp +++ b/src/mame/video/eolith.cpp @@ -26,6 +26,8 @@ VIDEO_START_MEMBER(eolith_state,eolith) m_vram = std::make_unique(0x40000); save_pointer(NAME(m_vram), 0x40000); save_item(NAME(m_buffer)); + + m_buffer = 0; } uint32_t eolith_state::screen_update_eolith(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) diff --git a/src/mame/video/gameplan.cpp b/src/mame/video/gameplan.cpp index 0438c012db5..d6e8eff207b 100644 --- a/src/mame/video/gameplan.cpp +++ b/src/mame/video/gameplan.cpp @@ -278,9 +278,9 @@ void gameplan_state::leprechn_video(machine_config &config) m_screen->set_screen_update(FUNC(gameplan_state::screen_update_leprechn)); } -void gameplan_state::trvquest_video(machine_config &config) +void trvquest_state::trvquest_video(machine_config &config) { gameplan_video(config); - m_screen->set_screen_update(FUNC(gameplan_state::screen_update_gameplan)); + m_screen->set_screen_update(FUNC(trvquest_state::screen_update_gameplan)); m_screen->screen_vblank().set(m_via_2, FUNC(via6522_device::write_ca1)); } diff --git a/src/mame/video/pcw.cpp b/src/mame/video/pcw.cpp index f0ee1903f5f..755323a15a6 100644 --- a/src/mame/video/pcw.cpp +++ b/src/mame/video/pcw.cpp @@ -38,6 +38,8 @@ void pcw_state::video_start() m_prn_output = std::make_unique(PCW_PRINTER_WIDTH,PCW_PRINTER_HEIGHT); m_prn_output->fill(1, rect); + + m_roller_ram_addr = 0; } /* black/white printer */ diff --git a/src/mame/video/wecleman.cpp b/src/mame/video/wecleman.cpp index 10595ba01d7..b6c39d1dc8e 100644 --- a/src/mame/video/wecleman.cpp +++ b/src/mame/video/wecleman.cpp @@ -866,6 +866,8 @@ void wecleman_state::video_start() m_cloud_ds = 0; m_cloud_visible = 0; m_black_pen = m_palette->black_pen(); + std::fill(std::begin(m_bgpage), std::end(m_bgpage), 0); + std::fill(std::begin(m_fgpage), std::end(m_fgpage), 0); m_rgb_half = (uint16_t*)(buffer + 0x00000); m_t32x32pm = (int*)(buffer + 0x10020); @@ -963,6 +965,8 @@ void hotchase_state::video_start() m_spr_offsx = -0xc0; m_spr_offsy = 0; m_black_pen = m_palette->black_pen(); + std::fill(std::begin(m_bgpage), std::end(m_bgpage), 0); + std::fill(std::begin(m_fgpage), std::end(m_fgpage), 0); m_spr_ptr_list = (sprite_t **)buffer;