From 8bf71eec3b9a97ce7a04a2df6bd5d9121a8f6874 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 26 Jun 2020 04:41:42 +1000 Subject: [PATCH] cleanup and loose ends: * Added AsmJit to COPYING * Changed some added code to better match surrounding code style * Removed completely unused members from mw8080bw.h state class * Made some code better align with MAME standards --- COPYING | 5 ++++- src/devices/bus/qbus/pc11.cpp | 3 ++- src/devices/bus/qbus/pc11.h | 8 +++----- src/devices/bus/qbus/qbus.cpp | 4 ++-- src/emu/debug/textbuf.cpp | 8 ++++---- src/emu/debug/textbuf.h | 14 +++++++------- src/mame/drivers/rt1715.cpp | 2 +- src/mame/includes/mw8080bw.h | 7 +------ src/mame/video/gime.cpp | 12 ++++++------ 9 files changed, 30 insertions(+), 33 deletions(-) diff --git a/COPYING b/COPYING index 0018c92aab1..740df3074d1 100644 --- a/COPYING +++ b/COPYING @@ -237,7 +237,10 @@ LZMA SDK code is compatible with open source licenses, for example, you can include it to GNU GPL or GNU LGPL code. -Nano SVG = Simple stupid SVG parser +AsmJit - a lightweight library for machine code generation. +Copyright (c) 2008-2020 The AsmJit Authors + +Nano SVG - Simple stupid SVG parser Copyright (c) 2013-14 Mikko Mononen memon@inside.org Simple DirectMedia Layer diff --git a/src/devices/bus/qbus/pc11.cpp b/src/devices/bus/qbus/pc11.cpp index 395a0235388..984c8f14e4e 100644 --- a/src/devices/bus/qbus/pc11.cpp +++ b/src/devices/bus/qbus/pc11.cpp @@ -6,6 +6,7 @@ ***************************************************************************/ +#include "emu.h" #include "pc11.h" @@ -13,7 +14,7 @@ #define LOG_DBG (1U << 2) //#define VERBOSE (LOG_GENERAL | LOG_DBG) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" diff --git a/src/devices/bus/qbus/pc11.h b/src/devices/bus/qbus/pc11.h index 0ecba20bc16..0de064029ae 100644 --- a/src/devices/bus/qbus/pc11.h +++ b/src/devices/bus/qbus/pc11.h @@ -6,13 +6,11 @@ ***************************************************************************/ +#ifndef MAME_BUS_QBUS_PC11_H +#define MAME_BUS_QBUS_PC11_H + #pragma once -#ifndef __PC11__ -#define __PC11__ - -#include "emu.h" - #include "qbus.h" #include "includes/pdp11.h" diff --git a/src/devices/bus/qbus/qbus.cpp b/src/devices/bus/qbus/qbus.cpp index 602f2cac685..293be5bcf27 100644 --- a/src/devices/bus/qbus/qbus.cpp +++ b/src/devices/bus/qbus/qbus.cpp @@ -26,8 +26,8 @@ void qbus_cards(device_slot_interface &device) // DEVICE DEFINITIONS //************************************************************************** -DEFINE_DEVICE_TYPE(QBUS, qbus_device, "qbus", "QBUS bus") -DEFINE_DEVICE_TYPE(QBUS_SLOT, qbus_slot_device, "qbus_slot", "QBUS slot") +DEFINE_DEVICE_TYPE(QBUS, qbus_device, "qbus", "DEC Qbus bus") +DEFINE_DEVICE_TYPE(QBUS_SLOT, qbus_slot_device, "qbus_slot", "DEC Qbus slot") //************************************************************************** diff --git a/src/emu/debug/textbuf.cpp b/src/emu/debug/textbuf.cpp index 76a4e99322e..395a58482a7 100644 --- a/src/emu/debug/textbuf.cpp +++ b/src/emu/debug/textbuf.cpp @@ -312,7 +312,7 @@ const char *text_buffer_get_seqnum_line(text_buffer *text, u32 seqnum) return &text->buffer[text->lineoffs[(text->linestart + index) % text->linesize]]; } -text_buffer_lines text_buffer_get_lines(text_buffer* text) +text_buffer_lines text_buffer_get_lines(text_buffer *text) { return text_buffer_lines(*text); } @@ -324,13 +324,13 @@ text_buffer_lines text_buffer_get_lines(text_buffer* text) text_buffer_line text_buffer_lines::text_buffer_line_iterator::operator*() const { - const char* line = &m_buffer.buffer[m_buffer.lineoffs[m_lineptr]]; + const char *line = &m_buffer.buffer[m_buffer.lineoffs[m_lineptr]]; auto next_lineptr = m_lineptr + 1; if (next_lineptr == m_buffer.linesize) next_lineptr = 0; - const char* nextline = &m_buffer.buffer[m_buffer.lineoffs[next_lineptr]]; + const char *nextline = &m_buffer.buffer[m_buffer.lineoffs[next_lineptr]]; /* -1 for the '\0' at the end of line */ @@ -347,7 +347,7 @@ text_buffer_line text_buffer_lines::text_buffer_line_iterator::operator*() const Moves to the next line. -----------------------------------------------------------------------*/ -text_buffer_lines::text_buffer_line_iterator& text_buffer_lines::text_buffer_line_iterator::operator++() +text_buffer_lines::text_buffer_line_iterator &text_buffer_lines::text_buffer_line_iterator::operator++() { if (++m_lineptr == m_buffer.linesize) m_lineptr = 0; diff --git a/src/emu/debug/textbuf.h b/src/emu/debug/textbuf.h index b5c941fe6da..f7514701eec 100644 --- a/src/emu/debug/textbuf.h +++ b/src/emu/debug/textbuf.h @@ -29,17 +29,17 @@ struct text_buffer_line class text_buffer_lines { private: - text_buffer& m_buffer; + text_buffer &m_buffer; public: text_buffer_lines(text_buffer& buffer) : m_buffer(buffer) { } class text_buffer_line_iterator { - text_buffer& m_buffer; + text_buffer &m_buffer; s32 m_lineptr; public: - text_buffer_line_iterator(text_buffer& buffer, s32 lineptr) : + text_buffer_line_iterator(text_buffer &buffer, s32 lineptr) : m_buffer(buffer), m_lineptr(lineptr) { @@ -48,15 +48,15 @@ public: /* technically this isn't a valid forward iterator, because * operator * doesn't return a reference */ - text_buffer_line operator *() const; - text_buffer_line_iterator& operator ++(); + text_buffer_line operator*() const; + text_buffer_line_iterator &operator++(); - bool operator != (const text_buffer_line_iterator& rhs) + bool operator!=(const text_buffer_line_iterator& rhs) { return m_lineptr != rhs.m_lineptr; } /* according to C++ spec, only != is needed; == is present for completeness. */ - bool operator == (const text_buffer_line_iterator& rhs) { return !(operator !=(rhs)); } + bool operator==(const text_buffer_line_iterator& rhs) { return !operator!=(rhs); } }; typedef text_buffer_line_iterator iterator; diff --git a/src/mame/drivers/rt1715.cpp b/src/mame/drivers/rt1715.cpp index 5f426cad32e..271d03ded1c 100644 --- a/src/mame/drivers/rt1715.cpp +++ b/src/mame/drivers/rt1715.cpp @@ -43,7 +43,7 @@ #define LOG_BANK (1U << 1) #define VERBOSE (LOG_GENERAL) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGBANK(format, ...) LOGMASKED(LOG_BANK, "%11.6f at %s: " format, machine().time().as_double(), machine().describe_context(), __VA_ARGS__) diff --git a/src/mame/includes/mw8080bw.h b/src/mame/includes/mw8080bw.h index d9a17ebd9d4..cd25098428b 100644 --- a/src/mame/includes/mw8080bw.h +++ b/src/mame/includes/mw8080bw.h @@ -379,19 +379,14 @@ class zzzap_state : public mw8080bw_state { public: zzzap_state(machine_config const &mconfig, device_type type, char const *tag) : - mw8080bw_state(mconfig, type, tag), - m_soundboard(*this, "soundboard") + mw8080bw_state(mconfig, type, tag) { } void zzzap(machine_config &config); private: - void io_w(offs_t offset, u8 data); - void io_map(address_map &map); - - required_device m_soundboard; }; diff --git a/src/mame/video/gime.cpp b/src/mame/video/gime.cpp index a11e00dd637..976616d73d7 100644 --- a/src/mame/video/gime.cpp +++ b/src/mame/video/gime.cpp @@ -569,14 +569,14 @@ void gime_device::update_memory(int bank) // are we in onboard ROM or cart ROM? if (block > 3) { - if( m_cart_rom) + if (m_cart_rom) { // perform the look up memory = &m_cart_rom[((block & 3) * 0x2000) % m_cart_size]; } else { - memory = 0; + memory = 0; } } else @@ -596,11 +596,11 @@ void gime_device::update_memory(int bank) memory += offset; // set the banks - if( memory ) + if (memory) { - read_bank->set_base(memory); - write_bank->set_base(is_read_only ? m_dummy_bank : memory); -} + read_bank->set_base(memory); + write_bank->set_base(is_read_only ? m_dummy_bank : memory); + } else { read_bank->set_base(m_dummy_bank);