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 "emu.h"
#include "cococart.h"
#include "coco_fdc.h" #include "coco_fdc.h"
#include "meb_intrf.h" #include "meb_intrf.h"
#include "imagedev/floppy.h"
#include "machine/ds1315.h" #include "machine/ds1315.h"
#include "machine/input_merger.h" #include "machine/input_merger.h"
#include "machine/msm6242.h" #include "machine/msm6242.h"
#include "machine/wd_fdc.h" #include "machine/wd_fdc.h"
#include "imagedev/floppy.h"
#include "formats/dmk_dsk.h" #include "formats/dmk_dsk.h"
#include "formats/flex_dsk.h"
#include "formats/fs_coco_os9.h" #include "formats/fs_coco_os9.h"
#include "formats/fs_coco_rsdos.h" #include "formats/fs_coco_rsdos.h"
#include "formats/jvc_dsk.h" #include "formats/jvc_dsk.h"
#include "formats/os9_dsk.h" #include "formats/os9_dsk.h"
#include "formats/sdf_dsk.h" #include "formats/sdf_dsk.h"
#include "formats/vdk_dsk.h" #include "formats/vdk_dsk.h"
#include "formats/flex_dsk.h"
#define LOG_WDFDC (1U << 1) // Shows register setup #define LOG_WDFDC (1U << 1) // Shows register setup
#define LOG_WDIO (1U << 2) // Shows data read and write #define LOG_WDIO (1U << 2) // Shows data read and write

View File

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

View File

