Miscellaneous cleanup

This commit is contained in:
Vas Crabb 2023-06-24 07:07:55 +10:00
parent 8c1a6fb6bb
commit 8c3f2a3c41
19 changed files with 89 additions and 87 deletions

View File

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

View File

@ -12,6 +12,7 @@
#define MAME_BUS_COCO_COCO_FDC_H
#include "cococart.h"
#include "imagedev/floppy.h"

View File

@ -35,16 +35,17 @@ public:
STATE_DTC_WRITEBACK = 0x10006
};
template<int port> auto read_adc() { return m_read_adc[port].bind(); }
template<int sci> auto write_sci_tx() { return m_sci_tx[sci].bind(); }
template<int sci> auto write_sci_clk() { return m_sci_clk[sci].bind(); }
template<int sci> void sci_rx_w(int state) { m_sci[sci]->do_rx_w(state); }
template<int sci> void sci_clk_w(int state) { m_sci[sci]->do_clk_w(state); }
template<int Port> auto read_adc() { return m_read_adc[Port].bind(); }
template<int Sci> auto write_sci_tx() { return m_sci_tx[Sci].bind(); }
template<int Sci> 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<int Sci> void sci_rx_w(int state) { m_sci[Sci]->do_rx_w(state); }
template<int Sci> 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);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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<uint16_t> m_bg_videoram;
required_shared_ptr<uint16_t> 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)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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