diff --git a/src/mame/drivers/hp3478a.cpp b/src/mame/drivers/hp3478a.cpp index 0b60f490a15..ae76df6831a 100644 --- a/src/mame/drivers/hp3478a.cpp +++ b/src/mame/drivers/hp3478a.cpp @@ -110,6 +110,8 @@ T1 : data in thru isol, from analog CPU (opcodes jt1 / jnt1) /**** HP 3478A class **/ +namespace { + class hp3478a_state : public driver_device { public: @@ -132,6 +134,7 @@ protected: virtual void machine_start() override; //virtual void machine_reset() override; //not needed? +private: uint8_t p1read(); void p1write(uint8_t data); void p2write(uint8_t data); @@ -588,6 +591,9 @@ void hp3478a_state::machine_start() m_watchdog->watchdog_enable(); + m_p1_oldstate = 0; + m_p2_oldstate = 0; + } /****************************************************************************** @@ -737,6 +743,9 @@ ROM_START( hp3478a ) ROM_LOAD( "calram.bin", 0, 0x100, NO_DUMP) ROM_END +} // Anonymous namespace + + /****************************************************************************** Drivers ******************************************************************************/ diff --git a/src/mame/drivers/hp80.cpp b/src/mame/drivers/hp80.cpp index c45365205c2..709366bbdaa 100644 --- a/src/mame/drivers/hp80.cpp +++ b/src/mame/drivers/hp80.cpp @@ -1776,6 +1776,9 @@ void hp86_state::machine_start() save_item(NAME(m_emc_mult)); save_item(NAME(m_emc_mode)); save_item(NAME(m_rulite)); + + m_emc_ptr1 = 0; + m_emc_ptr2 = 0; } void hp86_state::machine_reset() diff --git a/src/mame/drivers/hp9k_3xx.cpp b/src/mame/drivers/hp9k_3xx.cpp index fca52e34c47..16185c7338f 100644 --- a/src/mame/drivers/hp9k_3xx.cpp +++ b/src/mame/drivers/hp9k_3xx.cpp @@ -68,6 +68,9 @@ #include "softlist_dev.h" #include "hp9k_3xx.lh" + +namespace { + #define MAINCPU_TAG "maincpu" #define PTM6840_TAG "ptm" @@ -90,14 +93,15 @@ public: void hp9k380(machine_config &config); void hp9k382(machine_config &config); -private: - void hp9k300(machine_config &config); - required_device m_maincpu; - +protected: virtual void machine_reset() override; virtual void machine_start() override; virtual void driver_start() override; +private: + void hp9k300(machine_config &config); + required_device m_maincpu; + output_finder<8> m_diag_led; void set_bus_error(uint32_t address, bool write, uint16_t mem_mask); @@ -230,6 +234,7 @@ void hp9k3xx_state::machine_reset() void hp9k3xx_state::machine_start() { m_bus_error_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(hp9k3xx_state::bus_error_timeout), this)); + m_bus_error = false; save_item(NAME(m_bus_error)); } @@ -512,6 +517,9 @@ ROM_START( hp9k382 ) ROM_LOAD( "1818-5282_8ce61e951207_28c64.bin", 0x000000, 0x002000, CRC(740442f3) SHA1(ab65bd4eec1024afb97fc2dd3bd3f017e90f49ae) ) ROM_END +} // Anonymous namespace + + /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ COMP( 1985, hp9k310, 0, 0, hp9k310, hp9k330, hp9k3xx_state, empty_init, "Hewlett-Packard", "HP9000/310", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE) COMP( 1985, hp9k320, 0, 0, hp9k320, hp9k330, hp9k3xx_state, empty_init, "Hewlett-Packard", "HP9000/320", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE) diff --git a/src/mame/drivers/hp_ipc.cpp b/src/mame/drivers/hp_ipc.cpp index 74e05e364de..ff219646ba7 100644 --- a/src/mame/drivers/hp_ipc.cpp +++ b/src/mame/drivers/hp_ipc.cpp @@ -343,7 +343,7 @@ http://www.brouhaha.com/~eric/hpcalc/chips/ Software to look for -------------------- -00095-60978 "Service ROM - Used in trobleshooting the integral PC" via ambry +00095-60978 "Service ROM - Used in troubleshooting the integral PC" via ambry 00095-60925 "Service ROM" via service manual 00095-60969 "Service Diagnostic Disc" via service manual 00095-60950 "I/O Component-Level Diagnostic Disc" via serial interface service manual @@ -380,6 +380,8 @@ Software to look for #include "screen.h" +namespace { + class hp_ipc_state : public driver_device { public: @@ -406,10 +408,12 @@ public: void hp_ipc(machine_config &config); void hp9808a(machine_config &config); -private: +protected: virtual void machine_start() override; virtual void machine_reset() override; + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; +private: uint16_t mem_r(offs_t offset, uint16_t mem_mask); void mem_w(offs_t offset, uint16_t data, uint16_t mem_mask); uint16_t mmu_r(offs_t offset); @@ -427,9 +431,9 @@ private: DECLARE_WRITE_LINE_MEMBER(irq_1); DECLARE_WRITE_LINE_MEMBER(irq_2); DECLARE_WRITE_LINE_MEMBER(irq_3); - DECLARE_WRITE_LINE_MEMBER(irq_4); + [[maybe_unused]] DECLARE_WRITE_LINE_MEMBER(irq_4); DECLARE_WRITE_LINE_MEMBER(irq_5); - DECLARE_WRITE_LINE_MEMBER(irq_6); + [[maybe_unused]] DECLARE_WRITE_LINE_MEMBER(irq_6); DECLARE_WRITE_LINE_MEMBER(irq_7); emu_timer *m_bus_error_timer; @@ -467,7 +471,6 @@ private: return (m_mmu[(m_maincpu->get_fc() >> 1) & 3] + offset) & 0x3FFFFF; } - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; void set_bus_error(uint32_t address, bool write, uint16_t mem_mask); bool m_bus_error; }; @@ -731,6 +734,7 @@ WRITE_LINE_MEMBER(hp_ipc_state::irq_7) void hp_ipc_state::machine_start() { m_bus_error_timer = timer_alloc(0); + m_bus_error = false; m_bankdev->set_bank(1); @@ -930,6 +934,9 @@ ROM_END #define rom_hp9808a rom_hp_ipc +} // Anonymous namespace + + // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS COMP( 1985, hp_ipc, 0, 0, hp_ipc, hp_ipc, hp_ipc_state, empty_init, "Hewlett-Packard", "Integral Personal Computer 9807A", 0) COMP( 1985, hp9808a, 0, 0, hp9808a, hp_ipc, hp_ipc_state, empty_init, "Hewlett-Packard", "Integral Personal Computer 9808A", MACHINE_NOT_WORKING) diff --git a/src/mame/drivers/inder.cpp b/src/mame/drivers/inder.cpp index 41e3849de89..34a3babe2c6 100644 --- a/src/mame/drivers/inder.cpp +++ b/src/mame/drivers/inder.cpp @@ -43,6 +43,8 @@ #include "inder.lh" +namespace { + class inder_state : public genpin_class { public: @@ -58,6 +60,7 @@ public: , m_13(*this, "13") , m_switches(*this, "SW.%u", 0) , m_digits(*this, "digit%u", 0U) + , m_p_speech(*this, "speech") { } void inder(machine_config &config); @@ -68,6 +71,10 @@ public: void init_inder(); void init_inder1(); +protected: + virtual void machine_reset() override; + virtual void machine_start() override; + private: uint8_t ppic_r(); void ppia_w(uint8_t data); @@ -106,9 +113,7 @@ private: uint8_t m_sndcmd; uint8_t m_sndbank; uint32_t m_sound_addr; - uint8_t *m_p_speech; - virtual void machine_reset() override; - virtual void machine_start() override { m_digits.resolve(); } + required_device m_maincpu; optional_device m_audiocpu; optional_device m_sn; @@ -119,6 +124,7 @@ private: optional_device m_13; required_ioport_array<11> m_switches; output_finder<50> m_digits; + optional_region_ptr m_p_speech; }; void inder_state::brvteam_map(address_map &map) @@ -1321,6 +1327,13 @@ void inder_state::ppic_w(uint8_t data) } +void inder_state::machine_start() +{ + m_digits.resolve(); + + std::fill(std::begin(m_segment), std::end(m_segment), 0); +} + void inder_state::machine_reset() { m_sound_addr = 0; @@ -1335,7 +1348,6 @@ void inder_state::machine_reset() void inder_state::init_inder() { - m_p_speech = memregion("speech")->base(); if (m_7a.found()) { m_7a->d_w(0); @@ -1347,7 +1359,6 @@ void inder_state::init_inder() void inder_state::init_inder1() { - m_p_speech = memregion("speech")->base(); if (m_7a.found()) { m_7a->d_w(0); @@ -1631,6 +1642,8 @@ ROM_START(metalman) ROM_LOAD("sound_m3.bin", 0x40000, 0x20000, CRC(15ef1866) SHA1(4ffa3b29bf3c30a9a5bc622adde16a1a13833b22)) ROM_END +} // Anonymous namespace + // old cpu board, 6 digits, sn76489 GAME(1985, brvteam, 0, brvteam, brvteam, inder_state, empty_init, ROT0, "Inder", "Brave Team", MACHINE_MECHANICAL | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/iris3130.cpp b/src/mame/drivers/iris3130.cpp index 64cfb12f38d..227f1455a6c 100644 --- a/src/mame/drivers/iris3130.cpp +++ b/src/mame/drivers/iris3130.cpp @@ -53,6 +53,9 @@ #include "logmacro.h" + +namespace { + class iris3000_state : public driver_device { public: @@ -81,10 +84,11 @@ public: DECLARE_QUICKLOAD_LOAD_MEMBER(load_romboard); -private: +protected: virtual void machine_start() override; virtual void machine_reset() override; +private: void text_data_map(address_map &map); void stack_map(address_map &map); void kernel_map(address_map &map); @@ -125,7 +129,7 @@ private: uint16_t stack_limit_r(offs_t offset, uint16_t mem_mask = ~0); void stack_limit_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint8_t romboard_r(offs_t offset); - void romboard_w(offs_t offset, uint8_t data); + [[maybe_unused]] void romboard_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(duarta_irq_handler); DECLARE_WRITE_LINE_MEMBER(duartb_irq_handler); @@ -512,6 +516,7 @@ void iris3000_state::romboard_w(offs_t offset, uint8_t data) void iris3000_state::machine_start() { + m_mouse_buttons = 0; } void iris3000_state::machine_reset() @@ -710,5 +715,8 @@ ROM_START( iris3130 ) ROM_LOAD16_BYTE( "5808523a.bin", 0x0001, 0x8000, CRC(4c99e4b8) SHA1(899855e54c4520816ad43eb19b972b45783ccb6b) ) ROM_END +} // Anonymous namespace + + // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS COMP( 1985, iris3130, 0, 0, iris3130, iris3130, iris3000_state, empty_init, "Silicon Graphics Inc", "IRIS 3130 (IP2)", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/news_r3k.cpp b/src/mame/drivers/news_r3k.cpp index 1d77742cb51..fe6f9fcc802 100644 --- a/src/mame/drivers/news_r3k.cpp +++ b/src/mame/drivers/news_r3k.cpp @@ -185,6 +185,9 @@ void news_r3k_state::machine_start() int_state = false; m_lcd_enable = false; m_lcd_dim = false; + + m_inten = 0; + m_intst = 0; } void news_r3k_state::machine_reset() diff --git a/src/mame/drivers/pc4.cpp b/src/mame/drivers/pc4.cpp index 1f2e19ee4fd..99f3745b145 100644 --- a/src/mame/drivers/pc4.cpp +++ b/src/mame/drivers/pc4.cpp @@ -218,6 +218,7 @@ void pc4_state::machine_start() m_direction = 1; m_disp_shift = 0; m_blink = 0; + m_busy_flag = 0; } void pc4_state::pc4(machine_config &config) diff --git a/src/mame/includes/fromanc2.h b/src/mame/includes/fromanc2.h index 18cd7e1a474..46bbb870d6b 100644 --- a/src/mame/includes/fromanc2.h +++ b/src/mame/includes/fromanc2.h @@ -39,6 +39,9 @@ public: DECLARE_READ_LINE_MEMBER(sndcpu_nmi_r); DECLARE_READ_LINE_MEMBER(subcpu_nmi_r); +protected: + virtual void machine_reset() override; + private: /* memory pointers */ std::unique_ptr m_videoram[2][4]; @@ -108,7 +111,6 @@ private: template TILE_GET_INFO_MEMBER(fromanc2_get_tile_info); template TILE_GET_INFO_MEMBER(fromancr_get_tile_info); - virtual void machine_reset() override; DECLARE_MACHINE_START(fromanc2); DECLARE_VIDEO_START(fromanc2); DECLARE_VIDEO_START(fromancr); diff --git a/src/mame/video/fromanc2.cpp b/src/mame/video/fromanc2.cpp index 0ca8e31efb6..336fce7d9b5 100644 --- a/src/mame/video/fromanc2.cpp +++ b/src/mame/video/fromanc2.cpp @@ -327,6 +327,12 @@ VIDEO_START_MEMBER(fromanc2_state,fromancr) save_item(NAME(m_scrolly[1])); save_item(NAME(m_gfxbank[0])); save_item(NAME(m_gfxbank[1])); + + for (int i = 0; i < 2; i++) + { + std::fill(std::begin(m_scrollx[i]), std::end(m_scrollx[i]), 0 ); + std::fill(std::begin(m_scrolly[i]), std::end(m_scrolly[i]), 0 ); + } } VIDEO_START_MEMBER(fromanc2_state,fromanc4)