@ -35,16 +35,17 @@ public:
STATE_DTC_WRITEBACK = 0x10006 STATE_DTC_WRITEBACK = 0x10006
}; };
template<int port> auto read_adc() { return m_read_adc[port].bind(); } 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_tx() { return m_sci_tx[Sci].bind(); }
template<int sci> auto write_sci_clk() { return m_sci_clk[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); }
void sci_set_external_clock_period(int sci, const attotime &period) { void sci_set_external_clock_period(int sci, const attotime &period) {
m_sci[sci].lookup()->do_set_external_clock_period(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 internal_update();
void set_irq(int irq_vector, int irq_level, bool irq_nmi); void set_irq(int irq_vector, int irq_level, bool irq_nmi);
bool trigger_dma(int vector); bool trigger_dma(int vector);

View File

@ -6,7 +6,7 @@
// Verbosity level // Verbosity level
// 0 = no messages // 0 = no messages
// 1 = everything // 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_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") 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 "emu.h"
#include "h8_dtc.h" #include "h8_dtc.h"
#include "h8.h" #include "h8.h"
// Verbosity level // Verbosity level
// 0 = no messages // 0 = no messages
// 1 = in-memory registers once read // 1 = in-memory registers once read
// 2 = everything // 2 = everything
const int V = 0; static constexpr int V = 0;
DEFINE_DEVICE_TYPE(H8_DTC, h8_dtc_device, "h8_dtc", "H8 DTC controller") DEFINE_DEVICE_TYPE(H8_DTC, h8_dtc_device, "h8_dtc", "H8 DTC controller")

View File

@ -3,8 +3,10 @@
#include "emu.h" #include "emu.h"
#include "h8_intc.h" #include "h8_intc.h"
#include "h8.h" #include "h8.h"
DEFINE_DEVICE_TYPE(H8_INTC, h8_intc_device, "h8_intc", "H8 interrupt controller") 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(H8H_INTC, h8h_intc_device, "h8h_intc", "H8H interrupt controller")
DEFINE_DEVICE_TYPE(H8S_INTC, h8s_intc_device, "h8s_intc", "H8S 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 "emu.h"
#include "h8_sci.h" #include "h8_sci.h"
#include "h8.h" #include "h8.h"
#include "h8_intc.h" #include "h8_intc.h"
@ -11,7 +12,7 @@
// 1 = transmitted/recieved bytes, reception errors and clock setup // 1 = transmitted/recieved bytes, reception errors and clock setup
// 2 = everything but status register reads // 2 = everything but status register reads
// 3 = everything // 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") DEFINE_DEVICE_TYPE(H8_SCI, h8_sci_device, "h8_sci", "H8 Serial Communications Interface")

View File

@ -6,7 +6,7 @@
// Verbosity level // Verbosity level
// 0 = no messages // 0 = no messages
// 1 = everything // 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, 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") 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 // 0 = no messages
// 1 = timer setup // 1 = timer setup
// 2 = everything // 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(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") 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 "emu.h"
#include "neogeo_spr.h"
#include "cpu/m68000/m68000.h" #include "cpu/m68000/m68000.h"
#include "cpu/mcs51/mcs51.h" #include "cpu/mcs51/mcs51.h"
#include "cpu/pic16c5x/pic16c5x.h" #include "cpu/pic16c5x/pic16c5x.h"
@ -60,8 +62,6 @@
#include "machine/eepromser.h" #include "machine/eepromser.h"
#include "machine/ticket.h" #include "machine/ticket.h"
#include "neogeo_spr.h"
#include "emupal.h" #include "emupal.h"
#include "screen.h" #include "screen.h"
#include "speaker.h" #include "speaker.h"

View File

@ -39,6 +39,12 @@
* MS90C385B is a +3.3V, 150 MHz, 24-Bit LVDS Flat Panel Display Transmitter. * 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 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). (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 class pkspirit_state : public driver_device
{ {
public: public:
pkspirit_state(const machine_config &mconfig, device_type type, const char *tag) pkspirit_state(const machine_config &mconfig, device_type type, const char *tag) :
: driver_device(mconfig, type, tag), driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"), m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"), m_gfxdecode(*this, "gfxdecode"),
m_bg_videoram(*this, "bg_videoram"), 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_bg_videoram;
required_shared_ptr<uint16_t> m_fg_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); 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); 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 main_map(address_map &map);
void sound_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) void pkspirit_state::bg_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)

View File

@ -145,25 +145,22 @@
horizontalScrollerClass:[NSScroller class] horizontalScrollerClass:[NSScroller class]
verticalScrollerClass:[NSScroller class] verticalScrollerClass:[NSScroller class]
borderType:[regScroll borderType] borderType:[regScroll borderType]
controlSize: NSControlSizeRegular controlSize:NSControlSizeRegular
scrollerStyle: NSScrollerStyleOverlay scrollerStyle:NSScrollerStyleOverlay];
];
NSSize const dasmCurrent = [dasmScroll frame].size; NSSize const dasmCurrent = [dasmScroll frame].size;
NSSize const dasmSize = [NSScrollView frameSizeForContentSize:[dasmView maximumFrameSize] NSSize const dasmSize = [NSScrollView frameSizeForContentSize:[dasmView maximumFrameSize]
horizontalScrollerClass:[NSScroller class] horizontalScrollerClass:[NSScroller class]
verticalScrollerClass:[NSScroller class] verticalScrollerClass:[NSScroller class]
borderType:[dasmScroll borderType] borderType:[dasmScroll borderType]
controlSize: NSControlSizeRegular controlSize:NSControlSizeRegular
scrollerStyle: NSScrollerStyleOverlay scrollerStyle:NSScrollerStyleOverlay];
];
NSSize const consoleCurrent = [consoleContainer frame].size; NSSize const consoleCurrent = [consoleContainer frame].size;
NSSize consoleSize = [NSScrollView frameSizeForContentSize:[consoleView maximumFrameSize] NSSize consoleSize = [NSScrollView frameSizeForContentSize:[consoleView maximumFrameSize]
horizontalScrollerClass:[NSScroller class] horizontalScrollerClass:[NSScroller class]
verticalScrollerClass:[NSScroller class] verticalScrollerClass:[NSScroller class]
borderType:[consoleScroll borderType] borderType:[consoleScroll borderType]
controlSize: NSControlSizeRegular controlSize:NSControlSizeRegular
scrollerStyle: NSScrollerStyleOverlay scrollerStyle:NSScrollerStyleOverlay];
];
NSRect windowFrame = [window frame]; NSRect windowFrame = [window frame];
NSSize adjustment; NSSize adjustment;

View File

@ -212,10 +212,9 @@
NSSize desired = [NSScrollView frameSizeForContentSize:[contentView frame].size NSSize desired = [NSScrollView frameSizeForContentSize:[contentView frame].size
horizontalScrollerClass:[NSScroller class] horizontalScrollerClass:[NSScroller class]
verticalScrollerClass:[NSScroller class] verticalScrollerClass:[NSScroller class]
borderType: NSNoBorder borderType:NSNoBorder
controlSize: NSControlSizeRegular controlSize:NSControlSizeRegular
scrollerStyle: NSScrollerStyleOverlay scrollerStyle:NSScrollerStyleOverlay];
];
[window setContentSize:desired]; [window setContentSize:desired];
contentScroll = [[NSScrollView alloc] initWithFrame:[[window contentView] bounds]]; contentScroll = [[NSScrollView alloc] initWithFrame:[[window contentView] bounds]];
[contentScroll setDrawsBackground:NO]; [contentScroll setDrawsBackground:NO];

View File

@ -164,9 +164,8 @@
horizontalScrollerClass:[NSScroller class] horizontalScrollerClass:[NSScroller class]
verticalScrollerClass:[NSScroller class] verticalScrollerClass:[NSScroller class]
borderType:[devicesScroll borderType] borderType:[devicesScroll borderType]
controlSize: NSControlSizeRegular controlSize:NSControlSizeRegular
scrollerStyle: NSScrollerStyleOverlay scrollerStyle:NSScrollerStyleOverlay];
];
[self cascadeWindowWithDesiredSize:desired forView:devicesScroll]; [self cascadeWindowWithDesiredSize:desired forView:devicesScroll];
// don't forget the result // don't forget the result

