summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/ieee488/c8050.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2017-05-07 23:18:47 +1000
committer Vas Crabb <vas@vastheman.com>2017-05-14 21:44:11 +1000
commit0f0d39ef81562c75e79176dd3bebb1e491ca39d5 (patch)
tree201cee7fdf55ee800f83859a92efd2cfe66cf2b3 /src/devices/bus/ieee488/c8050.cpp
parente6c4be2b4d71c7a6c95be0bae111eb416ff0f9e7 (diff)
Move static data out of devices into the device types. This is a significant change, so please pay attention.
The core changes are: * Short name, full name and source file are no longer members of device_t, they are part of the device type * MACHINE_COFIG_START no longer needs a driver class * MACHINE_CONFIG_DERIVED_CLASS is no longer necessary * Specify the state class you want in the GAME/COMP/CONS line * The compiler will work out the base class where the driver init member is declared * There is one static device type object per driver rather than one per machine configuration Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type. * DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders. * DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type. Use DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types. * These macros declare storage for the static data, and instantiate the device type and device finder templates. The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate. Things I've actually messed with substantially: * More descriptive names for a lot of devices * Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes * Changed DECO BSMT2000 ready callback into a device delegate * Untangled Microprose 3D noise from driver state * Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices * Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly * Started to break out common parts of Samsung ARM SoC devices * Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++ * Tried to make Z180 table allocation/setup a bit safer * Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant * Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size * Imporved encapsulation of Z80DART channels * Refactored the SPC7110 bit table generator loop to make it more readable * Added wrappers for SNES PPU operations so members can be made protected * Factored out some boilerplate for YM chips with PSG * toaplan2 gfx * stic/intv resolution * Video System video * Out Run/Y-board sprite alignment * GIC video hookup * Amstrad CPC ROM box members * IQ151 ROM cart region * MSX cart IRQ callback resolution time * SMS passthrough control devices starting subslots I've smoke-tested several drivers, but I've probably missed something. Things I've missed will likely blow up spectacularly with failure to bind errors and the like. Let me know if there's more subtle breakage (could have happened in FM or Voodoo). And can everyone please, please try to keep stuff clean. In particular, please stop polluting the global namespace. Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros. It feels like an uphill battle trying to get this stuff under control while more of it's added.
Diffstat (limited to 'src/devices/bus/ieee488/c8050.cpp')
-rw-r--r--src/devices/bus/ieee488/c8050.cpp307
1 files changed, 150 insertions, 157 deletions
diff --git a/src/devices/bus/ieee488/c8050.cpp b/src/devices/bus/ieee488/c8050.cpp
index 11ea6204870..91118edd649 100644
--- a/src/devices/bus/ieee488/c8050.cpp
+++ b/src/devices/bus/ieee488/c8050.cpp
@@ -54,10 +54,10 @@ enum
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type C8050 = device_creator<c8050_t>;
-const device_type C8250 = device_creator<c8250_t>;
-const device_type C8250LP = device_creator<c8250lp_t>;
-const device_type SFD1001 = device_creator<sfd1001_t>;
+DEFINE_DEVICE_TYPE(C8050, c8050_device, "c8050", "Commodore 8050")
+DEFINE_DEVICE_TYPE(C8250, c8250_device, "c8250", "Commodore 8250")
+DEFINE_DEVICE_TYPE(C8250LP, c8250lp_device, "c8250lp", "Commodore 8250LP")
+DEFINE_DEVICE_TYPE(SFD1001, sfd1001_device, "sfd10001", "Commodore SFD-1001")
//-------------------------------------------------
@@ -110,7 +110,7 @@ ROM_END
// rom_region - device-specific ROM region
//-------------------------------------------------
-const tiny_rom_entry *c8050_t::device_rom_region() const
+const tiny_rom_entry *c8050_device::device_rom_region() const
{
return ROM_NAME( c8050 );
}
@@ -144,7 +144,7 @@ ROM_END
// rom_region - device-specific ROM region
//-------------------------------------------------
-const tiny_rom_entry *c8250lp_t::device_rom_region() const
+const tiny_rom_entry *c8250lp_device::device_rom_region() const
{
return ROM_NAME( c8250lp );
}
@@ -174,7 +174,7 @@ ROM_END
// rom_region - device-specific ROM region
//-------------------------------------------------
-const tiny_rom_entry *sfd1001_t::device_rom_region() const
+const tiny_rom_entry *sfd1001_device::device_rom_region() const
{
return ROM_NAME( sfd1001 );
}
@@ -184,11 +184,11 @@ const tiny_rom_entry *sfd1001_t::device_rom_region() const
// ADDRESS_MAP( c8050_main_mem )
//-------------------------------------------------
-static ADDRESS_MAP_START( c8050_main_mem, AS_PROGRAM, 8, c8050_t )
- AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0100) AM_DEVICE(M6532_0_TAG, mos6532_t, ram_map)
- AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0100) AM_DEVICE(M6532_1_TAG, mos6532_t, ram_map)
- AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVICE(M6532_0_TAG, mos6532_t, io_map)
- AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVICE(M6532_1_TAG, mos6532_t, io_map)
+static ADDRESS_MAP_START( c8050_main_mem, AS_PROGRAM, 8, c8050_device )
+ AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0100) AM_DEVICE(M6532_0_TAG, mos6532_new_device, ram_map)
+ AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0100) AM_DEVICE(M6532_1_TAG, mos6532_new_device, ram_map)
+ AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVICE(M6532_0_TAG, mos6532_new_device, io_map)
+ AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVICE(M6532_1_TAG, mos6532_new_device, io_map)
AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share1")
AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share2")
AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share3")
@@ -201,16 +201,16 @@ ADDRESS_MAP_END
// ADDRESS_MAP( c8050_fdc_mem )
//-------------------------------------------------
-static ADDRESS_MAP_START( c8050_fdc_mem, AS_PROGRAM, 8, c8050_t )
+static ADDRESS_MAP_START( c8050_fdc_mem, AS_PROGRAM, 8, c8050_device )
ADDRESS_MAP_GLOBAL_MASK(0x1fff)
- AM_RANGE(0x0000, 0x003f) AM_MIRROR(0x0300) AM_DEVICE(M6530_TAG, mos6530_t, ram_map)
+ AM_RANGE(0x0000, 0x003f) AM_MIRROR(0x0300) AM_DEVICE(M6530_TAG, mos6530_new_device, ram_map)
AM_RANGE(0x0040, 0x004f) AM_MIRROR(0x0330) AM_DEVICE(M6522_TAG, via6522_device, map)
- AM_RANGE(0x0080, 0x008f) AM_MIRROR(0x0330) AM_DEVICE(M6530_TAG, mos6530_t, io_map)
+ AM_RANGE(0x0080, 0x008f) AM_MIRROR(0x0330) AM_DEVICE(M6530_TAG, mos6530_new_device, io_map)
AM_RANGE(0x0400, 0x07ff) AM_RAM AM_SHARE("share1")
AM_RANGE(0x0800, 0x0bff) AM_RAM AM_SHARE("share2")
AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_SHARE("share3")
AM_RANGE(0x1000, 0x13ff) AM_RAM AM_SHARE("share4")
- AM_RANGE(0x1c00, 0x1fff) AM_DEVICE(M6530_TAG, mos6530_t, rom_map)
+ AM_RANGE(0x1c00, 0x1fff) AM_DEVICE(M6530_TAG, mos6530_new_device, rom_map)
ADDRESS_MAP_END
@@ -218,11 +218,11 @@ ADDRESS_MAP_END
// ADDRESS_MAP( c8250lp_fdc_mem )
//-------------------------------------------------
-static ADDRESS_MAP_START( c8250lp_fdc_mem, AS_PROGRAM, 8, c8050_t )
+static ADDRESS_MAP_START( c8250lp_fdc_mem, AS_PROGRAM, 8, c8050_device )
ADDRESS_MAP_GLOBAL_MASK(0x1fff)
- AM_RANGE(0x0000, 0x003f) AM_MIRROR(0x0300) AM_DEVICE(M6530_TAG, mos6530_t, ram_map)
+ AM_RANGE(0x0000, 0x003f) AM_MIRROR(0x0300) AM_DEVICE(M6530_TAG, mos6530_new_device, ram_map)
AM_RANGE(0x0040, 0x004f) AM_MIRROR(0x0330) AM_DEVICE(M6522_TAG, via6522_device, map)
- AM_RANGE(0x0080, 0x008f) AM_MIRROR(0x0330) AM_DEVICE(M6530_TAG, mos6530_t, io_map)
+ AM_RANGE(0x0080, 0x008f) AM_MIRROR(0x0330) AM_DEVICE(M6530_TAG, mos6530_new_device, io_map)
AM_RANGE(0x0400, 0x07ff) AM_RAM AM_SHARE("share1")
AM_RANGE(0x0800, 0x0bff) AM_RAM AM_SHARE("share2")
AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_SHARE("share3")
@@ -235,11 +235,11 @@ ADDRESS_MAP_END
// ADDRESS_MAP( sfd1001_fdc_mem )
//-------------------------------------------------
-static ADDRESS_MAP_START( sfd1001_fdc_mem, AS_PROGRAM, 8, c8050_t )
+static ADDRESS_MAP_START( sfd1001_fdc_mem, AS_PROGRAM, 8, c8050_device )
ADDRESS_MAP_GLOBAL_MASK(0x1fff)
- AM_RANGE(0x0000, 0x003f) AM_MIRROR(0x0300) AM_DEVICE(M6530_TAG, mos6530_t, ram_map)
+ AM_RANGE(0x0000, 0x003f) AM_MIRROR(0x0300) AM_DEVICE(M6530_TAG, mos6530_new_device, ram_map)
AM_RANGE(0x0040, 0x004f) AM_MIRROR(0x0330) AM_DEVICE(M6522_TAG, via6522_device, map)
- AM_RANGE(0x0080, 0x008f) AM_MIRROR(0x0330) AM_DEVICE(M6530_TAG, mos6530_t, io_map)
+ AM_RANGE(0x0080, 0x008f) AM_MIRROR(0x0330) AM_DEVICE(M6530_TAG, mos6530_new_device, io_map)
AM_RANGE(0x0400, 0x07ff) AM_RAM AM_SHARE("share1")
AM_RANGE(0x0800, 0x0bff) AM_RAM AM_SHARE("share2")
AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_SHARE("share3")
@@ -252,7 +252,7 @@ ADDRESS_MAP_END
// riot6532 uc1
//-------------------------------------------------
-READ8_MEMBER( c8050_t::dio_r )
+READ8_MEMBER( c8050_device::dio_r )
{
/*
@@ -272,7 +272,7 @@ READ8_MEMBER( c8050_t::dio_r )
return m_bus->dio_r();
}
-WRITE8_MEMBER( c8050_t::dio_w )
+WRITE8_MEMBER( c8050_device::dio_w )
{
/*
@@ -296,7 +296,7 @@ WRITE8_MEMBER( c8050_t::dio_w )
// riot6532 ue1
//-------------------------------------------------
-READ8_MEMBER( c8050_t::riot1_pa_r )
+READ8_MEMBER( c8050_device::riot1_pa_r )
{
/*
@@ -327,7 +327,7 @@ READ8_MEMBER( c8050_t::riot1_pa_r )
return data;
}
-WRITE8_MEMBER( c8050_t::riot1_pa_w )
+WRITE8_MEMBER( c8050_device::riot1_pa_w )
{
/*
@@ -362,7 +362,7 @@ WRITE8_MEMBER( c8050_t::riot1_pa_w )
update_ieee_signals();
}
-READ8_MEMBER( c8050_t::riot1_pb_r )
+READ8_MEMBER( c8050_device::riot1_pb_r )
{
/*
@@ -393,7 +393,7 @@ READ8_MEMBER( c8050_t::riot1_pb_r )
return data;
}
-WRITE8_MEMBER( c8050_t::riot1_pb_w )
+WRITE8_MEMBER( c8050_device::riot1_pb_w )
{
/*
@@ -420,7 +420,7 @@ WRITE8_MEMBER( c8050_t::riot1_pb_w )
machine().output().set_led_value(LED_ERR, BIT(data, 5));
}
-WRITE8_MEMBER( c8050_t::via_pb_w )
+WRITE8_MEMBER( c8050_device::via_pb_w )
{
/*
@@ -467,7 +467,7 @@ SLOT_INTERFACE_END
// FLOPPY_FORMATS( floppy_formats )
//-------------------------------------------------
-FLOPPY_FORMATS_MEMBER( c8050_t::floppy_formats )
+FLOPPY_FORMATS_MEMBER( c8050_device::floppy_formats )
FLOPPY_D80_FORMAT
FLOPPY_FORMATS_END
@@ -494,7 +494,7 @@ SLOT_INTERFACE_END
// FLOPPY_FORMATS( floppy_formats )
//-------------------------------------------------
-FLOPPY_FORMATS_MEMBER( c8250_t::floppy_formats )
+FLOPPY_FORMATS_MEMBER( c8250_device::floppy_formats )
FLOPPY_D80_FORMAT,
FLOPPY_D82_FORMAT
FLOPPY_FORMATS_END
@@ -504,7 +504,7 @@ FLOPPY_FORMATS_END
// FLOPPY_FORMATS( floppy_formats )
//-------------------------------------------------
-FLOPPY_FORMATS_MEMBER( c8250lp_t::floppy_formats )
+FLOPPY_FORMATS_MEMBER( c8250lp_device::floppy_formats )
FLOPPY_D80_FORMAT,
FLOPPY_D82_FORMAT
FLOPPY_FORMATS_END
@@ -514,7 +514,7 @@ FLOPPY_FORMATS_END
// FLOPPY_FORMATS( floppy_formats )
//-------------------------------------------------
-FLOPPY_FORMATS_MEMBER( sfd1001_t::floppy_formats )
+FLOPPY_FORMATS_MEMBER( sfd1001_device::floppy_formats )
FLOPPY_D80_FORMAT,
FLOPPY_D82_FORMAT
FLOPPY_FORMATS_END
@@ -529,15 +529,15 @@ static MACHINE_CONFIG_FRAGMENT( c8050 )
MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_12MHz/12)
MCFG_CPU_PROGRAM_MAP(c8050_main_mem)
- MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532n, XTAL_12MHz/12)
- MCFG_MOS6530n_IN_PA_CB(READ8(c8050_t, dio_r))
- MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_t, dio_w))
+ MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, dio_r))
+ MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, dio_w))
- MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532n, XTAL_12MHz/12)
- MCFG_MOS6530n_IN_PA_CB(READ8(c8050_t, riot1_pa_r))
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_t, riot1_pa_w))
- MCFG_MOS6530n_IN_PB_CB(READ8(c8050_t, riot1_pb_r))
- MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_t, riot1_pb_w))
+ MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, riot1_pa_r))
+ MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w))
+ MCFG_MOS6530n_IN_PB_CB(READ8(c8050_device, riot1_pb_r))
+ MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w))
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
@@ -545,17 +545,17 @@ static MACHINE_CONFIG_FRAGMENT( c8050 )
MCFG_CPU_PROGRAM_MAP(c8050_fdc_mem)
MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL_12MHz/12)
- MCFG_VIA6522_READPA_HANDLER(DEVREAD8(FDC_TAG, c8050_fdc_t, read))
- MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(c8050_t, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_12MHz/12)
- MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_t, write))
- MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, drv_sel_w))
- MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r))
+ MCFG_VIA6522_READPA_HANDLER(DEVREAD8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(c8050_device, via_pb_w))
+ MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
+
+ MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_device, write))
+ MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, drv_sel_w))
+ MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
+ MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
+ MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_device, wps_r))
MCFG_MOS6530n_IN_PB6_CB(VCC) // SINGLE SIDED
MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
@@ -564,8 +564,8 @@ static MACHINE_CONFIG_FRAGMENT( c8050 )
MCFG_C8050_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1))
MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
MCFG_C8050_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
- MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8050_floppies, "525ssqd", c8050_t::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8050_floppies, "525ssqd", c8050_t::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8050_floppies, "525ssqd", c8050_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8050_floppies, "525ssqd", c8050_device::floppy_formats)
MACHINE_CONFIG_END
@@ -574,7 +574,7 @@ MACHINE_CONFIG_END
// machine configurations
//-------------------------------------------------
-machine_config_constructor c8050_t::device_mconfig_additions() const
+machine_config_constructor c8050_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( c8050 );
}
@@ -589,15 +589,15 @@ static MACHINE_CONFIG_FRAGMENT( c8250 )
MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_12MHz/12)
MCFG_CPU_PROGRAM_MAP(c8050_main_mem)
- MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532n, XTAL_12MHz/12)
- MCFG_MOS6530n_IN_PA_CB(READ8(c8050_t, dio_r))
- MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_t, dio_w))
+ MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, dio_r))
+ MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, dio_w))
- MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532n, XTAL_12MHz/12)
- MCFG_MOS6530n_IN_PA_CB(READ8(c8050_t, riot1_pa_r))
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_t, riot1_pa_w))
- MCFG_MOS6530n_IN_PB_CB(READ8(c8050_t, riot1_pb_r))
- MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_t, riot1_pb_w))
+ MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, riot1_pa_r))
+ MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w))
+ MCFG_MOS6530n_IN_PB_CB(READ8(c8050_device, riot1_pb_r))
+ MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w))
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
@@ -605,18 +605,18 @@ static MACHINE_CONFIG_FRAGMENT( c8250 )
MCFG_CPU_PROGRAM_MAP(c8050_fdc_mem)
MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL_12MHz/12)
- MCFG_VIA6522_READPA_HANDLER(DEVREAD8(FDC_TAG, c8050_fdc_t, read))
- MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(c8050_t, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_12MHz/12)
- MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_t, write))
- MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, drv_sel_w))
- MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r))
- MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, odd_hd_w))
+ MCFG_VIA6522_READPA_HANDLER(DEVREAD8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(c8050_device, via_pb_w))
+ MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
+
+ MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_device, write))
+ MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, drv_sel_w))
+ MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
+ MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
+ MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_device, wps_r))
+ MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, odd_hd_w))
MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
@@ -625,8 +625,8 @@ static MACHINE_CONFIG_FRAGMENT( c8250 )
MCFG_C8050_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1))
MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
MCFG_C8050_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
- MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", c8250_t::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, "525qd", c8250_t::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", c8250_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, "525qd", c8250_device::floppy_formats)
MACHINE_CONFIG_END
@@ -635,7 +635,7 @@ MACHINE_CONFIG_END
// machine configurations
//-------------------------------------------------
-machine_config_constructor c8250_t::device_mconfig_additions() const
+machine_config_constructor c8250_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( c8250 );
}
@@ -650,15 +650,15 @@ static MACHINE_CONFIG_FRAGMENT( c8250lp )
MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_12MHz/12)
MCFG_CPU_PROGRAM_MAP(c8050_main_mem)
- MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532n, XTAL_12MHz/12)
- MCFG_MOS6530n_IN_PA_CB(READ8(c8050_t, dio_r))
- MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_t, dio_w))
+ MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, dio_r))
+ MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, dio_w))
- MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532n, XTAL_12MHz/12)
- MCFG_MOS6530n_IN_PA_CB(READ8(c8050_t, riot1_pa_r))
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_t, riot1_pa_w))
- MCFG_MOS6530n_IN_PB_CB(READ8(c8050_t, riot1_pb_r))
- MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_t, riot1_pb_w))
+ MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, riot1_pa_r))
+ MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w))
+ MCFG_MOS6530n_IN_PB_CB(READ8(c8050_device, riot1_pb_r))
+ MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w))
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
@@ -666,18 +666,18 @@ static MACHINE_CONFIG_FRAGMENT( c8250lp )
MCFG_CPU_PROGRAM_MAP(c8250lp_fdc_mem)
MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL_12MHz/12)
- MCFG_VIA6522_READPA_HANDLER(DEVREAD8(FDC_TAG, c8050_fdc_t, read))
- MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(c8050_t, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_12MHz/12)
- MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_t, write))
- MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, drv_sel_w))
- MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r))
- MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, odd_hd_w))
+ MCFG_VIA6522_READPA_HANDLER(DEVREAD8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(c8050_device, via_pb_w))
+ MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
+
+ MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_device, write))
+ MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, drv_sel_w))
+ MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
+ MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
+ MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_device, wps_r))
+ MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, odd_hd_w))
MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
@@ -686,8 +686,8 @@ static MACHINE_CONFIG_FRAGMENT( c8250lp )
MCFG_C8050_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1))
MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
MCFG_C8050_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
- MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", c8250lp_t::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, "525qd", c8250lp_t::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", c8250lp_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, "525qd", c8250lp_device::floppy_formats)
MACHINE_CONFIG_END
@@ -696,7 +696,7 @@ MACHINE_CONFIG_END
// machine configurations
//-------------------------------------------------
-machine_config_constructor c8250lp_t::device_mconfig_additions() const
+machine_config_constructor c8250lp_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( c8250lp );
}
@@ -711,15 +711,15 @@ static MACHINE_CONFIG_FRAGMENT( sfd1001 )
MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_12MHz/12)
MCFG_CPU_PROGRAM_MAP(c8050_main_mem)
- MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532n, XTAL_12MHz/12)
- MCFG_MOS6530n_IN_PA_CB(READ8(c8050_t, dio_r))
- MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_t, dio_w))
+ MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, dio_r))
+ MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, dio_w))
- MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532n, XTAL_12MHz/12)
- MCFG_MOS6530n_IN_PA_CB(READ8(c8050_t, riot1_pa_r))
- MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_t, riot1_pa_w))
- MCFG_MOS6530n_IN_PB_CB(READ8(c8050_t, riot1_pb_r))
- MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_t, riot1_pb_w))
+ MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, riot1_pa_r))
+ MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w))
+ MCFG_MOS6530n_IN_PB_CB(READ8(c8050_device, riot1_pb_r))
+ MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w))
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0))
// controller
@@ -727,17 +727,17 @@ static MACHINE_CONFIG_FRAGMENT( sfd1001 )
MCFG_CPU_PROGRAM_MAP(sfd1001_fdc_mem)
MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL_12MHz/12)
- MCFG_VIA6522_READPA_HANDLER(DEVREAD8(FDC_TAG, c8050_fdc_t, read))
- MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(c8050_t, via_pb_w))
- MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, mode_sel_w))
- MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, rw_sel_w))
-
- MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_12MHz/12)
- MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_t, write))
- MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w))
- MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds1_w))
- MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r))
- MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, odd_hd_w))
+ MCFG_VIA6522_READPA_HANDLER(DEVREAD8(FDC_TAG, c8050_fdc_device, read))
+ MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(c8050_device, via_pb_w))
+ MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_device, mode_sel_w))
+ MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_device, rw_sel_w))
+
+ MCFG_DEVICE_ADD(M6530_TAG, MOS6530_NEW, XTAL_12MHz/12)
+ MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_device, write))
+ MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, ds0_w))
+ MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, ds1_w))
+ MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_device, wps_r))
+ MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_device, odd_hd_w))
MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE))
@@ -746,7 +746,7 @@ static MACHINE_CONFIG_FRAGMENT( sfd1001 )
MCFG_C8050_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1))
MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
MCFG_C8050_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
- MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", sfd1001_floppies, "525qd", sfd1001_t::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", sfd1001_floppies, "525qd", sfd1001_device::floppy_formats)
MACHINE_CONFIG_END
@@ -755,7 +755,7 @@ MACHINE_CONFIG_END
// machine configurations
//-------------------------------------------------
-machine_config_constructor sfd1001_t::device_mconfig_additions() const
+machine_config_constructor sfd1001_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( sfd1001 );
}
@@ -783,7 +783,7 @@ INPUT_PORTS_END
// input_ports - device-specific input ports
//-------------------------------------------------
-ioport_constructor c8050_t::device_input_ports() const
+ioport_constructor c8050_device::device_input_ports() const
{
return INPUT_PORTS_NAME( c8050 );
}
@@ -798,7 +798,7 @@ ioport_constructor c8050_t::device_input_ports() const
// update_ieee_signals -
//-------------------------------------------------
-inline void c8050_t::update_ieee_signals()
+inline void c8050_device::update_ieee_signals()
{
int atn = m_bus->atn_r();
int nrfd = !(!(!(atn && m_atna) && m_rfdo) || !(atn || m_atna));
@@ -815,11 +815,11 @@ inline void c8050_t::update_ieee_signals()
//**************************************************************************
//-------------------------------------------------
-// c8050_t - constructor
+// c8050_device - constructor
//-------------------------------------------------
-c8050_t::c8050_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+c8050_device::c8050_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, type, tag, owner, clock),
device_ieee488_interface(mconfig, *this),
m_maincpu(*this, M6502_TAG),
m_fdccpu(*this, M6504_TAG),
@@ -833,59 +833,52 @@ c8050_t::c8050_t(const machine_config &mconfig, device_type type, const char *na
m_address(*this, "ADDRESS"),
m_rfdo(1),
m_daco(1),
- m_atna(1), m_ifc(0)
+ m_atna(1),
+ m_ifc(0)
{
}
-c8050_t::c8050_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, C8050, "C8050", tag, owner, clock, "c8050", __FILE__),
- device_ieee488_interface(mconfig, *this),
- m_maincpu(*this, M6502_TAG),
- m_fdccpu(*this, M6504_TAG),
- m_riot0(*this, M6532_0_TAG),
- m_riot1(*this, M6532_1_TAG),
- m_miot(*this, M6530_TAG),
- m_via(*this, M6522_TAG),
- m_floppy0(*this, FDC_TAG ":0"),
- m_floppy1(*this, FDC_TAG ":1"),
- m_fdc(*this, FDC_TAG),
- m_address(*this, "ADDRESS"),
- m_rfdo(1),
- m_daco(1),
- m_atna(1), m_ifc(0)
+c8050_device::c8050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ c8050_device(mconfig, C8050, tag, owner, clock)
{
}
//-------------------------------------------------
-// c8250_t - constructor
+// c8250_device - constructor
//-------------------------------------------------
-c8250_t::c8250_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- c8050_t(mconfig, C8250, "C8250", tag, owner, clock, "c8250", __FILE__) { }
+c8250_device::c8250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ c8050_device(mconfig, C8250, tag, owner, clock)
+{
+}
//-------------------------------------------------
-// c8250lp_t - constructor
+// c8250lp_device - constructor
//-------------------------------------------------
-c8250lp_t::c8250lp_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- c8050_t(mconfig, C8250LP, "C8250LP", tag, owner, clock, "c8250lp", __FILE__) { }
+c8250lp_device::c8250lp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ c8050_device(mconfig, C8250LP, tag, owner, clock)
+{
+}
//-------------------------------------------------
-// sfd1001_t - constructor
+// sfd1001_device - constructor
//-------------------------------------------------
-sfd1001_t::sfd1001_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- c8050_t(mconfig, SFD1001, "SFD1001", tag, owner, clock, "sfd1001", __FILE__) { }
+sfd1001_device::sfd1001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ c8050_device(mconfig, SFD1001, tag, owner, clock)
+{
+}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
-void c8050_t::device_start()
+void c8050_device::device_start()
{
// install image callbacks
m_fdc->set_floppy(m_floppy0, m_floppy1);
@@ -901,7 +894,7 @@ void c8050_t::device_start()
// device_reset - device-specific reset
//-------------------------------------------------
-void c8050_t::device_reset()
+void c8050_device::device_reset()
{
m_maincpu->reset();
@@ -928,7 +921,7 @@ void c8050_t::device_reset()
// ieee488_atn -
//-------------------------------------------------
-void c8050_t::ieee488_atn(int state)
+void c8050_device::ieee488_atn(int state)
{
update_ieee_signals();
@@ -940,7 +933,7 @@ void c8050_t::ieee488_atn(int state)
// ieee488_ifc -
//-------------------------------------------------
-void c8050_t::ieee488_ifc(int state)
+void c8050_device::ieee488_ifc(int state)
{
if (!m_ifc && state)
{