diff options
author | 2016-01-20 21:42:13 +0100 | |
---|---|---|
committer | 2016-01-20 21:42:13 +0100 | |
commit | 4e8e3066f847cc0fa11539f4d9ab8a63f70ca475 (patch) | |
tree | 25d48b50f2b89dd5b9e7dbbfeeb85c534ec6852a /src/devices/imagedev | |
parent | 3a8ccb89b426509be06089a19c51ecf55567ed1b (diff) |
reverting:
SHA-1: 1f90ceab075c4869298e963bf0a14a0aac2f1caa
* tags are now strings (nw)
fix start project for custom builds in Visual Studio (nw)
Diffstat (limited to 'src/devices/imagedev')
24 files changed, 128 insertions, 128 deletions
diff --git a/src/devices/imagedev/bitbngr.cpp b/src/devices/imagedev/bitbngr.cpp index 6f87fa9932e..9577d9e1efd 100644 --- a/src/devices/imagedev/bitbngr.cpp +++ b/src/devices/imagedev/bitbngr.cpp @@ -21,7 +21,7 @@ const device_type BITBANGER = &device_creator<bitbanger_device>; ctor -------------------------------------------------*/ -bitbanger_device::bitbanger_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +bitbanger_device::bitbanger_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, BITBANGER, "Bitbanger", tag, owner, clock, "bitbanger", __FILE__), device_image_interface(mconfig, *this) { diff --git a/src/devices/imagedev/bitbngr.h b/src/devices/imagedev/bitbngr.h index 6974687ae60..cd0f38df516 100644 --- a/src/devices/imagedev/bitbngr.h +++ b/src/devices/imagedev/bitbngr.h @@ -14,7 +14,7 @@ class bitbanger_device : public device_t, { public: // construction/destruction - bitbanger_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + bitbanger_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // image-level overrides virtual bool call_load() override; diff --git a/src/devices/imagedev/cassette.cpp b/src/devices/imagedev/cassette.cpp index 6ab29e997da..aedc6509d42 100644 --- a/src/devices/imagedev/cassette.cpp +++ b/src/devices/imagedev/cassette.cpp @@ -27,7 +27,7 @@ const device_type CASSETTE = &device_creator<cassette_image_device>; // cassette_image_device - constructor //------------------------------------------------- -cassette_image_device::cassette_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +cassette_image_device::cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, CASSETTE, "Cassette", tag, owner, clock, "cassette_image", __FILE__), device_image_interface(mconfig, *this), m_cassette(nullptr), @@ -391,7 +391,7 @@ void cassette_image_device::call_display() y = 0.5f; cassette_device_iterator iter(device().machine().root_device()); - for (dev = iter.first(); dev != nullptr && dev->tag()!=device().tag(); dev = iter.next()) + for (dev = iter.first(); dev != nullptr && strcmp( dev->tag(), device().tag() ); dev = iter.next()) y += 1; y *= device().machine().ui().get_line_height() + 2.0f * UI_BOX_TB_BORDER; diff --git a/src/devices/imagedev/cassette.h b/src/devices/imagedev/cassette.h index 432305001fb..e7edd0acef2 100644 --- a/src/devices/imagedev/cassette.h +++ b/src/devices/imagedev/cassette.h @@ -46,7 +46,7 @@ class cassette_image_device : public device_t, { public: // construction/destruction - cassette_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); virtual ~cassette_image_device(); static void static_set_formats(device_t &device, const struct CassetteFormat* const *formats) { downcast<cassette_image_device &>(device).m_formats = formats; } diff --git a/src/devices/imagedev/chd_cd.cpp b/src/devices/imagedev/chd_cd.cpp index 8be7c2aefaa..d9ab295dfad 100644 --- a/src/devices/imagedev/chd_cd.cpp +++ b/src/devices/imagedev/chd_cd.cpp @@ -26,7 +26,7 @@ const device_type CDROM = &device_creator<cdrom_image_device>; // cdrom_image_device - constructor //------------------------------------------------- -cdrom_image_device::cdrom_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +cdrom_image_device::cdrom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, CDROM, "CD-ROM Image", tag, owner, clock, "cdrom_image", __FILE__), device_image_interface(mconfig, *this), m_cdrom_handle(nullptr), @@ -35,7 +35,7 @@ cdrom_image_device::cdrom_image_device(const machine_config &mconfig, std::strin { } -cdrom_image_device::cdrom_image_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) +cdrom_image_device::cdrom_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), device_image_interface(mconfig, *this), m_cdrom_handle(nullptr), @@ -79,7 +79,7 @@ const option_guide *cdrom_image_device::create_option_guide() const void cdrom_image_device::device_start() { // try to locate the CHD from a DISK_REGION - chd_file *chd = machine().rom_load().get_disk_handle(owner()->tag().c_str()); + chd_file *chd = machine().rom_load().get_disk_handle(owner()->tag() ); if( chd != nullptr ) { m_cdrom_handle = cdrom_open( chd ); diff --git a/src/devices/imagedev/chd_cd.h b/src/devices/imagedev/chd_cd.h index f9d03528ba1..5d229a471b4 100644 --- a/src/devices/imagedev/chd_cd.h +++ b/src/devices/imagedev/chd_cd.h @@ -24,8 +24,8 @@ class cdrom_image_device : public device_t, { public: // construction/destruction - cdrom_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); - cdrom_image_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + cdrom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + cdrom_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); virtual ~cdrom_image_device(); static void static_set_interface(device_t &device, const char *_interface) { downcast<cdrom_image_device &>(device).m_interface = _interface; } diff --git a/src/devices/imagedev/diablo.cpp b/src/devices/imagedev/diablo.cpp index 3debbccce2c..be8b3e500f2 100644 --- a/src/devices/imagedev/diablo.cpp +++ b/src/devices/imagedev/diablo.cpp @@ -29,7 +29,7 @@ const device_type DIABLO = &device_creator<diablo_image_device>; // diablo_image_device - constructor //------------------------------------------------- -diablo_image_device::diablo_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +diablo_image_device::diablo_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, DIABLO, "Diablo", tag, owner, clock, "diablo_image", __FILE__), device_image_interface(mconfig, *this), m_chd(nullptr), @@ -76,7 +76,7 @@ void diablo_image_device::device_start() m_chd = nullptr; // try to locate the CHD from a DISK_REGION - chd_file *handle = machine().rom_load().get_disk_handle(tag().c_str()); + chd_file *handle = machine().rom_load().get_disk_handle(tag()); if (handle != nullptr) { m_hard_disk_handle = hard_disk_open(handle); diff --git a/src/devices/imagedev/diablo.h b/src/devices/imagedev/diablo.h index be44e8baf08..00df1345bbd 100644 --- a/src/devices/imagedev/diablo.h +++ b/src/devices/imagedev/diablo.h @@ -22,7 +22,7 @@ class diablo_image_device : public device_t, { public: // construction/destruction - diablo_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + diablo_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); virtual ~diablo_image_device(); static void static_set_device_load(device_t &device, device_image_load_delegate callback) { downcast<diablo_image_device &>(device).m_device_image_load = callback; } diff --git a/src/devices/imagedev/flopdrv.cpp b/src/devices/imagedev/flopdrv.cpp index 09b99bfe315..71bfd2c7158 100644 --- a/src/devices/imagedev/flopdrv.cpp +++ b/src/devices/imagedev/flopdrv.cpp @@ -509,10 +509,10 @@ legacy_floppy_image_device *floppy_get_device_by_type(running_machine &machine,i int floppy_get_drive(device_t *image) { int drive =0; - if (strcmp(image->tag().c_str(), ":" FLOPPY_0) == 0) drive = 0; - if (strcmp(image->tag().c_str(), ":" FLOPPY_1) == 0) drive = 1; - if (strcmp(image->tag().c_str(), ":" FLOPPY_2) == 0) drive = 2; - if (strcmp(image->tag().c_str(), ":" FLOPPY_3) == 0) drive = 3; + if (strcmp(image->tag(), ":" FLOPPY_0) == 0) drive = 0; + if (strcmp(image->tag(), ":" FLOPPY_1) == 0) drive = 1; + if (strcmp(image->tag(), ":" FLOPPY_2) == 0) drive = 2; + if (strcmp(image->tag(), ":" FLOPPY_3) == 0) drive = 3; return drive; } @@ -694,7 +694,7 @@ const device_type LEGACY_FLOPPY = &device_creator<legacy_floppy_image_device>; // legacy_floppy_image_device - constructor //------------------------------------------------- -legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, LEGACY_FLOPPY, "Floppy Disk", tag, owner, clock, "legacy_floppy_image", __FILE__), device_image_interface(mconfig, *this), m_out_idx_func(*this), @@ -728,7 +728,7 @@ legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mco memset(&m_extension_list,0,sizeof(m_extension_list)); } -legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) +legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), device_image_interface(mconfig, *this), m_out_idx_func(*this), diff --git a/src/devices/imagedev/flopdrv.h b/src/devices/imagedev/flopdrv.h index 02b4f80aa8c..9d4333cfae2 100644 --- a/src/devices/imagedev/flopdrv.h +++ b/src/devices/imagedev/flopdrv.h @@ -92,8 +92,8 @@ class legacy_floppy_image_device : public device_t, { public: // construction/destruction - legacy_floppy_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); - legacy_floppy_image_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + legacy_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + legacy_floppy_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); ~legacy_floppy_image_device(); template<class _Object> static devcb_base &set_out_idx_func(device_t &device, _Object object) { return downcast<legacy_floppy_image_device &>(device).m_out_idx_func.set_callback(object); } diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index 066866c843f..2d6eb4d5460 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -123,7 +123,7 @@ const floppy_format_type floppy_image_device::default_floppy_formats[] = { nullptr }; -floppy_connector::floppy_connector(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_connector::floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, FLOPPY_CONNECTOR, "Floppy drive connector abstraction", tag, owner, clock, "floppy_connector", __FILE__), device_slot_interface(mconfig, *this), formats(nullptr), @@ -163,7 +163,7 @@ floppy_image_device *floppy_connector::get_device() // floppy_image_device - constructor //------------------------------------------------- -floppy_image_device::floppy_image_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) +floppy_image_device::floppy_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), device_image_interface(mconfig, *this), device_slot_card_interface(mconfig, *this), @@ -625,7 +625,7 @@ void floppy_image_device::stp_w(int state) } if(ocyl != cyl) { - if (TRACE_STEP) logerror("%s: track %d\n", tag().c_str(), cyl); + if (TRACE_STEP) logerror("%s: track %d\n", tag(), cyl); // Do we want a stepper sound? if (m_make_sound) m_sound_out->step(); } @@ -672,7 +672,7 @@ void floppy_image_device::seek_phase_w(int phases) subcyl = next_pos & 3; if(TRACE_STEP && (next_pos != cur_pos)) - logerror("%s: track %d.%d\n", tag().c_str(), cyl, subcyl); + logerror("%s: track %d.%d\n", tag(), cyl, subcyl); /* Update disk detection if applicable */ if (exists()) @@ -1101,7 +1101,7 @@ void ui_menu_control_floppy_image::handle() // MZ, Aug 2015 //=================================================================== -floppy_sound_device::floppy_sound_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +floppy_sound_device::floppy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : samples_device(mconfig, FLOPPYSOUND, "Floppy sound", tag, owner, clock, "flopsnd", __FILE__), m_sound(nullptr), m_is525(false), @@ -1148,7 +1148,7 @@ void floppy_sound_device::device_start() m_step_playback_state = 0; // 0 == currently not playing, > 0 = playing one of the step samples from start to end m_motor_on = false; - m_is525 = strstr(tag().c_str(), "525") != nullptr; + m_is525 = strstr(tag(), "525") != nullptr; if (m_is525) { m_sampleindex_motor_start = 2; @@ -1337,7 +1337,7 @@ const device_type FLOPPYSOUND = &device_creator<floppy_sound_device>; // 3" single-sided double density //------------------------------------------------- -floppy_3_ssdd::floppy_3_ssdd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_3_ssdd::floppy_3_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_3_SSDD, "3\" single sided floppy drive", tag, owner, clock, "floppy_3_ssdd", __FILE__) { } @@ -1364,7 +1364,7 @@ void floppy_3_ssdd::handled_variants(UINT32 *variants, int &var_count) const // 3" double-sided double density //------------------------------------------------- -floppy_3_dsdd::floppy_3_dsdd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_3_dsdd::floppy_3_dsdd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_3_DSDD, "3\" double sided floppy drive", tag, owner, clock, "floppy_3_dsdd", __FILE__) { } @@ -1392,7 +1392,7 @@ void floppy_3_dsdd::handled_variants(UINT32 *variants, int &var_count) const // 3.5" single-sided double density //------------------------------------------------- -floppy_35_ssdd::floppy_35_ssdd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_35_ssdd::floppy_35_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_35_SSDD, "3.5\" single-sided double density floppy drive", tag, owner, clock, "floppy_35_ssdd", __FILE__) { } @@ -1420,7 +1420,7 @@ void floppy_35_ssdd::handled_variants(UINT32 *variants, int &var_count) const // 3.5" double-sided double density //------------------------------------------------- -floppy_35_dd::floppy_35_dd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_35_dd::floppy_35_dd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_35_DD, "3.5\" double density floppy drive", tag, owner, clock, "floppy_35_dd", __FILE__) { } @@ -1449,7 +1449,7 @@ void floppy_35_dd::handled_variants(UINT32 *variants, int &var_count) const // 3.5" high density //------------------------------------------------- -floppy_35_hd::floppy_35_hd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_35_hd::floppy_35_hd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_35_HD, "3.5\" high density floppy drive", tag, owner, clock, "floppy_35_hd", __FILE__) { } @@ -1479,7 +1479,7 @@ void floppy_35_hd::handled_variants(UINT32 *variants, int &var_count) const // 3.5" extended density //------------------------------------------------- -floppy_35_ed::floppy_35_ed(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_35_ed::floppy_35_ed(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_35_ED, "3.5\" extended density floppy drive", tag, owner, clock, "floppy_35_ed", __FILE__) { } @@ -1510,7 +1510,7 @@ void floppy_35_ed::handled_variants(UINT32 *variants, int &var_count) const // 5.25" single-sided single density 35 tracks //------------------------------------------------- -floppy_525_sssd_35t::floppy_525_sssd_35t(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_525_sssd_35t::floppy_525_sssd_35t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_525_SSSD_35T, "5.25\" single-sided single density 35-track floppy drive", tag, owner, clock, "floppy_525_sssd_35t", __FILE__) { } @@ -1537,7 +1537,7 @@ void floppy_525_sssd_35t::handled_variants(UINT32 *variants, int &var_count) con // 5.25" double-sided single density 35 tracks //------------------------------------------------- -floppy_525_sd_35t::floppy_525_sd_35t(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_525_sd_35t::floppy_525_sd_35t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_525_SD_35T, "5.25\" single density 35-track floppy drive", tag, owner, clock, "floppy_525_sd_35t", __FILE__) { } @@ -1564,7 +1564,7 @@ void floppy_525_sd_35t::handled_variants(UINT32 *variants, int &var_count) const // 5.25" single-sided single density //------------------------------------------------- -floppy_525_sssd::floppy_525_sssd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_525_sssd::floppy_525_sssd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_525_SSSD, "5.25\" single-sided single density floppy drive", tag, owner, clock, "floppy_525_sssd", __FILE__) { } @@ -1591,7 +1591,7 @@ void floppy_525_sssd::handled_variants(UINT32 *variants, int &var_count) const // 5.25" double-sided single density //------------------------------------------------- -floppy_525_sd::floppy_525_sd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_525_sd::floppy_525_sd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_525_SD, "5.25\" single density floppy drive", tag, owner, clock, "floppy_525_sd", __FILE__) { } @@ -1618,7 +1618,7 @@ void floppy_525_sd::handled_variants(UINT32 *variants, int &var_count) const // 5.25" single-sided double density //------------------------------------------------- -floppy_525_ssdd::floppy_525_ssdd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_525_ssdd::floppy_525_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_525_SSDD, "5.25\" single-sided double density floppy drive", tag, owner, clock, "floppy_525_ssdd", __FILE__) { } @@ -1646,7 +1646,7 @@ void floppy_525_ssdd::handled_variants(UINT32 *variants, int &var_count) const // 5.25" double-sided double density //------------------------------------------------- -floppy_525_dd::floppy_525_dd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_525_dd::floppy_525_dd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_525_DD, "5.25\" double density floppy drive", tag, owner, clock, "floppy_525_dd", __FILE__) { } @@ -1675,7 +1675,7 @@ void floppy_525_dd::handled_variants(UINT32 *variants, int &var_count) const // 5.25" single-sided quad density //------------------------------------------------- -floppy_525_ssqd::floppy_525_ssqd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_525_ssqd::floppy_525_ssqd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_525_QD, "5.25\" single-sided quad density floppy drive", tag, owner, clock, "floppy_525_ssqd", __FILE__) { } @@ -1704,7 +1704,7 @@ void floppy_525_ssqd::handled_variants(UINT32 *variants, int &var_count) const // 5.25" double-sided quad density //------------------------------------------------- -floppy_525_qd::floppy_525_qd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_525_qd::floppy_525_qd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_525_QD, "5.25\" quad density floppy drive", tag, owner, clock, "floppy_525_qd", __FILE__) { } @@ -1736,7 +1736,7 @@ void floppy_525_qd::handled_variants(UINT32 *variants, int &var_count) const // 5.25" high density //------------------------------------------------- -floppy_525_hd::floppy_525_hd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_525_hd::floppy_525_hd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_525_HD, "5.25\" high density floppy drive", tag, owner, clock, "floppy_525_hd", __FILE__) { } @@ -1768,7 +1768,7 @@ void floppy_525_hd::handled_variants(UINT32 *variants, int &var_count) const // 8" single-sided single density //------------------------------------------------- -floppy_8_sssd::floppy_8_sssd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_8_sssd::floppy_8_sssd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_8_SSSD, "8\" single density single sided floppy drive", tag, owner, clock, "floppy_8_sssd", __FILE__) { } @@ -1796,7 +1796,7 @@ void floppy_8_sssd::handled_variants(UINT32 *variants, int &var_count) const // 8" double-sided single density //------------------------------------------------- -floppy_8_dssd::floppy_8_dssd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_8_dssd::floppy_8_dssd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_8_DSSD, "8\" single density double sided floppy drive", tag, owner, clock, "floppy_8_dssd", __FILE__) { } @@ -1825,7 +1825,7 @@ void floppy_8_dssd::handled_variants(UINT32 *variants, int &var_count) const // 8" single-sided double density //------------------------------------------------- -floppy_8_ssdd::floppy_8_ssdd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_8_ssdd::floppy_8_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_8_DSDD, "8\" double density single sided floppy drive", tag, owner, clock, "floppy_8_ssdd", __FILE__) { } @@ -1854,7 +1854,7 @@ void floppy_8_ssdd::handled_variants(UINT32 *variants, int &var_count) const // 8" double-sided double density //------------------------------------------------- -floppy_8_dsdd::floppy_8_dsdd(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +floppy_8_dsdd::floppy_8_dsdd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, FLOPPY_8_DSDD, "8\" double density double sided floppy drive", tag, owner, clock, "floppy_8_dsdd", __FILE__) { } @@ -1895,7 +1895,7 @@ void floppy_8_dsdd::handled_variants(UINT32 *variants, int &var_count) const // //------------------------------------------------- -epson_smd_165::epson_smd_165(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +epson_smd_165::epson_smd_165(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, EPSON_SD_321, "EPSON SMD-165 Floppy Disk Drive", tag, owner, clock, "epson_smd_165", __FILE__) { } @@ -1946,7 +1946,7 @@ void epson_smd_165::handled_variants(UINT32 *variants, int &var_count) const // //------------------------------------------------- -epson_sd_320::epson_sd_320(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +epson_sd_320::epson_sd_320(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, EPSON_SD_320, "EPSON SD-320 Mini-Floppy Disk Drive", tag, owner, clock, "epson_sd_320", __FILE__) { } @@ -1978,7 +1978,7 @@ void epson_sd_320::handled_variants(UINT32 *variants, int &var_count) const // //------------------------------------------------- -epson_sd_321::epson_sd_321(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +epson_sd_321::epson_sd_321(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, EPSON_SD_321, "EPSON SD-321 Mini-Floppy Disk Drive", tag, owner, clock, "epson_sd_321", __FILE__) { } @@ -2013,7 +2013,7 @@ void epson_sd_321::handled_variants(UINT32 *variants, int &var_count) const // //------------------------------------------------- -sony_oa_d31v::sony_oa_d31v(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +sony_oa_d31v::sony_oa_d31v(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, SONY_OA_D31V, "Sony OA-D31V Micro Floppydisk Drive", tag, owner, clock, "sony_oa_d31v", __FILE__) { } @@ -2048,7 +2048,7 @@ void sony_oa_d31v::handled_variants(UINT32 *variants, int &var_count) const // //------------------------------------------------- -sony_oa_d32w::sony_oa_d32w(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +sony_oa_d32w::sony_oa_d32w(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, SONY_OA_D32W, "Sony OA-D32W Micro Floppydisk Drive", tag, owner, clock, "sony_oa_d32w", __FILE__) { } @@ -2084,7 +2084,7 @@ void sony_oa_d32w::handled_variants(UINT32 *variants, int &var_count) const // //------------------------------------------------- -sony_oa_d32v::sony_oa_d32v(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +sony_oa_d32v::sony_oa_d32v(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, SONY_OA_D32V, "Sony OA-D32V Micro Floppydisk Drive", tag, owner, clock, "sony_oa_d32v", __FILE__) { } @@ -2118,7 +2118,7 @@ void sony_oa_d32v::handled_variants(UINT32 *variants, int &var_count) const // //------------------------------------------------- -teac_fd_55e::teac_fd_55e(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +teac_fd_55e::teac_fd_55e(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, TEAC_FD_55F, "TEAC FD-55E FDD", tag, owner, clock, "teac_fd_55e", __FILE__) { } @@ -2153,7 +2153,7 @@ void teac_fd_55e::handled_variants(UINT32 *variants, int &var_count) const // //------------------------------------------------- -teac_fd_55f::teac_fd_55f(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +teac_fd_55f::teac_fd_55f(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, TEAC_FD_55F, "TEAC FD-55F FDD", tag, owner, clock, "teac_fd_55f", __FILE__) { } @@ -2191,7 +2191,7 @@ void teac_fd_55f::handled_variants(UINT32 *variants, int &var_count) const // //------------------------------------------------- -teac_fd_55g::teac_fd_55g(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +teac_fd_55g::teac_fd_55g(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, TEAC_FD_55G, "TEAC FD-55G FDD", tag, owner, clock, "teac_fd_55g", __FILE__) { } @@ -2225,7 +2225,7 @@ void teac_fd_55g::handled_variants(UINT32 *variants, int &var_count) const // used in the Commodoere 1541 disk drive //------------------------------------------------- -alps_3255190x::alps_3255190x(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +alps_3255190x::alps_3255190x(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : floppy_image_device(mconfig, ALPS_3255190x, "ALPS 32551901/32551902 Floppy Drive", tag, owner, clock, "alps_3255190x", __FILE__) { } diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h index 25a60219095..4d50d74234d 100644 --- a/src/devices/imagedev/floppy.h +++ b/src/devices/imagedev/floppy.h @@ -67,7 +67,7 @@ public: typedef delegate<void (floppy_image_device *, int)> wpt_cb; // construction/destruction - floppy_image_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + floppy_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); virtual ~floppy_image_device(); virtual void handled_variants(UINT32 *variants, int &var_count) const = 0; @@ -226,7 +226,7 @@ protected: #define DECLARE_FLOPPY_IMAGE_DEVICE(_name, _interface) \ class _name : public floppy_image_device { \ public: \ - _name(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); \ + _name(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); \ virtual ~_name(); \ virtual void handled_variants(UINT32 *variants, int &var_count) const override; \ virtual const char *image_interface() const override { return _interface; } \ @@ -276,7 +276,7 @@ extern const device_type FLOPPYSOUND; class floppy_sound_device : public samples_device { public: - floppy_sound_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + floppy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); void motor(bool on); void step(); bool samples_loaded() { return m_loaded; } @@ -315,7 +315,7 @@ class floppy_connector: public device_t, public device_slot_interface { public: - floppy_connector(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); virtual ~floppy_connector(); void set_formats(const floppy_format_type *formats); diff --git a/src/devices/imagedev/harddriv.cpp b/src/devices/imagedev/harddriv.cpp index dafb63f55a6..b5fd6ca87dc 100644 --- a/src/devices/imagedev/harddriv.cpp +++ b/src/devices/imagedev/harddriv.cpp @@ -38,7 +38,7 @@ const device_type HARDDISK = &device_creator<harddisk_image_device>; // harddisk_image_device - constructor //------------------------------------------------- -harddisk_image_device::harddisk_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +harddisk_image_device::harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, HARDDISK, "Harddisk", tag, owner, clock, "harddisk_image", __FILE__), device_image_interface(mconfig, *this), m_chd(nullptr), @@ -52,7 +52,7 @@ harddisk_image_device::harddisk_image_device(const machine_config &mconfig, std: //------------------------------------------------- // harddisk_image_device - constructor for subclasses //------------------------------------------------- -harddisk_image_device::harddisk_image_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) +harddisk_image_device::harddisk_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), device_image_interface(mconfig, *this), m_chd(nullptr), @@ -99,7 +99,7 @@ void harddisk_image_device::device_start() m_chd = nullptr; // try to locate the CHD from a DISK_REGION - chd_file *handle = machine().rom_load().get_disk_handle(tag().c_str()); + chd_file *handle = machine().rom_load().get_disk_handle(tag()); if (handle != nullptr) { m_hard_disk_handle = hard_disk_open(handle); diff --git a/src/devices/imagedev/harddriv.h b/src/devices/imagedev/harddriv.h index b72f7e4ee10..b85418e8c33 100644 --- a/src/devices/imagedev/harddriv.h +++ b/src/devices/imagedev/harddriv.h @@ -24,7 +24,7 @@ class harddisk_image_device : public device_t, { public: // construction/destruction - harddisk_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); virtual ~harddisk_image_device(); static void static_set_device_load(device_t &device, device_image_load_delegate callback) { downcast<harddisk_image_device &>(device).m_device_image_load = callback; } @@ -53,7 +53,7 @@ public: chd_file *get_chd_file(); protected: - harddisk_image_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + harddisk_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); // device-level overrides virtual void device_config_complete() override; diff --git a/src/devices/imagedev/mfmhd.cpp b/src/devices/imagedev/mfmhd.cpp index 802194feba6..bc8987d7b0f 100644 --- a/src/devices/imagedev/mfmhd.cpp +++ b/src/devices/imagedev/mfmhd.cpp @@ -307,7 +307,7 @@ std::string mfm_harddisk_device::tts(const attotime &t) return buf; } -mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) +mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : harddisk_image_device(mconfig, type, name, tag, owner, clock, shortname, source), device_slot_card_interface(mconfig, *this), m_index_timer(nullptr), @@ -406,7 +406,7 @@ bool mfm_harddisk_device::call_load() if (chdfile==nullptr) { - logerror("%s: chdfile is null\n", tag().c_str()); + logerror("%s: chdfile is null\n", tag()); return IMAGE_INIT_FAIL; } @@ -414,24 +414,24 @@ bool mfm_harddisk_device::call_load() chd_error state = chdfile->read_metadata(HARD_DISK_METADATA_TAG, 0, metadata); if (state != CHDERR_NONE) { - logerror("%s: Failed to read CHD metadata\n", tag().c_str()); + logerror("%s: Failed to read CHD metadata\n", tag()); return IMAGE_INIT_FAIL; } - if (TRACE_CONFIG) logerror("%s: CHD metadata: %s\n", tag().c_str(), metadata.c_str()); + if (TRACE_CONFIG) logerror("%s: CHD metadata: %s\n", tag(), metadata.c_str()); // Parse the metadata mfmhd_layout_params param; param.encoding = m_encoding; - if (TRACE_CONFIG) logerror("%s: Set encoding to %d\n", tag().c_str(), m_encoding); + if (TRACE_CONFIG) logerror("%s: Set encoding to %d\n", tag(), m_encoding); if (sscanf(metadata.c_str(), HARD_DISK_METADATA_FORMAT, ¶m.cylinders, ¶m.heads, ¶m.sectors_per_track, ¶m.sector_size) != 4) { - logerror("%s: Invalid CHD metadata\n", tag().c_str()); + logerror("%s: Invalid CHD metadata\n", tag()); return IMAGE_INIT_FAIL; } - if (TRACE_CONFIG) logerror("%s: CHD image has geometry cyl=%d, head=%d, sect=%d, size=%d\n", tag().c_str(), param.cylinders, param.heads, param.sectors_per_track, param.sector_size); + if (TRACE_CONFIG) logerror("%s: CHD image has geometry cyl=%d, head=%d, sect=%d, size=%d\n", tag(), param.cylinders, param.heads, param.sectors_per_track, param.sector_size); if (m_max_cylinders != 0 && (param.cylinders != m_max_cylinders || param.heads != m_max_heads)) { @@ -448,7 +448,7 @@ bool mfm_harddisk_device::call_load() state = chdfile->read_metadata(MFM_HARD_DISK_METADATA_TAG, 0, metadata); if (state != CHDERR_NONE) { - logerror("%s: Failed to read CHD sector arrangement/recording specs, applying defaults\n", tag().c_str()); + logerror("%s: Failed to read CHD sector arrangement/recording specs, applying defaults\n", tag()); } else { @@ -457,17 +457,17 @@ bool mfm_harddisk_device::call_load() if (!param.sane_rec()) { - if (TRACE_CONFIG) logerror("%s: Sector arrangement/recording specs have invalid values, applying defaults\n", tag().c_str()); + if (TRACE_CONFIG) logerror("%s: Sector arrangement/recording specs have invalid values, applying defaults\n", tag()); param.reset_rec(); } else if (TRACE_CONFIG) logerror("%s: MFM HD rec specs: interleave=%d, cylskew=%d, headskew=%d, wpcom=%d, rwc=%d\n", - tag().c_str(), param.interleave, param.cylskew, param.headskew, param.write_precomp_cylinder, param.reduced_wcurr_cylinder); + tag(), param.interleave, param.cylskew, param.headskew, param.write_precomp_cylinder, param.reduced_wcurr_cylinder); state = chdfile->read_metadata(MFM_HARD_DISK_METADATA_TAG, 1, metadata); if (state != CHDERR_NONE) { - logerror("%s: Failed to read CHD track gap specs, applying defaults\n", tag().c_str()); + logerror("%s: Failed to read CHD track gap specs, applying defaults\n", tag()); } else { @@ -476,12 +476,12 @@ bool mfm_harddisk_device::call_load() if (!param.sane_gap()) { - if (TRACE_CONFIG) logerror("%s: MFM HD gap specs have invalid values, applying defaults\n", tag().c_str()); + if (TRACE_CONFIG) logerror("%s: MFM HD gap specs have invalid values, applying defaults\n", tag()); param.reset_gap(); } else if (TRACE_CONFIG) logerror("%s: MFM HD gap specs: gap1=%d, gap2=%d, gap3=%d, sync=%d, headerlen=%d, ecctype=%d\n", - tag().c_str(), param.gap1, param.gap2, param.gap3, param.sync, param.headerlen, param.ecctype); + tag(), param.gap1, param.gap2, param.gap3, param.sync, param.headerlen, param.ecctype); m_format->set_layout_params(param); @@ -501,7 +501,7 @@ bool mfm_harddisk_device::call_load() float realmax = (m_maxseek_time==0)? (m_actual_cylinders * 0.2) : (m_maxseek_time * 0.8); float settle_us = ((m_actual_cylinders-1.0) * realnext - realmax) / (m_actual_cylinders-2.0) * 1000; float step_us = realnext * 1000 - settle_us; - if (TRACE_CONFIG) logerror("%s: Calculated settle time: %0.2f ms, step: %d us\n", tag().c_str(), settle_us/1000, (int)step_us); + if (TRACE_CONFIG) logerror("%s: Calculated settle time: %0.2f ms, step: %d us\n", tag(), settle_us/1000, (int)step_us); m_settle_time = attotime::from_usec((int)settle_us); m_step_time = attotime::from_usec((int)step_us); @@ -510,7 +510,7 @@ bool mfm_harddisk_device::call_load() } else { - logerror("%s: Could not load CHD\n", tag().c_str()); + logerror("%s: Could not load CHD\n", tag()); } return loaded; } @@ -529,7 +529,7 @@ void mfm_harddisk_device::call_unload() if (m_format->save_param(MFMHD_IL) && !params->equals_rec(oldparams)) { - logerror("%s: MFM HD sector arrangement and recording specs have changed; updating CHD metadata\n", tag().c_str()); + logerror("%s: MFM HD sector arrangement and recording specs have changed; updating CHD metadata\n", tag()); chd_file* chdfile = get_chd_file(); std::string metadata; @@ -538,13 +538,13 @@ void mfm_harddisk_device::call_unload() chd_error err = chdfile->write_metadata(MFM_HARD_DISK_METADATA_TAG, 0, metadata, 0); if (err != CHDERR_NONE) { - logerror("%s: Failed to save MFM HD sector arrangement/recording specs to CHD\n", tag().c_str()); + logerror("%s: Failed to save MFM HD sector arrangement/recording specs to CHD\n", tag()); } } if (m_format->save_param(MFMHD_GAP1) && !params->equals_gap(oldparams)) { - logerror("%s: MFM HD track gap specs have changed; updating CHD metadata\n", tag().c_str()); + logerror("%s: MFM HD track gap specs have changed; updating CHD metadata\n", tag()); chd_file* chdfile = get_chd_file(); std::string metadata; @@ -553,7 +553,7 @@ void mfm_harddisk_device::call_unload() chd_error err = chdfile->write_metadata(MFM_HARD_DISK_METADATA_TAG, 1, metadata, 0); if (err != CHDERR_NONE) { - logerror("%s: Failed to save MFM HD track gap specs to CHD\n", tag().c_str()); + logerror("%s: Failed to save MFM HD track gap specs to CHD\n", tag()); } } } @@ -592,7 +592,7 @@ attotime mfm_harddisk_device::track_end_time() if (!m_revolution_start_time.is_never()) { endtime = m_revolution_start_time + nexttime; - if (TRACE_TIMING) logerror("%s: Track start time = %s, end time = %s\n", tag().c_str(), tts(m_revolution_start_time).c_str(), tts(endtime).c_str()); + if (TRACE_TIMING) logerror("%s: Track start time = %s, end time = %s\n", tag(), tts(m_revolution_start_time).c_str(), tts(endtime).c_str()); } return endtime; } @@ -634,7 +634,7 @@ void mfm_harddisk_device::device_timer(emu_timer &timer, device_timer_id id, int // Start the settle timer m_step_phase = STEP_SETTLE; m_seek_timer->adjust(m_settle_time); - if (TRACE_STEPS && TRACE_DETAIL) logerror("%s: Arrived at target cylinder %d, settling ...\n", tag().c_str(), m_current_cylinder); + if (TRACE_STEPS && TRACE_DETAIL) logerror("%s: Arrived at target cylinder %d, settling ...\n", tag(), m_current_cylinder); } else { @@ -652,12 +652,12 @@ void mfm_harddisk_device::device_timer(emu_timer &timer, device_timer_id id, int { m_ready = true; m_recalibrated = true; - if (TRACE_STATE) logerror("%s: Spinup complete, drive recalibrated and positioned at cylinder %d; drive is READY\n", tag().c_str(), m_current_cylinder); + if (TRACE_STATE) logerror("%s: Spinup complete, drive recalibrated and positioned at cylinder %d; drive is READY\n", tag(), m_current_cylinder); if (!m_ready_cb.isnull()) m_ready_cb(this, ASSERT_LINE); } else { - if (TRACE_SIGNALS) logerror("%s: Settling done at cylinder %d, seek complete\n", tag().c_str(), m_current_cylinder); + if (TRACE_SIGNALS) logerror("%s: Settling done at cylinder %d, seek complete\n", tag(), m_current_cylinder); } m_seek_complete = true; if (!m_seek_complete_cb.isnull()) m_seek_complete_cb(this, ASSERT_LINE); @@ -670,7 +670,7 @@ void mfm_harddisk_device::device_timer(emu_timer &timer, device_timer_id id, int void mfm_harddisk_device::recalibrate() { - if (TRACE_STEPS) logerror("%s: Recalibrate to track 0\n", tag().c_str()); + if (TRACE_STEPS) logerror("%s: Recalibrate to track 0\n", tag()); direction_in_w(CLEAR_LINE); while (-m_track_delta < m_phys_cylinders) { @@ -683,13 +683,13 @@ void mfm_harddisk_device::head_move() { int steps = m_track_delta; if (steps < 0) steps = -steps; - if (TRACE_STEPS) logerror("%s: Moving head by %d step(s) %s\n", tag().c_str(), steps, (m_track_delta<0)? "outward" : "inward"); + if (TRACE_STEPS) logerror("%s: Moving head by %d step(s) %s\n", tag(), steps, (m_track_delta<0)? "outward" : "inward"); // We simulate the head movement by pausing for n*step_time with n being the cylinder delta m_step_phase = STEP_MOVING; m_seek_timer->adjust(m_step_time * steps); - if (TRACE_TIMING) logerror("%s: Head movement takes %s time\n", tag().c_str(), tts(m_step_time * steps).c_str()); + if (TRACE_TIMING) logerror("%s: Head movement takes %s time\n", tag(), tts(m_step_time * steps).c_str()); // We pretend that we already arrived // TODO: Check auto truncation? m_current_cylinder += m_track_delta; @@ -701,7 +701,7 @@ void mfm_harddisk_device::head_move() void mfm_harddisk_device::direction_in_w(line_state line) { m_seek_inward = (line == ASSERT_LINE); - if (TRACE_STEPS && TRACE_DETAIL) logerror("%s: Setting seek direction %s\n", tag().c_str(), m_seek_inward? "inward" : "outward"); + if (TRACE_STEPS && TRACE_DETAIL) logerror("%s: Setting seek direction %s\n", tag(), m_seek_inward? "inward" : "outward"); } /* @@ -752,10 +752,10 @@ void mfm_harddisk_device::step_w(line_state line) // Counter will be adjusted according to the direction (+-1) m_track_delta += (m_seek_inward)? +1 : -1; - if (TRACE_STEPS && TRACE_DETAIL) logerror("%s: Got seek pulse; track delta %d\n", tag().c_str(), m_track_delta); + if (TRACE_STEPS && TRACE_DETAIL) logerror("%s: Got seek pulse; track delta %d\n", tag(), m_track_delta); if (m_track_delta < -m_phys_cylinders || m_track_delta > m_phys_cylinders) { - if (TRACE_STEPS) logerror("%s: Excessive step pulses - doing auto-truncation\n", tag().c_str()); + if (TRACE_STEPS) logerror("%s: Excessive step pulses - doing auto-truncation\n", tag()); m_autotruncation = true; } m_seek_timer->adjust(attotime::from_usec(250)); // Start step collect timer @@ -788,7 +788,7 @@ bool mfm_harddisk_device::find_position(attotime &from_when, const attotime &lim // Reached the end if (bytepos >= m_trackimage_size) { - if (TRACE_TIMING) logerror("%s: Reached end: rev_start = %s, live = %s\n", tag().c_str(), tts(m_revolution_start_time).c_str(), tts(from_when).c_str()); + if (TRACE_TIMING) logerror("%s: Reached end: rev_start = %s, live = %s\n", tag(), tts(m_revolution_start_time).c_str(), tts(from_when).c_str()); m_revolution_start_time += m_rev_time; cell = (from_when - m_revolution_start_time).as_ticks(freq); bytepos = cell / 16; @@ -796,7 +796,7 @@ bool mfm_harddisk_device::find_position(attotime &from_when, const attotime &lim if (bytepos < 0) { - if (TRACE_TIMING) logerror("%s: Negative cell number: rev_start = %s, live = %s\n", tag().c_str(), tts(m_revolution_start_time).c_str(), tts(from_when).c_str()); + if (TRACE_TIMING) logerror("%s: Negative cell number: rev_start = %s, live = %s\n", tag(), tts(m_revolution_start_time).c_str(), tts(from_when).c_str()); bytepos = 0; } bit = cell % 16; @@ -833,12 +833,12 @@ bool mfm_harddisk_device::read(attotime &from_when, const attotime &limit, UINT1 { // We will deliver a single bit cdata = ((track[bytepos] << bitpos) & 0x8000) >> 15; - if (TRACE_BITS) logerror("%s: Reading (c=%d,h=%d,bit=%d) at cell %d [%s] = %d\n", tag().c_str(), m_current_cylinder, m_current_head, bitpos, ((bytepos<<4) + bitpos), tts(fw).c_str(), cdata); + if (TRACE_BITS) logerror("%s: Reading (c=%d,h=%d,bit=%d) at cell %d [%s] = %d\n", tag(), m_current_cylinder, m_current_head, bitpos, ((bytepos<<4) + bitpos), tts(fw).c_str(), cdata); } else { // We will deliver a whole byte - if (TRACE_READ) logerror("%s: Reading (c=%d,h=%d) at position %d\n", tag().c_str(), m_current_cylinder, m_current_head, bytepos); + if (TRACE_READ) logerror("%s: Reading (c=%d,h=%d) at position %d\n", tag(), m_current_cylinder, m_current_head, bytepos); cdata = track[bytepos]; } return false; @@ -891,7 +891,7 @@ bool mfm_harddisk_device::write(attotime &from_when, const attotime &limit, UINT if (wpcom && (params->write_precomp_cylinder == -1 || m_current_cylinder < params->write_precomp_cylinder)) params->write_precomp_cylinder = m_current_cylinder; - if (TRACE_WRITE) if ((bitpos&0x0f)==0) logerror("%s: Wrote data=%04x (c=%d,h=%d) at position %04x, wpcom=%d, rwc=%d\n", tag().c_str(), track[bytepos], m_current_cylinder, m_current_head, bytepos, wpcom, reduced_wc); + if (TRACE_WRITE) if ((bitpos&0x0f)==0) logerror("%s: Wrote data=%04x (c=%d,h=%d) at position %04x, wpcom=%d, rwc=%d\n", tag(), track[bytepos], m_current_cylinder, m_current_head, bytepos, wpcom, reduced_wc); return false; } @@ -914,7 +914,7 @@ int mfm_harddisk_device::get_actual_heads() /* The generic HD takes any kind of CHD HD image and magically creates enough heads and cylinders. */ -mfm_hd_generic_device::mfm_hd_generic_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +mfm_hd_generic_device::mfm_hd_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : mfm_harddisk_device(mconfig, MFMHD_GENERIC, "Generic MFM hard disk", tag, owner, clock, "mfm_harddisk", __FILE__) { } @@ -924,7 +924,7 @@ const device_type MFMHD_GENERIC = &device_creator<mfm_hd_generic_device>; /* Various models. */ -mfm_hd_st213_device::mfm_hd_st213_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +mfm_hd_st213_device::mfm_hd_st213_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : mfm_harddisk_device(mconfig, MFMHD_ST213, "Seagate ST-213 MFM hard disk", tag, owner, clock, "mfm_hd_st213", __FILE__) { m_phys_cylinders = 670; @@ -937,7 +937,7 @@ mfm_hd_st213_device::mfm_hd_st213_device(const machine_config &mconfig, std::str const device_type MFMHD_ST213 = &device_creator<mfm_hd_st213_device>; -mfm_hd_st225_device::mfm_hd_st225_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +mfm_hd_st225_device::mfm_hd_st225_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : mfm_harddisk_device(mconfig, MFMHD_ST225, "Seagate ST-225 MFM hard disk", tag, owner, clock, "mfm_hd_st225", __FILE__) { m_phys_cylinders = 670; @@ -950,7 +950,7 @@ mfm_hd_st225_device::mfm_hd_st225_device(const machine_config &mconfig, std::str const device_type MFMHD_ST225 = &device_creator<mfm_hd_st225_device>; -mfm_hd_st251_device::mfm_hd_st251_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +mfm_hd_st251_device::mfm_hd_st251_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : mfm_harddisk_device(mconfig, MFMHD_ST251, "Seagate ST-251 MFM hard disk", tag, owner, clock, "mfm_hd_st251", __FILE__) { m_phys_cylinders = 821; @@ -979,7 +979,7 @@ mfmhd_trackimage_cache::mfmhd_trackimage_cache(running_machine &machine): mfmhd_trackimage_cache::~mfmhd_trackimage_cache() { mfmhd_trackimage* current = m_tracks; - if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache destroy\n", m_mfmhd->tag().c_str()); + if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache destroy\n", m_mfmhd->tag()); while (current != nullptr) { @@ -1010,12 +1010,12 @@ void mfmhd_trackimage_cache::write_back_one() void mfmhd_trackimage_cache::cleanup() { mfmhd_trackimage* current = m_tracks; - if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache cleanup\n", m_mfmhd->tag().c_str()); + if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache cleanup\n", m_mfmhd->tag()); // Still dirty? while (current != nullptr) { - if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache: evict line cylinder=%d head=%d\n", m_mfmhd->tag().c_str(), current->cylinder, current->head); + if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache: evict line cylinder=%d head=%d\n", m_mfmhd->tag(), current->cylinder, current->head); if (current->dirty) { m_mfmhd->write_track(current->encdata, current->cylinder, current->head); @@ -1042,7 +1042,7 @@ const char *encnames[] = { "MFM_BITS","MFM_BYTE","SEPARATE","SSIMPLE " }; */ void mfmhd_trackimage_cache::init(mfm_harddisk_device* mfmhd, int tracksize, int trackslots) { - if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache init; cache size is %d tracks\n", mfmhd->tag().c_str(), trackslots); + if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache init; cache size is %d tracks\n", mfmhd->tag(), trackslots); chd_error state; @@ -1058,7 +1058,7 @@ void mfmhd_trackimage_cache::init(mfm_harddisk_device* mfmhd, int tracksize, int while (track < trackslots) { - if (TRACE_CACHE && TRACE_DETAIL) m_machine.logerror("%s: MFM HD allocate cache slot\n", mfmhd->tag().c_str()); + if (TRACE_CACHE && TRACE_DETAIL) m_machine.logerror("%s: MFM HD allocate cache slot\n", mfmhd->tag()); previous = current; current = global_alloc(mfmhd_trackimage); current->encdata = global_alloc_array(UINT16, tracksize); @@ -1137,7 +1137,7 @@ UINT16* mfmhd_trackimage_cache::get_trackimage(int cylinder, int head) // previous points to the second to last element current = previous->next; - if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache: evict line (c=%d,h=%d)\n", m_mfmhd->tag().c_str(), current->cylinder, current->head); + if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache: evict line (c=%d,h=%d)\n", m_mfmhd->tag(), current->cylinder, current->head); if (current->dirty) { @@ -1157,7 +1157,7 @@ UINT16* mfmhd_trackimage_cache::get_trackimage(int cylinder, int head) // ================================================================ -mfm_harddisk_connector::mfm_harddisk_connector(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock): +mfm_harddisk_connector::mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock): device_t(mconfig, MFM_HD_CONNECTOR, "MFM hard disk connector", tag, owner, clock, "mfm_hd_connector", __FILE__), device_slot_interface(mconfig, *this), m_encoding(), diff --git a/src/devices/imagedev/mfmhd.h b/src/devices/imagedev/mfmhd.h index 4360658f6f3..fe55ad12989 100644 --- a/src/devices/imagedev/mfmhd.h +++ b/src/devices/imagedev/mfmhd.h @@ -51,7 +51,7 @@ class mfm_harddisk_device : public harddisk_image_device, public device_slot_card_interface { public: - mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); ~mfm_harddisk_device(); typedef delegate<void (mfm_harddisk_device*, int)> index_pulse_cb; @@ -174,7 +174,7 @@ private: class mfm_hd_generic_device : public mfm_harddisk_device { public: - mfm_hd_generic_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + mfm_hd_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); }; extern const device_type MFMHD_GENERIC; @@ -182,7 +182,7 @@ extern const device_type MFMHD_GENERIC; class mfm_hd_st213_device : public mfm_harddisk_device { public: - mfm_hd_st213_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + mfm_hd_st213_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); }; extern const device_type MFMHD_ST213; @@ -190,7 +190,7 @@ extern const device_type MFMHD_ST213; class mfm_hd_st225_device : public mfm_harddisk_device { public: - mfm_hd_st225_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + mfm_hd_st225_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); }; extern const device_type MFMHD_ST225; @@ -198,7 +198,7 @@ extern const device_type MFMHD_ST225; class mfm_hd_st251_device : public mfm_harddisk_device { public: - mfm_hd_st251_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + mfm_hd_st251_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); }; extern const device_type MFMHD_ST251; @@ -209,7 +209,7 @@ class mfm_harddisk_connector : public device_t, public device_slot_interface { public: - mfm_harddisk_connector(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~mfm_harddisk_connector(); mfm_harddisk_device *get_device(); diff --git a/src/devices/imagedev/midiin.cpp b/src/devices/imagedev/midiin.cpp index f8771ea8e11..ae5bdb81eb8 100644 --- a/src/devices/imagedev/midiin.cpp +++ b/src/devices/imagedev/midiin.cpp @@ -22,7 +22,7 @@ const device_type MIDIIN = &device_creator<midiin_device>; ctor -------------------------------------------------*/ -midiin_device::midiin_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +midiin_device::midiin_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, MIDIIN, "MIDI In image device", tag, owner, clock, "midiin", __FILE__), device_image_interface(mconfig, *this), device_serial_interface(mconfig, *this), diff --git a/src/devices/imagedev/midiin.h b/src/devices/imagedev/midiin.h index 350d91a105b..b4c04d1e549 100644 --- a/src/devices/imagedev/midiin.h +++ b/src/devices/imagedev/midiin.h @@ -26,7 +26,7 @@ class midiin_device : public device_t, { public: // construction/destruction - midiin_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + midiin_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); template<class _Object> static devcb_base &set_input_callback(device_t &device, _Object object) { return downcast<midiin_device &>(device).m_input_cb.set_callback(object); } diff --git a/src/devices/imagedev/midiout.cpp b/src/devices/imagedev/midiout.cpp index c770ec10ba7..a8651c40b49 100644 --- a/src/devices/imagedev/midiout.cpp +++ b/src/devices/imagedev/midiout.cpp @@ -22,7 +22,7 @@ const device_type MIDIOUT = &device_creator<midiout_device>; ctor -------------------------------------------------*/ -midiout_device::midiout_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +midiout_device::midiout_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, MIDIOUT, "MIDI Out image device", tag, owner, clock, "midiout", __FILE__), device_image_interface(mconfig, *this), device_serial_interface(mconfig, *this), diff --git a/src/devices/imagedev/midiout.h b/src/devices/imagedev/midiout.h index 9281fe6f5a6..b154773ddea 100644 --- a/src/devices/imagedev/midiout.h +++ b/src/devices/imagedev/midiout.h @@ -31,7 +31,7 @@ class midiout_device : public device_t, { public: // construction/destruction - midiout_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + midiout_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // image-level overrides virtual bool call_load() override; diff --git a/src/devices/imagedev/printer.cpp b/src/devices/imagedev/printer.cpp index 4b3f95ec705..aedfecbeddd 100644 --- a/src/devices/imagedev/printer.cpp +++ b/src/devices/imagedev/printer.cpp @@ -19,7 +19,7 @@ const device_type PRINTER = &device_creator<printer_image_device>; // printer_image_device - constructor //------------------------------------------------- -printer_image_device::printer_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : +printer_image_device::printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, PRINTER, "Printer", tag, owner, clock, "printer_image", __FILE__), device_image_interface(mconfig, *this), m_online_cb(*this) diff --git a/src/devices/imagedev/printer.h b/src/devices/imagedev/printer.h index 475a974d708..8db31298bf7 100644 --- a/src/devices/imagedev/printer.h +++ b/src/devices/imagedev/printer.h @@ -25,7 +25,7 @@ class printer_image_device : public device_t, { public: // construction/destruction - printer_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); template<class _Object> static devcb_base &set_online_callback(device_t &device, _Object object) { return downcast<printer_image_device &>(device).m_online_cb.set_callback(object); } diff --git a/src/devices/imagedev/snapquik.cpp b/src/devices/imagedev/snapquik.cpp index 84160a92537..a3c55ff4064 100644 --- a/src/devices/imagedev/snapquik.cpp +++ b/src/devices/imagedev/snapquik.cpp @@ -18,7 +18,7 @@ const device_type SNAPSHOT = &device_creator<snapshot_image_device>; // snapshot_image_device - constructor //------------------------------------------------- -snapshot_image_device::snapshot_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +snapshot_image_device::snapshot_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, SNAPSHOT, "Snapshot", tag, owner, clock, "snapshot_image", __FILE__), device_image_interface(mconfig, *this), m_file_extensions(nullptr), @@ -29,7 +29,7 @@ snapshot_image_device::snapshot_image_device(const machine_config &mconfig, std: { } -snapshot_image_device::snapshot_image_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : +snapshot_image_device::snapshot_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), device_image_interface(mconfig, *this), m_file_extensions(nullptr), @@ -96,7 +96,7 @@ const device_type QUICKLOAD = &device_creator<quickload_image_device>; // quickload_image_device - constructor //------------------------------------------------- -quickload_image_device::quickload_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) +quickload_image_device::quickload_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : snapshot_image_device(mconfig, QUICKLOAD, "Quickload", tag, owner, clock, "quickload", __FILE__) { } diff --git a/src/devices/imagedev/snapquik.h b/src/devices/imagedev/snapquik.h index 04bb2de4800..3b88319a121 100644 --- a/src/devices/imagedev/snapquik.h +++ b/src/devices/imagedev/snapquik.h @@ -19,8 +19,8 @@ class snapshot_image_device : public device_t, { public: // construction/destruction - snapshot_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); - snapshot_image_device(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + snapshot_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + snapshot_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); virtual ~snapshot_image_device(); static void static_set_interface(device_t &device, const char *_interface) { downcast<snapshot_image_device &>(device).m_interface = _interface; } @@ -63,7 +63,7 @@ class quickload_image_device : public snapshot_image_device { public: // construction/destruction - quickload_image_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock); + quickload_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); virtual iodevice_t image_type() const override { return IO_QUICKLOAD; } }; |