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
This commit is contained in:
Vas Crabb 2020-06-26 04:41:42 +10:00
parent fc970b9f82
commit 8bf71eec3b
9 changed files with 30 additions and 33 deletions

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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")
//**************************************************************************

View File

@ -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;

View File

@ -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;

View File

@ -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__)

View File

@ -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<zzzap_audio_device> m_soundboard;
};

View File

@ -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);