mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
hp_dio: add namespace (nw) (#3939)
* hp_dio: add namespace (nw) * hp_dio: add comment on closing namespace brackets (nw)
This commit is contained in:
parent
f644d20981
commit
fce6de9d16
@ -21,7 +21,10 @@ ROM_START(hp98543)
|
||||
ROM_LOAD("1818-3907.bin", 0x000000, 0x002000, CRC(5e2bf02a) SHA1(9ba9391cf39624ef8027ce42c84e100344b2a2b8))
|
||||
ROM_END
|
||||
|
||||
DEFINE_DEVICE_TYPE(HPDIO_98543, dio16_98543_device, "dio98543", "HP98543 medium-res color DIO video card")
|
||||
DEFINE_DEVICE_TYPE_NS(HPDIO_98543, bus::hp_dio, dio16_98543_device, "dio98543", "HP98543 medium-res color DIO video card")
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
|
||||
MACHINE_CONFIG_START(dio16_98543_device::device_add_mconfig)
|
||||
MCFG_SCREEN_ADD(HP98543_SCREEN_NAME, RASTER)
|
||||
@ -53,7 +56,6 @@ MACHINE_CONFIG_START(dio16_98543_device::device_add_mconfig)
|
||||
|
||||
MCFG_DEVICE_ADD("nereid", NEREID, 0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
const tiny_rom_entry *dio16_98543_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME(hp98543);
|
||||
@ -190,3 +192,6 @@ uint32_t dio16_98543_device::screen_update(screen_device &screen, bitmap_rgb32 &
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace bus::hp_dio
|
||||
} // namespace bus
|
||||
|
@ -11,6 +11,9 @@
|
||||
#include "video/nereid.h"
|
||||
#include "machine/ram.h"
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
|
||||
class dio16_98543_device :
|
||||
public device_t,
|
||||
public device_dio16_card_interface,
|
||||
@ -57,7 +60,10 @@ private:
|
||||
|
||||
};
|
||||
|
||||
} // namespace bus::hp_dio
|
||||
} // namespace bus
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(HPDIO_98543, dio16_98543_device)
|
||||
DECLARE_DEVICE_TYPE_NS(HPDIO_98543, bus::hp_dio, dio16_98543_device)
|
||||
|
||||
#endif // MAME_BUS_HPDIO_98543_H
|
||||
|
@ -24,8 +24,10 @@ ROM_END
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(HPDIO_98544, dio16_98544_device, "dio98544", "HP98544 high-res monochrome DIO video card")
|
||||
DEFINE_DEVICE_TYPE_NS(HPDIO_98544, bus::hp_dio, dio16_98544_device, "dio98544", "HP98544 high-res monochrome DIO video card")
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
@ -156,4 +158,5 @@ uint32_t dio16_98544_device::screen_update(screen_device &screen, bitmap_rgb32 &
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace bus::hp_dio
|
||||
} // namespace bus
|
||||
|
@ -14,6 +14,9 @@
|
||||
|
||||
// ======================> dio16_98544_device
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
|
||||
class dio16_98544_device :
|
||||
public device_t,
|
||||
public device_dio16_card_interface,
|
||||
@ -52,7 +55,10 @@ private:
|
||||
required_shared_ptr<uint8_t> m_vram;
|
||||
};
|
||||
|
||||
} // namespace bus::hp_dio
|
||||
} // namespace bus
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(HPDIO_98544, dio16_98544_device)
|
||||
DECLARE_DEVICE_TYPE_NS(HPDIO_98544, bus::hp_dio, dio16_98544_device)
|
||||
|
||||
#endif // MAME_BUS_HPDIO_98544_H
|
||||
|
@ -9,10 +9,13 @@
|
||||
#include "emu.h"
|
||||
#include "hp98603a.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE(HPDIO_98603A, dio16_98603a_device, "dio98603a", "HP98603A BASIC 4.0 ROM card")
|
||||
DEFINE_DEVICE_TYPE_NS(HPDIO_98603A, bus::hp_dio, dio16_98603a_device, "dio98603a", "HP98603A BASIC 4.0 ROM card")
|
||||
|
||||
#define HP98603A_ROM_REGION "98603a_rom"
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
|
||||
ROM_START(hp98603a)
|
||||
ROM_REGION(0x80000, HP98603A_ROM_REGION, 0)
|
||||
ROM_LOAD16_BYTE("98603_80001.bin", 0x00001, 32768, CRC(5d8c9657) SHA1(f5d89e7f8a61072f362532d1b5e05f5b5e3f42b3))
|
||||
@ -75,3 +78,6 @@ READ16_MEMBER(dio16_98603a_device::rom_r)
|
||||
WRITE16_MEMBER(dio16_98603a_device::rom_w)
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace bus::hp_dio
|
||||
} // namespace bus
|
||||
|
@ -8,6 +8,9 @@
|
||||
|
||||
#include "hp_dio.h"
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
|
||||
class dio16_98603a_device :
|
||||
public device_t,
|
||||
public device_dio16_card_interface
|
||||
@ -33,6 +36,9 @@ private:
|
||||
uint8_t *m_rom;
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(HPDIO_98603A, dio16_98603a_device)
|
||||
} // namespace bus::hp_dio
|
||||
} // namespace bus
|
||||
|
||||
DECLARE_DEVICE_TYPE_NS(HPDIO_98603A, bus::hp_dio, dio16_98603a_device)
|
||||
|
||||
#endif // MAME_BUS_HPDIO_98603A_H
|
||||
|
@ -9,10 +9,13 @@
|
||||
#include "emu.h"
|
||||
#include "hp98603b.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE(HPDIO_98603B, dio16_98603b_device, "dio98603b", "HP98603 BASIC ROM card")
|
||||
DEFINE_DEVICE_TYPE_NS(HPDIO_98603B, bus::hp_dio, dio16_98603b_device, "dio98603b", "HP98603 BASIC ROM card")
|
||||
|
||||
#define HP98603B_ROM_REGION "98603b_rom"
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
|
||||
ROM_START(hp98603b)
|
||||
ROM_REGION(0x100000, HP98603B_ROM_REGION, 0)
|
||||
|
||||
@ -69,3 +72,6 @@ READ16_MEMBER(dio16_98603b_device::rom_r)
|
||||
WRITE16_MEMBER(dio16_98603b_device::rom_w)
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace bus::hp_dio
|
||||
} // namespace bus
|
||||
|
@ -8,6 +8,9 @@
|
||||
|
||||
#include "hp_dio.h"
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
|
||||
class dio16_98603b_device :
|
||||
public device_t,
|
||||
public device_dio16_card_interface
|
||||
@ -33,6 +36,9 @@ private:
|
||||
uint8_t *m_rom;
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(HPDIO_98603B, dio16_98603b_device)
|
||||
} // namespace bus::hp_dio
|
||||
} // namespace bus
|
||||
|
||||
DECLARE_DEVICE_TYPE_NS(HPDIO_98603B, bus::hp_dio, dio16_98603b_device)
|
||||
|
||||
#endif // MAME_BUS_HPDIO_98603B_H
|
||||
|
@ -15,8 +15,10 @@
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(HPDIO_98644, dio16_98644_device, "dio98644", "HP98644A Asynchronous Serial Interface")
|
||||
DEFINE_DEVICE_TYPE_NS(HPDIO_98644, bus::hp_dio, dio16_98644_device, "dio98644", "HP98644A Asynchronous Serial Interface")
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
@ -226,3 +228,6 @@ WRITE16_MEMBER(dio16_98644_device::io_w)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace bus::hp_dio
|
||||
} // namespace bus
|
||||
|
@ -15,6 +15,9 @@
|
||||
|
||||
// ======================> dio16_98644_device
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
|
||||
class dio16_98644_device :
|
||||
public device_t,
|
||||
public device_dio16_card_interface
|
||||
@ -49,7 +52,10 @@ private:
|
||||
uint8_t m_data;
|
||||
};
|
||||
|
||||
} // namespace bus::hp_dio
|
||||
} // namespace bus
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(HPDIO_98644, dio16_98644_device)
|
||||
DECLARE_DEVICE_TYPE_NS(HPDIO_98644, bus::hp_dio, dio16_98644_device)
|
||||
|
||||
#endif // MAME_BUS_HPDIO_98644_H
|
||||
|
@ -13,7 +13,13 @@
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(DIO16_SLOT, dio16_slot_device, "dio16_slot", "16-bit DIO slot")
|
||||
DEFINE_DEVICE_TYPE_NS(DIO16_SLOT, bus::hp_dio, dio16_slot_device, "dio16_slot", "16-bit DIO slot")
|
||||
DEFINE_DEVICE_TYPE_NS(DIO32_SLOT, bus::hp_dio, dio32_slot_device, "dio32_slot", "32-bit DIO-II slot")
|
||||
DEFINE_DEVICE_TYPE_NS(DIO16, bus::hp_dio, dio16_device, "dio16", "16-bit DIO bus")
|
||||
DEFINE_DEVICE_TYPE_NS(DIO32, bus::hp_dio, dio32_device, "dio32", "32-bit DIO-II bus")
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
@ -52,14 +58,6 @@ void dio16_slot_device::device_start()
|
||||
throw emu_fatalerror("dio16_slot_device: card device %s (%s) does not implement device_dio16_card_interface\n", card->tag(), card->name());
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(DIO32_SLOT, dio32_slot_device, "dio32_slot", "32-bit DIO-II slot")
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
@ -81,13 +79,6 @@ void dio32_slot_device::device_start()
|
||||
dio16_slot_device::device_start();
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(DIO16, dio16_device, "dio16", "16-bit DIO bus")
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
@ -200,7 +191,7 @@ void device_dio16_card_interface::interface_pre_start()
|
||||
// DIO32 DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(DIO32, dio32_device, "dio32", "32-bit DIO-II bus")
|
||||
|
||||
|
||||
dio32_device::dio32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
dio16_device(mconfig, DIO32, tag, owner, clock)
|
||||
@ -233,3 +224,5 @@ void device_dio32_card_interface::interface_pre_start()
|
||||
if (m_dio_dev && !dynamic_cast<dio32_device *>(m_dio_dev))
|
||||
throw emu_fatalerror("device_dio32_card_interface: DIO32 device %s (%s) in DIO16 slot %s\n", device().tag(), device().name(), m_dio_dev->name());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,26 +17,28 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace bus {
|
||||
namespace hp_dio {
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_DIO16_CPU(_cputag) \
|
||||
downcast<dio16_device &>(*device).set_cputag(_cputag);
|
||||
downcast<bus::hp_dio::dio16_device &>(*device).set_cputag(_cputag);
|
||||
#define MCFG_DIO32_CPU(_cputag) \
|
||||
downcast<dio32_device &>(*device).set_cputag(_cputag);
|
||||
downcast<bus::hp_dio::dio32_device &>(*device).set_cputag(_cputag);
|
||||
|
||||
#define MCFG_ISA_OUT_IRQ3_CB(_devcb) \
|
||||
downcast<dio16_device &>(*device).set_out_irq3_callback(DEVCB_##_devcb);
|
||||
downcast<bus::hp_dio::dio16_device &>(*device).set_out_irq3_callback(DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_ISA_OUT_IRQ4_CB(_devcb) \
|
||||
downcast<dio16_device &>(*device).set_out_irq4_callback(DEVCB_##_devcb);
|
||||
downcast<bus::hp_dio::dio16_device &>(*device).set_out_irq4_callback(DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_ISA_OUT_IRQ5_CB(_devcb) \
|
||||
downcast<dio16_device &>(*device).set_out_irq5_callback(DEVCB_##_devcb);
|
||||
downcast<bus::hp_dio::dio16_device &>(*device).set_out_irq5_callback(DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_ISA_OUT_IRQ6_CB(_devcb) \
|
||||
downcast<dio16_device &>(*device).set_out_irq6_callback(DEVCB_##_devcb);
|
||||
downcast<bus::hp_dio::dio16_device &>(*device).set_out_irq6_callback(DEVCB_##_devcb);
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
@ -75,8 +77,6 @@ protected:
|
||||
required_device<dio16_device> m_dio;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(DIO16_SLOT, dio16_slot_device)
|
||||
|
||||
class device_dio16_card_interface;
|
||||
// ======================> dio16_device
|
||||
@ -133,10 +133,6 @@ protected:
|
||||
devcb_write_line m_out_irq6_cb;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(DIO16, dio16_device)
|
||||
|
||||
// ======================> device_dio16_card_interface
|
||||
|
||||
// class representing interface-specific live dio16 card
|
||||
@ -189,8 +185,6 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(DIO32_SLOT, dio32_slot_device)
|
||||
|
||||
// ======================> dio32_device
|
||||
class dio32_device : public dio16_device
|
||||
@ -207,8 +201,6 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(DIO32, dio32_device)
|
||||
|
||||
// ======================> device_dio32_card_interface
|
||||
|
||||
@ -227,5 +219,13 @@ protected:
|
||||
|
||||
dio32_device &dio() { assert(m_dio_dev); return downcast<dio32_device &>(*m_dio_dev); }
|
||||
};
|
||||
} // namespace bus::hp_dio
|
||||
} // namespace bus
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE_NS(DIO16_SLOT, bus::hp_dio, dio16_slot_device)
|
||||
DECLARE_DEVICE_TYPE_NS(DIO32, bus::hp_dio, dio32_device)
|
||||
DECLARE_DEVICE_TYPE_NS(DIO32_SLOT, bus::hp_dio, dio32_slot_device)
|
||||
DECLARE_DEVICE_TYPE_NS(DIO16, bus::hp_dio, dio16_device)
|
||||
|
||||
#endif // MAME_BUS_HPDIO_HPDIO_H
|
||||
|
Loading…
Reference in New Issue
Block a user