diff options
author | 2019-10-27 15:31:50 +1100 | |
---|---|---|
committer | 2019-10-27 15:31:50 +1100 | |
commit | ecde621979bba870c8e66f41a6f03c233e1c7c93 (patch) | |
tree | c798b0bf964bd4c442a653c13ae89c239155ff45 | |
parent | d80e7f95eb1ae276b86f8bd1dc818de1a1f887f7 (diff) |
(nw) fix MPU4 video crash, clean up a little
-rw-r--r-- | docs/source/initialsetup/compilingmame.rst | 2 | ||||
-rw-r--r-- | src/devices/cpu/m68000/m68kcpu.cpp | 17 | ||||
-rw-r--r-- | src/mame/drivers/mpu4vid.cpp | 39 |
3 files changed, 34 insertions, 24 deletions
diff --git a/docs/source/initialsetup/compilingmame.rst b/docs/source/initialsetup/compilingmame.rst index 49c717372f1..87ba0a044db 100644 --- a/docs/source/initialsetup/compilingmame.rst +++ b/docs/source/initialsetup/compilingmame.rst @@ -444,7 +444,7 @@ Known Issues Issues with specific compiler versions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* MinGW GCC 7 for Windows i386 produces spurious out-of-bounds access warnings. +* GCC 7 for 32-bit x86 targets produces spurious out-of-bounds access warnings. Adding **NOWERROR=1** to your build options works around this by not treating warnings as errors. * Initial versions of GNU libstdc++ 6 have a broken ``std::unique_ptr`` diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp index f4a4583e604..727324fe510 100644 --- a/src/devices/cpu/m68000/m68kcpu.cpp +++ b/src/devices/cpu/m68000/m68kcpu.cpp @@ -2584,6 +2584,7 @@ m68000_device::m68000_device(const machine_config &mconfig, const device_type ty void m68000_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68000(); } @@ -2607,6 +2608,7 @@ m68008_device::m68008_device(const machine_config &mconfig, const char *tag, dev void m68008_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68008(); } @@ -2618,6 +2620,7 @@ m68008fn_device::m68008fn_device(const machine_config &mconfig, const char *tag, void m68008fn_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68008(); } @@ -2630,6 +2633,7 @@ m68010_device::m68010_device(const machine_config &mconfig, const char *tag, dev void m68010_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68010(); } @@ -2642,6 +2646,7 @@ m68020_device::m68020_device(const machine_config &mconfig, const char *tag, dev void m68020_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68020(); } @@ -2653,6 +2658,7 @@ m68020fpu_device::m68020fpu_device(const machine_config &mconfig, const char *ta void m68020fpu_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68020fpu(); } @@ -2664,6 +2670,7 @@ m68020pmmu_device::m68020pmmu_device(const machine_config &mconfig, const char * void m68020pmmu_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68020pmmu(); } @@ -2689,6 +2696,7 @@ m68020hmmu_device::m68020hmmu_device(const machine_config &mconfig, const char * void m68020hmmu_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68020hmmu(); } @@ -2700,6 +2708,7 @@ m68ec020_device::m68ec020_device(const machine_config &mconfig, const char *tag, void m68ec020_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68ec020(); } @@ -2710,6 +2719,7 @@ m68030_device::m68030_device(const machine_config &mconfig, const char *tag, dev void m68030_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68030(); } @@ -2720,6 +2730,7 @@ m68ec030_device::m68ec030_device(const machine_config &mconfig, const char *tag, void m68ec030_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68ec030(); } @@ -2731,6 +2742,7 @@ m68040_device::m68040_device(const machine_config &mconfig, const char *tag, dev void m68040_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68040(); } @@ -2743,6 +2755,7 @@ m68ec040_device::m68ec040_device(const machine_config &mconfig, const char *tag, void m68ec040_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68ec040(); } @@ -2755,6 +2768,7 @@ m68lc040_device::m68lc040_device(const machine_config &mconfig, const char *tag, void m68lc040_device::device_start() { + m68000_base_device::device_start(); init_cpu_m68lc040(); } @@ -2767,6 +2781,7 @@ scc68070_base_device::scc68070_base_device(const machine_config &mconfig, const void scc68070_base_device::device_start() { + m68000_base_device::device_start(); init_cpu_scc68070(); } @@ -2785,6 +2800,7 @@ fscpu32_device::fscpu32_device(const machine_config &mconfig, const char *tag, d void fscpu32_device::device_start() { + m68000_base_device::device_start(); init_cpu_fscpu32(); } @@ -2797,6 +2813,7 @@ mcf5206e_device::mcf5206e_device(const machine_config &mconfig, const char *tag, void mcf5206e_device::device_start() { + m68000_base_device::device_start(); init_cpu_coldfire(); } diff --git a/src/mame/drivers/mpu4vid.cpp b/src/mame/drivers/mpu4vid.cpp index 96bc9aa624c..3e22aa97128 100644 --- a/src/mame/drivers/mpu4vid.cpp +++ b/src/mame/drivers/mpu4vid.cpp @@ -205,19 +205,18 @@ TODO: #include "crmaze4p.lh" -struct bt471_t -{ - uint8_t address; - uint8_t addr_cnt; - uint8_t pixmask; - uint8_t command; - rgb_t color; -}; - - class mpu4vid_state : public mpu4_state { public: + struct bt471_t + { + uint8_t address; + uint8_t addr_cnt; + uint8_t pixmask; + uint8_t command; + rgb_t color; + }; + mpu4vid_state(const machine_config &mconfig, device_type type, const char *tag) : mpu4_state(mconfig, type, tag), m_videocpu(*this, "video"), @@ -281,9 +280,9 @@ private: int m_gfx_index; int8_t m_cur[2]; - DECLARE_MACHINE_START(mpu4_vid); - DECLARE_MACHINE_RESET(mpu4_vid); - DECLARE_VIDEO_START(mpu4_vid); + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; SCN2674_DRAW_CHARACTER_MEMBER(display_pixels); DECLARE_WRITE_LINE_MEMBER(m6809_acia_irq); DECLARE_WRITE_LINE_MEMBER(m68k_acia_irq); @@ -438,7 +437,7 @@ WRITE16_MEMBER(mpu4vid_state::mpu4_vid_vidram_w ) } -VIDEO_START_MEMBER(mpu4vid_state,mpu4_vid) +void mpu4vid_state::video_start() { m_vid_vidram.allocate(0x20000/2); @@ -1152,19 +1151,16 @@ WRITE_LINE_MEMBER(mpu4vid_state::mpu_video_reset) } /* machine start (called only once) */ -MACHINE_START_MEMBER(mpu4vid_state,mpu4_vid) +void mpu4vid_state::machine_start() { mpu4_config_common(); m_mod_number=4; //No AY chip /* setup communications */ m_link7a_connected = 1; - - /* Hook the reset line */ - m_videocpu->set_reset_callback(FUNC(mpu4vid_state::mpu_video_reset)); } -MACHINE_RESET_MEMBER(mpu4vid_state,mpu4_vid) +void mpu4vid_state::machine_reset() { m_vfd->reset(); //for debug ports only @@ -1302,13 +1298,10 @@ void mpu4vid_state::mpu4_vid(machine_config &config) M68000(config, m_videocpu, VIDEO_MASTER_CLOCK); m_videocpu->set_addrmap(AS_PROGRAM, &mpu4vid_state::mpu4_68k_map); + m_videocpu->set_reset_callback(FUNC(mpu4vid_state::mpu_video_reset)); // config.m_minimum_quantum = attotime::from_hz(960); - MCFG_MACHINE_START_OVERRIDE(mpu4vid_state,mpu4_vid) - MCFG_MACHINE_RESET_OVERRIDE(mpu4vid_state,mpu4_vid) - MCFG_VIDEO_START_OVERRIDE (mpu4vid_state,mpu4_vid) - PALETTE(config, m_palette).set_entries(ef9369_device::NUMCOLORS); EF9369(config, "ef9369").set_color_update_callback(FUNC(mpu4vid_state::ef9369_color_update)); |