summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/cbmiec/c1541.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-11-15 05:11:51 +1100
committer Vas Crabb <vas@vastheman.com>2019-11-15 05:11:51 +1100
commitce3c38914d4b710e2e40c212af0d61aa4b328de0 (patch)
tree9f68c3964399f72379e3f7c349c57e56756879ca /src/devices/bus/cbmiec/c1541.h
parentf7e679876fef04ee8d1f1ca5af6466423a265ae7 (diff)
c64.cpp, c128.cpp: fixed CBM IEC slot address not being set when replacing devices in machine config
bus/c64/rex_ep256.cpp: fixed array of EPROM slots not being populated (subdevices don't exist at construction time) cleanup: (nw) * having a macro for a device's expected tag in a header is bad - devices should not make assumptions about their tag or their location in the system hierarchy * device types exist in the global namespace - you must not use overly generic names for them as this is likely to cause collisions * device short names and titles each have their own namespace, but they're also global, and it should be possible to work out vaguely what a device is from its names * POSIX reserves all names ending in "_t" at global scope - we want fewer of these causing potential future issues, not more * if your device is in the global namespace, you should name it in a way that's not asking for name collisions to happen * we have a simple convention for device class names - it doesn't hurt to follow it: - concrete device_t implementations end with "_device" - device_interface implementations end with "_interface" (and often start with "device_") - abstract classes that derive from device_t end with "_device_base" * if you want to give your slot card device classes short, generic names, put them in a namespace for the "bus" * if you really want to use names ending with "_t", put them in a namespace or nest them inside a class
Diffstat (limited to 'src/devices/bus/cbmiec/c1541.h')
-rw-r--r--src/devices/bus/cbmiec/c1541.h168
1 files changed, 80 insertions, 88 deletions
diff --git a/src/devices/bus/cbmiec/c1541.h b/src/devices/bus/cbmiec/c1541.h
index 0382b62278e..36310429f63 100644
--- a/src/devices/bus/cbmiec/c1541.h
+++ b/src/devices/bus/cbmiec/c1541.h
@@ -22,26 +22,18 @@
//**************************************************************************
-// MACROS / CONSTANTS
-//**************************************************************************
-
-#define C1541_TAG "c1541"
-
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
-// ======================> c1541_base_t
+// ======================> c1541_device_base
-class c1541_base_t : public device_t,
+class c1541_device_base : public device_t,
public device_cbm_iec_interface,
public device_c64_floppy_parallel_interface
{
protected:
// construction/destruction
- c1541_base_t(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ c1541_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
// device-level overrides
virtual void device_start() override;
@@ -56,7 +48,7 @@ protected:
virtual void cbm_iec_reset(int state) override;
// device_c64_floppy_parallel_interface overrides
- virtual void parallel_data_w(uint8_t data) override;
+ virtual void parallel_data_w(u8 data) override;
virtual void parallel_strobe_w(int state) override;
required_device<floppy_image_device> m_floppy;
@@ -105,13 +97,13 @@ private:
};
-// ======================> c1540_t
+// ======================> c1540_device
-class c1540_t : public c1541_base_t
+class c1540_device : public c1541_device_base
{
public:
// construction/destruction
- c1540_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ c1540_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -119,13 +111,13 @@ protected:
};
-// ======================> c1541_t
+// ======================> c1541_device
-class c1541_t : public c1541_base_t
+class c1541_device : public c1541_device_base
{
public:
// construction/destruction
- c1541_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ c1541_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -133,13 +125,13 @@ protected:
};
-// ======================> c1541c_t
+// ======================> c1541c_device
-class c1541c_t : public c1541_base_t
+class c1541c_device : public c1541_device_base
{
public:
// construction/destruction
- c1541c_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ c1541c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -152,13 +144,13 @@ private:
};
-// ======================> c1541ii_t
+// ======================> c1541ii_device
-class c1541ii_t : public c1541_base_t
+class c1541ii_device : public c1541_device_base
{
public:
// construction/destruction
- c1541ii_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ c1541ii_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -166,13 +158,13 @@ protected:
};
-// ======================> sx1541_t
+// ======================> sx1541_device
-class sx1541_t : public c1541_base_t
+class sx1541_device : public c1541_device_base
{
public:
// construction/destruction
- sx1541_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sx1541_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -180,13 +172,13 @@ protected:
};
-// ======================> fsd1_t
+// ======================> fsd1_device
-class fsd1_t : public c1541_base_t
+class fsd1_device : public c1541_device_base
{
public:
// construction/destruction
- fsd1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ fsd1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -194,13 +186,13 @@ protected:
};
-// ======================> fsd2_t
+// ======================> fsd2_device
-class fsd2_t : public c1541_base_t
+class fsd2_device : public c1541_device_base
{
public:
// construction/destruction
- fsd2_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ fsd2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -211,13 +203,13 @@ protected:
};
-// ======================> csd1_t
+// ======================> csd1_device
-class csd1_t : public c1541_base_t
+class csd1_device : public c1541_device_base
{
public:
// construction/destruction
- csd1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ csd1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -225,13 +217,13 @@ protected:
};
-// ======================> c1541_dolphin_dos_t
+// ======================> c1541_dolphin_dos_device
-class c1541_dolphin_dos_t : public c1541_base_t
+class c1541_dolphin_dos_device : public c1541_device_base
{
public:
// construction/destruction
- c1541_dolphin_dos_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ c1541_dolphin_dos_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -240,13 +232,13 @@ protected:
};
-// ======================> c1541_professional_dos_v1_t
+// ======================> c1541_professional_dos_v1_device
-class c1541_professional_dos_v1_t : public c1541_base_t
+class c1541_professional_dos_v1_device : public c1541_device_base
{
public:
// construction/destruction
- c1541_professional_dos_v1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ c1541_professional_dos_v1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -255,13 +247,13 @@ protected:
};
-// ======================> c1541_prologic_dos_classic_t
+// ======================> c1541_prologic_dos_classic_device
-class c1541_prologic_dos_classic_t : public c1541_base_t
+class c1541_prologic_dos_classic_device : public c1541_device_base
{
public:
// construction/destruction
- c1541_prologic_dos_classic_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ c1541_prologic_dos_classic_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -285,13 +277,13 @@ private:
};
-// ======================> indus_gt_t
+// ======================> indus_gt_device
-class indus_gt_t : public c1541_base_t
+class indus_gt_device : public c1541_device_base
{
public:
// construction/destruction
- indus_gt_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ indus_gt_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -299,13 +291,13 @@ protected:
};
-// ======================> technica_t
+// ======================> technica_device
-class technica_t : public c1541_base_t
+class technica_device : public c1541_device_base
{
public:
// construction/destruction
- technica_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ technica_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -313,13 +305,13 @@ protected:
};
-// ======================> blue_chip_t
+// ======================> blue_chip_device
-class blue_chip_t : public c1541_base_t
+class blue_chip_device : public c1541_device_base
{
public:
// construction/destruction
- blue_chip_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ blue_chip_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -327,13 +319,13 @@ protected:
};
-// ======================> commander_c2_t
+// ======================> commander_c2_device
-class commander_c2_t : public c1541_base_t
+class commander_c2_device : public c1541_device_base
{
public:
// construction/destruction
- commander_c2_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ commander_c2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -341,13 +333,13 @@ protected:
};
-// ======================> enhancer_2000_t
+// ======================> enhancer_2000_device
-class enhancer_2000_t : public c1541_base_t
+class enhancer_2000_device : public c1541_device_base
{
public:
// construction/destruction
- enhancer_2000_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ enhancer_2000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -355,13 +347,13 @@ protected:
};
-// ======================> fd148_t
+// ======================> fd148_device
-class fd148_t : public c1541_base_t
+class fd148_device : public c1541_device_base
{
public:
// construction/destruction
- fd148_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ fd148_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -369,13 +361,13 @@ protected:
};
-// ======================> msd_sd1_t
+// ======================> msd_sd1_device
-class msd_sd1_t : public c1541_base_t
+class msd_sd1_device : public c1541_device_base
{
public:
// construction/destruction
- msd_sd1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ msd_sd1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -383,13 +375,13 @@ protected:
};
-// ======================> msd_sd2_t
+// ======================> msd_sd2_device
-class msd_sd2_t : public c1541_base_t
+class msd_sd2_device : public c1541_device_base
{
public:
// construction/destruction
- msd_sd2_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ msd_sd2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// optional information overrides
@@ -398,25 +390,25 @@ protected:
// device type definition
-DECLARE_DEVICE_TYPE(C1540, c1540_t)
-DECLARE_DEVICE_TYPE(C1541, c1541_t)
-DECLARE_DEVICE_TYPE(C1541C, c1541c_t)
-DECLARE_DEVICE_TYPE(C1541II, c1541ii_t)
-DECLARE_DEVICE_TYPE(SX1541, sx1541_t)
-DECLARE_DEVICE_TYPE(FSD1, fsd1_t)
-DECLARE_DEVICE_TYPE(FSD2, fsd2_t)
-DECLARE_DEVICE_TYPE(CSD1, csd1_t)
-DECLARE_DEVICE_TYPE(C1541_DOLPHIN_DOS, c1541_dolphin_dos_t)
-DECLARE_DEVICE_TYPE(C1541_PROFESSIONAL_DOS_V1, c1541_professional_dos_v1_t)
-DECLARE_DEVICE_TYPE(C1541_PROLOGIC_DOS_CLASSIC, c1541_prologic_dos_classic_t)
-DECLARE_DEVICE_TYPE(INDUS_GT, indus_gt_t)
-DECLARE_DEVICE_TYPE(TECHNICA, technica_t)
-DECLARE_DEVICE_TYPE(BLUE_CHIP, blue_chip_t)
-DECLARE_DEVICE_TYPE(COMMANDER_C2, commander_c2_t)
-DECLARE_DEVICE_TYPE(ENHANCER_2000, enhancer_2000_t)
-DECLARE_DEVICE_TYPE(FD148, fd148_t)
-DECLARE_DEVICE_TYPE(MSD_SD1, msd_sd1_t)
-DECLARE_DEVICE_TYPE(MSD_SD2, msd_sd2_t)
+DECLARE_DEVICE_TYPE(C1540, c1540_device)
+DECLARE_DEVICE_TYPE(C1541, c1541_device)
+DECLARE_DEVICE_TYPE(C1541C, c1541c_device)
+DECLARE_DEVICE_TYPE(C1541II, c1541ii_device)
+DECLARE_DEVICE_TYPE(SX1541, sx1541_device)
+DECLARE_DEVICE_TYPE(FSD1, fsd1_device)
+DECLARE_DEVICE_TYPE(FSD2, fsd2_device)
+DECLARE_DEVICE_TYPE(CSD1, csd1_device)
+DECLARE_DEVICE_TYPE(C1541_DOLPHIN_DOS, c1541_dolphin_dos_device)
+DECLARE_DEVICE_TYPE(C1541_PROFESSIONAL_DOS_V1, c1541_professional_dos_v1_device)
+DECLARE_DEVICE_TYPE(C1541_PROLOGIC_DOS_CLASSIC, c1541_prologic_dos_classic_device)
+DECLARE_DEVICE_TYPE(INDUS_GT, indus_gt_device)
+DECLARE_DEVICE_TYPE(TECHNICA, technica_device)
+DECLARE_DEVICE_TYPE(BLUE_CHIP, blue_chip_device)
+DECLARE_DEVICE_TYPE(COMMANDER_C2, commander_c2_device)
+DECLARE_DEVICE_TYPE(ENHANCER_2000, enhancer_2000_device)
+DECLARE_DEVICE_TYPE(FD148, fd148_device)
+DECLARE_DEVICE_TYPE(MSD_SD1, msd_sd1_device)
+DECLARE_DEVICE_TYPE(MSD_SD2, msd_sd2_device)
#endif // MAME_BUS_CBMIEC_C1541_H