From 8c3f2a3c41c88cf9a159fd5f4577acdd6b2e95c8 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 24 Jun 2023 07:07:55 +1000 Subject: [PATCH] Miscellaneous cleanup --- src/devices/bus/coco/coco_fdc.cpp | 8 +++-- src/devices/bus/coco/coco_fdc.h | 1 + src/devices/cpu/h8/h8.h | 11 ++++--- src/devices/cpu/h8/h8_adc.cpp | 2 +- src/devices/cpu/h8/h8_dtc.cpp | 3 +- src/devices/cpu/h8/h8_intc.cpp | 2 ++ src/devices/cpu/h8/h8_sci.cpp | 3 +- src/devices/cpu/h8/h8_timer16.cpp | 2 +- src/devices/cpu/h8/h8_timer8.cpp | 2 +- src/mame/neogeo/midas.cpp | 4 +-- src/mame/skeleton/happyvideo.cpp | 6 ++++ src/mame/taito/pkspirit.cpp | 11 +++---- src/osd/modules/debugger/osx/debugconsole.mm | 31 ++++++++--------- .../modules/debugger/osx/deviceinfoviewer.mm | 11 +++---- src/osd/modules/debugger/osx/devicesviewer.mm | 11 +++---- .../modules/debugger/osx/disassemblyviewer.mm | 11 +++---- .../modules/debugger/osx/errorlogviewer.mm | 13 ++++---- src/osd/modules/debugger/osx/memoryviewer.mm | 11 +++---- src/osd/modules/debugger/osx/pointsviewer.mm | 33 +++++++++---------- 19 files changed, 89 insertions(+), 87 deletions(-) diff --git a/src/devices/bus/coco/coco_fdc.cpp b/src/devices/bus/coco/coco_fdc.cpp index 53fa874de8d..2eac7f8b7f3 100644 --- a/src/devices/bus/coco/coco_fdc.cpp +++ b/src/devices/bus/coco/coco_fdc.cpp @@ -73,22 +73,24 @@ *********************************************************************/ #include "emu.h" -#include "cococart.h" #include "coco_fdc.h" + #include "meb_intrf.h" + +#include "imagedev/floppy.h" #include "machine/ds1315.h" #include "machine/input_merger.h" #include "machine/msm6242.h" #include "machine/wd_fdc.h" -#include "imagedev/floppy.h" + #include "formats/dmk_dsk.h" +#include "formats/flex_dsk.h" #include "formats/fs_coco_os9.h" #include "formats/fs_coco_rsdos.h" #include "formats/jvc_dsk.h" #include "formats/os9_dsk.h" #include "formats/sdf_dsk.h" #include "formats/vdk_dsk.h" -#include "formats/flex_dsk.h" #define LOG_WDFDC (1U << 1) // Shows register setup #define LOG_WDIO (1U << 2) // Shows data read and write diff --git a/src/devices/bus/coco/coco_fdc.h b/src/devices/bus/coco/coco_fdc.h index 486b28b637e..f5279fe445b 100644 --- a/src/devices/bus/coco/coco_fdc.h +++ b/src/devices/bus/coco/coco_fdc.h @@ -12,6 +12,7 @@ #define MAME_BUS_COCO_COCO_FDC_H #include "cococart.h" + #include "imagedev/floppy.h" diff --git a/src/devices/cpu/h8/h8.h b/src/devices/cpu/h8/h8.h index 07375cc4df3..060b34595ec 100644 --- a/src/devices/cpu/h8/h8.h +++ b/src/devices/cpu/h8/h8.h @@ -35,16 +35,17 @@ public: STATE_DTC_WRITEBACK = 0x10006 }; - template auto read_adc() { return m_read_adc[port].bind(); } - template auto write_sci_tx() { return m_sci_tx[sci].bind(); } - template auto write_sci_clk() { return m_sci_clk[sci].bind(); } - template void sci_rx_w(int state) { m_sci[sci]->do_rx_w(state); } - template void sci_clk_w(int state) { m_sci[sci]->do_clk_w(state); } + template auto read_adc() { return m_read_adc[Port].bind(); } + template auto write_sci_tx() { return m_sci_tx[Sci].bind(); } + template auto write_sci_clk() { return m_sci_clk[Sci].bind(); } void sci_set_external_clock_period(int sci, const attotime &period) { m_sci[sci].lookup()->do_set_external_clock_period(period); } + template void sci_rx_w(int state) { m_sci[Sci]->do_rx_w(state); } + template void sci_clk_w(int state) { m_sci[Sci]->do_clk_w(state); } + void internal_update(); void set_irq(int irq_vector, int irq_level, bool irq_nmi); bool trigger_dma(int vector); diff --git a/src/devices/cpu/h8/h8_adc.cpp b/src/devices/cpu/h8/h8_adc.cpp index ac5f547ddfc..ffd89220158 100644 --- a/src/devices/cpu/h8/h8_adc.cpp +++ b/src/devices/cpu/h8/h8_adc.cpp @@ -6,7 +6,7 @@ // Verbosity level // 0 = no messages // 1 = everything -const int V = 0; +static constexpr int V = 0; DEFINE_DEVICE_TYPE(H8_ADC_3337, h8_adc_3337_device, "h8_adc_3337", "H8/3337 ADC") DEFINE_DEVICE_TYPE(H8_ADC_3006, h8_adc_3006_device, "h8_adc_3006", "H8/3006 ADC") diff --git a/src/devices/cpu/h8/h8_dtc.cpp b/src/devices/cpu/h8/h8_dtc.cpp index 17ffe9a52a7..8d51c067843 100644 --- a/src/devices/cpu/h8/h8_dtc.cpp +++ b/src/devices/cpu/h8/h8_dtc.cpp @@ -1,12 +1,13 @@ #include "emu.h" #include "h8_dtc.h" + #include "h8.h" // Verbosity level // 0 = no messages // 1 = in-memory registers once read // 2 = everything -const int V = 0; +static constexpr int V = 0; DEFINE_DEVICE_TYPE(H8_DTC, h8_dtc_device, "h8_dtc", "H8 DTC controller") diff --git a/src/devices/cpu/h8/h8_intc.cpp b/src/devices/cpu/h8/h8_intc.cpp index b4a03cb0972..144f012068e 100644 --- a/src/devices/cpu/h8/h8_intc.cpp +++ b/src/devices/cpu/h8/h8_intc.cpp @@ -3,8 +3,10 @@ #include "emu.h" #include "h8_intc.h" + #include "h8.h" + DEFINE_DEVICE_TYPE(H8_INTC, h8_intc_device, "h8_intc", "H8 interrupt controller") DEFINE_DEVICE_TYPE(H8H_INTC, h8h_intc_device, "h8h_intc", "H8H interrupt controller") DEFINE_DEVICE_TYPE(H8S_INTC, h8s_intc_device, "h8s_intc", "H8S interrupt controller") diff --git a/src/devices/cpu/h8/h8_sci.cpp b/src/devices/cpu/h8/h8_sci.cpp index 2030ca69b93..d78eb04f83e 100644 --- a/src/devices/cpu/h8/h8_sci.cpp +++ b/src/devices/cpu/h8/h8_sci.cpp @@ -3,6 +3,7 @@ #include "emu.h" #include "h8_sci.h" + #include "h8.h" #include "h8_intc.h" @@ -11,7 +12,7 @@ // 1 = transmitted/recieved bytes, reception errors and clock setup // 2 = everything but status register reads // 3 = everything -const int V = 1; +static constexpr int V = 1; DEFINE_DEVICE_TYPE(H8_SCI, h8_sci_device, "h8_sci", "H8 Serial Communications Interface") diff --git a/src/devices/cpu/h8/h8_timer16.cpp b/src/devices/cpu/h8/h8_timer16.cpp index d9db2ec40c7..81bce7a49a6 100644 --- a/src/devices/cpu/h8/h8_timer16.cpp +++ b/src/devices/cpu/h8/h8_timer16.cpp @@ -6,7 +6,7 @@ // Verbosity level // 0 = no messages // 1 = everything -const int V = 0; +static constexpr int V = 0; DEFINE_DEVICE_TYPE(H8_TIMER16, h8_timer16_device, "h8_timer16", "H8 16-bit timer") DEFINE_DEVICE_TYPE(H8_TIMER16_CHANNEL, h8_timer16_channel_device, "h8_timer16_channel", "H8 16-bit timer channel") diff --git a/src/devices/cpu/h8/h8_timer8.cpp b/src/devices/cpu/h8/h8_timer8.cpp index 02d43035991..6976adfbeca 100644 --- a/src/devices/cpu/h8/h8_timer8.cpp +++ b/src/devices/cpu/h8/h8_timer8.cpp @@ -7,7 +7,7 @@ // 0 = no messages // 1 = timer setup // 2 = everything -const int V = 1; +static constexpr int V = 1; DEFINE_DEVICE_TYPE(H8_TIMER8_CHANNEL, h8_timer8_channel_device, "h8_timer8_channel", "H8 8-bit timer channel") DEFINE_DEVICE_TYPE(H8H_TIMER8_CHANNEL, h8h_timer8_channel_device, "h8h_timer8_channel", "H8H 8-bit timer channel") diff --git a/src/mame/neogeo/midas.cpp b/src/mame/neogeo/midas.cpp index 3b81336b33d..6f0f0e4c53c 100644 --- a/src/mame/neogeo/midas.cpp +++ b/src/mame/neogeo/midas.cpp @@ -53,6 +53,8 @@ #include "emu.h" +#include "neogeo_spr.h" + #include "cpu/m68000/m68000.h" #include "cpu/mcs51/mcs51.h" #include "cpu/pic16c5x/pic16c5x.h" @@ -60,8 +62,6 @@ #include "machine/eepromser.h" #include "machine/ticket.h" -#include "neogeo_spr.h" - #include "emupal.h" #include "screen.h" #include "speaker.h" diff --git a/src/mame/skeleton/happyvideo.cpp b/src/mame/skeleton/happyvideo.cpp index 05a9ab552ff..f2b4457282a 100644 --- a/src/mame/skeleton/happyvideo.cpp +++ b/src/mame/skeleton/happyvideo.cpp @@ -39,6 +39,12 @@ * MS90C385B is a +3.3V, 150 MHz, 24-Bit LVDS Flat Panel Display Transmitter. +PCB silkscreen says: +2018.08_08 +CK_RB1808P_V4.1 + +Labeled with a sticker "单8" + The PCB was found without any USB mass storage on the USB port. It is unknown if it needs one (the serial EEPROM contents refers to files that are not on the MK25V4GL). diff --git a/src/mame/taito/pkspirit.cpp b/src/mame/taito/pkspirit.cpp index fad4a4d5030..80b2edf8f2f 100644 --- a/src/mame/taito/pkspirit.cpp +++ b/src/mame/taito/pkspirit.cpp @@ -48,8 +48,8 @@ namespace { class pkspirit_state : public driver_device { public: - pkspirit_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + pkspirit_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_bg_videoram(*this, "bg_videoram"), @@ -68,6 +68,9 @@ private: required_shared_ptr m_bg_videoram; required_shared_ptr m_fg_videoram; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void bg_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); @@ -78,10 +81,6 @@ private: void main_map(address_map &map); void sound_map(address_map &map); - - tilemap_t *m_bg_tilemap = nullptr; - tilemap_t *m_fg_tilemap = nullptr; - }; void pkspirit_state::bg_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) diff --git a/src/osd/modules/debugger/osx/debugconsole.mm b/src/osd/modules/debugger/osx/debugconsole.mm index 0b7ba082875..9673dc852ab 100644 --- a/src/osd/modules/debugger/osx/debugconsole.mm +++ b/src/osd/modules/debugger/osx/debugconsole.mm @@ -143,27 +143,24 @@ NSSize const regCurrent = [regScroll frame].size; NSSize const regSize = [NSScrollView frameSizeForContentSize:[regView maximumFrameSize] horizontalScrollerClass:[NSScroller class] - verticalScrollerClass:[NSScroller class] - borderType:[regScroll borderType] - controlSize: NSControlSizeRegular - scrollerStyle: NSScrollerStyleOverlay - ]; + verticalScrollerClass:[NSScroller class] + borderType:[regScroll borderType] + controlSize:NSControlSizeRegular + scrollerStyle:NSScrollerStyleOverlay]; NSSize const dasmCurrent = [dasmScroll frame].size; NSSize const dasmSize = [NSScrollView frameSizeForContentSize:[dasmView maximumFrameSize] - horizontalScrollerClass:[NSScroller class] - verticalScrollerClass:[NSScroller class] - borderType:[dasmScroll borderType] - controlSize: NSControlSizeRegular - scrollerStyle: NSScrollerStyleOverlay - ]; + horizontalScrollerClass:[NSScroller class] + verticalScrollerClass:[NSScroller class] + borderType:[dasmScroll borderType] + controlSize:NSControlSizeRegular + scrollerStyle:NSScrollerStyleOverlay]; NSSize const consoleCurrent = [consoleContainer frame].size; NSSize consoleSize = [NSScrollView frameSizeForContentSize:[consoleView maximumFrameSize] - horizontalScrollerClass:[NSScroller class] - verticalScrollerClass:[NSScroller class] - borderType:[consoleScroll borderType] - controlSize: NSControlSizeRegular - scrollerStyle: NSScrollerStyleOverlay - ]; + horizontalScrollerClass:[NSScroller class] + verticalScrollerClass:[NSScroller class] + borderType:[consoleScroll borderType] + controlSize:NSControlSizeRegular + scrollerStyle:NSScrollerStyleOverlay]; NSRect windowFrame = [window frame]; NSSize adjustment; diff --git a/src/osd/modules/debugger/osx/deviceinfoviewer.mm b/src/osd/modules/debugger/osx/deviceinfoviewer.mm index a60ba02a5c2..12f1ea1957a 100644 --- a/src/osd/modules/debugger/osx/deviceinfoviewer.mm +++ b/src/osd/modules/debugger/osx/deviceinfoviewer.mm @@ -210,12 +210,11 @@ // create a scroll view for holding everything NSSize desired = [NSScrollView frameSizeForContentSize:[contentView frame].size - horizontalScrollerClass:[NSScroller class] - verticalScrollerClass:[NSScroller class] - borderType: NSNoBorder - controlSize: NSControlSizeRegular - scrollerStyle: NSScrollerStyleOverlay - ]; + horizontalScrollerClass:[NSScroller class] + verticalScrollerClass:[NSScroller class] + borderType:NSNoBorder + controlSize:NSControlSizeRegular + scrollerStyle:NSScrollerStyleOverlay]; [window setContentSize:desired]; contentScroll = [[NSScrollView alloc] initWithFrame:[[window contentView] bounds]]; [contentScroll setDrawsBackground:NO]; diff --git a/src/osd/modules/debugger/osx/devicesviewer.mm b/src/osd/modules/debugger/osx/devicesviewer.mm index 4241aab3e90..02f63a41a6b 100644 --- a/src/osd/modules/debugger/osx/devicesviewer.mm +++ b/src/osd/modules/debugger/osx/devicesviewer.mm @@ -161,12 +161,11 @@ // calculate the optimal size for everything NSSize const desired = [NSScrollView frameSizeForContentSize:NSMakeSize(480, 320) - horizontalScrollerClass:[NSScroller class] - verticalScrollerClass:[NSScroller class] - borderType:[devicesScroll borderType] - controlSize: NSControlSizeRegular - scrollerStyle: NSScrollerStyleOverlay - ]; + horizontalScrollerClass:[NSScroller class] + verticalScrollerClass:[NSScroller class] + borderType:[devicesScroll borderType] + controlSize:NSControlSizeRegular + scrollerStyle:NSScrollerStyleOverlay]; [self cascadeWindowWithDesiredSize:desired forView:devicesScroll]; // don't forget the result diff --git a/src/osd/modules/debugger/osx/disassemblyviewer.mm b/src/osd/modules/debugger/osx/disassemblyviewer.mm index 9cd714708c7..20ec457f628 100644 --- a/src/osd/modules/debugger/osx/disassemblyviewer.mm +++ b/src/osd/modules/debugger/osx/disassemblyviewer.mm @@ -120,12 +120,11 @@ // calculate the optimal size for everything NSSize const desired = [NSScrollView frameSizeForContentSize:[dasmView maximumFrameSize] - horizontalScrollerClass:[NSScroller class] - verticalScrollerClass:[NSScroller class] - borderType:[dasmScroll borderType] - controlSize: NSControlSizeRegular - scrollerStyle: NSScrollerStyleOverlay - ]; + horizontalScrollerClass:[NSScroller class] + verticalScrollerClass:[NSScroller class] + borderType:[dasmScroll borderType] + controlSize:NSControlSizeRegular + scrollerStyle:NSScrollerStyleOverlay]; [self cascadeWindowWithDesiredSize:desired forView:dasmScroll]; // don't forget the result diff --git a/src/osd/modules/debugger/osx/errorlogviewer.mm b/src/osd/modules/debugger/osx/errorlogviewer.mm index 5c392b9cd6b..68d6f312b7c 100644 --- a/src/osd/modules/debugger/osx/errorlogviewer.mm +++ b/src/osd/modules/debugger/osx/errorlogviewer.mm @@ -43,14 +43,13 @@ // calculate the optimal size for everything { NSSize desired = [NSScrollView frameSizeForContentSize:[logView maximumFrameSize] - horizontalScrollerClass:[NSScroller class] - verticalScrollerClass:[NSScroller class] - borderType:[logScroll borderType] - controlSize: NSControlSizeRegular - scrollerStyle: NSScrollerStyleOverlay - ]; + horizontalScrollerClass:[NSScroller class] + verticalScrollerClass:[NSScroller class] + borderType:[logScroll borderType] + controlSize:NSControlSizeRegular + scrollerStyle:NSScrollerStyleOverlay]; - // this thing starts with no content, so its prefered height may be very small + // this thing starts with no content, so its preferred height may be very small desired.height = std::max(desired.height, CGFloat(240)); [self cascadeWindowWithDesiredSize:desired forView:logScroll]; } diff --git a/src/osd/modules/debugger/osx/memoryviewer.mm b/src/osd/modules/debugger/osx/memoryviewer.mm index f5de21571bf..1d45650dcbb 100644 --- a/src/osd/modules/debugger/osx/memoryviewer.mm +++ b/src/osd/modules/debugger/osx/memoryviewer.mm @@ -118,12 +118,11 @@ // calculate the optimal size for everything NSSize const desired = [NSScrollView frameSizeForContentSize:[memoryView maximumFrameSize] - horizontalScrollerClass:[NSScroller class] - verticalScrollerClass:[NSScroller class] - borderType:[memoryScroll borderType] - controlSize: NSControlSizeRegular - scrollerStyle: NSScrollerStyleOverlay - ]; + horizontalScrollerClass:[NSScroller class] + verticalScrollerClass:[NSScroller class] + borderType:[memoryScroll borderType] + controlSize:NSControlSizeRegular + scrollerStyle:NSScrollerStyleOverlay]; [self cascadeWindowWithDesiredSize:desired forView:memoryScroll]; // don't forget the result diff --git a/src/osd/modules/debugger/osx/pointsviewer.mm b/src/osd/modules/debugger/osx/pointsviewer.mm index 2a12d628236..8b2f69c50b5 100644 --- a/src/osd/modules/debugger/osx/pointsviewer.mm +++ b/src/osd/modules/debugger/osx/pointsviewer.mm @@ -139,26 +139,23 @@ // calculate the optimal size for everything NSSize const breakDesired = [NSScrollView frameSizeForContentSize:[breakView maximumFrameSize] - horizontalScrollerClass:[NSScroller class] - verticalScrollerClass:[NSScroller class] - borderType:[breakScroll borderType] - controlSize: NSControlSizeRegular - scrollerStyle: NSScrollerStyleOverlay - ]; + horizontalScrollerClass:[NSScroller class] + verticalScrollerClass:[NSScroller class] + borderType:[breakScroll borderType] + controlSize:NSControlSizeRegular + scrollerStyle:NSScrollerStyleOverlay]; NSSize const watchDesired = [NSScrollView frameSizeForContentSize:[watchView maximumFrameSize] - horizontalScrollerClass:[NSScroller class] - verticalScrollerClass:[NSScroller class] - borderType:[watchScroll borderType] - controlSize: NSControlSizeRegular - scrollerStyle: NSScrollerStyleOverlay - ]; + horizontalScrollerClass:[NSScroller class] + verticalScrollerClass:[NSScroller class] + borderType:[watchScroll borderType] + controlSize:NSControlSizeRegular + scrollerStyle:NSScrollerStyleOverlay]; NSSize const registerDesired = [NSScrollView frameSizeForContentSize:[registerView maximumFrameSize] - horizontalScrollerClass:[NSScroller class] - verticalScrollerClass:[NSScroller class] - borderType:[registerScroll borderType] - controlSize: NSControlSizeRegular - scrollerStyle: NSScrollerStyleOverlay - ]; + horizontalScrollerClass:[NSScroller class] + verticalScrollerClass:[NSScroller class] + borderType:[registerScroll borderType] + controlSize:NSControlSizeRegular + scrollerStyle:NSScrollerStyleOverlay]; NSSize const desired = NSMakeSize(std::max({ breakDesired.width, watchDesired.width, registerDesired.width }), std::max({ breakDesired.height, watchDesired.height, registerDesired.height })); [self cascadeWindowWithDesiredSize:desired forView:tabs];