View File

@ -123,9 +123,8 @@
horizontalScrollerClass:[NSScroller class] horizontalScrollerClass:[NSScroller class]
verticalScrollerClass:[NSScroller class] verticalScrollerClass:[NSScroller class]
borderType:[dasmScroll borderType] borderType:[dasmScroll borderType]
controlSize: NSControlSizeRegular controlSize:NSControlSizeRegular
scrollerStyle: NSScrollerStyleOverlay scrollerStyle:NSScrollerStyleOverlay];
];
[self cascadeWindowWithDesiredSize:desired forView:dasmScroll]; [self cascadeWindowWithDesiredSize:desired forView:dasmScroll];
// don't forget the result // don't forget the result

View File

@ -46,11 +46,10 @@
horizontalScrollerClass:[NSScroller class] horizontalScrollerClass:[NSScroller class]
verticalScrollerClass:[NSScroller class] verticalScrollerClass:[NSScroller class]
borderType:[logScroll borderType] borderType:[logScroll borderType]
controlSize: NSControlSizeRegular controlSize:NSControlSizeRegular
scrollerStyle: NSScrollerStyleOverlay 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)); desired.height = std::max(desired.height, CGFloat(240));
[self cascadeWindowWithDesiredSize:desired forView:logScroll]; [self cascadeWindowWithDesiredSize:desired forView:logScroll];
} }

View File

@ -121,9 +121,8 @@
horizontalScrollerClass:[NSScroller class] horizontalScrollerClass:[NSScroller class]
verticalScrollerClass:[NSScroller class] verticalScrollerClass:[NSScroller class]
borderType:[memoryScroll borderType] borderType:[memoryScroll borderType]
controlSize: NSControlSizeRegular controlSize:NSControlSizeRegular
scrollerStyle: NSScrollerStyleOverlay scrollerStyle:NSScrollerStyleOverlay];
];
[self cascadeWindowWithDesiredSize:desired forView:memoryScroll]; [self cascadeWindowWithDesiredSize:desired forView:memoryScroll];
// don't forget the result // don't forget the result

View File

@ -142,23 +142,20 @@
horizontalScrollerClass:[NSScroller class] horizontalScrollerClass:[NSScroller class]
verticalScrollerClass:[NSScroller class] verticalScrollerClass:[NSScroller class]
borderType:[breakScroll borderType] borderType:[breakScroll borderType]
controlSize: NSControlSizeRegular controlSize:NSControlSizeRegular
scrollerStyle: NSScrollerStyleOverlay scrollerStyle:NSScrollerStyleOverlay];
];
NSSize const watchDesired = [NSScrollView frameSizeForContentSize:[watchView maximumFrameSize] NSSize const watchDesired = [NSScrollView frameSizeForContentSize:[watchView maximumFrameSize]
horizontalScrollerClass:[NSScroller class] horizontalScrollerClass:[NSScroller class]
verticalScrollerClass:[NSScroller class] verticalScrollerClass:[NSScroller class]
borderType:[watchScroll borderType] borderType:[watchScroll borderType]
controlSize: NSControlSizeRegular controlSize:NSControlSizeRegular
scrollerStyle: NSScrollerStyleOverlay scrollerStyle:NSScrollerStyleOverlay];
];
NSSize const registerDesired = [NSScrollView frameSizeForContentSize:[registerView maximumFrameSize] NSSize const registerDesired = [NSScrollView frameSizeForContentSize:[registerView maximumFrameSize]
horizontalScrollerClass:[NSScroller class] horizontalScrollerClass:[NSScroller class]
verticalScrollerClass:[NSScroller class] verticalScrollerClass:[NSScroller class]
borderType:[registerScroll borderType] borderType:[registerScroll borderType]
controlSize: NSControlSizeRegular controlSize:NSControlSizeRegular
scrollerStyle: NSScrollerStyleOverlay scrollerStyle:NSScrollerStyleOverlay];
];
NSSize const desired = NSMakeSize(std::max({ breakDesired.width, watchDesired.width, registerDesired.width }), NSSize const desired = NSMakeSize(std::max({ breakDesired.width, watchDesired.width, registerDesired.width }),
std::max({ breakDesired.height, watchDesired.height, registerDesired.height })); std::max({ breakDesired.height, watchDesired.height, registerDesired.height }));
[self cascadeWindowWithDesiredSize:desired forView:tabs]; [self cascadeWindowWithDesiredSize:desired forView:tabs];