diff --git a/src/devices/bus/a7800/a78_slot.cpp b/src/devices/bus/a7800/a78_slot.cpp
index 8b55aa228c7..5f6544b5c03 100644
--- a/src/devices/bus/a7800/a78_slot.cpp
+++ b/src/devices/bus/a7800/a78_slot.cpp
@@ -528,7 +528,7 @@ int a78_cart_slot_device::verify_header(char *header)
get default card software
-------------------------------------------------*/
-void a78_cart_slot_device::get_default_card_software(std::string &result)
+std::string a78_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -586,10 +586,10 @@ void a78_cart_slot_device::get_default_card_software(std::string &result)
clear();
- result.assign(slot_string);
+ return std::string(slot_string);
}
else
- software_get_default_slot(result, "a78_rom");
+ return software_get_default_slot("a78_rom");
}
diff --git a/src/devices/bus/a7800/a78_slot.h b/src/devices/bus/a7800/a78_slot.h
index 791f9291981..cbdc38741f2 100644
--- a/src/devices/bus/a7800/a78_slot.h
+++ b/src/devices/bus/a7800/a78_slot.h
@@ -113,7 +113,7 @@ public:
virtual device_image_partialhash_func get_partial_hash() const override { return &a78_partialhash; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_04xx);
diff --git a/src/devices/bus/a800/a800_slot.cpp b/src/devices/bus/a800/a800_slot.cpp
index 952975a649a..bd3d8ec0abe 100644
--- a/src/devices/bus/a800/a800_slot.cpp
+++ b/src/devices/bus/a800/a800_slot.cpp
@@ -406,7 +406,7 @@ int a800_cart_slot_device::identify_cart_type(UINT8 *header)
get default card software
-------------------------------------------------*/
-void a800_cart_slot_device::get_default_card_software(std::string &result)
+std::string a800_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -436,14 +436,14 @@ void a800_cart_slot_device::get_default_card_software(std::string &result)
clear();
- result.assign(slot_string);
+ return std::string(slot_string);
}
else
- software_get_default_slot(result, "a800_8k");
+ return software_get_default_slot("a800_8k");
}
-void a5200_cart_slot_device::get_default_card_software(std::string &result)
+std::string a5200_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -469,14 +469,14 @@ void a5200_cart_slot_device::get_default_card_software(std::string &result)
clear();
- result.assign(slot_string);
+ return std::string(slot_string);
}
else
- software_get_default_slot(result, "a5200");
+ return software_get_default_slot("a5200");
}
-void xegs_cart_slot_device::get_default_card_software(std::string &result)
+std::string xegs_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -504,10 +504,10 @@ void xegs_cart_slot_device::get_default_card_software(std::string &result)
clear();
- result.assign(slot_string);
+ return std::string(slot_string);
}
else
- software_get_default_slot(result, "xegs");
+ return software_get_default_slot("xegs");
}
diff --git a/src/devices/bus/a800/a800_slot.h b/src/devices/bus/a800/a800_slot.h
index 95948109653..6efdd0839e9 100644
--- a/src/devices/bus/a800/a800_slot.h
+++ b/src/devices/bus/a800/a800_slot.h
@@ -113,7 +113,7 @@ public:
virtual const char *file_extensions() const override { return "bin,rom,car"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_80xx);
@@ -142,7 +142,7 @@ public:
virtual const char *file_extensions() const override { return "bin,rom,car,a52"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
};
// ======================> xegs_cart_slot_device
@@ -157,7 +157,7 @@ public:
virtual const char *file_extensions() const override { return "bin,rom,car"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
};
// device type definition
diff --git a/src/devices/bus/adam/exp.cpp b/src/devices/bus/adam/exp.cpp
index 2e907aca39a..29a53947dd2 100644
--- a/src/devices/bus/adam/exp.cpp
+++ b/src/devices/bus/adam/exp.cpp
@@ -124,9 +124,9 @@ bool adam_expansion_slot_device::call_softlist_load(software_list_device &swlist
// get_default_card_software -
//-------------------------------------------------
-void adam_expansion_slot_device::get_default_card_software(std::string &result)
+std::string adam_expansion_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "standard");
+ return software_get_default_slot("standard");
}
diff --git a/src/devices/bus/adam/exp.h b/src/devices/bus/adam/exp.h
index 0ede272e340..bd764c667c9 100644
--- a/src/devices/bus/adam/exp.h
+++ b/src/devices/bus/adam/exp.h
@@ -87,7 +87,7 @@ protected:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
devcb_write_line m_write_irq;
diff --git a/src/devices/bus/apf/slot.cpp b/src/devices/bus/apf/slot.cpp
index 89c04a95dc6..461c7bd68ef 100644
--- a/src/devices/bus/apf/slot.cpp
+++ b/src/devices/bus/apf/slot.cpp
@@ -221,7 +221,7 @@ bool apf_cart_slot_device::call_softlist_load(software_list_device &swlist, cons
get default card software
-------------------------------------------------*/
-void apf_cart_slot_device::get_default_card_software(std::string &result)
+std::string apf_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -240,11 +240,10 @@ void apf_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "std");
+ return software_get_default_slot("std");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/apf/slot.h b/src/devices/bus/apf/slot.h
index 15d2c8500a9..e8260ab55bc 100644
--- a/src/devices/bus/apf/slot.h
+++ b/src/devices/bus/apf/slot.h
@@ -84,7 +84,7 @@ public:
virtual const char *file_extensions() const override { return "bin"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom);
diff --git a/src/devices/bus/arcadia/slot.cpp b/src/devices/bus/arcadia/slot.cpp
index eec8c412775..3ae3d45c645 100644
--- a/src/devices/bus/arcadia/slot.cpp
+++ b/src/devices/bus/arcadia/slot.cpp
@@ -230,9 +230,9 @@ bool arcadia_cart_slot_device::call_softlist_load(software_list_device &swlist,
get default card software
-------------------------------------------------*/
-void arcadia_cart_slot_device::get_default_card_software(std::string &result)
+std::string arcadia_cart_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "std");
+ return software_get_default_slot("std");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/arcadia/slot.h b/src/devices/bus/arcadia/slot.h
index b4777024f2c..e018b40595d 100644
--- a/src/devices/bus/arcadia/slot.h
+++ b/src/devices/bus/arcadia/slot.h
@@ -73,7 +73,7 @@ public:
virtual const char *file_extensions() const override { return "bin"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom);
diff --git a/src/devices/bus/astrocde/slot.cpp b/src/devices/bus/astrocde/slot.cpp
index 80b429a18c3..02d2294b7b5 100644
--- a/src/devices/bus/astrocde/slot.cpp
+++ b/src/devices/bus/astrocde/slot.cpp
@@ -198,7 +198,7 @@ bool astrocade_cart_slot_device::call_softlist_load(software_list_device &swlist
get default card software
-------------------------------------------------*/
-void astrocade_cart_slot_device::get_default_card_software(std::string &result)
+std::string astrocade_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -216,11 +216,10 @@ void astrocade_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "rom");
+ return software_get_default_slot("rom");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/astrocde/slot.h b/src/devices/bus/astrocde/slot.h
index 76eb2f8ed20..1a28ccf4b96 100644
--- a/src/devices/bus/astrocde/slot.h
+++ b/src/devices/bus/astrocde/slot.h
@@ -73,7 +73,7 @@ public:
virtual const char *file_extensions() const override { return "bin"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom);
diff --git a/src/devices/bus/c64/exp.cpp b/src/devices/bus/c64/exp.cpp
index 8ffc963d0e2..a78706d80cb 100644
--- a/src/devices/bus/c64/exp.cpp
+++ b/src/devices/bus/c64/exp.cpp
@@ -217,20 +217,17 @@ bool c64_expansion_slot_device::call_softlist_load(software_list_device &swlist,
// get_default_card_software -
//-------------------------------------------------
-void c64_expansion_slot_device::get_default_card_software(std::string &result)
+std::string c64_expansion_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
if (!core_stricmp(filetype(), "crt"))
- {
- cbm_crt_get_card(result, m_file);
- return;
- }
+ return cbm_crt_get_card(m_file);
clear();
}
- software_get_default_slot(result, "standard");
+ return software_get_default_slot("standard");
}
diff --git a/src/devices/bus/c64/exp.h b/src/devices/bus/c64/exp.h
index 1e3c4ad049c..d72a91475be 100644
--- a/src/devices/bus/c64/exp.h
+++ b/src/devices/bus/c64/exp.h
@@ -149,7 +149,7 @@ protected:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
devcb_read8 m_read_dma_cd;
devcb_write8 m_write_dma_cd;
diff --git a/src/devices/bus/cbm2/exp.cpp b/src/devices/bus/cbm2/exp.cpp
index 8e9c03c022a..f673abc7395 100644
--- a/src/devices/bus/cbm2/exp.cpp
+++ b/src/devices/bus/cbm2/exp.cpp
@@ -155,9 +155,9 @@ bool cbm2_expansion_slot_device::call_softlist_load(software_list_device &swlist
// get_default_card_software -
//-------------------------------------------------
-void cbm2_expansion_slot_device::get_default_card_software(std::string &result)
+std::string cbm2_expansion_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "standard");
+ return software_get_default_slot("standard");
}
diff --git a/src/devices/bus/cbm2/exp.h b/src/devices/bus/cbm2/exp.h
index 771a66604cc..ce5daf10dbb 100644
--- a/src/devices/bus/cbm2/exp.h
+++ b/src/devices/bus/cbm2/exp.h
@@ -96,7 +96,7 @@ protected:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
device_cbm2_expansion_card_interface *m_card;
};
diff --git a/src/devices/bus/chanf/slot.cpp b/src/devices/bus/chanf/slot.cpp
index a533c85bb05..442c5e05c70 100644
--- a/src/devices/bus/chanf/slot.cpp
+++ b/src/devices/bus/chanf/slot.cpp
@@ -217,7 +217,7 @@ bool channelf_cart_slot_device::call_softlist_load(software_list_device &swlist,
get default card software
-------------------------------------------------*/
-void channelf_cart_slot_device::get_default_card_software(std::string &result)
+std::string channelf_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -235,10 +235,9 @@ void channelf_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "chess");
+ return software_get_default_slot("chess");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/chanf/slot.h b/src/devices/bus/chanf/slot.h
index cd20ce557c4..78ee692640e 100644
--- a/src/devices/bus/chanf/slot.h
+++ b/src/devices/bus/chanf/slot.h
@@ -87,7 +87,7 @@ public:
virtual const char *file_extensions() const override { return "bin,chf"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom);
diff --git a/src/devices/bus/coco/cococart.cpp b/src/devices/bus/coco/cococart.cpp
index 9943378996c..684f7a5d156 100644
--- a/src/devices/bus/coco/cococart.cpp
+++ b/src/devices/bus/coco/cococart.cpp
@@ -364,9 +364,9 @@ bool cococart_slot_device::call_softlist_load(software_list_device &swlist, cons
// get_default_card_software
//-------------------------------------------------
-void cococart_slot_device::get_default_card_software(std::string &result)
+std::string cococart_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "pak");
+ return software_get_default_slot("pak");
}
diff --git a/src/devices/bus/coco/cococart.h b/src/devices/bus/coco/cococart.h
index ac53c52a0da..f92459b4388 100644
--- a/src/devices/bus/coco/cococart.h
+++ b/src/devices/bus/coco/cococart.h
@@ -102,7 +102,7 @@ public:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing to $FF40-$FF7F
DECLARE_READ8_MEMBER(read);
diff --git a/src/devices/bus/coleco/exp.cpp b/src/devices/bus/coleco/exp.cpp
index bf79854d857..4da0d060398 100644
--- a/src/devices/bus/coleco/exp.cpp
+++ b/src/devices/bus/coleco/exp.cpp
@@ -112,18 +112,15 @@ bool colecovision_cartridge_slot_device::call_softlist_load(software_list_device
// get_default_card_software -
//-------------------------------------------------
-void colecovision_cartridge_slot_device::get_default_card_software(std::string &result)
+std::string colecovision_cartridge_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
UINT32 length = core_fsize(m_file);
if (length == 0x100000 || length == 0x200000)
- {
- software_get_default_slot(result, "xin1");
- return;
- }
+ return software_get_default_slot("xin1");
}
- software_get_default_slot(result, "standard");
+ return software_get_default_slot("standard");
}
diff --git a/src/devices/bus/coleco/exp.h b/src/devices/bus/coleco/exp.h
index c70b06959a0..e64e3c8d6d1 100644
--- a/src/devices/bus/coleco/exp.h
+++ b/src/devices/bus/coleco/exp.h
@@ -93,7 +93,7 @@ protected:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
device_colecovision_cartridge_interface *m_card;
};
diff --git a/src/devices/bus/crvision/slot.cpp b/src/devices/bus/crvision/slot.cpp
index 5953c1c5cb6..47173a1cf5d 100644
--- a/src/devices/bus/crvision/slot.cpp
+++ b/src/devices/bus/crvision/slot.cpp
@@ -229,7 +229,7 @@ bool crvision_cart_slot_device::call_softlist_load(software_list_device &swlist,
get default card software
-------------------------------------------------*/
-void crvision_cart_slot_device::get_default_card_software(std::string &result)
+std::string crvision_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -267,11 +267,10 @@ void crvision_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "crv_rom4k");
+ return software_get_default_slot("crv_rom4k");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/crvision/slot.h b/src/devices/bus/crvision/slot.h
index b6da6c165df..d3bb02d6790 100644
--- a/src/devices/bus/crvision/slot.h
+++ b/src/devices/bus/crvision/slot.h
@@ -78,7 +78,7 @@ public:
virtual const char *file_extensions() const override { return "bin,rom"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom40);
diff --git a/src/devices/bus/gameboy/gb_slot.cpp b/src/devices/bus/gameboy/gb_slot.cpp
index 32e0f46db29..9202bbfb358 100644
--- a/src/devices/bus/gameboy/gb_slot.cpp
+++ b/src/devices/bus/gameboy/gb_slot.cpp
@@ -600,7 +600,7 @@ int base_gb_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
get default card software
-------------------------------------------------*/
-void base_gb_cart_slot_device::get_default_card_software(std::string &result)
+std::string base_gb_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -623,23 +623,19 @@ void base_gb_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "rom");
+ return software_get_default_slot("rom");
}
-void megaduck_cart_slot_device::get_default_card_software(std::string &result)
+std::string megaduck_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
- {
- result.assign("rom");
- return;
- }
+ return std::string("rom");
- software_get_default_slot(result, "rom");
+ return software_get_default_slot("rom");
}
diff --git a/src/devices/bus/gameboy/gb_slot.h b/src/devices/bus/gameboy/gb_slot.h
index 3d37b7b11ec..a0108ec03c7 100644
--- a/src/devices/bus/gameboy/gb_slot.h
+++ b/src/devices/bus/gameboy/gb_slot.h
@@ -141,7 +141,7 @@ public:
virtual const char *file_extensions() const override { return "bin,gb,gbc"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom);
@@ -182,7 +182,7 @@ public:
virtual const char *file_extensions() const override { return "bin"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
};
diff --git a/src/devices/bus/gba/gba_slot.cpp b/src/devices/bus/gba/gba_slot.cpp
index 82ef6663a93..1fa9372faa4 100644
--- a/src/devices/bus/gba/gba_slot.cpp
+++ b/src/devices/bus/gba/gba_slot.cpp
@@ -400,7 +400,7 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
get default card software
-------------------------------------------------*/
-void gba_cart_slot_device::get_default_card_software(std::string &result)
+std::string gba_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -417,11 +417,10 @@ void gba_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "gba_rom");
+ return software_get_default_slot("gba_rom");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/gba/gba_slot.h b/src/devices/bus/gba/gba_slot.h
index 339be075733..9d9a6a48be7 100644
--- a/src/devices/bus/gba/gba_slot.h
+++ b/src/devices/bus/gba/gba_slot.h
@@ -91,7 +91,7 @@ public:
virtual const char *file_extensions() const override { return "gba,bin"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ32_MEMBER(read_rom);
diff --git a/src/devices/bus/generic/slot.cpp b/src/devices/bus/generic/slot.cpp
index 40a32ffcecd..94644ba728f 100644
--- a/src/devices/bus/generic/slot.cpp
+++ b/src/devices/bus/generic/slot.cpp
@@ -179,9 +179,9 @@ bool generic_slot_device::call_softlist_load(software_list_device &swlist, const
get default card software
-------------------------------------------------*/
-void generic_slot_device::get_default_card_software(std::string &result)
+std::string generic_slot_device::get_default_card_software()
{
- software_get_default_slot(result, m_default_card);
+ return software_get_default_slot(m_default_card);
}
diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h
index bf3833558da..6a12c1cd84c 100644
--- a/src/devices/bus/generic/slot.h
+++ b/src/devices/bus/generic/slot.h
@@ -124,7 +124,7 @@ public:
virtual const char *file_extensions() const override { return m_extensions; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom);
diff --git a/src/devices/bus/intv/slot.cpp b/src/devices/bus/intv/slot.cpp
index 3cb214753f0..daa41e57f7c 100644
--- a/src/devices/bus/intv/slot.cpp
+++ b/src/devices/bus/intv/slot.cpp
@@ -459,7 +459,7 @@ bool intv_cart_slot_device::call_softlist_load(software_list_device &swlist, con
get default card software
-------------------------------------------------*/
-void intv_cart_slot_device::get_default_card_software(std::string &result)
+std::string intv_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -503,10 +503,9 @@ void intv_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "intv_rom");
+ return software_get_default_slot("intv_rom");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/intv/slot.h b/src/devices/bus/intv/slot.h
index 865866ca2e0..7d970f18a52 100644
--- a/src/devices/bus/intv/slot.h
+++ b/src/devices/bus/intv/slot.h
@@ -120,7 +120,7 @@ public:
virtual const char *file_extensions() const override { return "bin,int,rom,itv"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ16_MEMBER(read_rom04) { if (m_cart) return m_cart->read_rom04(space, offset, mem_mask); else return 0xffff; }
diff --git a/src/devices/bus/iq151/iq151.cpp b/src/devices/bus/iq151/iq151.cpp
index 1a3f2d3018f..5f2d522c1d9 100644
--- a/src/devices/bus/iq151/iq151.cpp
+++ b/src/devices/bus/iq151/iq151.cpp
@@ -204,7 +204,7 @@ bool iq151cart_slot_device::call_softlist_load(software_list_device &swlist, con
get default card software
-------------------------------------------------*/
-void iq151cart_slot_device::get_default_card_software(std::string &result)
+std::string iq151cart_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "basic6");
+ return software_get_default_slot("basic6");
}
diff --git a/src/devices/bus/iq151/iq151.h b/src/devices/bus/iq151/iq151.h
index c88948c925c..292362f0d45 100644
--- a/src/devices/bus/iq151/iq151.h
+++ b/src/devices/bus/iq151/iq151.h
@@ -106,7 +106,7 @@ public:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual void read(offs_t offset, UINT8 &data);
diff --git a/src/devices/bus/kc/kc.cpp b/src/devices/bus/kc/kc.cpp
index fdd2de706e6..13bca495f89 100644
--- a/src/devices/bus/kc/kc.cpp
+++ b/src/devices/bus/kc/kc.cpp
@@ -370,7 +370,7 @@ bool kccart_slot_device::call_softlist_load(software_list_device &swlist, const
get default card software
-------------------------------------------------*/
-void kccart_slot_device::get_default_card_software(std::string &result)
+std::string kccart_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "standard");
+ return software_get_default_slot("standard");
}
diff --git a/src/devices/bus/kc/kc.h b/src/devices/bus/kc/kc.h
index 85146d4cfe8..e31007ea85e 100644
--- a/src/devices/bus/kc/kc.h
+++ b/src/devices/bus/kc/kc.h
@@ -104,7 +104,7 @@ public:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
};
// device type definition
diff --git a/src/devices/bus/megadrive/md_slot.cpp b/src/devices/bus/megadrive/md_slot.cpp
index f1a5700b0e1..92eb9fa1b8f 100644
--- a/src/devices/bus/megadrive/md_slot.cpp
+++ b/src/devices/bus/megadrive/md_slot.cpp
@@ -900,7 +900,7 @@ int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
get default card software
-------------------------------------------------*/
-void base_md_cart_slot_device::get_default_card_software(std::string &result)
+std::string base_md_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -919,10 +919,10 @@ void base_md_cart_slot_device::get_default_card_software(std::string &result)
clear();
- result.assign(slot_string);
+ return std::string(slot_string);
}
else
- software_get_default_slot(result, "rom");
+ return software_get_default_slot("rom");
}
diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h
index 2adac9e01d0..086d02bc79f 100644
--- a/src/devices/bus/megadrive/md_slot.h
+++ b/src/devices/bus/megadrive/md_slot.h
@@ -161,7 +161,7 @@ public:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
int get_type() { return m_type; }
diff --git a/src/devices/bus/msx_slot/cartridge.cpp b/src/devices/bus/msx_slot/cartridge.cpp
index 43a92a94906..274e6f1875c 100644
--- a/src/devices/bus/msx_slot/cartridge.cpp
+++ b/src/devices/bus/msx_slot/cartridge.cpp
@@ -278,7 +278,7 @@ int msx_slot_cartridge_device::get_cart_type(UINT8 *rom, UINT32 length)
}
-void msx_slot_cartridge_device::get_default_card_software(std::string &result)
+std::string msx_slot_cartridge_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -337,10 +337,9 @@ void msx_slot_cartridge_device::get_default_card_software(std::string &result)
slot_string = msx_cart_get_slot_option(type);
}
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "nomapper");
+ return software_get_default_slot("nomapper");
}
diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h
index 7eaaf7a3242..ce8303ff3d4 100644
--- a/src/devices/bus/msx_slot/cartridge.h
+++ b/src/devices/bus/msx_slot/cartridge.h
@@ -55,7 +55,7 @@ public:
virtual const char *file_extensions() const override { return "mx1,bin,rom"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// msx_internal_slot-level overrides
virtual DECLARE_READ8_MEMBER(read) override;
diff --git a/src/devices/bus/neogeo/neogeo_slot.cpp b/src/devices/bus/neogeo/neogeo_slot.cpp
index 100e53e6e18..3f8eea06635 100644
--- a/src/devices/bus/neogeo/neogeo_slot.cpp
+++ b/src/devices/bus/neogeo/neogeo_slot.cpp
@@ -204,9 +204,9 @@ bool neogeo_cart_slot_device::call_softlist_load(software_list_device &swlist, c
get default card software
-------------------------------------------------*/
-void neogeo_cart_slot_device::get_default_card_software(std::string &result)
+std::string neogeo_cart_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "rom");
+ return software_get_default_slot("rom");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/neogeo/neogeo_slot.h b/src/devices/bus/neogeo/neogeo_slot.h
index ae46e619f0e..1b037103165 100644
--- a/src/devices/bus/neogeo/neogeo_slot.h
+++ b/src/devices/bus/neogeo/neogeo_slot.h
@@ -41,7 +41,7 @@ public:
virtual const char *file_extensions() const override { return "bin"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ16_MEMBER(read_rom);
diff --git a/src/devices/bus/nes/aladdin.cpp b/src/devices/bus/nes/aladdin.cpp
index ff3598d9052..95834d239aa 100644
--- a/src/devices/bus/nes/aladdin.cpp
+++ b/src/devices/bus/nes/aladdin.cpp
@@ -142,7 +142,7 @@ bool nes_aladdin_slot_device::call_softlist_load(software_list_device &swlist, c
return TRUE;
}
-void nes_aladdin_slot_device::get_default_card_software(std::string &result)
+std::string nes_aladdin_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -163,10 +163,10 @@ void nes_aladdin_slot_device::get_default_card_software(std::string &result)
clear();
- result.assign(slot_string);
+ return std::string(slot_string);
}
else
- software_get_default_slot(result, "algn");
+ return software_get_default_slot("algn");
}
diff --git a/src/devices/bus/nes/aladdin.h b/src/devices/bus/nes/aladdin.h
index ad6b7a4a796..20786c3cab3 100644
--- a/src/devices/bus/nes/aladdin.h
+++ b/src/devices/bus/nes/aladdin.h
@@ -65,7 +65,7 @@ public:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
virtual DECLARE_READ8_MEMBER(read);
void write_prg(UINT32 offset, UINT8 data) { if (m_cart) m_cart->write_prg(offset, data); }
diff --git a/src/devices/bus/nes/datach.cpp b/src/devices/bus/nes/datach.cpp
index e0629f74fd3..aff526a755f 100644
--- a/src/devices/bus/nes/datach.cpp
+++ b/src/devices/bus/nes/datach.cpp
@@ -143,10 +143,10 @@ bool nes_datach_slot_device::call_softlist_load(software_list_device &swlist, co
return TRUE;
}
-void nes_datach_slot_device::get_default_card_software(std::string &result)
+std::string nes_datach_slot_device::get_default_card_software()
{
// any way to detect the game with X24C01?
- software_get_default_slot(result, "datach_rom");
+ return software_get_default_slot("datach_rom");
}
diff --git a/src/devices/bus/nes/datach.h b/src/devices/bus/nes/datach.h
index 3fe70c2a531..bda9edfe50e 100644
--- a/src/devices/bus/nes/datach.h
+++ b/src/devices/bus/nes/datach.h
@@ -67,7 +67,7 @@ public:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
virtual DECLARE_READ8_MEMBER(read);
void write_prg_bank(UINT8 bank) { if (m_cart) m_cart->write_prg_bank(bank); }
diff --git a/src/devices/bus/nes/karastudio.cpp b/src/devices/bus/nes/karastudio.cpp
index 9342f18dd40..1e9317db284 100644
--- a/src/devices/bus/nes/karastudio.cpp
+++ b/src/devices/bus/nes/karastudio.cpp
@@ -132,9 +132,9 @@ bool nes_kstudio_slot_device::call_softlist_load(software_list_device &swlist, c
return TRUE;
}
-void nes_kstudio_slot_device::get_default_card_software(std::string &result)
+std::string nes_kstudio_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "ks_exp");
+ return software_get_default_slot("ks_exp");
}
diff --git a/src/devices/bus/nes/karastudio.h b/src/devices/bus/nes/karastudio.h
index c39020d38ce..3a2f0c6d919 100644
--- a/src/devices/bus/nes/karastudio.h
+++ b/src/devices/bus/nes/karastudio.h
@@ -64,7 +64,7 @@ public:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
virtual DECLARE_READ8_MEMBER(read);
void write_prg_bank(UINT8 bank) { if (m_cart) m_cart->write_prg_bank(bank); }
diff --git a/src/devices/bus/nes/nes_slot.cpp b/src/devices/bus/nes/nes_slot.cpp
index 7a4065a6d80..dc9b2e8e639 100644
--- a/src/devices/bus/nes/nes_slot.cpp
+++ b/src/devices/bus/nes/nes_slot.cpp
@@ -912,7 +912,7 @@ bool nes_cart_slot_device::call_softlist_load(software_list_device &swlist, cons
get default card software
-------------------------------------------------*/
-void nes_cart_slot_device::get_default_card_software(std::string &result)
+std::string nes_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -930,10 +930,10 @@ void nes_cart_slot_device::get_default_card_software(std::string &result)
clear();
- result.assign(slot_string);
+ return std::string(slot_string);
}
else
- software_get_default_slot(result, "nrom");
+ return software_get_default_slot("nrom");
}
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index 975357c81aa..ad2a1b1c28a 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -363,7 +363,7 @@ public:
virtual device_image_partialhash_func get_partial_hash() const override { return &nes_partialhash; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
const char * get_default_card_ines(UINT8 *ROM, UINT32 len);
const char * get_default_card_unif(UINT8 *ROM, UINT32 len);
const char * nes_get_slot(int pcb_id);
diff --git a/src/devices/bus/nes/sunsoft_dcs.cpp b/src/devices/bus/nes/sunsoft_dcs.cpp
index 8be24a9c66d..a4f86e7e781 100644
--- a/src/devices/bus/nes/sunsoft_dcs.cpp
+++ b/src/devices/bus/nes/sunsoft_dcs.cpp
@@ -111,9 +111,9 @@ bool nes_ntb_slot_device::call_softlist_load(software_list_device &swlist, const
return TRUE;
}
-void nes_ntb_slot_device::get_default_card_software(std::string &result)
+std::string nes_ntb_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "ntbrom");
+ return software_get_default_slot("ntbrom");
}
//-----------------------------------------------
diff --git a/src/devices/bus/nes/sunsoft_dcs.h b/src/devices/bus/nes/sunsoft_dcs.h
index a6437cb4638..83393719cf7 100644
--- a/src/devices/bus/nes/sunsoft_dcs.h
+++ b/src/devices/bus/nes/sunsoft_dcs.h
@@ -61,7 +61,7 @@ public:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
virtual DECLARE_READ8_MEMBER(read);
diff --git a/src/devices/bus/odyssey2/slot.cpp b/src/devices/bus/odyssey2/slot.cpp
index fe12540494f..4d540411a7f 100644
--- a/src/devices/bus/odyssey2/slot.cpp
+++ b/src/devices/bus/odyssey2/slot.cpp
@@ -209,7 +209,7 @@ bool o2_cart_slot_device::call_softlist_load(software_list_device &swlist, const
get default card software
-------------------------------------------------*/
-void o2_cart_slot_device::get_default_card_software(std::string &result)
+std::string o2_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -227,11 +227,10 @@ void o2_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "o2_rom");
+ return software_get_default_slot("o2_rom");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/odyssey2/slot.h b/src/devices/bus/odyssey2/slot.h
index 59b576af30f..6634ed57c61 100644
--- a/src/devices/bus/odyssey2/slot.h
+++ b/src/devices/bus/odyssey2/slot.h
@@ -84,7 +84,7 @@ public:
virtual const char *file_extensions() const override { return "bin,rom"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom04);
diff --git a/src/devices/bus/pce/pce_slot.cpp b/src/devices/bus/pce/pce_slot.cpp
index 913f22110b8..3ecd0e9cb7b 100644
--- a/src/devices/bus/pce/pce_slot.cpp
+++ b/src/devices/bus/pce/pce_slot.cpp
@@ -339,7 +339,7 @@ int pce_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
get default card software
-------------------------------------------------*/
-void pce_cart_slot_device::get_default_card_software(std::string &result)
+std::string pce_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -356,11 +356,10 @@ void pce_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "rom");
+ return software_get_default_slot("rom");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/pce/pce_slot.h b/src/devices/bus/pce/pce_slot.h
index 2b859d7236f..e680ef7b950 100644
--- a/src/devices/bus/pce/pce_slot.h
+++ b/src/devices/bus/pce/pce_slot.h
@@ -88,7 +88,7 @@ public:
virtual const char *file_extensions() const override { return "pce,bin"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_cart);
diff --git a/src/devices/bus/plus4/exp.cpp b/src/devices/bus/plus4/exp.cpp
index 5ea6289b2cc..efea87851e1 100644
--- a/src/devices/bus/plus4/exp.cpp
+++ b/src/devices/bus/plus4/exp.cpp
@@ -157,9 +157,9 @@ bool plus4_expansion_slot_device::call_softlist_load(software_list_device &swlis
// get_default_card_software -
//-------------------------------------------------
-void plus4_expansion_slot_device::get_default_card_software(std::string &result)
+std::string plus4_expansion_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "standard");
+ return software_get_default_slot("standard");
}
diff --git a/src/devices/bus/plus4/exp.h b/src/devices/bus/plus4/exp.h
index 616857711c8..3595b013f98 100644
--- a/src/devices/bus/plus4/exp.h
+++ b/src/devices/bus/plus4/exp.h
@@ -135,7 +135,7 @@ protected:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
devcb_write_line m_write_irq;
devcb_read8 m_read_dma_cd;
diff --git a/src/devices/bus/ql/rom.cpp b/src/devices/bus/ql/rom.cpp
index 3a1dc4dd171..c15ac21b872 100644
--- a/src/devices/bus/ql/rom.cpp
+++ b/src/devices/bus/ql/rom.cpp
@@ -114,9 +114,9 @@ bool ql_rom_cartridge_slot_t::call_softlist_load(software_list_device &swlist, c
// get_default_card_software -
//-------------------------------------------------
-void ql_rom_cartridge_slot_t::get_default_card_software(std::string &result)
+std::string ql_rom_cartridge_slot_t::get_default_card_software()
{
- software_get_default_slot(result, "standard");
+ return software_get_default_slot("standard");
}
diff --git a/src/devices/bus/ql/rom.h b/src/devices/bus/ql/rom.h
index e2c9a89818e..282c47cac3d 100644
--- a/src/devices/bus/ql/rom.h
+++ b/src/devices/bus/ql/rom.h
@@ -110,7 +110,7 @@ protected:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
device_ql_rom_cartridge_card_interface *m_card;
};
diff --git a/src/devices/bus/saturn/sat_slot.cpp b/src/devices/bus/saturn/sat_slot.cpp
index 7e1f0cd1233..d1160c68e29 100644
--- a/src/devices/bus/saturn/sat_slot.cpp
+++ b/src/devices/bus/saturn/sat_slot.cpp
@@ -219,9 +219,9 @@ bool sat_cart_slot_device::call_softlist_load(software_list_device &swlist, cons
get default card software
-------------------------------------------------*/
-void sat_cart_slot_device::get_default_card_software(std::string &result)
+std::string sat_cart_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "rom");
+ return software_get_default_slot("rom");
}
diff --git a/src/devices/bus/saturn/sat_slot.h b/src/devices/bus/saturn/sat_slot.h
index 075848ee409..e8a711c3a0b 100644
--- a/src/devices/bus/saturn/sat_slot.h
+++ b/src/devices/bus/saturn/sat_slot.h
@@ -89,7 +89,7 @@ public:
virtual const char *file_extensions() const override { return "bin"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ32_MEMBER(read_rom);
diff --git a/src/devices/bus/scv/slot.cpp b/src/devices/bus/scv/slot.cpp
index e2c6dece7c0..6cb7157b5bb 100644
--- a/src/devices/bus/scv/slot.cpp
+++ b/src/devices/bus/scv/slot.cpp
@@ -259,7 +259,7 @@ int scv_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
get default card software
-------------------------------------------------*/
-void scv_cart_slot_device::get_default_card_software(std::string &result)
+std::string scv_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -276,11 +276,10 @@ void scv_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "rom8k");
+ return software_get_default_slot("rom8k");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/scv/slot.h b/src/devices/bus/scv/slot.h
index 1befef08f28..3fa5a02578a 100644
--- a/src/devices/bus/scv/slot.h
+++ b/src/devices/bus/scv/slot.h
@@ -88,7 +88,7 @@ public:
virtual const char *file_extensions() const override { return "bin"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_cart);
diff --git a/src/devices/bus/sega8/sega8_slot.cpp b/src/devices/bus/sega8/sega8_slot.cpp
index a3fee762e91..9f85e6b810c 100644
--- a/src/devices/bus/sega8/sega8_slot.cpp
+++ b/src/devices/bus/sega8/sega8_slot.cpp
@@ -603,7 +603,7 @@ int sega8_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
get default card software
-------------------------------------------------*/
-void sega8_cart_slot_device::get_default_card_software(std::string &result)
+std::string sega8_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -623,11 +623,10 @@ void sega8_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "rom");
+ return software_get_default_slot("rom");
}
diff --git a/src/devices/bus/sega8/sega8_slot.h b/src/devices/bus/sega8/sega8_slot.h
index cf56effa4f0..439bc3be7a2 100644
--- a/src/devices/bus/sega8/sega8_slot.h
+++ b/src/devices/bus/sega8/sega8_slot.h
@@ -137,7 +137,7 @@ public:
virtual const char *file_extensions() const override { return m_extensions; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_cart);
diff --git a/src/devices/bus/snes/snes_slot.cpp b/src/devices/bus/snes/snes_slot.cpp
index 6098824921f..15d68f41afe 100644
--- a/src/devices/bus/snes/snes_slot.cpp
+++ b/src/devices/bus/snes/snes_slot.cpp
@@ -999,7 +999,7 @@ void base_sns_cart_slot_device::get_cart_type_addon(UINT8 *ROM, UINT32 len, int
get default card software
-------------------------------------------------*/
-void base_sns_cart_slot_device::get_default_card_software(std::string &result)
+std::string base_sns_cart_slot_device::get_default_card_software()
{
bool fullpath = open_image_file(mconfig().options());
@@ -1058,11 +1058,10 @@ void base_sns_cart_slot_device::get_default_card_software(std::string &result)
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "lorom");
+ return software_get_default_slot("lorom");
}
diff --git a/src/devices/bus/snes/snes_slot.h b/src/devices/bus/snes/snes_slot.h
index 8b433d1128a..02b00a1cb87 100644
--- a/src/devices/bus/snes/snes_slot.h
+++ b/src/devices/bus/snes/snes_slot.h
@@ -180,7 +180,7 @@ public:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_l);
diff --git a/src/devices/bus/vboy/slot.cpp b/src/devices/bus/vboy/slot.cpp
index 88ef2ce7a2f..151d6f93ef0 100644
--- a/src/devices/bus/vboy/slot.cpp
+++ b/src/devices/bus/vboy/slot.cpp
@@ -233,9 +233,9 @@ bool vboy_cart_slot_device::call_softlist_load(software_list_device &swlist, con
get default card software
-------------------------------------------------*/
-void vboy_cart_slot_device::get_default_card_software(std::string &result)
+std::string vboy_cart_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "vb_rom");
+ return software_get_default_slot("vb_rom");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/vboy/slot.h b/src/devices/bus/vboy/slot.h
index c663b37252b..ca9e784ad8c 100644
--- a/src/devices/bus/vboy/slot.h
+++ b/src/devices/bus/vboy/slot.h
@@ -83,7 +83,7 @@ public:
virtual const char *file_extensions() const override { return "vb,bin"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ32_MEMBER(read_cart);
diff --git a/src/devices/bus/vc4000/slot.cpp b/src/devices/bus/vc4000/slot.cpp
index 88d7b9b4f7e..f7f8b797cfb 100644
--- a/src/devices/bus/vc4000/slot.cpp
+++ b/src/devices/bus/vc4000/slot.cpp
@@ -235,7 +235,7 @@ bool vc4000_cart_slot_device::call_softlist_load(software_list_device &swlist, c
get default card software
-------------------------------------------------*/
-void vc4000_cart_slot_device::get_default_card_software(std::string &result)
+std::string vc4000_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -254,11 +254,10 @@ void vc4000_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "std");
+ return software_get_default_slot("std");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/vc4000/slot.h b/src/devices/bus/vc4000/slot.h
index 089bdf5fc3a..6b40c6cbcbe 100644
--- a/src/devices/bus/vc4000/slot.h
+++ b/src/devices/bus/vc4000/slot.h
@@ -85,7 +85,7 @@ public:
virtual const char *file_extensions() const override { return "bin,rom"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom);
diff --git a/src/devices/bus/vcs/vcs_slot.cpp b/src/devices/bus/vcs/vcs_slot.cpp
index 73d01ef1547..f37c00a1f97 100755
--- a/src/devices/bus/vcs/vcs_slot.cpp
+++ b/src/devices/bus/vcs/vcs_slot.cpp
@@ -781,7 +781,7 @@ int vcs_cart_slot_device::identify_cart_type(UINT8 *ROM, UINT32 len)
get default card software
-------------------------------------------------*/
-void vcs_cart_slot_device::get_default_card_software(std::string &result)
+std::string vcs_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -797,10 +797,10 @@ void vcs_cart_slot_device::get_default_card_software(std::string &result)
clear();
- result.assign(slot_string);
+ return std::string(slot_string);
}
else
- software_get_default_slot(result, "a26_4k");
+ return software_get_default_slot("a26_4k");
}
diff --git a/src/devices/bus/vcs/vcs_slot.h b/src/devices/bus/vcs/vcs_slot.h
index f77eda9056c..984cf5c9d12 100755
--- a/src/devices/bus/vcs/vcs_slot.h
+++ b/src/devices/bus/vcs/vcs_slot.h
@@ -112,7 +112,7 @@ public:
virtual const char *file_extensions() const override { return "bin,a26"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom);
diff --git a/src/devices/bus/vectrex/slot.cpp b/src/devices/bus/vectrex/slot.cpp
index c97b007642a..eadf505484a 100644
--- a/src/devices/bus/vectrex/slot.cpp
+++ b/src/devices/bus/vectrex/slot.cpp
@@ -217,7 +217,7 @@ bool vectrex_cart_slot_device::call_softlist_load(software_list_device &swlist,
get default card software
-------------------------------------------------*/
-void vectrex_cart_slot_device::get_default_card_software(std::string &result)
+std::string vectrex_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -238,11 +238,10 @@ void vectrex_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "vec_rom");
+ return software_get_default_slot("vec_rom");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/vectrex/slot.h b/src/devices/bus/vectrex/slot.h
index f9007ca01a6..5a1bf306213 100644
--- a/src/devices/bus/vectrex/slot.h
+++ b/src/devices/bus/vectrex/slot.h
@@ -84,7 +84,7 @@ public:
virtual const char *file_extensions() const override { return "bin,gam,vec"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom);
diff --git a/src/devices/bus/vic10/exp.cpp b/src/devices/bus/vic10/exp.cpp
index 6aca9930c13..9a4ab019eb2 100644
--- a/src/devices/bus/vic10/exp.cpp
+++ b/src/devices/bus/vic10/exp.cpp
@@ -182,20 +182,17 @@ bool vic10_expansion_slot_device::call_softlist_load(software_list_device &swlis
// get_default_card_software -
//-------------------------------------------------
-void vic10_expansion_slot_device::get_default_card_software(std::string &result)
+std::string vic10_expansion_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
if (!core_stricmp(filetype(), "crt"))
- {
- cbm_crt_get_card(result, m_file);
- return;
- }
+ return cbm_crt_get_card(m_file);
clear();
}
- software_get_default_slot(result, "standard");
+ return software_get_default_slot("standard");
}
diff --git a/src/devices/bus/vic10/exp.h b/src/devices/bus/vic10/exp.h
index f334668ada8..9ca71e33653 100644
--- a/src/devices/bus/vic10/exp.h
+++ b/src/devices/bus/vic10/exp.h
@@ -134,7 +134,7 @@ protected:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
devcb_write_line m_write_irq;
devcb_write_line m_write_res;
diff --git a/src/devices/bus/vic20/exp.cpp b/src/devices/bus/vic20/exp.cpp
index 42907bbb0d9..946405a13eb 100644
--- a/src/devices/bus/vic20/exp.cpp
+++ b/src/devices/bus/vic20/exp.cpp
@@ -167,9 +167,9 @@ bool vic20_expansion_slot_device::call_softlist_load(software_list_device &swlis
// get_default_card_software -
//-------------------------------------------------
-void vic20_expansion_slot_device::get_default_card_software(std::string &result)
+std::string vic20_expansion_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "standard");
+ return software_get_default_slot("standard");
}
diff --git a/src/devices/bus/vic20/exp.h b/src/devices/bus/vic20/exp.h
index ddcffa82569..15d67b00e53 100644
--- a/src/devices/bus/vic20/exp.h
+++ b/src/devices/bus/vic20/exp.h
@@ -125,7 +125,7 @@ protected:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
devcb_write_line m_write_irq;
devcb_write_line m_write_nmi;
diff --git a/src/devices/bus/vidbrain/exp.cpp b/src/devices/bus/vidbrain/exp.cpp
index 2aea10bfc8a..a2044481a6a 100644
--- a/src/devices/bus/vidbrain/exp.cpp
+++ b/src/devices/bus/vidbrain/exp.cpp
@@ -154,9 +154,9 @@ bool videobrain_expansion_slot_device::call_softlist_load(software_list_device &
// get_default_card_software -
//-------------------------------------------------
-void videobrain_expansion_slot_device::get_default_card_software(std::string &result)
+std::string videobrain_expansion_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "standard");
+ return software_get_default_slot("standard");
}
diff --git a/src/devices/bus/vidbrain/exp.h b/src/devices/bus/vidbrain/exp.h
index 2579d92a08d..e431ff3f1a6 100644
--- a/src/devices/bus/vidbrain/exp.h
+++ b/src/devices/bus/vidbrain/exp.h
@@ -150,7 +150,7 @@ protected:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
devcb_write_line m_write_extres;
diff --git a/src/devices/bus/wswan/slot.cpp b/src/devices/bus/wswan/slot.cpp
index 0a7383ea8a9..372a40a851a 100644
--- a/src/devices/bus/wswan/slot.cpp
+++ b/src/devices/bus/wswan/slot.cpp
@@ -306,7 +306,7 @@ int ws_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len, UINT32 &nvram_len
get default card software
-------------------------------------------------*/
-void ws_cart_slot_device::get_default_card_software(std::string &result)
+std::string ws_cart_slot_device::get_default_card_software()
{
if (open_image_file(mconfig().options()))
{
@@ -325,11 +325,10 @@ void ws_cart_slot_device::get_default_card_software(std::string &result)
//printf("type: %s\n", slot_string);
clear();
- result.assign(slot_string);
- return;
+ return std::string(slot_string);
}
- software_get_default_slot(result, "ws_rom");
+ return software_get_default_slot("ws_rom");
}
/*-------------------------------------------------
diff --git a/src/devices/bus/wswan/slot.h b/src/devices/bus/wswan/slot.h
index 59dd49550ca..ae5ab7d81d6 100644
--- a/src/devices/bus/wswan/slot.h
+++ b/src/devices/bus/wswan/slot.h
@@ -96,7 +96,7 @@ public:
virtual const char *file_extensions() const override { return "ws,wsc,bin"; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_rom20);
diff --git a/src/devices/bus/z88/z88.cpp b/src/devices/bus/z88/z88.cpp
index 228805142be..647ea838fed 100644
--- a/src/devices/bus/z88/z88.cpp
+++ b/src/devices/bus/z88/z88.cpp
@@ -182,9 +182,9 @@ bool z88cart_slot_device::call_softlist_load(software_list_device &swlist, const
get default card software
-------------------------------------------------*/
-void z88cart_slot_device::get_default_card_software(std::string &result)
+std::string z88cart_slot_device::get_default_card_software()
{
- software_get_default_slot(result, "128krom");
+ return software_get_default_slot("128krom");
}
diff --git a/src/devices/bus/z88/z88.h b/src/devices/bus/z88/z88.h
index 19785d4a7b1..0c39edd5e24 100644
--- a/src/devices/bus/z88/z88.h
+++ b/src/devices/bus/z88/z88.h
@@ -109,7 +109,7 @@ public:
virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
- virtual void get_default_card_software(std::string &result) override;
+ virtual std::string get_default_card_software() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read);
diff --git a/src/devices/cpu/8x300/8x300.cpp b/src/devices/cpu/8x300/8x300.cpp
index ae1fa8bb906..a18f4d50c73 100644
--- a/src/devices/cpu/8x300/8x300.cpp
+++ b/src/devices/cpu/8x300/8x300.cpp
@@ -145,7 +145,7 @@ void n8x300_cpu_device::device_start()
m_icountptr = &m_icount;
}
-void n8x300_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void n8x300_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/8x300/8x300.h b/src/devices/cpu/8x300/8x300.h
index fe6b95259b0..dd236372e5d 100644
--- a/src/devices/cpu/8x300/8x300.h
+++ b/src/devices/cpu/8x300/8x300.h
@@ -66,7 +66,7 @@ protected:
}
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/adsp2100/adsp2100.cpp b/src/devices/cpu/adsp2100/adsp2100.cpp
index 5554513e42f..63788892288 100644
--- a/src/devices/cpu/adsp2100/adsp2100.cpp
+++ b/src/devices/cpu/adsp2100/adsp2100.cpp
@@ -544,15 +544,14 @@ void adsp21xx_device::device_start()
state_add(ADSP2100_SR0_SEC, "SR0_SEC", m_alt.sr.srx.sr0.u);
state_add(ADSP2100_SR1_SEC, "SR1_SEC", m_alt.sr.srx.sr1.u);
- std::string tempstring;
for (int ireg = 0; ireg < 8; ireg++)
- state_add(ADSP2100_I0 + ireg, strformat(tempstring, "I%d", ireg).c_str(), m_i[ireg]).mask(0x3fff).callimport();
+ state_add(ADSP2100_I0 + ireg, strformat("I%d", ireg).c_str(), m_i[ireg]).mask(0x3fff).callimport();
for (int lreg = 0; lreg < 8; lreg++)
- state_add(ADSP2100_L0 + lreg, strformat(tempstring, "L%d", lreg).c_str(), m_l[lreg]).mask(0x3fff).callimport();
+ state_add(ADSP2100_L0 + lreg, strformat("L%d", lreg).c_str(), m_l[lreg]).mask(0x3fff).callimport();
for (int mreg = 0; mreg < 8; mreg++)
- state_add(ADSP2100_M0 + mreg, strformat(tempstring, "M%d", mreg).c_str(), m_m[mreg]).signed_mask(0x3fff);
+ state_add(ADSP2100_M0 + mreg, strformat("M%d", mreg).c_str(), m_m[mreg]).signed_mask(0x3fff);
state_add(ADSP2100_PX, "PX", m_px);
state_add(ADSP2100_CNTR, "CNTR", m_cntr).mask(0x3fff);
@@ -571,7 +570,7 @@ void adsp21xx_device::device_start()
for (int irqnum = 0; irqnum < 4; irqnum++)
if (irqnum < 4 || m_chip_type == CHIP_TYPE_ADSP2100)
- state_add(ADSP2100_IRQSTATE0 + irqnum, strformat(tempstring, "IRQ%d", irqnum).c_str(), m_irq_state[irqnum]).mask(1).callimport();
+ state_add(ADSP2100_IRQSTATE0 + irqnum, strformat("IRQ%d", irqnum).c_str(), m_irq_state[irqnum]).mask(1).callimport();
state_add(ADSP2100_FLAGIN, "FLAGIN", m_flagin).mask(1);
state_add(ADSP2100_FLAGOUT, "FLAGOUT", m_flagout).mask(1);
@@ -720,7 +719,7 @@ void adsp21xx_device::state_import(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void adsp21xx_device::state_string_export(const device_state_entry &entry, std::string &str)
+void adsp21xx_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/adsp2100/adsp2100.h b/src/devices/cpu/adsp2100/adsp2100.h
index 816255eea4a..f2393f986d2 100644
--- a/src/devices/cpu/adsp2100/adsp2100.h
+++ b/src/devices/cpu/adsp2100/adsp2100.h
@@ -237,7 +237,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/alph8201/alph8201.cpp b/src/devices/cpu/alph8201/alph8201.cpp
index 06c4deb020e..9c40d8d55ee 100644
--- a/src/devices/cpu/alph8201/alph8201.cpp
+++ b/src/devices/cpu/alph8201/alph8201.cpp
@@ -527,7 +527,7 @@ void alpha8201_cpu_device::state_export(const device_state_entry &entry)
}
-void alpha8201_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void alpha8201_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/alph8201/alph8201.h b/src/devices/cpu/alph8201/alph8201.h
index 740bd1b1042..22130bc5464 100644
--- a/src/devices/cpu/alph8201/alph8201.h
+++ b/src/devices/cpu/alph8201/alph8201.h
@@ -75,7 +75,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/alto2/alto2cpu.cpp b/src/devices/cpu/alto2/alto2cpu.cpp
index 6b35a076ec3..a3538dee290 100644
--- a/src/devices/cpu/alto2/alto2cpu.cpp
+++ b/src/devices/cpu/alto2/alto2cpu.cpp
@@ -1002,7 +1002,7 @@ void alto2_cpu_device::device_start()
// for the debugger
//-------------------------------------------------
-void alto2_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void alto2_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/alto2/alto2cpu.h b/src/devices/cpu/alto2/alto2cpu.h
index 9a9fdf0d031..071cbd3cb2a 100644
--- a/src/devices/cpu/alto2/alto2cpu.h
+++ b/src/devices/cpu/alto2/alto2cpu.h
@@ -213,7 +213,7 @@ protected:
//! device (P)ROMs
virtual const rom_entry *device_rom_region() const override;
//! device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
//! device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/am29000/am29000.cpp b/src/devices/cpu/am29000/am29000.cpp
index 27924fa163f..a31dc3b0374 100644
--- a/src/devices/cpu/am29000/am29000.cpp
+++ b/src/devices/cpu/am29000/am29000.cpp
@@ -404,7 +404,7 @@ void am29000_cpu_device::device_start()
}
-void am29000_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void am29000_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/am29000/am29000.h b/src/devices/cpu/am29000/am29000.h
index 221e7309cea..4f0c1a1a4af 100644
--- a/src/devices/cpu/am29000/am29000.h
+++ b/src/devices/cpu/am29000/am29000.h
@@ -462,7 +462,7 @@ protected:
}
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/amis2000/amis2000.cpp b/src/devices/cpu/amis2000/amis2000.cpp
index 3082b09f14b..57ed4d99578 100644
--- a/src/devices/cpu/amis2000/amis2000.cpp
+++ b/src/devices/cpu/amis2000/amis2000.cpp
@@ -70,7 +70,7 @@ amis2152_cpu_device::amis2152_cpu_device(const machine_config &mconfig, const ch
// disasm
-void amis2000_base_device::state_string_export(const device_state_entry &entry, std::string &str)
+void amis2000_base_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/amis2000/amis2000.h b/src/devices/cpu/amis2000/amis2000.h
index e30522d7719..5beee90fae9 100644
--- a/src/devices/cpu/amis2000/amis2000.h
+++ b/src/devices/cpu/amis2000/amis2000.h
@@ -89,7 +89,7 @@ protected:
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
virtual UINT32 disasm_max_opcode_bytes() const override { return 1; }
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
address_space_config m_program_config;
address_space_config m_data_config;
diff --git a/src/devices/cpu/apexc/apexc.cpp b/src/devices/cpu/apexc/apexc.cpp
index 77e5c919f44..87c5ff9a351 100644
--- a/src/devices/cpu/apexc/apexc.cpp
+++ b/src/devices/cpu/apexc/apexc.cpp
@@ -814,7 +814,7 @@ void apexc_cpu_device::state_export(const device_state_entry &entry)
}
-void apexc_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void apexc_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/apexc/apexc.h b/src/devices/cpu/apexc/apexc.h
index 99b64812702..ad07fba71c6 100644
--- a/src/devices/cpu/apexc/apexc.h
+++ b/src/devices/cpu/apexc/apexc.h
@@ -44,7 +44,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp
index aa07ddcfecb..41724668f53 100644
--- a/src/devices/cpu/arm/arm.cpp
+++ b/src/devices/cpu/arm/arm.cpp
@@ -552,7 +552,7 @@ void arm_cpu_device::device_start()
}
-void arm_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void arm_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
static const char *s[4] = { "USER", "FIRQ", "IRQ ", "SVC " };
diff --git a/src/devices/cpu/arm/arm.h b/src/devices/cpu/arm/arm.h
index f0639f384c1..d2f6156127b 100644
--- a/src/devices/cpu/arm/arm.h
+++ b/src/devices/cpu/arm/arm.h
@@ -61,7 +61,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/arm7/arm7.cpp b/src/devices/cpu/arm7/arm7.cpp
index 346dcb1020d..828f8562811 100644
--- a/src/devices/cpu/arm7/arm7.cpp
+++ b/src/devices/cpu/arm7/arm7.cpp
@@ -564,7 +564,7 @@ void arm7_cpu_device::state_export(const device_state_entry &entry)
}
-void arm7_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void arm7_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/arm7/arm7.h b/src/devices/cpu/arm7/arm7.h
index 210abe73cf6..24ab02f2b86 100644
--- a/src/devices/cpu/arm7/arm7.h
+++ b/src/devices/cpu/arm7/arm7.h
@@ -71,7 +71,7 @@ protected:
// device_state_interface overrides
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/asap/asap.cpp b/src/devices/cpu/asap/asap.cpp
index 9f36eb6116f..c22d0cdcee2 100644
--- a/src/devices/cpu/asap/asap.cpp
+++ b/src/devices/cpu/asap/asap.cpp
@@ -186,7 +186,6 @@ void asap_device::device_start()
m_direct = &m_program->direct();
// register our state for the debugger
- std::string tempstr;
state_add(STATE_GENPC, "GENPC", m_pc).noshow();
state_add(STATE_GENPCBASE, "GENPCBASE", m_ppc).noshow();
state_add(STATE_GENSP, "GENSP", m_src2val[REGBASE + 31]).noshow();
@@ -194,7 +193,7 @@ void asap_device::device_start()
state_add(ASAP_PC, "PC", m_pc);
state_add(ASAP_PS, "PS", m_flagsio).callimport().callexport();
for (int regnum = 0; regnum < 32; regnum++)
- state_add(ASAP_R0 + regnum, strformat(tempstr, "R%d", regnum).c_str(), m_src2val[REGBASE + regnum]);
+ state_add(ASAP_R0 + regnum, strformat("R%d", regnum).c_str(), m_src2val[REGBASE + regnum]);
// register our state for saving
save_item(NAME(m_pc));
@@ -281,7 +280,7 @@ void asap_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void asap_device::state_string_export(const device_state_entry &entry, std::string &str)
+void asap_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/asap/asap.h b/src/devices/cpu/asap/asap.h
index 287f2056af2..87d11282072 100644
--- a/src/devices/cpu/asap/asap.h
+++ b/src/devices/cpu/asap/asap.h
@@ -48,7 +48,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/avr8/avr8.cpp b/src/devices/cpu/avr8/avr8.cpp
index f8f357a2a9b..756562f0ea7 100644
--- a/src/devices/cpu/avr8/avr8.cpp
+++ b/src/devices/cpu/avr8/avr8.cpp
@@ -905,7 +905,7 @@ const address_space_config *avr8_device::memory_space_config(address_spacenum sp
// for the debugger
//-------------------------------------------------
-void avr8_device::state_string_export(const device_state_entry &entry, std::string &str)
+void avr8_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/avr8/avr8.h b/src/devices/cpu/avr8/avr8.h
index 45174d48741..86207566ffc 100644
--- a/src/devices/cpu/avr8/avr8.h
+++ b/src/devices/cpu/avr8/avr8.h
@@ -131,7 +131,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// address spaces
const address_space_config m_program_config;
diff --git a/src/devices/cpu/ccpu/ccpu.cpp b/src/devices/cpu/ccpu/ccpu.cpp
index e8893580f0c..85756d12794 100644
--- a/src/devices/cpu/ccpu/ccpu.cpp
+++ b/src/devices/cpu/ccpu/ccpu.cpp
@@ -139,7 +139,7 @@ void ccpu_cpu_device::device_start()
}
-void ccpu_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void ccpu_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/ccpu/ccpu.h b/src/devices/cpu/ccpu/ccpu.h
index 349b9e9ffc4..bfae00383e3 100644
--- a/src/devices/cpu/ccpu/ccpu.h
+++ b/src/devices/cpu/ccpu/ccpu.h
@@ -82,7 +82,7 @@ protected:
}
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/cop400/cop400.cpp b/src/devices/cpu/cop400/cop400.cpp
index 9f68a8c0545..ae14bd59cab 100644
--- a/src/devices/cpu/cop400/cop400.cpp
+++ b/src/devices/cpu/cop400/cop400.cpp
@@ -1205,7 +1205,7 @@ void cop400_cpu_device::state_export(const device_state_entry &entry)
}
}
-void cop400_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void cop400_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/cop400/cop400.h b/src/devices/cpu/cop400/cop400.h
index 3b2cbf349bc..43e7755f1f4 100644
--- a/src/devices/cpu/cop400/cop400.h
+++ b/src/devices/cpu/cop400/cop400.h
@@ -170,7 +170,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/cosmac/cosmac.cpp b/src/devices/cpu/cosmac/cosmac.cpp
index 73170762cbf..d8e3d52c6fd 100644
--- a/src/devices/cpu/cosmac/cosmac.cpp
+++ b/src/devices/cpu/cosmac/cosmac.cpp
@@ -353,9 +353,8 @@ void cosmac_device::device_start()
state_add(COSMAC_I, "I", m_i).mask(0xf);
state_add(COSMAC_N, "N", m_n).mask(0xf);
- std::string tempstr;
for (int regnum = 0; regnum < 16; regnum++)
- state_add(COSMAC_R0 + regnum, strformat(tempstr, "R%x", regnum).c_str(), m_r[regnum]);
+ state_add(COSMAC_R0 + regnum, strformat("R%x", regnum).c_str(), m_r[regnum]);
state_add(COSMAC_DF, "DF", m_df).mask(0x1).noshow();
state_add(COSMAC_IE, "IE", m_ie).mask(0x1).noshow();
@@ -469,7 +468,7 @@ void cosmac_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void cosmac_device::state_string_export(const device_state_entry &entry, std::string &str)
+void cosmac_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/cosmac/cosmac.h b/src/devices/cpu/cosmac/cosmac.h
index 26a60021335..31b1d8dc11c 100644
--- a/src/devices/cpu/cosmac/cosmac.h
+++ b/src/devices/cpu/cosmac/cosmac.h
@@ -232,7 +232,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/cp1610/cp1610.cpp b/src/devices/cpu/cp1610/cp1610.cpp
index fd6fd5eceb7..a05bbbc0d49 100644
--- a/src/devices/cpu/cp1610/cp1610.cpp
+++ b/src/devices/cpu/cp1610/cp1610.cpp
@@ -3401,7 +3401,7 @@ cp1610_cpu_device::cp1610_cpu_device(const machine_config &mconfig, const char *
}
-void cp1610_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void cp1610_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/cp1610/cp1610.h b/src/devices/cpu/cp1610/cp1610.h
index ec9618eefff..84611f75a2c 100644
--- a/src/devices/cpu/cp1610/cp1610.h
+++ b/src/devices/cpu/cp1610/cp1610.h
@@ -56,7 +56,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/cubeqcpu/cubeqcpu.cpp b/src/devices/cpu/cubeqcpu/cubeqcpu.cpp
index 0582c9a2679..a657a23680e 100644
--- a/src/devices/cpu/cubeqcpu/cubeqcpu.cpp
+++ b/src/devices/cpu/cubeqcpu/cubeqcpu.cpp
@@ -347,7 +347,7 @@ void cquestrot_cpu_device::device_reset()
}
-void cquestrot_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void cquestrot_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
@@ -471,7 +471,7 @@ void cquestlin_cpu_device::device_reset()
}
-void cquestlin_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void cquestlin_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/cubeqcpu/cubeqcpu.h b/src/devices/cpu/cubeqcpu/cubeqcpu.h
index 1faa4fc5db7..23bfbf84f5b 100644
--- a/src/devices/cpu/cubeqcpu/cubeqcpu.h
+++ b/src/devices/cpu/cubeqcpu/cubeqcpu.h
@@ -232,7 +232,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 8; }
@@ -316,7 +316,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 8; }
diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp
index 5b2b2cb2eb5..034f06def80 100644
--- a/src/devices/cpu/drcbex64.cpp
+++ b/src/devices/cpu/drcbex64.cpp
@@ -787,7 +787,6 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3
x86code *dst = base;
// generate code
- std::string tempstring;
const char *blockname = nullptr;
for (int inum = 0; inum < numinst; inum++)
{
@@ -797,8 +796,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3
// add a comment
if (m_log != nullptr)
{
- std::string dasm;
- inst.disasm(dasm, &m_drcuml);
+ std::string dasm = inst.disasm(&m_drcuml);
x86log_add_comment(m_log, dst, "%s", dasm.c_str());
}
@@ -808,7 +806,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3
if (inst.opcode() == OP_HANDLE)
blockname = inst.param(0).handle().string();
else if (inst.opcode() == OP_HASH)
- blockname = strformat(tempstring, "Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str();
+ blockname = strformat("Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str();
}
// generate code
diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp
index 625f702160f..3ca840e1c6f 100644
--- a/src/devices/cpu/drcbex86.cpp
+++ b/src/devices/cpu/drcbex86.cpp
@@ -770,7 +770,6 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3
x86code *dst = base;
// generate code
- std::string tempstring;
const char *blockname = nullptr;
for (int inum = 0; inum < numinst; inum++)
{
@@ -780,8 +779,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3
// add a comment
if (m_log != nullptr)
{
- std::string dasm;
- inst.disasm(dasm, &m_drcuml);
+ std::string dasm = inst.disasm(&m_drcuml);
x86log_add_comment(m_log, dst, "%s", dasm.c_str());
}
@@ -791,7 +789,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3
if (inst.opcode() == OP_HANDLE)
blockname = inst.param(0).handle().string();
else if (inst.opcode() == OP_HASH)
- blockname = strformat(tempstring, "Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str();
+ blockname = strformat("Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str();
}
// generate code
diff --git a/src/devices/cpu/drcuml.cpp b/src/devices/cpu/drcuml.cpp
index 4cf2fc981c0..3bbd610cfa9 100644
--- a/src/devices/cpu/drcuml.cpp
+++ b/src/devices/cpu/drcuml.cpp
@@ -456,7 +456,6 @@ void drcuml_block::optimize()
void drcuml_block::disassemble()
{
std::string comment;
- std::string dasm;
// iterate over instructions and output
int firstcomment = -1;
@@ -483,7 +482,7 @@ void drcuml_block::disassemble()
// indent everything else with a tab
else
{
- m_inst[instnum].disasm(dasm, &m_drcuml);
+ std::string dasm = m_inst[instnum].disasm(&m_drcuml);
// include the first accumulated comment with this line
if (firstcomment != -1)
@@ -1119,16 +1118,14 @@ static int bevalidate_verify_state(drcuml_state *drcuml, const drcuml_machine_st
// output the error if we have one
if (errend != errorbuf)
{
- char disasm[256];
-
// disassemble the test instruction
- testinst->disasm(disasm, drcuml);
+ std::string disasm = testinst->disasm(drcuml);
// output a description of what went wrong
printf("\n");
printf("----------------------------------------------\n");
printf("Backend validation error:\n");
- printf(" %s\n", disasm);
+ printf(" %s\n", disasm.c_str());
printf("\n");
printf("Errors:\n");
printf("%s\n", errorbuf);
diff --git a/src/devices/cpu/dsp16/dsp16.cpp b/src/devices/cpu/dsp16/dsp16.cpp
index f7b68e50d75..8b97ce4c064 100644
--- a/src/devices/cpu/dsp16/dsp16.cpp
+++ b/src/devices/cpu/dsp16/dsp16.cpp
@@ -214,7 +214,7 @@ const address_space_config *dsp16_device::memory_space_config(address_spacenum s
// for the debugger
//-------------------------------------------------
-void dsp16_device::state_string_export(const device_state_entry &entry, std::string &str)
+void dsp16_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/dsp16/dsp16.h b/src/devices/cpu/dsp16/dsp16.h
index f574aeae03e..6e509da0569 100644
--- a/src/devices/cpu/dsp16/dsp16.h
+++ b/src/devices/cpu/dsp16/dsp16.h
@@ -46,7 +46,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp
index a8e65846559..f060e81d13c 100644
--- a/src/devices/cpu/dsp32/dsp32.cpp
+++ b/src/devices/cpu/dsp32/dsp32.cpp
@@ -194,14 +194,13 @@ void dsp32c_device::device_start()
m_direct = &m_program->direct();
// register our state for the debugger
- std::string tempstr;
state_add(STATE_GENPC, "GENPC", m_r[15]).noshow();
state_add(STATE_GENPCBASE, "GENPCBASE", m_ppc).noshow();
state_add(STATE_GENSP, "GENSP", m_r[21]).noshow();
state_add(STATE_GENFLAGS, "GENFLAGS", m_iotemp).callimport().callexport().formatstr("%6s").noshow();
state_add(DSP32_PC, "PC", m_r[15]).mask(0xffffff);
for (int regnum = 0; regnum <= 14; regnum++)
- state_add(DSP32_R0 + regnum, strformat(tempstr, "R%d", regnum).c_str(), m_r[regnum]).mask(0xffffff);
+ state_add(DSP32_R0 + regnum, strformat("R%d", regnum).c_str(), m_r[regnum]).mask(0xffffff);
state_add(DSP32_R15, "R15", m_r[17]).mask(0xffffff);
state_add(DSP32_R16, "R16", m_r[18]).mask(0xffffff);
state_add(DSP32_R17, "R17", m_r[19]).mask(0xffffff);
@@ -369,7 +368,7 @@ void dsp32c_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void dsp32c_device::state_string_export(const device_state_entry &entry, std::string &str)
+void dsp32c_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/dsp32/dsp32.h b/src/devices/cpu/dsp32/dsp32.h
index 2b0b9e2b07e..b83888b7a6a 100644
--- a/src/devices/cpu/dsp32/dsp32.h
+++ b/src/devices/cpu/dsp32/dsp32.h
@@ -123,7 +123,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/dsp56k/dsp56k.cpp b/src/devices/cpu/dsp56k/dsp56k.cpp
index 9e151019c7e..7c4b7abd163 100644
--- a/src/devices/cpu/dsp56k/dsp56k.cpp
+++ b/src/devices/cpu/dsp56k/dsp56k.cpp
@@ -340,9 +340,9 @@ void dsp56k_device::device_start()
}
-void dsp56k_device::state_string_export(const device_state_entry &entry, std::string &str)
+void dsp56k_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
- dsp56k_core *cpustate = &m_dsp56k_core;
+ const dsp56k_core *cpustate = &m_dsp56k_core;
switch (entry.index())
{
diff --git a/src/devices/cpu/dsp56k/dsp56k.h b/src/devices/cpu/dsp56k/dsp56k.h
index 8b2eeb4561c..185b52dc033 100644
--- a/src/devices/cpu/dsp56k/dsp56k.h
+++ b/src/devices/cpu/dsp56k/dsp56k.h
@@ -231,7 +231,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/dsp56k/dsp56pcu.cpp b/src/devices/cpu/dsp56k/dsp56pcu.cpp
index 68b35199c73..637f7b6e067 100644
--- a/src/devices/cpu/dsp56k/dsp56pcu.cpp
+++ b/src/devices/cpu/dsp56k/dsp56pcu.cpp
@@ -14,18 +14,18 @@ namespace DSP56K
/* |-------------------------------------| |-------------------------------| */
/* */
/* ************************************************************************* */
-UINT8 LF_bit(dsp56k_core* cpustate) { return (SR & 0x8000) >> 15; }
-UINT8 FV_bit(dsp56k_core* cpustate) { return (SR & 0x4000) >> 14; }
-// UINT8 S_bits(dsp56k_core* cpustate) { return (SR & 0x0c00) >> 10; }
-UINT8 I_bits(dsp56k_core* cpustate) { return (SR & 0x0300) >> 8; }
-UINT8 S_bit (dsp56k_core* cpustate) { return (SR & 0x0080) >> 7; }
-UINT8 L_bit (dsp56k_core* cpustate) { return (SR & 0x0040) >> 6; }
-UINT8 E_bit (dsp56k_core* cpustate) { return (SR & 0x0020) >> 5; }
-UINT8 U_bit (dsp56k_core* cpustate) { return (SR & 0x0010) >> 4; }
-UINT8 N_bit (dsp56k_core* cpustate) { return (SR & 0x0008) >> 3; }
-UINT8 Z_bit (dsp56k_core* cpustate) { return (SR & 0x0004) >> 2; }
-UINT8 V_bit (dsp56k_core* cpustate) { return (SR & 0x0002) >> 1; }
-UINT8 C_bit (dsp56k_core* cpustate) { return (SR & 0x0001) >> 0; }
+UINT8 LF_bit(const dsp56k_core* cpustate) { return (SR & 0x8000) >> 15; }
+UINT8 FV_bit(const dsp56k_core* cpustate) { return (SR & 0x4000) >> 14; }
+// UINT8 S_bits(const dsp56k_core* cpustate) { return (SR & 0x0c00) >> 10; }
+UINT8 I_bits(const dsp56k_core* cpustate) { return (SR & 0x0300) >> 8; }
+UINT8 S_bit (const dsp56k_core* cpustate) { return (SR & 0x0080) >> 7; }
+UINT8 L_bit (const dsp56k_core* cpustate) { return (SR & 0x0040) >> 6; }
+UINT8 E_bit (const dsp56k_core* cpustate) { return (SR & 0x0020) >> 5; }
+UINT8 U_bit (const dsp56k_core* cpustate) { return (SR & 0x0010) >> 4; }
+UINT8 N_bit (const dsp56k_core* cpustate) { return (SR & 0x0008) >> 3; }
+UINT8 Z_bit (const dsp56k_core* cpustate) { return (SR & 0x0004) >> 2; }
+UINT8 V_bit (const dsp56k_core* cpustate) { return (SR & 0x0002) >> 1; }
+UINT8 C_bit (const dsp56k_core* cpustate) { return (SR & 0x0001) >> 0; }
/* MR setters */
void LF_bit_set(dsp56k_core* cpustate, UINT8 value) { if (value) (SR |= 0x8000); else (SR &= (~0x8000)); }
@@ -54,13 +54,13 @@ void C_bit_set(dsp56k_core* cpustate, UINT8 value) { if (value) (SR |= 0x0001);
/* |---------------------------------------------------------------------| */
/* */
/* ************************************************************************* */
-// UINT8 CD_bit(dsp56k_core* cpustate) { return ((OMR & 0x0080) != 0); }
-// UINT8 SD_bit(dsp56k_core* cpustate) { return ((OMR & 0x0040) != 0); }
-// UINT8 R_bit(dsp56k_core* cpustate) { return ((OMR & 0x0020) != 0); }
-// UINT8 SA_bit(dsp56k_core* cpustate) { return ((OMR & 0x0010) != 0); }
-// UINT8 MC_bit(dsp56k_core* cpustate) { return ((OMR & 0x0004) != 0); }
-UINT8 MB_bit(dsp56k_core* cpustate) { return ((OMR & 0x0002) != 0); }
-UINT8 MA_bit(dsp56k_core* cpustate) { return ((OMR & 0x0001) != 0); }
+// UINT8 CD_bit(const dsp56k_core* cpustate) { return ((OMR & 0x0080) != 0); }
+// UINT8 SD_bit(const dsp56k_core* cpustate) { return ((OMR & 0x0040) != 0); }
+// UINT8 R_bit(const dsp56k_core* cpustate) { return ((OMR & 0x0020) != 0); }
+// UINT8 SA_bit(const dsp56k_core* cpustate) { return ((OMR & 0x0010) != 0); }
+// UINT8 MC_bit(const dsp56k_core* cpustate) { return ((OMR & 0x0004) != 0); }
+UINT8 MB_bit(const dsp56k_core* cpustate) { return ((OMR & 0x0002) != 0); }
+UINT8 MA_bit(const dsp56k_core* cpustate) { return ((OMR & 0x0001) != 0); }
void CD_bit_set(dsp56k_core* cpustate, UINT8 value) { if (value) (OMR |= 0x0080); else (OMR &= (~0x0080)); }
void SD_bit_set(dsp56k_core* cpustate, UINT8 value) { if (value) (OMR |= 0x0040); else (OMR &= (~0x0040)); }
@@ -70,7 +70,7 @@ void MC_bit_set(dsp56k_core* cpustate, UINT8 value) { if (value) (OMR |= 0x0004)
void MB_bit_set(dsp56k_core* cpustate, UINT8 value) { if (value) (OMR |= 0x0002); else (OMR &= (~0x0002)); }
void MA_bit_set(dsp56k_core* cpustate, UINT8 value) { if (value) (OMR |= 0x0001); else (OMR &= (~0x0001)); }
-UINT8 dsp56k_operating_mode(dsp56k_core* cpustate)
+UINT8 dsp56k_operating_mode(const dsp56k_core* cpustate)
{
return ((MB_bit(cpustate) << 1) | MA_bit(cpustate));
}
@@ -86,8 +86,8 @@ UINT8 dsp56k_operating_mode(dsp56k_core* cpustate)
/* |---------------------------------------------------------------------| */
/* */
/* ************************************************************************* */
-UINT8 UF_bit(dsp56k_core* cpustate) { return ((SP & 0x0020) != 0); }
-UINT8 SE_bit(dsp56k_core* cpustate) { return ((SP & 0x0010) != 0); }
+UINT8 UF_bit(const dsp56k_core* cpustate) { return ((SP & 0x0020) != 0); }
+UINT8 SE_bit(const dsp56k_core* cpustate) { return ((SP & 0x0010) != 0); }
//void UF_bit_set(dsp56k_core* cpustate, UINT8 value) {};
//void SE_bit_set(dsp56k_core* cpustate, UINT8 value) {};
diff --git a/src/devices/cpu/dsp56k/dsp56pcu.h b/src/devices/cpu/dsp56k/dsp56pcu.h
index 7463ac11d35..b3b83109a35 100644
--- a/src/devices/cpu/dsp56k/dsp56pcu.h
+++ b/src/devices/cpu/dsp56k/dsp56pcu.h
@@ -42,28 +42,28 @@ void pcu_init(dsp56k_core* cpustate, device_t *device);
/* STATUS REGISTER (SR) BITS (1-25) */
/* MR */
-UINT8 LF_bit(dsp56k_core* cpustate);
-UINT8 FV_bit(dsp56k_core* cpustate);
-//UINT8 S_bits(dsp56k_core* cpustate);
-UINT8 I_bits(dsp56k_core* cpustate);
+UINT8 LF_bit(const dsp56k_core* cpustate);
+UINT8 FV_bit(const dsp56k_core* cpustate);
+//UINT8 S_bits(const dsp56k_core* cpustate);
+UINT8 I_bits(const dsp56k_core* cpustate);
/* CCR - with macros for easy access */
#define S() (S_bit(cpustate))
-UINT8 S_bit(dsp56k_core* cpustate);
+UINT8 S_bit(const dsp56k_core* cpustate);
#define L() (L_bit(cpustate))
-UINT8 L_bit(dsp56k_core* cpustate);
+UINT8 L_bit(const dsp56k_core* cpustate);
#define E() (E_bit(cpustate))
-UINT8 E_bit(dsp56k_core* cpustate);
+UINT8 E_bit(const dsp56k_core* cpustate);
#define U() (U_bit(cpustate))
-UINT8 U_bit(dsp56k_core* cpustate);
+UINT8 U_bit(const dsp56k_core* cpustate);
#define N() (N_bit(cpustate))
-UINT8 N_bit(dsp56k_core* cpustate);
+UINT8 N_bit(const dsp56k_core* cpustate);
#define Z() (Z_bit(cpustate))
-UINT8 Z_bit(dsp56k_core* cpustate);
+UINT8 Z_bit(const dsp56k_core* cpustate);
#define V() (V_bit(cpustate))
-UINT8 V_bit(dsp56k_core* cpustate);
+UINT8 V_bit(const dsp56k_core* cpustate);
#define C() (C_bit(cpustate))
-UINT8 C_bit(dsp56k_core* cpustate);
+UINT8 C_bit(const dsp56k_core* cpustate);
/* MR setters */
void LF_bit_set(dsp56k_core* cpustate, UINT8 value);
@@ -101,13 +101,13 @@ void C_bit_set(dsp56k_core* cpustate, UINT8 value);
/* 1-28 OPERATING MODE REGISTER (OMR) BITS */
-//UINT8 CD_bit(dsp56k_core* cpustate);
-//UINT8 SD_bit(dsp56k_core* cpustate);
-//UINT8 R_bit(dsp56k_core* cpustate);
-//UINT8 SA_bit(dsp56k_core* cpustate);
-//UINT8 MC_bit(dsp56k_core* cpustate);
-UINT8 MB_bit(dsp56k_core* cpustate);
-UINT8 MA_bit(dsp56k_core* cpustate);
+//UINT8 CD_bit(const dsp56k_core* cpustate);
+//UINT8 SD_bit(const dsp56k_core* cpustate);
+//UINT8 R_bit(const dsp56k_core* cpustate);
+//UINT8 SA_bit(const dsp56k_core* cpustate);
+//UINT8 MC_bit(const dsp56k_core* cpustate);
+UINT8 MB_bit(const dsp56k_core* cpustate);
+UINT8 MA_bit(const dsp56k_core* cpustate);
void CD_bit_set(dsp56k_core* cpustate, UINT8 value);
void SD_bit_set(dsp56k_core* cpustate, UINT8 value);
@@ -118,8 +118,8 @@ void MB_bit_set(dsp56k_core* cpustate, UINT8 value);
void MA_bit_set(dsp56k_core* cpustate, UINT8 value);
/* 1-27 STACK POINTER (SP) BITS */
-UINT8 UF_bit(dsp56k_core* cpustate);
-UINT8 SE_bit(dsp56k_core* cpustate);
+UINT8 UF_bit(const dsp56k_core* cpustate);
+UINT8 SE_bit(const dsp56k_core* cpustate);
//void UF_bit_set(dsp56k_core* cpustate, UINT8 value) {};
//void SE_bit_set(dsp56k_core* cpustate, UINT8 value) {};
diff --git a/src/devices/cpu/e0c6200/e0c6200.cpp b/src/devices/cpu/e0c6200/e0c6200.cpp
index e0b6a2eb8d2..0b87b9eaa7d 100644
--- a/src/devices/cpu/e0c6200/e0c6200.cpp
+++ b/src/devices/cpu/e0c6200/e0c6200.cpp
@@ -25,7 +25,7 @@
// disasm
-void e0c6200_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void e0c6200_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/e0c6200/e0c6200.h b/src/devices/cpu/e0c6200/e0c6200.h
index c55aae83505..7e47f817380 100644
--- a/src/devices/cpu/e0c6200/e0c6200.h
+++ b/src/devices/cpu/e0c6200/e0c6200.h
@@ -44,7 +44,7 @@ protected:
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
virtual UINT32 disasm_max_opcode_bytes() const override { return 2; }
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
address_space_config m_program_config;
address_space_config m_data_config;
diff --git a/src/devices/cpu/e132xs/e132xs.cpp b/src/devices/cpu/e132xs/e132xs.cpp
index 95622ee095a..afa0da8d962 100644
--- a/src/devices/cpu/e132xs/e132xs.cpp
+++ b/src/devices/cpu/e132xs/e132xs.cpp
@@ -1848,7 +1848,7 @@ const address_space_config *hyperstone_device::memory_space_config(address_space
// for the debugger
//-------------------------------------------------
-void hyperstone_device::state_string_export(const device_state_entry &entry, std::string &str)
+void hyperstone_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/e132xs/e132xs.h b/src/devices/cpu/e132xs/e132xs.h
index 719c139ae84..28149e1a742 100644
--- a/src/devices/cpu/e132xs/e132xs.h
+++ b/src/devices/cpu/e132xs/e132xs.h
@@ -241,7 +241,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// address spaces
const address_space_config m_program_config;
diff --git a/src/devices/cpu/esrip/esrip.cpp b/src/devices/cpu/esrip/esrip.cpp
index 4a1b27b62de..a788c2a3ab3 100644
--- a/src/devices/cpu/esrip/esrip.cpp
+++ b/src/devices/cpu/esrip/esrip.cpp
@@ -350,7 +350,7 @@ const address_space_config *esrip_device::memory_space_config(address_spacenum s
// for the debugger
//-------------------------------------------------
-void esrip_device::state_string_export(const device_state_entry &entry, std::string &str)
+void esrip_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
@@ -408,13 +408,13 @@ offs_t esrip_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *op
PRIVATE FUNCTIONS
***************************************************************************/
-int esrip_device::get_hblank()
+int esrip_device::get_hblank() const
{
return machine().first_screen()->hblank();
}
/* Return the state of the LBRM line (Y-scaling related) */
-int esrip_device::get_lbrm()
+int esrip_device::get_lbrm() const
{
int addr = ((m_y_scale & 0x3f) << 3) | ((m_line_latch >> 3) & 7);
int sel = (m_line_latch & 7);
@@ -424,7 +424,7 @@ int esrip_device::get_lbrm()
return (val >> sel) & 1;
}
-int esrip_device::check_jmp(UINT8 jmp_ctrl)
+int esrip_device::check_jmp(UINT8 jmp_ctrl) const
{
int ret = 0;
diff --git a/src/devices/cpu/esrip/esrip.h b/src/devices/cpu/esrip/esrip.h
index 468139701f6..852ce65533e 100644
--- a/src/devices/cpu/esrip/esrip.h
+++ b/src/devices/cpu/esrip/esrip.h
@@ -152,7 +152,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// address spaces
const address_space_config m_program_config;
@@ -223,9 +223,9 @@ protected:
static const ophandler s_opcodetable[24];
private:
- int get_hblank();
- int get_lbrm();
- int check_jmp(UINT8 jmp_ctrl);
+ int get_hblank() const;
+ int get_lbrm() const;
+ int check_jmp(UINT8 jmp_ctrl) const;
// flags
void calc_z_flag(UINT16 res);
diff --git a/src/devices/cpu/f8/f8.cpp b/src/devices/cpu/f8/f8.cpp
index 182638543d7..2bc875e12ee 100644
--- a/src/devices/cpu/f8/f8.cpp
+++ b/src/devices/cpu/f8/f8.cpp
@@ -2045,7 +2045,7 @@ void f8_cpu_device::device_start()
}
-void f8_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void f8_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/f8/f8.h b/src/devices/cpu/f8/f8.h
index 277383c4fec..8afddae22bd 100644
--- a/src/devices/cpu/f8/f8.h
+++ b/src/devices/cpu/f8/f8.h
@@ -51,7 +51,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/g65816/g65816.cpp b/src/devices/cpu/g65816/g65816.cpp
index 8373ddbeecf..47b0e035798 100644
--- a/src/devices/cpu/g65816/g65816.cpp
+++ b/src/devices/cpu/g65816/g65816.cpp
@@ -952,7 +952,7 @@ void g65816_device::state_export(const device_state_entry &entry)
}
}
-void g65816_device::state_string_export(const device_state_entry &entry, std::string &str)
+void g65816_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/g65816/g65816.h b/src/devices/cpu/g65816/g65816.h
index 54294ad4f74..c04b9adf71c 100644
--- a/src/devices/cpu/g65816/g65816.h
+++ b/src/devices/cpu/g65816/g65816.h
@@ -82,7 +82,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/h6280/h6280.cpp b/src/devices/cpu/h6280/h6280.cpp
index d1be228e732..ec0b62b5076 100644
--- a/src/devices/cpu/h6280/h6280.cpp
+++ b/src/devices/cpu/h6280/h6280.cpp
@@ -2191,7 +2191,7 @@ OP(op,ff) { h6280_cycles(4); bbs(7, rd_zpg()); } // 6/8 BBS7 ZPG,REL
// for the debugger
//-------------------------------------------------
-void h6280_device::state_string_export(const device_state_entry &entry, std::string &str)
+void h6280_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/h6280/h6280.h b/src/devices/cpu/h6280/h6280.h
index a344f6392be..ecf93dee843 100644
--- a/src/devices/cpu/h6280/h6280.h
+++ b/src/devices/cpu/h6280/h6280.h
@@ -98,7 +98,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// opcode accessors
UINT8 program_read8(offs_t addr);
diff --git a/src/devices/cpu/h8/h8.cpp b/src/devices/cpu/h8/h8.cpp
index 2692dc4372c..bc78626b00b 100644
--- a/src/devices/cpu/h8/h8.cpp
+++ b/src/devices/cpu/h8/h8.cpp
@@ -216,7 +216,7 @@ void h8_device::state_export(const device_state_entry &entry)
{
}
-void h8_device::state_string_export(const device_state_entry &entry, std::string &str)
+void h8_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch(entry.index()) {
case STATE_GENFLAGS:
diff --git a/src/devices/cpu/h8/h8.h b/src/devices/cpu/h8/h8.h
index d55d8ea7784..8ed2bee2796 100644
--- a/src/devices/cpu/h8/h8.h
+++ b/src/devices/cpu/h8/h8.h
@@ -157,7 +157,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/hcd62121/hcd62121.cpp b/src/devices/cpu/hcd62121/hcd62121.cpp
index 692297048c0..e6104627990 100644
--- a/src/devices/cpu/hcd62121/hcd62121.cpp
+++ b/src/devices/cpu/hcd62121/hcd62121.cpp
@@ -363,7 +363,7 @@ void hcd62121_cpu_device::device_start()
}
-void hcd62121_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void hcd62121_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/hcd62121/hcd62121.h b/src/devices/cpu/hcd62121/hcd62121.h
index dc1c7477409..2339f2229c3 100644
--- a/src/devices/cpu/hcd62121/hcd62121.h
+++ b/src/devices/cpu/hcd62121/hcd62121.h
@@ -54,7 +54,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/hd61700/hd61700.cpp b/src/devices/cpu/hd61700/hd61700.cpp
index 3d08c23473e..c786c7235ba 100644
--- a/src/devices/cpu/hd61700/hd61700.cpp
+++ b/src/devices/cpu/hd61700/hd61700.cpp
@@ -183,8 +183,7 @@ void hd61700_cpu_device::device_start()
for (int ireg=0; ireg<32; ireg++)
{
- std::string tmpstr;
- state_add(HD61700_MAINREG + ireg, strformat(tmpstr, "R%d", ireg).c_str(), m_regmain[ireg]).callimport().callexport().formatstr("%02X");
+ state_add(HD61700_MAINREG + ireg, strformat("R%d", ireg).c_str(), m_regmain[ireg]).callimport().callexport().formatstr("%02X");
}
state_add(STATE_GENPC, "curpc", m_curpc).callimport().callexport().formatstr("%8s").noshow();
@@ -271,7 +270,7 @@ void hd61700_cpu_device::state_import(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void hd61700_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void hd61700_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/hd61700/hd61700.h b/src/devices/cpu/hd61700/hd61700.h
index 6f99aeca899..838ea8833bb 100644
--- a/src/devices/cpu/hd61700/hd61700.h
+++ b/src/devices/cpu/hd61700/hd61700.h
@@ -92,7 +92,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
diff --git a/src/devices/cpu/hmcs40/hmcs40.cpp b/src/devices/cpu/hmcs40/hmcs40.cpp
index c9b7220cf2a..58cd711f8da 100644
--- a/src/devices/cpu/hmcs40/hmcs40.cpp
+++ b/src/devices/cpu/hmcs40/hmcs40.cpp
@@ -133,7 +133,7 @@ hd44828_device::hd44828_device(const machine_config &mconfig, const char *tag, d
// disasm
-void hmcs40_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void hmcs40_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/hmcs40/hmcs40.h b/src/devices/cpu/hmcs40/hmcs40.h
index a06d3848cbc..d9e30a92f72 100644
--- a/src/devices/cpu/hmcs40/hmcs40.h
+++ b/src/devices/cpu/hmcs40/hmcs40.h
@@ -175,7 +175,7 @@ protected:
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
virtual UINT32 disasm_max_opcode_bytes() const override { return 2; }
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
address_space_config m_program_config;
address_space_config m_data_config;
diff --git a/src/devices/cpu/hphybrid/hphybrid.cpp b/src/devices/cpu/hphybrid/hphybrid.cpp
index 22bc74eea08..3d9c9631c5d 100644
--- a/src/devices/cpu/hphybrid/hphybrid.cpp
+++ b/src/devices/cpu/hphybrid/hphybrid.cpp
@@ -616,15 +616,15 @@ UINT16 hp_hybrid_cpu_device::execute_one_sub(UINT16 opcode)
return m_reg_P + 1;
}
-void hp_hybrid_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void hp_hybrid_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
- if (entry.index() == STATE_GENFLAGS) {
- strprintf(str, "%s %s %c %c",
- BIT(m_flags , HPHYBRID_DB_BIT) ? "Db":"..",
- BIT(m_flags , HPHYBRID_CB_BIT) ? "Cb":"..",
- BIT(m_flags , HPHYBRID_O_BIT) ? 'O':'.',
- BIT(m_flags , HPHYBRID_C_BIT) ? 'E':'.');
- }
+ if (entry.index() == STATE_GENFLAGS) {
+ strprintf(str, "%s %s %c %c",
+ BIT(m_flags , HPHYBRID_DB_BIT) ? "Db":"..",
+ BIT(m_flags , HPHYBRID_CB_BIT) ? "Cb":"..",
+ BIT(m_flags , HPHYBRID_O_BIT) ? 'O':'.',
+ BIT(m_flags , HPHYBRID_C_BIT) ? 'E':'.');
+ }
}
offs_t hp_hybrid_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
diff --git a/src/devices/cpu/hphybrid/hphybrid.h b/src/devices/cpu/hphybrid/hphybrid.h
index 10060d751f6..8baeeb66c1d 100644
--- a/src/devices/cpu/hphybrid/hphybrid.h
+++ b/src/devices/cpu/hphybrid/hphybrid.h
@@ -112,7 +112,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp
index 5ce7fdb4f4e..f0d57ada9a0 100644
--- a/src/devices/cpu/i386/i386.cpp
+++ b/src/devices/cpu/i386/i386.cpp
@@ -275,7 +275,7 @@ UINT32 i386_device::i386_get_stack_ptr(UINT8 privilege)
return ret;
}
-UINT32 i386_device::get_flags()
+UINT32 i386_device::get_flags() const
{
UINT32 f = 0x2;
f |= m_CF;
@@ -3465,7 +3465,7 @@ void i386_device::state_export(const device_state_entry &entry)
}
}
-void i386_device::state_string_export(const device_state_entry &entry, std::string &str)
+void i386_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/i386/i386.h b/src/devices/cpu/i386/i386.h
index ed2cf432ee3..c9ef38b4280 100644
--- a/src/devices/cpu/i386/i386.h
+++ b/src/devices/cpu/i386/i386.h
@@ -59,7 +59,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
@@ -362,7 +362,7 @@ struct I386_CALL_GATE
void i386_load_segment_descriptor(int segment );
UINT32 i386_get_stack_segment(UINT8 privilege);
UINT32 i386_get_stack_ptr(UINT8 privilege);
- UINT32 get_flags();
+ UINT32 get_flags() const;
void set_flags(UINT32 f );
void sib_byte(UINT8 mod, UINT32* out_ea, UINT8* out_segment);
void modrm_to_EA(UINT8 mod_rm, UINT32* out_ea, UINT8* out_segment);
diff --git a/src/devices/cpu/i4004/i4004.cpp b/src/devices/cpu/i4004/i4004.cpp
index 51258268e8a..d4ba8891260 100644
--- a/src/devices/cpu/i4004/i4004.cpp
+++ b/src/devices/cpu/i4004/i4004.cpp
@@ -419,15 +419,14 @@ void i4004_cpu_device::device_start()
state_add(STATE_GENFLAGS, "GENFLAGS", m_flags).mask(0x0f).callimport().callexport().noshow().formatstr("%4s");
state_add(I4004_A, "A", m_A).mask(0x0f);
- std::string tempstr;
for (int regnum = 0; regnum < 8; regnum++)
{
- state_add(I4004_R01 + regnum, strformat(tempstr, "R%X%X", regnum * 2, regnum * 2 + 1).c_str(), m_R[regnum]);
+ state_add(I4004_R01 + regnum, strformat("R%X%X", regnum * 2, regnum * 2 + 1).c_str(), m_R[regnum]);
}
for (int addrnum = 0; addrnum < 4; addrnum++)
{
- state_add(I4004_ADDR1 + addrnum, strformat(tempstr, "ADDR%d", addrnum + 1).c_str(), m_ADDR[addrnum].w.l).mask(0xfff);
+ state_add(I4004_ADDR1 + addrnum, strformat("ADDR%d", addrnum + 1).c_str(), m_ADDR[addrnum].w.l).mask(0xfff);
}
state_add(I4004_RAM, "RAM", m_RAM.w.l).mask(0x0fff);
@@ -507,7 +506,7 @@ void i4004_cpu_device::state_export(const device_state_entry &entry)
}
}
-void i4004_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void i4004_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/i4004/i4004.h b/src/devices/cpu/i4004/i4004.h
index 3bdc7cddcfd..fd60a9a5d10 100644
--- a/src/devices/cpu/i4004/i4004.h
+++ b/src/devices/cpu/i4004/i4004.h
@@ -57,7 +57,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/i8008/i8008.cpp b/src/devices/cpu/i8008/i8008.cpp
index 319e6ccd56b..6baeacfe7bb 100644
--- a/src/devices/cpu/i8008/i8008.cpp
+++ b/src/devices/cpu/i8008/i8008.cpp
@@ -92,9 +92,8 @@ void i8008_device::device_start()
state_add(I8008_H, "H", m_H);
state_add(I8008_L, "L", m_L);
- std::string tempstr;
for (int addrnum = 0; addrnum < 8; addrnum++)
- state_add(I8008_ADDR1 + addrnum, strformat(tempstr, "ADDR%d", addrnum + 1).c_str(), m_ADDR[addrnum].w.l).mask(0xfff);
+ state_add(I8008_ADDR1 + addrnum, strformat("ADDR%d", addrnum + 1).c_str(), m_ADDR[addrnum].w.l).mask(0xfff);
init_tables();
}
@@ -187,7 +186,7 @@ void i8008_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void i8008_device::state_string_export(const device_state_entry &entry, std::string &str)
+void i8008_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/i8008/i8008.h b/src/devices/cpu/i8008/i8008.h
index 35b9c0b41ad..74c727290eb 100644
--- a/src/devices/cpu/i8008/i8008.h
+++ b/src/devices/cpu/i8008/i8008.h
@@ -48,7 +48,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
diff --git a/src/devices/cpu/i8085/i8085.cpp b/src/devices/cpu/i8085/i8085.cpp
index 55daea22fee..308de09e4a1 100644
--- a/src/devices/cpu/i8085/i8085.cpp
+++ b/src/devices/cpu/i8085/i8085.cpp
@@ -1048,7 +1048,7 @@ void i8085a_cpu_device::state_export(const device_state_entry &entry)
}
}
-void i8085a_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void i8085a_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/i8085/i8085.h b/src/devices/cpu/i8085/i8085.h
index 59d630393db..9a866577ca6 100644
--- a/src/devices/cpu/i8085/i8085.h
+++ b/src/devices/cpu/i8085/i8085.h
@@ -85,9 +85,9 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
- void state_export(const device_state_entry &entry) override;
- void state_import(const device_state_entry &entry) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
+ virtual void state_export(const device_state_entry &entry) override;
+ virtual void state_import(const device_state_entry &entry) override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/i8089/i8089.cpp b/src/devices/cpu/i8089/i8089.cpp
index f3772286f6f..22494cfdd2f 100644
--- a/src/devices/cpu/i8089/i8089.cpp
+++ b/src/devices/cpu/i8089/i8089.cpp
@@ -158,9 +158,9 @@ offs_t i8089_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *op
// for the debugger
//-------------------------------------------------
-void i8089_device::state_string_export(const device_state_entry &entry, std::string &str)
+void i8089_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
- i8089_channel *ch = m_ch1;
+ const i8089_channel *ch = m_ch1;
if (entry.index() >= CH2_GA && entry.index() <= CH2_PSW)
ch = m_ch2;
diff --git a/src/devices/cpu/i8089/i8089.h b/src/devices/cpu/i8089/i8089.h
index 66477c4e6c3..e4100b8fa94 100644
--- a/src/devices/cpu/i8089/i8089.h
+++ b/src/devices/cpu/i8089/i8089.h
@@ -88,15 +88,15 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
private:
- bool sysbus_width() { return BIT(m_sysbus, 0); }
- bool remotebus_width() { return BIT(m_soc, 0); }
- bool request_grant() { return BIT(m_soc, 1); }
+ bool sysbus_width() const { return BIT(m_sysbus, 0); }
+ bool remotebus_width() const { return BIT(m_soc, 0); }
+ bool request_grant() const { return BIT(m_soc, 1); }
UINT8 read_byte(bool space, offs_t address);
UINT16 read_word(bool space, offs_t address);
diff --git a/src/devices/cpu/i86/i286.cpp b/src/devices/cpu/i86/i286.cpp
index 819ce92f69d..9f79007506a 100644
--- a/src/devices/cpu/i86/i286.cpp
+++ b/src/devices/cpu/i86/i286.cpp
@@ -277,12 +277,12 @@ void i80286_cpu_device::device_start()
m_out_shutdown_func.resolve_safe();
}
-void i80286_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void i80286_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
case STATE_GENPC:
- strprintf(str, "%08X", pc());
+ strprintf(str, "%08X", m_base[CS] + m_ip);
break;
case STATE_GENFLAGS:
diff --git a/src/devices/cpu/i86/i286.h b/src/devices/cpu/i86/i286.h
index 62ee771ac0a..8df1bf43d94 100644
--- a/src/devices/cpu/i86/i286.h
+++ b/src/devices/cpu/i86/i286.h
@@ -77,7 +77,7 @@ protected:
virtual void execute_run() override;
virtual void device_reset() override;
virtual void device_start() override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
virtual UINT32 execute_input_lines() const override { return 1; }
virtual void execute_set_input(int inputnum, int state) override;
bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
diff --git a/src/devices/cpu/i86/i86.cpp b/src/devices/cpu/i86/i86.cpp
index 70af764f1a2..cffe2793516 100644
--- a/src/devices/cpu/i86/i86.cpp
+++ b/src/devices/cpu/i86/i86.cpp
@@ -314,12 +314,12 @@ i8086_common_cpu_device::i8086_common_cpu_device(const machine_config &mconfig,
memset(m_sregs, 0x00, sizeof(m_sregs));
}
-void i8086_common_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void i8086_common_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
case STATE_GENPC:
- strprintf(str, "%08X", pc());
+ strprintf(str, "%08X", (m_sregs[CS] << 4) + m_ip);
break;
case STATE_GENFLAGS:
diff --git a/src/devices/cpu/i86/i86.h b/src/devices/cpu/i86/i86.h
index a142d6672f2..978fa7d1690 100644
--- a/src/devices/cpu/i86/i86.h
+++ b/src/devices/cpu/i86/i86.h
@@ -127,7 +127,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
virtual void interrupt(int int_num, int trap = 1);
bool common_op(UINT8 op);
@@ -192,7 +192,7 @@ protected:
inline void set_OFB_Add(UINT32 x,UINT32 y,UINT32 z);
inline void set_OFW_Sub(UINT32 x,UINT32 y,UINT32 z);
inline void set_OFB_Sub(UINT32 x,UINT32 y,UINT32 z);
- inline UINT16 CompressFlags();
+ inline UINT16 CompressFlags() const;
inline void ExpandFlags(UINT16 f);
// rep instructions
diff --git a/src/devices/cpu/i86/i86inline.h b/src/devices/cpu/i86/i86inline.h
index d848e336e35..8a9ad703fec 100644
--- a/src/devices/cpu/i86/i86inline.h
+++ b/src/devices/cpu/i86/i86inline.h
@@ -504,7 +504,7 @@ inline void i8086_common_cpu_device::set_OFB_Sub(UINT32 x,UINT32 y,UINT32 z)
}
-inline UINT16 i8086_common_cpu_device::CompressFlags()
+inline UINT16 i8086_common_cpu_device::CompressFlags() const
{
return (CF ? 1 : 0)
| (1 << 1)
diff --git a/src/devices/cpu/i960/i960.cpp b/src/devices/cpu/i960/i960.cpp
index d2bb39e709c..224b844387c 100644
--- a/src/devices/cpu/i960/i960.cpp
+++ b/src/devices/cpu/i960/i960.cpp
@@ -2081,7 +2081,7 @@ void i960_cpu_device::device_start()
m_icountptr = &m_icount;
}
-void i960_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void i960_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
static const char *const conditions[8] =
{
diff --git a/src/devices/cpu/i960/i960.h b/src/devices/cpu/i960/i960.h
index 833ae7d741a..3f26fbb46d1 100644
--- a/src/devices/cpu/i960/i960.h
+++ b/src/devices/cpu/i960/i960.h
@@ -95,7 +95,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/ie15/ie15.cpp b/src/devices/cpu/ie15/ie15.cpp
index 95851497236..87de1cb2217 100644
--- a/src/devices/cpu/ie15/ie15.cpp
+++ b/src/devices/cpu/ie15/ie15.cpp
@@ -64,9 +64,8 @@ void ie15_device::device_start()
state_add(STATE_GENFLAGS,"GENFLAGS", m_flags).mask(0x0f).callimport().callexport().noshow().formatstr("%4s");
state_add(IE15_A, "A", m_A);
- std::string tempstring;
for (int ireg = 0; ireg < 32; ireg++)
- state_add(IE15_R0 + ireg, strformat(tempstring, "R%d", ireg).c_str(), m_REGS[ireg]);
+ state_add(IE15_R0 + ireg, strformat("R%d", ireg).c_str(), m_REGS[ireg]);
}
//-------------------------------------------------
@@ -133,7 +132,7 @@ void ie15_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void ie15_device::state_string_export(const device_state_entry &entry, std::string &str)
+void ie15_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/ie15/ie15.h b/src/devices/cpu/ie15/ie15.h
index a68b7acbd15..ce5cb46bf81 100644
--- a/src/devices/cpu/ie15/ie15.h
+++ b/src/devices/cpu/ie15/ie15.h
@@ -48,7 +48,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/jaguar/jaguar.cpp b/src/devices/cpu/jaguar/jaguar.cpp
index 81fcba812bf..000d6375cce 100644
--- a/src/devices/cpu/jaguar/jaguar.cpp
+++ b/src/devices/cpu/jaguar/jaguar.cpp
@@ -400,7 +400,7 @@ void jaguar_cpu_device::device_start()
}
-void jaguar_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void jaguar_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/jaguar/jaguar.h b/src/devices/cpu/jaguar/jaguar.h
index d2ab5f235e6..cc2e8938961 100644
--- a/src/devices/cpu/jaguar/jaguar.h
+++ b/src/devices/cpu/jaguar/jaguar.h
@@ -127,7 +127,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/lc8670/lc8670.cpp b/src/devices/cpu/lc8670/lc8670.cpp
index a397f8505bb..d24b3f64775 100644
--- a/src/devices/cpu/lc8670/lc8670.cpp
+++ b/src/devices/cpu/lc8670/lc8670.cpp
@@ -369,7 +369,7 @@ void lc8670_cpu_device::state_import(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void lc8670_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void lc8670_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/lc8670/lc8670.h b/src/devices/cpu/lc8670/lc8670.h
index 6d2522dcef4..e6211a4522f 100644
--- a/src/devices/cpu/lc8670/lc8670.h
+++ b/src/devices/cpu/lc8670/lc8670.h
@@ -110,7 +110,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
diff --git a/src/devices/cpu/lh5801/lh5801.cpp b/src/devices/cpu/lh5801/lh5801.cpp
index 0287e0d0859..2e748c63905 100644
--- a/src/devices/cpu/lh5801/lh5801.cpp
+++ b/src/devices/cpu/lh5801/lh5801.cpp
@@ -142,7 +142,7 @@ void lh5801_cpu_device::device_start()
m_icountptr = &m_icount;
}
-void lh5801_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void lh5801_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/lh5801/lh5801.h b/src/devices/cpu/lh5801/lh5801.h
index ff47135b262..fe6f3c44f63 100644
--- a/src/devices/cpu/lh5801/lh5801.h
+++ b/src/devices/cpu/lh5801/lh5801.h
@@ -90,7 +90,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/lr35902/lr35902.cpp b/src/devices/cpu/lr35902/lr35902.cpp
index 02cb785e1ff..8f365c18c54 100644
--- a/src/devices/cpu/lr35902/lr35902.cpp
+++ b/src/devices/cpu/lr35902/lr35902.cpp
@@ -180,7 +180,7 @@ void lr35902_cpu_device::device_start()
}
-void lr35902_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void lr35902_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/lr35902/lr35902.h b/src/devices/cpu/lr35902/lr35902.h
index 0a9999ba10c..74ad24d07f8 100644
--- a/src/devices/cpu/lr35902/lr35902.h
+++ b/src/devices/cpu/lr35902/lr35902.h
@@ -70,7 +70,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/m37710/m37710.cpp b/src/devices/cpu/m37710/m37710.cpp
index 26a2accfe76..43568915dce 100644
--- a/src/devices/cpu/m37710/m37710.cpp
+++ b/src/devices/cpu/m37710/m37710.cpp
@@ -1136,7 +1136,7 @@ void m37710_cpu_device::state_export(const device_state_entry &entry)
}
-void m37710_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void m37710_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/m37710/m37710.h b/src/devices/cpu/m37710/m37710.h
index 1f085da0c1f..e88408e527a 100644
--- a/src/devices/cpu/m37710/m37710.h
+++ b/src/devices/cpu/m37710/m37710.h
@@ -117,7 +117,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/m6502/m6502.cpp b/src/devices/cpu/m6502/m6502.cpp
index eae369f4960..0ecd12258f1 100644
--- a/src/devices/cpu/m6502/m6502.cpp
+++ b/src/devices/cpu/m6502/m6502.cpp
@@ -439,7 +439,7 @@ void m6502_device::state_export(const device_state_entry &entry)
{
}
-void m6502_device::state_string_export(const device_state_entry &entry, std::string &str)
+void m6502_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch(entry.index()) {
case STATE_GENFLAGS:
diff --git a/src/devices/cpu/m6502/m6502.h b/src/devices/cpu/m6502/m6502.h
index 6f5ef092891..b8f8b16a6dd 100644
--- a/src/devices/cpu/m6502/m6502.h
+++ b/src/devices/cpu/m6502/m6502.h
@@ -144,7 +144,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/m6502/m65ce02.cpp b/src/devices/cpu/m6502/m65ce02.cpp
index fdedc99369d..01f6fe34b2f 100644
--- a/src/devices/cpu/m6502/m65ce02.cpp
+++ b/src/devices/cpu/m6502/m65ce02.cpp
@@ -75,7 +75,7 @@ void m65ce02_device::state_export(const device_state_entry &entry)
{
}
-void m65ce02_device::state_string_export(const device_state_entry &entry, std::string &str)
+void m65ce02_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch(entry.index()) {
case STATE_GENFLAGS:
diff --git a/src/devices/cpu/m6502/m65ce02.h b/src/devices/cpu/m6502/m65ce02.h
index 3b5dc800954..d0d457d313c 100644
--- a/src/devices/cpu/m6502/m65ce02.h
+++ b/src/devices/cpu/m6502/m65ce02.h
@@ -34,7 +34,7 @@ protected:
virtual void device_reset() override;
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
inline void dec_SP_ce() { if(P & F_E) SP = set_l(SP, SP-1); else SP--; }
inline void inc_SP_ce() { if(P & F_E) SP = set_l(SP, SP+1); else SP++; }
diff --git a/src/devices/cpu/m6502/m740.cpp b/src/devices/cpu/m6502/m740.cpp
index 4987b26e31a..061f6dd75c7 100644
--- a/src/devices/cpu/m6502/m740.cpp
+++ b/src/devices/cpu/m6502/m740.cpp
@@ -53,7 +53,7 @@ void m740_device::device_reset()
SP = 0x00ff;
}
-void m740_device::state_string_export(const device_state_entry &entry, std::string &str)
+void m740_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch(entry.index()) {
case STATE_GENFLAGS:
diff --git a/src/devices/cpu/m6502/m740.h b/src/devices/cpu/m6502/m740.h
index c08eda19609..7f312b256cd 100644
--- a/src/devices/cpu/m6502/m740.h
+++ b/src/devices/cpu/m6502/m740.h
@@ -44,7 +44,7 @@ public:
static const disasm_entry disasm_entries[0x200];
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
virtual void do_exec_full() override;
diff --git a/src/devices/cpu/m6800/m6800.cpp b/src/devices/cpu/m6800/m6800.cpp
index 302ba478445..84d3b8d03e2 100644
--- a/src/devices/cpu/m6800/m6800.cpp
+++ b/src/devices/cpu/m6800/m6800.cpp
@@ -1140,7 +1140,7 @@ void m6800_cpu_device::device_start()
m_icountptr = &m_icount;
}
-void m6800_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void m6800_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/m6800/m6800.h b/src/devices/cpu/m6800/m6800.h
index 45c24d2e039..bb6055e8ad0 100644
--- a/src/devices/cpu/m6800/m6800.h
+++ b/src/devices/cpu/m6800/m6800.h
@@ -87,7 +87,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/m68000/m68000.h b/src/devices/cpu/m68000/m68000.h
index 4fb372fdf12..013627ac6c0 100644
--- a/src/devices/cpu/m68000/m68000.h
+++ b/src/devices/cpu/m68000/m68000.h
@@ -396,7 +396,7 @@ public:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_memory_interface overrides
virtual bool memory_translate(address_spacenum space, int intention, offs_t &address) override;
diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp
index 5b6d2a602bf..dc7e0b14a6f 100644
--- a/src/devices/cpu/m68000/m68kcpu.cpp
+++ b/src/devices/cpu/m68000/m68kcpu.cpp
@@ -1166,7 +1166,7 @@ void m68000_base_device::state_export(const device_state_entry &entry)
}
}
-void m68000_base_device::state_string_export(const device_state_entry &entry, std::string &str)
+void m68000_base_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
UINT16 sr;
@@ -1734,14 +1734,11 @@ void m68000_base_device::define_state(void)
if (cpu_type & MASK_020_OR_LATER)
state_add(M68K_MSP, "MSP", iotemp).callimport().callexport();
- std::string tempstr;
for (int regnum = 0; regnum < 8; regnum++) {
- strprintf(tempstr,"D%d", regnum);
- state_add(M68K_D0 + regnum, tempstr.c_str(), dar[regnum]);
+ state_add(M68K_D0 + regnum, strformat("D%d", regnum).c_str(), dar[regnum]);
}
for (int regnum = 0; regnum < 8; regnum++) {
- strprintf(tempstr,"A%d", regnum);
- state_add(M68K_A0 + regnum, tempstr.c_str(), dar[8 + regnum]);
+ state_add(M68K_A0 + regnum, strformat("A%d", regnum).c_str(), dar[8 + regnum]);
}
state_add(M68K_PREF_ADDR, "PREF_ADDR", pref_addr).mask(addrmask);
@@ -1763,8 +1760,7 @@ void m68000_base_device::define_state(void)
if (cpu_type & MASK_030_OR_LATER)
{
for (int regnum = 0; regnum < 8; regnum++) {
- strprintf(tempstr,"FP%d", regnum);
- state_add(M68K_FP0 + regnum, tempstr.c_str(), iotemp).callimport().callexport().formatstr("%10s");
+ state_add(M68K_FP0 + regnum, strformat("FP%d", regnum).c_str(), iotemp).callimport().callexport().formatstr("%10s");
}
state_add(M68K_FPSR, "FPSR", fpsr);
state_add(M68K_FPCR, "FPCR", fpcr);
diff --git a/src/devices/cpu/m6805/m6805.cpp b/src/devices/cpu/m6805/m6805.cpp
index d3905118b48..0bb5ac3877e 100644
--- a/src/devices/cpu/m6805/m6805.cpp
+++ b/src/devices/cpu/m6805/m6805.cpp
@@ -493,7 +493,7 @@ const address_space_config *m6805_base_device::memory_space_config(address_space
// for the debugger
//-------------------------------------------------
-void m6805_base_device::state_string_export(const device_state_entry &entry, std::string &str)
+void m6805_base_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/m6805/m6805.h b/src/devices/cpu/m6805/m6805.h
index 063fe0f4689..40fd8b3db9b 100644
--- a/src/devices/cpu/m6805/m6805.h
+++ b/src/devices/cpu/m6805/m6805.h
@@ -51,7 +51,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
private:
// opcode/condition tables
diff --git a/src/devices/cpu/m6809/m6809.cpp b/src/devices/cpu/m6809/m6809.cpp
index 30690ed5db5..61337f180f0 100644
--- a/src/devices/cpu/m6809/m6809.cpp
+++ b/src/devices/cpu/m6809/m6809.cpp
@@ -302,7 +302,7 @@ const address_space_config *m6809_base_device::memory_space_config(address_space
// for the debugger
//-------------------------------------------------
-void m6809_base_device::state_string_export(const device_state_entry &entry, std::string &str)
+void m6809_base_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/m6809/m6809.h b/src/devices/cpu/m6809/m6809.h
index 53ca385f81c..a992be78789 100644
--- a/src/devices/cpu/m6809/m6809.h
+++ b/src/devices/cpu/m6809/m6809.h
@@ -84,7 +84,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// addressing modes
enum
diff --git a/src/devices/cpu/mb86233/mb86233.cpp b/src/devices/cpu/mb86233/mb86233.cpp
index b818924fa15..341309d8c12 100644
--- a/src/devices/cpu/mb86233/mb86233.cpp
+++ b/src/devices/cpu/mb86233/mb86233.cpp
@@ -161,7 +161,7 @@ void mb86233_cpu_device::device_start()
}
-void mb86233_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void mb86233_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/mb86233/mb86233.h b/src/devices/cpu/mb86233/mb86233.h
index 0d1e3843737..26fc5b3e9f6 100644
--- a/src/devices/cpu/mb86233/mb86233.h
+++ b/src/devices/cpu/mb86233/mb86233.h
@@ -74,7 +74,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/mb86235/mb86235.cpp b/src/devices/cpu/mb86235/mb86235.cpp
index c68a66e4e7b..edcc6a0471f 100644
--- a/src/devices/cpu/mb86235/mb86235.cpp
+++ b/src/devices/cpu/mb86235/mb86235.cpp
@@ -108,7 +108,7 @@ mb86235_cpu_device::mb86235_cpu_device(const machine_config &mconfig, const char
}
-void mb86235_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void mb86235_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/mb86235/mb86235.h b/src/devices/cpu/mb86235/mb86235.h
index 4fdda0030be..35f586c7290 100644
--- a/src/devices/cpu/mb86235/mb86235.h
+++ b/src/devices/cpu/mb86235/mb86235.h
@@ -42,7 +42,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 8; }
diff --git a/src/devices/cpu/mb88xx/mb88xx.cpp b/src/devices/cpu/mb88xx/mb88xx.cpp
index 5d8ca5f7e09..9ab07538e6e 100644
--- a/src/devices/cpu/mb88xx/mb88xx.cpp
+++ b/src/devices/cpu/mb88xx/mb88xx.cpp
@@ -269,7 +269,7 @@ void mb88_cpu_device::state_export(const device_state_entry &entry)
}
-void mb88_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void mb88_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/mb88xx/mb88xx.h b/src/devices/cpu/mb88xx/mb88xx.h
index 8a9e555d968..6dc4252f706 100644
--- a/src/devices/cpu/mb88xx/mb88xx.h
+++ b/src/devices/cpu/mb88xx/mb88xx.h
@@ -90,9 +90,9 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ) ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
- void state_import(const device_state_entry &entry) override;
- void state_export(const device_state_entry &entry) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
+ virtual void state_import(const device_state_entry &entry) override;
+ virtual void state_export(const device_state_entry &entry) override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/mc68hc11/mc68hc11.cpp b/src/devices/cpu/mc68hc11/mc68hc11.cpp
index f05d9126334..a208a618c4b 100644
--- a/src/devices/cpu/mc68hc11/mc68hc11.cpp
+++ b/src/devices/cpu/mc68hc11/mc68hc11.cpp
@@ -448,7 +448,7 @@ void mc68hc11_cpu_device::device_start()
}
-void mc68hc11_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void mc68hc11_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/mc68hc11/mc68hc11.h b/src/devices/cpu/mc68hc11/mc68hc11.h
index 3f76577b29c..047a1f559e2 100644
--- a/src/devices/cpu/mc68hc11/mc68hc11.h
+++ b/src/devices/cpu/mc68hc11/mc68hc11.h
@@ -70,7 +70,7 @@ protected:
}
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/mcs48/mcs48.cpp b/src/devices/cpu/mcs48/mcs48.cpp
index 0f7a72f0f89..b49899ca498 100644
--- a/src/devices/cpu/mcs48/mcs48.cpp
+++ b/src/devices/cpu/mcs48/mcs48.cpp
@@ -978,10 +978,8 @@ void mcs48_cpu_device::device_start()
state_add(MCS48_P1, "P1", m_p1);
state_add(MCS48_P2, "P2", m_p2);
- std::string tempstr;
for (int regnum = 0; regnum < 8; regnum++) {
- strprintf(tempstr, "R%d", regnum);
- state_add(MCS48_R0 + regnum, tempstr.c_str(), m_rtemp).callimport().callexport();
+ state_add(MCS48_R0 + regnum, strformat("R%d", regnum).c_str(), m_rtemp).callimport().callexport();
}
state_add(MCS48_EA, "EA", m_ea).mask(0x1);
@@ -1298,7 +1296,7 @@ void mcs48_cpu_device::state_export(const device_state_entry &entry)
}
}
-void mcs48_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void mcs48_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/mcs48/mcs48.h b/src/devices/cpu/mcs48/mcs48.h
index ed994d1030e..a916ccd2016 100644
--- a/src/devices/cpu/mcs48/mcs48.h
+++ b/src/devices/cpu/mcs48/mcs48.h
@@ -152,7 +152,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/mcs51/mcs51.cpp b/src/devices/cpu/mcs51/mcs51.cpp
index d77a84a20d0..f3d5816d722 100644
--- a/src/devices/cpu/mcs51/mcs51.cpp
+++ b/src/devices/cpu/mcs51/mcs51.cpp
@@ -2213,7 +2213,7 @@ void mcs51_cpu_device::state_export(const device_state_entry &entry)
}
}
-void mcs51_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void mcs51_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/mcs51/mcs51.h b/src/devices/cpu/mcs51/mcs51.h
index 3babfda9f50..7b769de24ad 100644
--- a/src/devices/cpu/mcs51/mcs51.h
+++ b/src/devices/cpu/mcs51/mcs51.h
@@ -109,7 +109,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/mcs96/mcs96.cpp b/src/devices/cpu/mcs96/mcs96.cpp
index 8c52a8c029d..3c8284f8555 100644
--- a/src/devices/cpu/mcs96/mcs96.cpp
+++ b/src/devices/cpu/mcs96/mcs96.cpp
@@ -128,7 +128,7 @@ void mcs96_device::state_export(const device_state_entry &entry)
{
}
-void mcs96_device::state_string_export(const device_state_entry &entry, std::string &str)
+void mcs96_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch(entry.index()) {
case STATE_GENFLAGS:
diff --git a/src/devices/cpu/mcs96/mcs96.h b/src/devices/cpu/mcs96/mcs96.h
index ed9b64709ec..0111361899c 100644
--- a/src/devices/cpu/mcs96/mcs96.h
+++ b/src/devices/cpu/mcs96/mcs96.h
@@ -85,7 +85,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/melps4/melps4.cpp b/src/devices/cpu/melps4/melps4.cpp
index 7a3653dfe96..d228b42fbee 100644
--- a/src/devices/cpu/melps4/melps4.cpp
+++ b/src/devices/cpu/melps4/melps4.cpp
@@ -42,7 +42,7 @@
// disasm
-void melps4_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void melps4_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/melps4/melps4.h b/src/devices/cpu/melps4/melps4.h
index 2d80cfcf8d2..b0aa67fd6d4 100644
--- a/src/devices/cpu/melps4/melps4.h
+++ b/src/devices/cpu/melps4/melps4.h
@@ -160,7 +160,7 @@ protected:
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
virtual UINT32 disasm_max_opcode_bytes() const override { return 2; }
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
address_space_config m_program_config;
address_space_config m_data_config;
diff --git a/src/devices/cpu/minx/minx.cpp b/src/devices/cpu/minx/minx.cpp
index e822fbd9ecc..bae0338da76 100644
--- a/src/devices/cpu/minx/minx.cpp
+++ b/src/devices/cpu/minx/minx.cpp
@@ -121,7 +121,7 @@ void minx_cpu_device::device_start()
}
-void minx_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void minx_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/minx/minx.h b/src/devices/cpu/minx/minx.h
index e530b3cf88a..a31db6ab7a0 100644
--- a/src/devices/cpu/minx/minx.h
+++ b/src/devices/cpu/minx/minx.h
@@ -36,7 +36,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp
index 3588db1b888..f4747b7304c 100644
--- a/src/devices/cpu/mips/mips3.cpp
+++ b/src/devices/cpu/mips/mips3.cpp
@@ -659,7 +659,7 @@ void mips3_device::state_export(const device_state_entry &entry)
}
-void mips3_device::state_string_export(const device_state_entry &entry, std::string &str)
+void mips3_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h
index e87f8862f40..9e0de9ed419 100644
--- a/src/devices/cpu/mips/mips3.h
+++ b/src/devices/cpu/mips/mips3.h
@@ -303,7 +303,7 @@ protected:
// device_state_interface overrides
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/mips/r3000.cpp b/src/devices/cpu/mips/r3000.cpp
index b53afb83d29..f14c6adc93f 100644
--- a/src/devices/cpu/mips/r3000.cpp
+++ b/src/devices/cpu/mips/r3000.cpp
@@ -443,7 +443,7 @@ void r3000_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void r3000_device::state_string_export(const device_state_entry &entry, std::string &str)
+void r3000_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/mips/r3000.h b/src/devices/cpu/mips/r3000.h
index f9063806cde..a7541eaab85 100644
--- a/src/devices/cpu/mips/r3000.h
+++ b/src/devices/cpu/mips/r3000.h
@@ -126,7 +126,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/mn10200/mn10200.cpp b/src/devices/cpu/mn10200/mn10200.cpp
index bf00be5b984..1b4af66e13f 100644
--- a/src/devices/cpu/mn10200/mn10200.cpp
+++ b/src/devices/cpu/mn10200/mn10200.cpp
@@ -51,7 +51,7 @@ mn1020012a_device::mn1020012a_device(const machine_config &mconfig, const char *
// disasm
-void mn10200_device::state_string_export(const device_state_entry &entry, std::string &str)
+void mn10200_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/mn10200/mn10200.h b/src/devices/cpu/mn10200/mn10200.h
index f3dc2dcfee7..38073fb8e27 100644
--- a/src/devices/cpu/mn10200/mn10200.h
+++ b/src/devices/cpu/mn10200/mn10200.h
@@ -88,7 +88,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/nec/nec.cpp b/src/devices/cpu/nec/nec.cpp
index 7b282e2570c..42ef74df7d5 100644
--- a/src/devices/cpu/nec/nec.cpp
+++ b/src/devices/cpu/nec/nec.cpp
@@ -437,7 +437,7 @@ void nec_common_device::device_start()
m_icountptr = &m_icount;
}
-void nec_common_device::state_string_export(const device_state_entry &entry, std::string &str)
+void nec_common_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
UINT16 flags = CompressFlags();
diff --git a/src/devices/cpu/nec/nec.h b/src/devices/cpu/nec/nec.h
index 50a3adc7656..c0c1fa82327 100644
--- a/src/devices/cpu/nec/nec.h
+++ b/src/devices/cpu/nec/nec.h
@@ -42,7 +42,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/nec/v25.cpp b/src/devices/cpu/nec/v25.cpp
index 8612c5f8760..c5e62446cb0 100644
--- a/src/devices/cpu/nec/v25.cpp
+++ b/src/devices/cpu/nec/v25.cpp
@@ -525,7 +525,7 @@ void v25_common_device::device_start()
}
-void v25_common_device::state_string_export(const device_state_entry &entry, std::string &str)
+void v25_common_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
UINT16 flags = CompressFlags();
diff --git a/src/devices/cpu/nec/v25.h b/src/devices/cpu/nec/v25.h
index 0e996468942..1cd5ab91012 100644
--- a/src/devices/cpu/nec/v25.h
+++ b/src/devices/cpu/nec/v25.h
@@ -59,7 +59,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/pdp1/pdp1.cpp b/src/devices/cpu/pdp1/pdp1.cpp
index b36e7242967..cbb43535d7f 100644
--- a/src/devices/cpu/pdp1/pdp1.cpp
+++ b/src/devices/cpu/pdp1/pdp1.cpp
@@ -737,7 +737,7 @@ void pdp1_device::state_export(const device_state_entry &entry)
}
-void pdp1_device::state_string_export(const device_state_entry &entry, std::string &str)
+void pdp1_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/pdp1/pdp1.h b/src/devices/cpu/pdp1/pdp1.h
index 9f421716366..2cb01f5c20b 100644
--- a/src/devices/cpu/pdp1/pdp1.h
+++ b/src/devices/cpu/pdp1/pdp1.h
@@ -107,7 +107,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/pdp8/pdp8.cpp b/src/devices/cpu/pdp8/pdp8.cpp
index 1ed24effe12..2679c7e9205 100644
--- a/src/devices/cpu/pdp8/pdp8.cpp
+++ b/src/devices/cpu/pdp8/pdp8.cpp
@@ -72,7 +72,6 @@ void pdp8_device::device_start()
m_program = &space(AS_PROGRAM);
// register our state for the debugger
- std::string tempstr;
state_add(STATE_GENPC, "GENPC", m_pc).noshow();
state_add(STATE_GENFLAGS, "GENFLAGS", m_l).callimport().callexport().formatstr("%1s").noshow();
state_add(PDP8_PC, "PC", m_pc).mask(0xfff);
@@ -136,7 +135,7 @@ const address_space_config *pdp8_device::memory_space_config(address_spacenum sp
// for the debugger
//-------------------------------------------------
-void pdp8_device::state_string_export(const device_state_entry &entry, std::string &str)
+void pdp8_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/pdp8/pdp8.h b/src/devices/cpu/pdp8/pdp8.h
index 70393e3f0bf..66f04682d7e 100644
--- a/src/devices/cpu/pdp8/pdp8.h
+++ b/src/devices/cpu/pdp8/pdp8.h
@@ -45,7 +45,7 @@ public:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// address spaces
const address_space_config m_program_config;
diff --git a/src/devices/cpu/pic16c5x/pic16c5x.cpp b/src/devices/cpu/pic16c5x/pic16c5x.cpp
index 3acd46944f7..c568b27b4c7 100644
--- a/src/devices/cpu/pic16c5x/pic16c5x.cpp
+++ b/src/devices/cpu/pic16c5x/pic16c5x.cpp
@@ -923,7 +923,7 @@ void pic16c5x_device::state_export(const device_state_entry &entry)
}
}
-void pic16c5x_device::state_string_export(const device_state_entry &entry, std::string &str)
+void pic16c5x_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/pic16c5x/pic16c5x.h b/src/devices/cpu/pic16c5x/pic16c5x.h
index 0e34f97178f..c3d2480fd86 100644
--- a/src/devices/cpu/pic16c5x/pic16c5x.h
+++ b/src/devices/cpu/pic16c5x/pic16c5x.h
@@ -117,7 +117,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/pic16c62x/pic16c62x.cpp b/src/devices/cpu/pic16c62x/pic16c62x.cpp
index 2bbbd9f3439..9fb6e2324ab 100644
--- a/src/devices/cpu/pic16c62x/pic16c62x.cpp
+++ b/src/devices/cpu/pic16c62x/pic16c62x.cpp
@@ -990,7 +990,7 @@ void pic16c62x_device::state_export(const device_state_entry &entry)
}
}
-void pic16c62x_device::state_string_export(const device_state_entry &entry, std::string &str)
+void pic16c62x_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/pic16c62x/pic16c62x.h b/src/devices/cpu/pic16c62x/pic16c62x.h
index 300fc6d77e5..7e8af51ca40 100644
--- a/src/devices/cpu/pic16c62x/pic16c62x.h
+++ b/src/devices/cpu/pic16c62x/pic16c62x.h
@@ -79,7 +79,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/powerpc/ppc.h b/src/devices/cpu/powerpc/ppc.h
index c9b37cbb196..5e40ee88249 100644
--- a/src/devices/cpu/powerpc/ppc.h
+++ b/src/devices/cpu/powerpc/ppc.h
@@ -264,7 +264,7 @@ protected:
// device_state_interface overrides
virtual void state_export(const device_state_entry &entry) override;
virtual void state_import(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/powerpc/ppccom.cpp b/src/devices/cpu/powerpc/ppccom.cpp
index 5fc2ea00b9b..9036ff2c794 100644
--- a/src/devices/cpu/powerpc/ppccom.cpp
+++ b/src/devices/cpu/powerpc/ppccom.cpp
@@ -1007,7 +1007,7 @@ void ppc_device::state_import(const device_state_entry &entry)
}
-void ppc_device::state_string_export(const device_state_entry &entry, std::string &str)
+void ppc_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/pps4/pps4.cpp b/src/devices/cpu/pps4/pps4.cpp
index 5be986f2c3d..43c79059d4b 100644
--- a/src/devices/cpu/pps4/pps4.cpp
+++ b/src/devices/cpu/pps4/pps4.cpp
@@ -1552,7 +1552,7 @@ void pps4_device::device_start()
m_icountptr = &m_icount;
}
-void pps4_device::state_string_export(const device_state_entry &entry, std::string &str)
+void pps4_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/pps4/pps4.h b/src/devices/cpu/pps4/pps4.h
index 44c9f27d00e..a2797668751 100644
--- a/src/devices/cpu/pps4/pps4.h
+++ b/src/devices/cpu/pps4/pps4.h
@@ -62,7 +62,7 @@ protected:
}
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/psx/psx.cpp b/src/devices/cpu/psx/psx.cpp
index f98c6fccc8f..c3e2e340d24 100644
--- a/src/devices/cpu/psx/psx.cpp
+++ b/src/devices/cpu/psx/psx.cpp
@@ -2026,7 +2026,7 @@ void psxcpu_device::state_import( const device_state_entry &entry )
// for the debugger
//-------------------------------------------------
-void psxcpu_device::state_string_export( const device_state_entry &entry, std::string &str )
+void psxcpu_device::state_string_export( const device_state_entry &entry, std::string &str ) const
{
switch( entry.index() )
{
diff --git a/src/devices/cpu/psx/psx.h b/src/devices/cpu/psx/psx.h
index e15bb9663ae..98b15819f32 100644
--- a/src/devices/cpu/psx/psx.h
+++ b/src/devices/cpu/psx/psx.h
@@ -222,7 +222,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/rsp/rsp.cpp b/src/devices/cpu/rsp/rsp.cpp
index 5541c643c6b..1939cb33b5f 100644
--- a/src/devices/cpu/rsp/rsp.cpp
+++ b/src/devices/cpu/rsp/rsp.cpp
@@ -539,7 +539,7 @@ void rsp_device::state_export(const device_state_entry &entry)
}
}
-void rsp_device::state_string_export(const device_state_entry &entry, std::string &str)
+void rsp_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
const int index = entry.index();
if (index >= RSP_V0 && index <= RSP_V31)
diff --git a/src/devices/cpu/rsp/rsp.h b/src/devices/cpu/rsp/rsp.h
index 5688dbdab59..93215bd0649 100644
--- a/src/devices/cpu/rsp/rsp.h
+++ b/src/devices/cpu/rsp/rsp.h
@@ -184,7 +184,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/rsp/rspcp2.cpp b/src/devices/cpu/rsp/rspcp2.cpp
index ce16a351b5a..cb45d906bde 100644
--- a/src/devices/cpu/rsp/rspcp2.cpp
+++ b/src/devices/cpu/rsp/rspcp2.cpp
@@ -746,7 +746,7 @@ void rsp_cop2::start()
}
}
-void rsp_cop2::state_string_export(const int index, std::string &str)
+void rsp_cop2::state_string_export(const int index, std::string &str) const
{
switch (index)
{
diff --git a/src/devices/cpu/rsp/rspcp2.h b/src/devices/cpu/rsp/rspcp2.h
index bfa5b91a7fb..9eb0bb37fdc 100644
--- a/src/devices/cpu/rsp/rspcp2.h
+++ b/src/devices/cpu/rsp/rspcp2.h
@@ -89,7 +89,7 @@ protected:
virtual int generate_lwc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) { return TRUE; }
virtual int generate_swc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) { return TRUE; }
- virtual void state_string_export(const int index, std::string &str);
+ virtual void state_string_export(const int index, std::string &str) const;
public:
virtual ~rsp_cop2();
diff --git a/src/devices/cpu/rsp/rspcp2d.cpp b/src/devices/cpu/rsp/rspcp2d.cpp
index c16eb109449..4caacd28a0d 100644
--- a/src/devices/cpu/rsp/rspcp2d.cpp
+++ b/src/devices/cpu/rsp/rspcp2d.cpp
@@ -147,7 +147,7 @@ static void unimplemented_opcode(void *param)
((rsp_cop2 *)param)->cfunc_unimplemented_opcode();
}
-void rsp_cop2_drc::state_string_export(const int index, std::string &str)
+void rsp_cop2_drc::state_string_export(const int index, std::string &str) const
{
switch (index)
{
diff --git a/src/devices/cpu/rsp/rspcp2d.h b/src/devices/cpu/rsp/rspcp2d.h
index c918d825e60..62fc25fe475 100644
--- a/src/devices/cpu/rsp/rspcp2d.h
+++ b/src/devices/cpu/rsp/rspcp2d.h
@@ -28,7 +28,7 @@ private:
virtual int generate_lwc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) override;
virtual int generate_swc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) override;
- virtual void state_string_export(const int index, std::string &str) override;
+ virtual void state_string_export(const int index, std::string &str) const override;
void cfunc_unimplemented_opcode() override;
diff --git a/src/devices/cpu/s2650/s2650.cpp b/src/devices/cpu/s2650/s2650.cpp
index ae842ca9fa6..8a257ff5a9e 100644
--- a/src/devices/cpu/s2650/s2650.cpp
+++ b/src/devices/cpu/s2650/s2650.cpp
@@ -876,7 +876,7 @@ void s2650_device::state_export(const device_state_entry &entry)
}
}
-void s2650_device::state_string_export(const device_state_entry &entry, std::string &str)
+void s2650_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/s2650/s2650.h b/src/devices/cpu/s2650/s2650.h
index 2be3f99ce1c..cd5dc1c12f1 100644
--- a/src/devices/cpu/s2650/s2650.h
+++ b/src/devices/cpu/s2650/s2650.h
@@ -66,7 +66,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/saturn/saturn.cpp b/src/devices/cpu/saturn/saturn.cpp
index a8c86f934c0..3e25ae6b76f 100644
--- a/src/devices/cpu/saturn/saturn.cpp
+++ b/src/devices/cpu/saturn/saturn.cpp
@@ -169,7 +169,7 @@ void saturn_device::device_start()
m_icountptr = &m_icount;
}
-void saturn_device::state_string_export(const device_state_entry &entry, std::string &str)
+void saturn_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
#define Reg64Data(s) s[15],s[14],s[13],s[12],s[11],s[10],s[9],s[8],s[7],s[6],s[5],s[4],s[3],s[2],s[1],s[0]
#define Reg64Format "%x %x%x%x%x%x%x%x %x%x%x %x%x%x%x%x"
diff --git a/src/devices/cpu/saturn/saturn.h b/src/devices/cpu/saturn/saturn.h
index 3281ade5fcd..28de3e41910 100644
--- a/src/devices/cpu/saturn/saturn.h
+++ b/src/devices/cpu/saturn/saturn.h
@@ -104,7 +104,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/sc61860/sc61860.cpp b/src/devices/cpu/sc61860/sc61860.cpp
index a36c02a658a..27251e10e78 100644
--- a/src/devices/cpu/sc61860/sc61860.cpp
+++ b/src/devices/cpu/sc61860/sc61860.cpp
@@ -171,7 +171,7 @@ void sc61860_device::device_start()
}
-void sc61860_device::state_string_export(const device_state_entry &entry, std::string &str)
+void sc61860_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/sc61860/sc61860.h b/src/devices/cpu/sc61860/sc61860.h
index 65a42862bb8..855d0d91e21 100644
--- a/src/devices/cpu/sc61860/sc61860.h
+++ b/src/devices/cpu/sc61860/sc61860.h
@@ -106,7 +106,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/scmp/scmp.cpp b/src/devices/cpu/scmp/scmp.cpp
index 4ceb90c9f8f..2e1cf4cd021 100644
--- a/src/devices/cpu/scmp/scmp.cpp
+++ b/src/devices/cpu/scmp/scmp.cpp
@@ -547,7 +547,7 @@ void scmp_device::device_reset()
COMMON STATE IMPORT/EXPORT
***************************************************************************/
-void scmp_device::state_string_export(const device_state_entry &entry, std::string &str)
+void scmp_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/scmp/scmp.h b/src/devices/cpu/scmp/scmp.h
index e89dc2e9088..03f284589eb 100644
--- a/src/devices/cpu/scmp/scmp.h
+++ b/src/devices/cpu/scmp/scmp.h
@@ -56,7 +56,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/score/score.cpp b/src/devices/cpu/score/score.cpp
index f949efe7453..984f832b464 100644
--- a/src/devices/cpu/score/score.cpp
+++ b/src/devices/cpu/score/score.cpp
@@ -80,16 +80,14 @@ void score7_cpu_device::device_start()
// register state for debugger
state_add(SCORE_PC , "PC" , m_pc).callimport().callexport().formatstr("%08X");
- std::string tmp_string;
+ for(int i=0; i<0x20; i++)
+ state_add(SCORE_GPR + i, strformat("r%d", i).c_str(), m_gpr[i]).callimport().callexport().formatstr("%08X");
for(int i=0; i<0x20; i++)
- state_add(SCORE_GPR + i, strformat(tmp_string, "r%d", i).c_str(), m_gpr[i]).callimport().callexport().formatstr("%08X");
-
- for(int i=0; i<0x20; i++)
- state_add(SCORE_CR + i, strformat(tmp_string, "cr%d", i).c_str(), m_cr[i]).callimport().callexport().formatstr("%08X");
+ state_add(SCORE_CR + i, strformat("cr%d", i).c_str(), m_cr[i]).callimport().callexport().formatstr("%08X");
for(int i=0; i<3; i++)
- state_add(SCORE_SR + i, strformat(tmp_string, "sr%d", i).c_str(), m_sr[i]).callimport().callexport().formatstr("%08X");
+ state_add(SCORE_SR + i, strformat("sr%d", i).c_str(), m_sr[i]).callimport().callexport().formatstr("%08X");
state_add(SCORE_CEH, "ceh", REG_CEH).callimport().callexport().formatstr("%08X");
state_add(SCORE_CEL, "cel", REG_CEL).callimport().callexport().formatstr("%08X");
@@ -132,7 +130,7 @@ void score7_cpu_device::device_reset()
// for the debugger
//-------------------------------------------------
-void score7_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void score7_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/score/score.h b/src/devices/cpu/score/score.h
index 83e724e7785..ba7058196f8 100644
--- a/src/devices/cpu/score/score.h
+++ b/src/devices/cpu/score/score.h
@@ -47,7 +47,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
diff --git a/src/devices/cpu/scudsp/scudsp.cpp b/src/devices/cpu/scudsp/scudsp.cpp
index 14d1565caa2..f0ec1644af5 100644
--- a/src/devices/cpu/scudsp/scudsp.cpp
+++ b/src/devices/cpu/scudsp/scudsp.cpp
@@ -1010,7 +1010,7 @@ scudsp_cpu_device::scudsp_cpu_device(const machine_config &mconfig, const char *
}
-void scudsp_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void scudsp_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/scudsp/scudsp.h b/src/devices/cpu/scudsp/scudsp.h
index e8f52f661f1..a5827b05e41 100644
--- a/src/devices/cpu/scudsp/scudsp.h
+++ b/src/devices/cpu/scudsp/scudsp.h
@@ -96,7 +96,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/se3208/se3208.cpp b/src/devices/cpu/se3208/se3208.cpp
index b37a8e09f5f..011cc103909 100644
--- a/src/devices/cpu/se3208/se3208.cpp
+++ b/src/devices/cpu/se3208/se3208.cpp
@@ -1821,7 +1821,7 @@ void se3208_device::device_start()
}
-void se3208_device::state_string_export(const device_state_entry &entry, std::string &str)
+void se3208_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/se3208/se3208.h b/src/devices/cpu/se3208/se3208.h
index e548b7f7621..fbed0d6452b 100644
--- a/src/devices/cpu/se3208/se3208.h
+++ b/src/devices/cpu/se3208/se3208.h
@@ -32,7 +32,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/sh2/sh2.cpp b/src/devices/cpu/sh2/sh2.cpp
index 71b960ac341..481f2544126 100644
--- a/src/devices/cpu/sh2/sh2.cpp
+++ b/src/devices/cpu/sh2/sh2.cpp
@@ -2583,7 +2583,7 @@ void sh2_device::device_start()
}
-void sh2_device::state_string_export(const device_state_entry &entry, std::string &str)
+void sh2_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/sh2/sh2.h b/src/devices/cpu/sh2/sh2.h
index da6c928b939..d7fe6c36935 100644
--- a/src/devices/cpu/sh2/sh2.h
+++ b/src/devices/cpu/sh2/sh2.h
@@ -131,7 +131,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/sh4/sh4.cpp b/src/devices/cpu/sh4/sh4.cpp
index e0835b1f9c0..fc67b4d9d86 100644
--- a/src/devices/cpu/sh4/sh4.cpp
+++ b/src/devices/cpu/sh4/sh4.cpp
@@ -4447,7 +4447,7 @@ void sh34_base_device::state_export(const device_state_entry &entry)
}
}
-void sh34_base_device::state_string_export(const device_state_entry &entry, std::string &str)
+void sh34_base_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
#ifdef LSB_FIRST
UINT8 fpu_xor = m_fpu_pr;
diff --git a/src/devices/cpu/sh4/sh4.h b/src/devices/cpu/sh4/sh4.h
index bba3483b9a1..badaacd4558 100644
--- a/src/devices/cpu/sh4/sh4.h
+++ b/src/devices/cpu/sh4/sh4.h
@@ -220,7 +220,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/sm8500/sm8500.cpp b/src/devices/cpu/sm8500/sm8500.cpp
index 11fc61132fc..66c51c61e5b 100644
--- a/src/devices/cpu/sm8500/sm8500.cpp
+++ b/src/devices/cpu/sm8500/sm8500.cpp
@@ -53,7 +53,7 @@ void sm8500_cpu_device::get_sp()
}
-UINT8 sm8500_cpu_device::mem_readbyte( UINT32 offset )
+UINT8 sm8500_cpu_device::mem_readbyte( UINT32 offset ) const
{
offset &= 0xffff;
if ( offset < 0x10)
@@ -141,7 +141,7 @@ void sm8500_cpu_device::device_start()
}
-void sm8500_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void sm8500_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/sm8500/sm8500.h b/src/devices/cpu/sm8500/sm8500.h
index 8dd4802efb6..ab9f3c9ea65 100644
--- a/src/devices/cpu/sm8500/sm8500.h
+++ b/src/devices/cpu/sm8500/sm8500.h
@@ -71,7 +71,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
@@ -79,9 +79,9 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
inline void get_sp();
- UINT8 mem_readbyte(UINT32 offset);
+ UINT8 mem_readbyte(UINT32 offset) const;
void mem_writebyte(UINT32 offset, UINT8 data);
- inline UINT16 mem_readword(UINT32 address) { return (mem_readbyte(address ) << 8) | (mem_readbyte(address+1)); }
+ inline UINT16 mem_readword(UINT32 address) const { return (mem_readbyte(address ) << 8) | (mem_readbyte(address+1)); }
inline void mem_writeword(UINT32 address, UINT16 value) { mem_writebyte(address, value >> 8); mem_writebyte(address+1, value); }
inline void take_interrupt(UINT16 vector);
void process_interrupts();
diff --git a/src/devices/cpu/spc700/spc700.cpp b/src/devices/cpu/spc700/spc700.cpp
index 968aad0f10c..22969235ae7 100644
--- a/src/devices/cpu/spc700/spc700.cpp
+++ b/src/devices/cpu/spc700/spc700.cpp
@@ -1244,7 +1244,7 @@ void spc700_device::device_start()
}
-void spc700_device::state_string_export(const device_state_entry &entry, std::string &str)
+void spc700_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/spc700/spc700.h b/src/devices/cpu/spc700/spc700.h
index ad5085b38a9..30b9b2ccdf3 100644
--- a/src/devices/cpu/spc700/spc700.h
+++ b/src/devices/cpu/spc700/spc700.h
@@ -30,7 +30,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/ssem/ssem.cpp b/src/devices/cpu/ssem/ssem.cpp
index 0dfec9b9cfb..438e36cbd9e 100644
--- a/src/devices/cpu/ssem/ssem.cpp
+++ b/src/devices/cpu/ssem/ssem.cpp
@@ -149,7 +149,7 @@ const address_space_config *ssem_device::memory_space_config(address_spacenum sp
// for the debugger
//-------------------------------------------------
-void ssem_device::state_string_export(const device_state_entry &entry, std::string &str)
+void ssem_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/ssem/ssem.h b/src/devices/cpu/ssem/ssem.h
index e57294fbbf5..8d2c0c21044 100644
--- a/src/devices/cpu/ssem/ssem.h
+++ b/src/devices/cpu/ssem/ssem.h
@@ -45,7 +45,7 @@ public:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// address spaces
const address_space_config m_program_config;
diff --git a/src/devices/cpu/ssp1601/ssp1601.cpp b/src/devices/cpu/ssp1601/ssp1601.cpp
index d15fa2525e5..e8cc1f501af 100644
--- a/src/devices/cpu/ssp1601/ssp1601.cpp
+++ b/src/devices/cpu/ssp1601/ssp1601.cpp
@@ -547,7 +547,7 @@ void ssp1601_device::device_start()
}
-void ssp1601_device::state_string_export(const device_state_entry &entry, std::string &str)
+void ssp1601_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/ssp1601/ssp1601.h b/src/devices/cpu/ssp1601/ssp1601.h
index 5d67827b288..1917af79adb 100644
--- a/src/devices/cpu/ssp1601/ssp1601.h
+++ b/src/devices/cpu/ssp1601/ssp1601.h
@@ -40,7 +40,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : nullptr); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/t11/t11.cpp b/src/devices/cpu/t11/t11.cpp
index 4a012ec0505..72c2e80c91b 100644
--- a/src/devices/cpu/t11/t11.cpp
+++ b/src/devices/cpu/t11/t11.cpp
@@ -291,7 +291,7 @@ void t11_device::device_start()
m_icountptr = &m_icount;
}
-void t11_device::state_string_export(const device_state_entry &entry, std::string &str)
+void t11_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
@@ -310,7 +310,7 @@ void t11_device::state_string_export(const device_state_entry &entry, std::strin
}
}
-void k1801vm2_device::state_string_export(const device_state_entry &entry, std::string &str)
+void k1801vm2_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/t11/t11.h b/src/devices/cpu/t11/t11.h
index d2d0896445b..55d11c9666a 100644
--- a/src/devices/cpu/t11/t11.h
+++ b/src/devices/cpu/t11/t11.h
@@ -59,7 +59,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
@@ -1145,7 +1145,7 @@ protected:
virtual void device_reset() override;
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
};
diff --git a/src/devices/cpu/tlcs90/tlcs90.cpp b/src/devices/cpu/tlcs90/tlcs90.cpp
index 67745e1f0e2..994d0abb3da 100644
--- a/src/devices/cpu/tlcs90/tlcs90.cpp
+++ b/src/devices/cpu/tlcs90/tlcs90.cpp
@@ -2766,7 +2766,7 @@ void tlcs90_device::device_start()
}
-void tlcs90_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tlcs90_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/tlcs90/tlcs90.h b/src/devices/cpu/tlcs90/tlcs90.h
index 7921444d7fd..42a7e5f5c08 100644
--- a/src/devices/cpu/tlcs90/tlcs90.h
+++ b/src/devices/cpu/tlcs90/tlcs90.h
@@ -51,7 +51,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/tlcs900/tlcs900.cpp b/src/devices/cpu/tlcs900/tlcs900.cpp
index 03f7a014c56..4ac6f8b07a3 100644
--- a/src/devices/cpu/tlcs900/tlcs900.cpp
+++ b/src/devices/cpu/tlcs900/tlcs900.cpp
@@ -384,7 +384,7 @@ void tlcs900h_device::device_start()
}
-void tlcs900h_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tlcs900h_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/tlcs900/tlcs900.h b/src/devices/cpu/tlcs900/tlcs900.h
index c095c848cf1..0dcf3d84994 100644
--- a/src/devices/cpu/tlcs900/tlcs900.h
+++ b/src/devices/cpu/tlcs900/tlcs900.h
@@ -71,7 +71,7 @@ protected:
}
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/tms0980/tms0980.cpp b/src/devices/cpu/tms0980/tms0980.cpp
index 0bf75012555..7bc62b5a475 100644
--- a/src/devices/cpu/tms0980/tms0980.cpp
+++ b/src/devices/cpu/tms0980/tms0980.cpp
@@ -475,7 +475,7 @@ offs_t tms0980_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UIN
return CPU_DISASSEMBLE_NAME(tms0980)(this, buffer, pc, oprom, opram, options);
}
-void tms1xxx_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tms1xxx_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/tms0980/tms0980.h b/src/devices/cpu/tms0980/tms0980.h
index 35ea954efa0..2572eb1b1ef 100644
--- a/src/devices/cpu/tms0980/tms0980.h
+++ b/src/devices/cpu/tms0980/tms0980.h
@@ -137,7 +137,8 @@ protected:
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
virtual UINT32 disasm_max_opcode_bytes() const override { return 1; }
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ // device_state_interface overrides
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
void next_pc();
diff --git a/src/devices/cpu/tms32010/tms32010.cpp b/src/devices/cpu/tms32010/tms32010.cpp
index e6264d3f1dd..3a164e8f984 100644
--- a/src/devices/cpu/tms32010/tms32010.cpp
+++ b/src/devices/cpu/tms32010/tms32010.cpp
@@ -895,7 +895,7 @@ void tms32010_device::device_reset()
}
-void tms32010_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tms32010_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/tms32010/tms32010.h b/src/devices/cpu/tms32010/tms32010.h
index 2185e324346..a1c0692c566 100644
--- a/src/devices/cpu/tms32010/tms32010.h
+++ b/src/devices/cpu/tms32010/tms32010.h
@@ -72,7 +72,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/tms32025/tms32025.cpp b/src/devices/cpu/tms32025/tms32025.cpp
index 562b86b2a6a..2d40b2d3448 100644
--- a/src/devices/cpu/tms32025/tms32025.cpp
+++ b/src/devices/cpu/tms32025/tms32025.cpp
@@ -1801,7 +1801,7 @@ void tms32025_device::state_export(const device_state_entry &entry)
}
-void tms32025_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tms32025_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/tms32025/tms32025.h b/src/devices/cpu/tms32025/tms32025.h
index 464843cbe95..daac81c8314 100644
--- a/src/devices/cpu/tms32025/tms32025.h
+++ b/src/devices/cpu/tms32025/tms32025.h
@@ -97,7 +97,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/tms32031/tms32031.cpp b/src/devices/cpu/tms32031/tms32031.cpp
index d391285f314..cfab62a7929 100644
--- a/src/devices/cpu/tms32031/tms32031.cpp
+++ b/src/devices/cpu/tms32031/tms32031.cpp
@@ -529,7 +529,7 @@ void tms3203x_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void tms3203x_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tms3203x_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/tms32031/tms32031.h b/src/devices/cpu/tms32031/tms32031.h
index 46706f774c8..4ce0decf010 100644
--- a/src/devices/cpu/tms32031/tms32031.h
+++ b/src/devices/cpu/tms32031/tms32031.h
@@ -179,7 +179,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/tms32082/tms32082.cpp b/src/devices/cpu/tms32082/tms32082.cpp
index 615cdc68fe1..8b89bc3ef88 100644
--- a/src/devices/cpu/tms32082/tms32082.cpp
+++ b/src/devices/cpu/tms32082/tms32082.cpp
@@ -214,7 +214,7 @@ void tms32082_mp_device::device_start()
m_icountptr = &m_icount;
}
-void tms32082_mp_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tms32082_mp_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
@@ -511,7 +511,7 @@ void tms32082_pp_device::device_start()
m_icountptr = &m_icount;
}
-void tms32082_pp_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tms32082_pp_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/tms32082/tms32082.h b/src/devices/cpu/tms32082/tms32082.h
index 07476c700d4..80163cc6145 100644
--- a/src/devices/cpu/tms32082/tms32082.h
+++ b/src/devices/cpu/tms32082/tms32082.h
@@ -97,7 +97,7 @@ protected:
}
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
@@ -192,7 +192,7 @@ protected:
}
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 8; }
diff --git a/src/devices/cpu/tms34010/tms34010.cpp b/src/devices/cpu/tms34010/tms34010.cpp
index 3fffd1c03c5..1ad1879c3b0 100644
--- a/src/devices/cpu/tms34010/tms34010.cpp
+++ b/src/devices/cpu/tms34010/tms34010.cpp
@@ -592,14 +592,13 @@ void tms340x0_device::device_start()
state_add(TMS34010_ST, "ST", m_st);
state_add(STATE_GENFLAGS, "GENFLAGS", m_st).noshow().formatstr("%18s");
- std::string tempstr;
for (int regnum = 0; regnum < 15; regnum++)
{
- state_add(TMS34010_A0 + regnum, strformat(tempstr, "A%d", regnum).c_str(), m_regs[regnum].reg);
+ state_add(TMS34010_A0 + regnum, strformat("A%d", regnum).c_str(), m_regs[regnum].reg);
}
for (int regnum = 0; regnum < 15; regnum++)
{
- state_add(TMS34010_B0 + regnum, strformat(tempstr, "B%d", regnum).c_str(), m_regs[30 - regnum].reg);
+ state_add(TMS34010_B0 + regnum, strformat("B%d", regnum).c_str(), m_regs[30 - regnum].reg);
}
}
@@ -1599,7 +1598,7 @@ READ16_MEMBER( tms340x0_device::host_r )
}
-void tms340x0_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tms340x0_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/tms34010/tms34010.h b/src/devices/cpu/tms34010/tms34010.h
index 733674d4279..f87a3df37b1 100644
--- a/src/devices/cpu/tms34010/tms34010.h
+++ b/src/devices/cpu/tms34010/tms34010.h
@@ -282,7 +282,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/tms7000/tms7000.cpp b/src/devices/cpu/tms7000/tms7000.cpp
index 99451e30d6b..42e76319855 100644
--- a/src/devices/cpu/tms7000/tms7000.cpp
+++ b/src/devices/cpu/tms7000/tms7000.cpp
@@ -257,7 +257,7 @@ void tms7000_device::device_start()
state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).formatstr("%8s").noshow();
}
-void tms7000_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tms7000_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/tms7000/tms7000.h b/src/devices/cpu/tms7000/tms7000.h
index 53d940232d2..b44ac9324c7 100644
--- a/src/devices/cpu/tms7000/tms7000.h
+++ b/src/devices/cpu/tms7000/tms7000.h
@@ -80,7 +80,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/tms9900/tms9900.cpp b/src/devices/cpu/tms9900/tms9900.cpp
index 0c3de4547c0..b1fad1bbeeb 100644
--- a/src/devices/cpu/tms9900/tms9900.cpp
+++ b/src/devices/cpu/tms9900/tms9900.cpp
@@ -349,11 +349,11 @@ void tms99xx_device::state_export(const device_state_entry &entry)
/*
state_string_export - export state as a string for the debugger
*/
-void tms99xx_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tms99xx_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
static const char *statestr = "LAECOPX-----IIII";
char flags[17];
- memset(flags, 0x00, ARRAY_LENGTH(flags));
+ for (auto &flag : flags) flag = 0x00;
UINT16 val = 0x8000;
if (entry.index()==STATE_GENFLAGS)
{
diff --git a/src/devices/cpu/tms9900/tms9900.h b/src/devices/cpu/tms9900/tms9900.h
index 32953477172..4669eeb439a 100644
--- a/src/devices/cpu/tms9900/tms9900.h
+++ b/src/devices/cpu/tms9900/tms9900.h
@@ -224,9 +224,9 @@ private:
// State / debug management
UINT16 m_state_any;
static const char* s_statename[];
- void state_import(const device_state_entry &entry) override;
- void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_import(const device_state_entry &entry) override;
+ virtual void state_export(const device_state_entry &entry) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// Interrupt handling
void service_interrupt();
diff --git a/src/devices/cpu/tms9900/tms9995.cpp b/src/devices/cpu/tms9900/tms9995.cpp
index 6eec831e927..855f00499a0 100644
--- a/src/devices/cpu/tms9900/tms9995.cpp
+++ b/src/devices/cpu/tms9900/tms9995.cpp
@@ -372,7 +372,7 @@ void tms9995_device::state_export(const device_state_entry &entry)
/*
state_string_export - export state as a string for the debugger
*/
-void tms9995_device::state_string_export(const device_state_entry &entry, std::string &str)
+void tms9995_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
static const char *statestr = "LAECOPX-----IIII";
char flags[17];
diff --git a/src/devices/cpu/tms9900/tms9995.h b/src/devices/cpu/tms9900/tms9995.h
index fc24c82801d..e5dc055f36f 100644
--- a/src/devices/cpu/tms9900/tms9995.h
+++ b/src/devices/cpu/tms9900/tms9995.h
@@ -106,7 +106,7 @@ private:
static const char* s_statename[];
void state_import(const device_state_entry &entry) override;
void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) const override;
UINT16 read_workspace_register_debug(int reg);
void write_workspace_register_debug(int reg, UINT16 data);
diff --git a/src/devices/cpu/ucom4/ucom4.cpp b/src/devices/cpu/ucom4/ucom4.cpp
index 0c6bd280358..69b608a6592 100644
--- a/src/devices/cpu/ucom4/ucom4.cpp
+++ b/src/devices/cpu/ucom4/ucom4.cpp
@@ -76,7 +76,7 @@ upd552_cpu_device::upd552_cpu_device(const machine_config &mconfig, const char *
// disasm
-void ucom4_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void ucom4_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/ucom4/ucom4.h b/src/devices/cpu/ucom4/ucom4.h
index a01ccaa37a7..01a7f2ecc1c 100644
--- a/src/devices/cpu/ucom4/ucom4.h
+++ b/src/devices/cpu/ucom4/ucom4.h
@@ -157,7 +157,8 @@ protected:
virtual UINT32 disasm_max_opcode_bytes() const override { return 2; }
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ // device_state_interface overrides
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
address_space_config m_program_config;
address_space_config m_data_config;
diff --git a/src/devices/cpu/uml.cpp b/src/devices/cpu/uml.cpp
index e01b34cdcb6..5b9785f792c 100644
--- a/src/devices/cpu/uml.cpp
+++ b/src/devices/cpu/uml.cpp
@@ -739,9 +739,8 @@ void uml::instruction::simplify()
/*
if (LOG_SIMPLIFICATIONS && memcmp(&orig, inst, sizeof(orig)) != 0)
{
- std::string disasm1, disasm2;
- orig.disasm(disasm1, block->drcuml);
- inst->disasm(disasm2, block->drcuml);
+ std::string disasm1 = orig.disasm(block->drcuml);
+ std::string disasm2 = inst->disasm(block->drcuml);
osd_printf_debug("Simplified: %-50.50s -> %s\n", disasm1.c_str(), disasm2.c_str());
}
*/
@@ -854,7 +853,7 @@ UINT8 uml::instruction::modified_flags() const
// given buffer
//-------------------------------------------------
-const char *uml::instruction::disasm(std::string &buffer, drcuml_state *drcuml) const
+std::string uml::instruction::disasm(drcuml_state *drcuml) const
{
static const char *const conditions[] = { "z", "nz", "s", "ns", "c", "nc", "v", "nv", "u", "nu", "a", "be", "g", "le", "l", "ge" };
static const char *const pound_size[] = { "?", "?", "?", "?", "s", "?", "?", "?", "d" };
@@ -868,7 +867,7 @@ const char *uml::instruction::disasm(std::string &buffer, drcuml_state *drcuml)
assert(m_opcode != OP_INVALID && m_opcode < OP_MAX);
// start with the raw mnemonic and substitute sizes
- buffer.clear();
+ std::string buffer;
for (const char *opsrc = opinfo.mnemonic; *opsrc != 0; opsrc++)
if (*opsrc == '!')
strcatprintf(buffer, "%s", bang_size[m_size]);
@@ -1025,5 +1024,5 @@ const char *uml::instruction::disasm(std::string &buffer, drcuml_state *drcuml)
if (m_flags & FLAG_C)
buffer.push_back('C');
}
- return buffer.c_str();
+ return buffer;
}
diff --git a/src/devices/cpu/uml.h b/src/devices/cpu/uml.h
index 6086320cf99..2dfd95adbea 100644
--- a/src/devices/cpu/uml.h
+++ b/src/devices/cpu/uml.h
@@ -409,7 +409,7 @@ namespace uml
void set_mapvar(int paramnum, UINT32 value) { assert(paramnum < m_numparams); assert(m_param[paramnum].is_mapvar()); m_param[paramnum] = value; }
// misc
- const char *disasm(std::string &str, drcuml_state *drcuml = nullptr) const;
+ std::string disasm(drcuml_state *drcuml = nullptr) const;
UINT8 input_flags() const;
UINT8 output_flags() const;
UINT8 modified_flags() const;
diff --git a/src/devices/cpu/upd7725/upd7725.cpp b/src/devices/cpu/upd7725/upd7725.cpp
index 5820d6fe4e0..ef211dd13c3 100644
--- a/src/devices/cpu/upd7725/upd7725.cpp
+++ b/src/devices/cpu/upd7725/upd7725.cpp
@@ -202,7 +202,7 @@ void necdsp_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void necdsp_device::state_string_export(const device_state_entry &entry, std::string &str)
+void necdsp_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/upd7725/upd7725.h b/src/devices/cpu/upd7725/upd7725.h
index 856014dc7d1..94a7f85869f 100644
--- a/src/devices/cpu/upd7725/upd7725.h
+++ b/src/devices/cpu/upd7725/upd7725.h
@@ -110,7 +110,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/upd7810/upd7810.cpp b/src/devices/cpu/upd7810/upd7810.cpp
index 16734940564..d0974d00a74 100644
--- a/src/devices/cpu/upd7810/upd7810.cpp
+++ b/src/devices/cpu/upd7810/upd7810.cpp
@@ -1696,7 +1696,7 @@ void upd78c05_device::device_start()
}
-void upd7810_device::state_string_export(const device_state_entry &entry, std::string &str)
+void upd7810_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/upd7810/upd7810.h b/src/devices/cpu/upd7810/upd7810.h
index d25b22e49a7..d7d96be75d7 100644
--- a/src/devices/cpu/upd7810/upd7810.h
+++ b/src/devices/cpu/upd7810/upd7810.h
@@ -170,7 +170,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/v30mz/v30mz.cpp b/src/devices/cpu/v30mz/v30mz.cpp
index 3bc7c28236a..ec720d59f9a 100644
--- a/src/devices/cpu/v30mz/v30mz.cpp
+++ b/src/devices/cpu/v30mz/v30mz.cpp
@@ -185,12 +185,12 @@ void v30mz_cpu_device::device_start()
}
-void v30mz_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
+void v30mz_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
case STATE_GENPC:
- strprintf(str, "%08X", pc());
+ strprintf(str, "%08X", ( m_sregs[CS] << 4 ) + m_ip);
break;
case STATE_GENFLAGS:
@@ -781,7 +781,7 @@ inline void v30mz_cpu_device::set_OFB_Sub(UINT32 x,UINT32 y,UINT32 z)
}
-inline UINT16 v30mz_cpu_device::CompressFlags()
+inline UINT16 v30mz_cpu_device::CompressFlags() const
{
return (CF ? 1 : 0)
| (PF ? 4 : 0)
diff --git a/src/devices/cpu/v30mz/v30mz.h b/src/devices/cpu/v30mz/v30mz.h
index 7696cda2f0d..6ba07800b9e 100644
--- a/src/devices/cpu/v30mz/v30mz.h
+++ b/src/devices/cpu/v30mz/v30mz.h
@@ -44,7 +44,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
@@ -112,7 +112,7 @@ protected:
inline void set_OFB_Add(UINT32 x,UINT32 y,UINT32 z);
inline void set_OFW_Sub(UINT32 x,UINT32 y,UINT32 z);
inline void set_OFB_Sub(UINT32 x,UINT32 y,UINT32 z);
- inline UINT16 CompressFlags();
+ inline UINT16 CompressFlags() const;
inline void ExpandFlags(UINT16 f);
// rep instructions
diff --git a/src/devices/cpu/v810/v810.cpp b/src/devices/cpu/v810/v810.cpp
index 84293a990ae..958c28edc49 100644
--- a/src/devices/cpu/v810/v810.cpp
+++ b/src/devices/cpu/v810/v810.cpp
@@ -1314,7 +1314,7 @@ void v810_device::device_start()
m_icountptr = &m_icount;
}
-void v810_device::state_string_export(const device_state_entry &entry, std::string &str)
+void v810_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/v810/v810.h b/src/devices/cpu/v810/v810.h
index dbe9cf10b55..4e85ed7b540 100644
--- a/src/devices/cpu/v810/v810.h
+++ b/src/devices/cpu/v810/v810.h
@@ -101,7 +101,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : nullptr); }
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/z180/z180.cpp b/src/devices/cpu/z180/z180.cpp
index 214062cfe79..c8f3b968468 100644
--- a/src/devices/cpu/z180/z180.cpp
+++ b/src/devices/cpu/z180/z180.cpp
@@ -2560,7 +2560,7 @@ void z180_device::state_export(const device_state_entry &entry)
}
}
-void z180_device::state_string_export(const device_state_entry &entry, std::string &str)
+void z180_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/z180/z180.h b/src/devices/cpu/z180/z180.h
index 9f36266fc94..e76c75501ba 100644
--- a/src/devices/cpu/z180/z180.h
+++ b/src/devices/cpu/z180/z180.h
@@ -152,7 +152,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/z8/z8.cpp b/src/devices/cpu/z8/z8.cpp
index 3d8c6746c5b..d6c4fe3de77 100644
--- a/src/devices/cpu/z8/z8.cpp
+++ b/src/devices/cpu/z8/z8.cpp
@@ -677,9 +677,8 @@ void z8_device::device_start()
state_add(Z8_T1, "T1", m_t1);
state_add(STATE_GENFLAGS, "GENFLAGS", m_r[Z8_REGISTER_FLAGS]).noshow().formatstr("%6s");
- std::string tempstr;
for (int regnum = 0; regnum < 16; regnum++)
- state_add(Z8_R0 + regnum, strformat(tempstr, "R%d", regnum).c_str(), m_fake_r[regnum]).callimport().callexport();
+ state_add(Z8_R0 + regnum, strformat("R%d", regnum).c_str(), m_fake_r[regnum]).callimport().callexport();
}
/* find address spaces */
@@ -806,7 +805,7 @@ void z8_device::state_export(const device_state_entry &entry)
}
}
-void z8_device::state_string_export(const device_state_entry &entry, std::string &str)
+void z8_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/z8/z8.h b/src/devices/cpu/z8/z8.h
index 11758a771d7..6ef667c74cc 100644
--- a/src/devices/cpu/z8/z8.h
+++ b/src/devices/cpu/z8/z8.h
@@ -59,7 +59,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp
index 37ae5938426..345ea4334bf 100644
--- a/src/devices/cpu/z80/z80.cpp
+++ b/src/devices/cpu/z80/z80.cpp
@@ -3666,7 +3666,7 @@ void z80_device::state_export( const device_state_entry &entry )
}
}
-void z80_device::state_string_export(const device_state_entry &entry, std::string &str)
+void z80_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h
index 679e7444435..c523f101a24 100644
--- a/src/devices/cpu/z80/z80.h
+++ b/src/devices/cpu/z80/z80.h
@@ -68,7 +68,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/z8000/z8000.cpp b/src/devices/cpu/z8000/z8000.cpp
index 9cd356225d6..dcc52f92fb0 100644
--- a/src/devices/cpu/z8000/z8000.cpp
+++ b/src/devices/cpu/z8000/z8000.cpp
@@ -616,7 +616,7 @@ void z8002_device::register_debug_state()
state_add( STATE_GENSP, "GENSP", m_nspoff ).noshow();
}
-void z8002_device::state_string_export(const device_state_entry &entry, std::string &str)
+void z8002_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{
diff --git a/src/devices/cpu/z8000/z8000.h b/src/devices/cpu/z8000/z8000.h
index aaea89f7600..98ccc6ddea4 100644
--- a/src/devices/cpu/z8000/z8000.h
+++ b/src/devices/cpu/z8000/z8000.h
@@ -67,7 +67,7 @@ protected:
}
// device_state_interface overrides
- void state_string_export(const device_state_entry &entry, std::string &str) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h
index 04d0a962b31..961bb7a26ea 100644
--- a/src/devices/machine/netlist.h
+++ b/src/devices/machine/netlist.h
@@ -220,7 +220,7 @@ protected:
// device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) override
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override
{
if (entry.index() >= 0)
{
diff --git a/src/emu/audit.cpp b/src/emu/audit.cpp
index 714fadcc32e..b1016967931 100644
--- a/src/emu/audit.cpp
+++ b/src/emu/audit.cpp
@@ -369,10 +369,9 @@ media_auditor::summary media_auditor::summarize(const char *name, std::string *o
case audit_record::SUBSTATUS_FOUND_BAD_CHECKSUM:
if (output != nullptr)
{
- std::string tempstr;
strcatprintf(*output,"INCORRECT CHECKSUM:\n");
- strcatprintf(*output,"EXPECTED: %s\n", record->expected_hashes().macro_string(tempstr));
- strcatprintf(*output," FOUND: %s\n", record->actual_hashes().macro_string(tempstr));
+ strcatprintf(*output,"EXPECTED: %s\n", record->expected_hashes().macro_string().c_str());
+ strcatprintf(*output," FOUND: %s\n", record->actual_hashes().macro_string().c_str());
}
break;
diff --git a/src/emu/cheat.cpp b/src/emu/cheat.cpp
index 8b1584bbd2a..16291063985 100644
--- a/src/emu/cheat.cpp
+++ b/src/emu/cheat.cpp
@@ -102,28 +102,23 @@
// the format
//-------------------------------------------------
-inline const char *number_and_format::format(std::string &str) const
+inline std::string number_and_format::format() const
{
switch (m_format)
{
default:
case XML_INT_FORMAT_DECIMAL:
- strprintf(str, "%d", (UINT32)m_value);
- break;
+ return strformat("%d", (UINT32)m_value);
case XML_INT_FORMAT_DECIMAL_POUND:
- strprintf(str, "#%d", (UINT32)m_value);
- break;
+ return strformat("#%d", (UINT32)m_value);
case XML_INT_FORMAT_HEX_DOLLAR:
- strprintf(str, "$%X", (UINT32)m_value);
- break;
+ return strformat("$%X", (UINT32)m_value);
case XML_INT_FORMAT_HEX_C:
- strprintf(str, "0x%X", (UINT32)m_value);
- break;
+ return strformat("0x%X", (UINT32)m_value);
}
- return str.c_str();
}
@@ -206,15 +201,14 @@ void cheat_parameter::save(emu_file &cheatfile) const
cheatfile.printf("\t\t\n");
}
@@ -222,7 +216,7 @@ void cheat_parameter::save(emu_file &cheatfile) const
else
{
for (const item *curitem = m_itemlist.first(); curitem != nullptr; curitem = curitem->next())
- cheatfile.printf("\t\t\t- %s
\n", curitem->value().format(str), curitem->text());
+ cheatfile.printf("\t\t\t- %s
\n", curitem->value().format().c_str(), curitem->text());
cheatfile.printf("\t\t\n");
}
}
@@ -527,15 +521,13 @@ void cheat_script::script_entry::execute(cheat_manager &manager, UINT64 &arginde
void cheat_script::script_entry::save(emu_file &cheatfile) const
{
- std::string tempstring;
-
// output an action
if (m_format.empty())
{
cheatfile.printf("\t\t\t%s\n", cheat_manager::quote_expression(tempstring, m_expression));
+ cheatfile.printf(" condition=\"%s\"", cheat_manager::quote_expression(m_condition).c_str());
+ cheatfile.printf(">%s\n", cheat_manager::quote_expression(m_expression).c_str());
}
// output an output
@@ -543,7 +535,7 @@ void cheat_script::script_entry::save(emu_file &cheatfile) const
{
cheatfile.printf("\t\t\t