moved all to std::string (nw)

This commit is contained in:
Miodrag Milanovic 2015-04-22 11:30:19 +02:00
parent 946958136d
commit 54f8b3ae5d
395 changed files with 3440 additions and 3893 deletions

View File

@ -64,9 +64,9 @@ const char *driverpath = m_enumerator.config().root_device().searchpath();
for (const rom_entry *region = rom_first_region(*device); region != NULL; region = rom_next_region(region))
{
// temporary hack: add the driver path & region name
astring combinedpath = astring(device->searchpath()).cat(";").cat(driverpath);
std::string combinedpath = std::string(device->searchpath()).append(";").append(driverpath);
if (device->shortname())
combinedpath.cat(";").cat(device->shortname());
combinedpath.append(";").append(device->shortname());
m_searchpath = combinedpath.c_str();
for (const rom_entry *rom = rom_first_file(region); rom; rom = rom_next_file(rom))
@ -188,19 +188,19 @@ media_auditor::summary media_auditor::audit_software(const char *list_name, soft
// store validation for later
m_validation = validation;
astring combinedpath(swinfo->shortname());
combinedpath.cat(";");
combinedpath.cat(list_name);
combinedpath.cat(PATH_SEPARATOR);
combinedpath.cat(swinfo->shortname());
astring locationtag(list_name);
locationtag.cat("%");
locationtag.cat(swinfo->shortname());
locationtag.cat("%");
std::string combinedpath(swinfo->shortname());
combinedpath.append(";");
combinedpath.append(list_name);
combinedpath.append(PATH_SEPARATOR);
combinedpath.append(swinfo->shortname());
std::string locationtag(list_name);
locationtag.append("%");
locationtag.append(swinfo->shortname());
locationtag.append("%");
if (swinfo->parentname() != NULL)
{
locationtag.cat(swinfo->parentname());
combinedpath.cat(";").cat(swinfo->parentname()).cat(";").cat(list_name).cat(PATH_SEPARATOR).cat(swinfo->parentname());
locationtag.append(swinfo->parentname());
combinedpath.append(";").append(swinfo->parentname()).append(";").append(list_name).append(PATH_SEPARATOR).append(swinfo->parentname());
}
m_searchpath = combinedpath.c_str();
@ -274,12 +274,12 @@ media_auditor::summary media_auditor::audit_samples()
for (samples_device *device = iter.first(); device != NULL; device = iter.next())
{
// by default we just search using the driver name
astring searchpath(m_enumerator.driver().name);
std::string searchpath(m_enumerator.driver().name);
// add the alternate path if present
samples_iterator iter(*device);
if (iter.altbasename() != NULL)
searchpath.cat(";").cat(iter.altbasename());
searchpath.append(";").append(iter.altbasename());
// iterate over samples in this entry
for (const char *samplename = iter.first(); samplename != NULL; samplename = iter.next())
@ -292,7 +292,7 @@ media_auditor::summary media_auditor::audit_samples()
// look for the files
emu_file file(m_enumerator.options().sample_path(), OPEN_FLAG_READ | OPEN_FLAG_NO_PRELOAD);
path_iterator path(searchpath.c_str());
astring curpath;
std::string curpath;
while (path.next(curpath, samplename))
{
// attempt to access the file (.flac) or (.wav)
@ -327,7 +327,7 @@ media_auditor::summary media_auditor::audit_samples()
// string format
//-------------------------------------------------
media_auditor::summary media_auditor::summarize(const char *name, astring *output)
media_auditor::summary media_auditor::summarize(const char *name, std::string *output)
{
if (m_record_list.count() == 0)
{
@ -347,37 +347,37 @@ media_auditor::summary media_auditor::summarize(const char *name, astring *outpu
// output the game name, file name, and length (if applicable)
if (output != NULL)
{
output->catprintf("%-12s: %s", name, record->name());
strcatprintf(*output,"%-12s: %s", name, record->name());
if (record->expected_length() > 0)
output->catprintf(" (%" I64FMT "d bytes)", record->expected_length());
output->catprintf(" - ");
strcatprintf(*output," (%" I64FMT "d bytes)", record->expected_length());
strcatprintf(*output," - ");
}
// use the substatus for finer details
switch (record->substatus())
{
case audit_record::SUBSTATUS_GOOD_NEEDS_REDUMP:
if (output != NULL) output->catprintf("NEEDS REDUMP\n");
if (output != NULL) strcatprintf(*output,"NEEDS REDUMP\n");
best_new_status = BEST_AVAILABLE;
break;
case audit_record::SUBSTATUS_FOUND_NODUMP:
if (output != NULL) output->catprintf("NO GOOD DUMP KNOWN\n");
if (output != NULL) strcatprintf(*output,"NO GOOD DUMP KNOWN\n");
best_new_status = BEST_AVAILABLE;
break;
case audit_record::SUBSTATUS_FOUND_BAD_CHECKSUM:
if (output != NULL)
{
astring tempstr;
output->catprintf("INCORRECT CHECKSUM:\n");
output->catprintf("EXPECTED: %s\n", record->expected_hashes().macro_string(tempstr));
output->catprintf(" FOUND: %s\n", record->actual_hashes().macro_string(tempstr));
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));
}
break;
case audit_record::SUBSTATUS_FOUND_WRONG_LENGTH:
if (output != NULL) output->catprintf("INCORRECT LENGTH: %" I64FMT "d bytes\n", record->actual_length());
if (output != NULL) strcatprintf(*output,"INCORRECT LENGTH: %" I64FMT "d bytes\n", record->actual_length());
break;
case audit_record::SUBSTATUS_NOT_FOUND:
@ -385,20 +385,20 @@ media_auditor::summary media_auditor::summarize(const char *name, astring *outpu
{
device_t *shared_device = record->shared_device();
if (shared_device == NULL)
output->catprintf("NOT FOUND\n");
strcatprintf(*output,"NOT FOUND\n");
else
output->catprintf("NOT FOUND (%s)\n", shared_device->shortname());
strcatprintf(*output,"NOT FOUND (%s)\n", shared_device->shortname());
}
best_new_status = NOTFOUND;
break;
case audit_record::SUBSTATUS_NOT_FOUND_NODUMP:
if (output != NULL) output->catprintf("NOT FOUND - NO GOOD DUMP KNOWN\n");
if (output != NULL) strcatprintf(*output,"NOT FOUND - NO GOOD DUMP KNOWN\n");
best_new_status = BEST_AVAILABLE;
break;
case audit_record::SUBSTATUS_NOT_FOUND_OPTIONAL:
if (output != NULL) output->catprintf("NOT FOUND BUT OPTIONAL\n");
if (output != NULL) strcatprintf(*output,"NOT FOUND BUT OPTIONAL\n");
best_new_status = BEST_AVAILABLE;
break;
@ -430,7 +430,7 @@ audit_record *media_auditor::audit_one_rom(const rom_entry *rom)
emu_file file(m_enumerator.options().media_path(), OPEN_FLAG_READ | OPEN_FLAG_NO_PRELOAD);
file.set_restrict_to_mediapath(true);
path_iterator path(m_searchpath);
astring curpath;
std::string curpath;
while (path.next(curpath, record.name()))
{
// open the file if we can

View File

@ -149,7 +149,7 @@ public:
summary audit_device(device_t *device, const char *validation = AUDIT_VALIDATE_FULL);
summary audit_software(const char *list_name, software_info *swinfo, const char *validation = AUDIT_VALIDATE_FULL);
summary audit_samples();
summary summarize(const char *name,astring *output = NULL);
summary summarize(const char *name,std::string *output = NULL);
private:
// internal helpers

View File

@ -256,9 +256,9 @@ bool gba_cart_slot_device::call_softlist_load(software_list_device &swlist, cons
fullpath
-------------------------------------------------*/
INLINE astring gba_chip_string( UINT32 chip )
INLINE std::string gba_chip_string( UINT32 chip )
{
astring str;
std::string str;
if (chip == 0) str += "NONE ";
if (chip & GBA_CHIP_EEPROM) str += "EEPROM ";
if (chip & GBA_CHIP_EEPROM_64K) str += "EEPROM_64K ";
@ -268,7 +268,8 @@ INLINE astring gba_chip_string( UINT32 chip )
if (chip & GBA_CHIP_FLASH_512) str += "FLASH_512 ";
if (chip & GBA_CHIP_SRAM) str += "SRAM ";
if (chip & GBA_CHIP_RTC) str += "RTC ";
return str.trimspace();
strtrimspace(str);
return str;
}

View File

@ -101,25 +101,25 @@
// the format
//-------------------------------------------------
inline const char *number_and_format::format(astring &str) const
inline const char *number_and_format::format(std::string &str) const
{
switch (m_format)
{
default:
case XML_INT_FORMAT_DECIMAL:
str.printf("%d", (UINT32)m_value);
strprintf(str, "%d", (UINT32)m_value);
break;
case XML_INT_FORMAT_DECIMAL_POUND:
str.printf("#%d", (UINT32)m_value);
strprintf(str, "#%d", (UINT32)m_value);
break;
case XML_INT_FORMAT_HEX_DOLLAR:
str.printf("$%X", (UINT32)m_value);
strprintf(str, "$%X", (UINT32)m_value);
break;
case XML_INT_FORMAT_HEX_C:
str.printf("0x%X", (UINT32)m_value);
strprintf(str, "0x%X", (UINT32)m_value);
break;
}
return str.c_str();
@ -178,16 +178,16 @@ const char *cheat_parameter::text()
{
// are we a value cheat?
if (!has_itemlist())
m_curtext.format("%d (0x%X)", UINT32(m_value), UINT32(m_value));
strprintf(m_curtext,"%d (0x%X)", UINT32(m_value), UINT32(m_value));
// if not, we're an item cheat
else
{
m_curtext.format("??? (%d)", UINT32(m_value));
strprintf(m_curtext, "??? (%d)", UINT32(m_value));
for (item *curitem = m_itemlist.first(); curitem != NULL; curitem = curitem->next())
if (curitem->value() == m_value)
{
m_curtext.cpy(curitem->text());
m_curtext.assign(curitem->text());
break;
}
}
@ -205,7 +205,7 @@ void cheat_parameter::save(emu_file &cheatfile) const
cheatfile.printf("\t\t<parameter");
// if no items, just output min/max/step
astring str;
std::string str;
if (!has_itemlist())
{
if (m_minval != 0)
@ -426,7 +426,7 @@ cheat_script::script_entry::script_entry(cheat_manager &manager, symbol_table &s
const char *format = xml_get_attribute_string(&entrynode, "format", NULL);
if (format == NULL || format[0] == 0)
throw emu_fatalerror("%s.xml(%d): missing format in output tag\n", filename, entrynode.line);
m_format.cpy(format);
m_format.assign(format);
// extract other attributes
m_line = xml_get_attribute_int(&entrynode, "line", 0);
@ -507,7 +507,7 @@ void cheat_script::script_entry::execute(cheat_manager &manager, UINT64 &arginde
curarg += arg->values(argindex, &params[curarg]);
// generate the astring
manager.get_output_astring(m_line, m_justify).printf(m_format.c_str(),
strprintf(manager.get_output_astring(m_line, m_justify), m_format.c_str(),
(UINT32)params[0], (UINT32)params[1], (UINT32)params[2], (UINT32)params[3],
(UINT32)params[4], (UINT32)params[5], (UINT32)params[6], (UINT32)params[7],
(UINT32)params[8], (UINT32)params[9], (UINT32)params[10], (UINT32)params[11],
@ -526,7 +526,7 @@ void cheat_script::script_entry::execute(cheat_manager &manager, UINT64 &arginde
void cheat_script::script_entry::save(emu_file &cheatfile) const
{
astring tempstring;
std::string tempstring;
// output an action
if (m_format.empty())
@ -660,7 +660,7 @@ int cheat_script::script_entry::output_argument::values(UINT64 &argindex, UINT64
void cheat_script::script_entry::output_argument::save(emu_file &cheatfile) const
{
astring tempstring;
std::string tempstring;
cheatfile.printf("\t\t\t\t<argument");
if (m_count != 1)
@ -709,9 +709,11 @@ cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, cons
// create the symbol table
m_symbols.add("argindex", symbol_table::READ_ONLY, &m_argindex);
astring tempname;
for (int curtemp = 0; curtemp < tempcount; curtemp++)
m_symbols.add(tempname.format("temp%d", curtemp).c_str(), symbol_table::READ_WRITE);
std::string tempname;
for (int curtemp = 0; curtemp < tempcount; curtemp++) {
strprintf(tempname,"temp%d", curtemp);
m_symbols.add(tempname.c_str(), symbol_table::READ_WRITE);
}
// read the first comment node
xml_data_node *commentnode = xml_get_sibling(cheatnode.child, "comment");
@ -719,7 +721,7 @@ cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, cons
{
// set the value if not NULL
if (commentnode->value != NULL && commentnode->value[0] != 0)
m_comment.cpy(commentnode->value);
m_comment.assign(commentnode->value);
// only one comment is kept
commentnode = xml_get_sibling(commentnode->next, "comment");
@ -951,11 +953,11 @@ bool cheat_entry::select_next_state()
// this cheat in a menu item
//-------------------------------------------------
void cheat_entry::menu_text(astring &description, astring &state, UINT32 &flags)
void cheat_entry::menu_text(std::string &description, std::string &state, UINT32 &flags)
{
// description is standard
description.cpy(m_description);
state.reset();
description.assign(m_description);
state.clear();
flags = 0;
// some cheat entries are just text for display
@ -963,21 +965,21 @@ void cheat_entry::menu_text(astring &description, astring &state, UINT32 &flags)
{
if (!description.empty())
{
description.trimspace();
strtrimspace(description);
if (description.empty())
description.cpy(MENU_SEPARATOR_ITEM);
description.assign(MENU_SEPARATOR_ITEM);
}
flags = MENU_FLAG_DISABLE;
}
// if we have no parameter and no run or off script, it's a oneshot cheat
else if (is_oneshot())
state.cpy("Set");
state.assign("Set");
// if we have no parameter, it's just on/off
else if (is_onoff())
{
state.cpy((m_state == SCRIPT_STATE_RUN) ? "On" : "Off");
state.assign((m_state == SCRIPT_STATE_RUN) ? "On" : "Off");
flags = (m_state != 0) ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW;
}
@ -986,12 +988,12 @@ void cheat_entry::menu_text(astring &description, astring &state, UINT32 &flags)
{
if (m_state == SCRIPT_STATE_OFF)
{
state.cpy(is_oneshot_parameter() ? "Set" : "Off");
state.assign(is_oneshot_parameter() ? "Set" : "Off");
flags = MENU_FLAG_RIGHT_ARROW;
}
else
{
state.cpy(m_parameter->text());
state.assign(m_parameter->text());
flags = MENU_FLAG_LEFT_ARROW;
if (!m_parameter->is_maximum())
flags |= MENU_FLAG_RIGHT_ARROW;
@ -1149,8 +1151,8 @@ void cheat_manager::reload()
UINT32 crc = image->crc();
if (crc != 0)
{
astring filename;
filename.printf("%08X", crc);
std::string filename;
strprintf(filename,"%08X", crc);
load_cheats(filename.c_str());
break;
}
@ -1235,7 +1237,7 @@ void cheat_manager::render_text(render_container &container)
// justification
//-------------------------------------------------
astring &cheat_manager::get_output_astring(int row, int justify)
std::string &cheat_manager::get_output_astring(int row, int justify)
{
// if the row is not specified, grab the next one
if (row == 0)
@ -1263,34 +1265,34 @@ astring &cheat_manager::get_output_astring(int row, int justify)
// document
//-------------------------------------------------
const char *cheat_manager::quote_expression(astring &str, const parsed_expression &expression)
const char *cheat_manager::quote_expression(std::string &str, const parsed_expression &expression)
{
str.cpy(expression.original_string());
str.assign(expression.original_string());
str.replace(0, " && ", " and ");
str.replace(0, " &&", " and ");
str.replace(0, "&& ", " and ");
str.replace(0, "&&", " and ");
strreplace(str, " && ", " and ");
strreplace(str, " &&", " and ");
strreplace(str, "&& ", " and ");
strreplace(str, "&&", " and ");
str.replace(0, " & ", " band ");
str.replace(0, " &", " band ");
str.replace(0, "& ", " band ");
str.replace(0, "&", " band ");
strreplace(str, " & ", " band ");
strreplace(str, " &", " band ");
strreplace(str, "& ", " band ");
strreplace(str, "&", " band ");
str.replace(0, " <= ", " le ");
str.replace(0, " <=", " le ");
str.replace(0, "<= ", " le ");
str.replace(0, "<=", " le ");
strreplace(str, " <= ", " le ");
strreplace(str, " <=", " le ");
strreplace(str, "<= ", " le ");
strreplace(str, "<=", " le ");
str.replace(0, " < ", " lt ");
str.replace(0, " <", " lt ");
str.replace(0, "< ", " lt ");
str.replace(0, "<", " lt ");
strreplace(str, " < ", " lt ");
strreplace(str, " <", " lt ");
strreplace(str, "< ", " lt ");
strreplace(str, "<", " lt ");
str.replace(0, " << ", " lshift ");
str.replace(0, " <<", " lshift ");
str.replace(0, "<< ", " lshift ");
str.replace(0, "<<", " lshift ");
strreplace(str, " << ", " lshift ");
strreplace(str, " <<", " lshift ");
strreplace(str, "<< ", " lshift ");
strreplace(str, "<<", " lshift ");
return str.c_str();
}
@ -1347,7 +1349,7 @@ void cheat_manager::frame_update()
m_numlines = floor(1.0f / machine().ui().get_line_height());
m_numlines = MIN(m_numlines, ARRAY_LENGTH(m_output));
for (int linenum = 0; linenum < ARRAY_LENGTH(m_output); linenum++)
m_output[linenum].reset();
m_output[linenum].clear();
// iterate over running cheats and execute them
for (cheat_entry *cheat = m_cheatlist.first(); cheat != NULL; cheat = cheat->next())

View File

@ -56,7 +56,7 @@ public:
operator const UINT64 &() const { return m_value; }
// format the number according to its format
const char *format(astring &str) const;
const char *format(std::string &str) const;
private:
// internal state
@ -109,7 +109,7 @@ private:
private:
// internal state
item * m_next; // next item in list
astring m_text; // name of the item
std::string m_text; // name of the item
number_and_format m_value; // value of the item
};
@ -118,7 +118,7 @@ private:
number_and_format m_maxval; // maximum value
number_and_format m_stepval; // step value
UINT64 m_value; // live value of the parameter
astring m_curtext; // holding for a value string
std::string m_curtext; // holding for a value string
simple_list<item> m_itemlist; // list of items
};
@ -190,7 +190,7 @@ private:
script_entry * m_next; // link to next entry
parsed_expression m_condition; // condition under which this is executed
parsed_expression m_expression; // expression to execute
astring m_format; // string format to print
std::string m_format; // string format to print
simple_list<output_argument> m_arglist; // list of arguments
INT8 m_line; // which line to print on
UINT8 m_justify; // justification when printing
@ -252,7 +252,7 @@ public:
void save(emu_file &cheatfile) const;
// UI helpers
void menu_text(astring &description, astring &state, UINT32 &flags);
void menu_text(std::string &description, std::string &state, UINT32 &flags);
// per-frame update
void frame_update() { if (m_state == SCRIPT_STATE_RUN) execute_run_script(); }
@ -265,8 +265,8 @@ private:
// internal state
cheat_manager & m_manager; // reference to our manager
cheat_entry * m_next; // next cheat entry
astring m_description; // string description/menu title
astring m_comment; // comment data
std::string m_description; // string description/menu title
std::string m_comment; // comment data
auto_pointer<cheat_parameter> m_parameter; // parameter
auto_pointer<cheat_script> m_on_script; // script to run when turning on
auto_pointer<cheat_script> m_off_script; // script to run when turning off
@ -305,10 +305,10 @@ public:
void render_text(render_container &container);
// output helpers
astring &get_output_astring(int row, int justify);
std::string &get_output_astring(int row, int justify);
// global helpers
static const char *quote_expression(astring &str, const parsed_expression &expression);
static const char *quote_expression(std::string &str, const parsed_expression &expression);
static UINT64 execute_frombcd(symbol_table &table, void *ref, int params, const UINT64 *param);
static UINT64 execute_tobcd(symbol_table &table, void *ref, int params, const UINT64 *param);
@ -321,7 +321,7 @@ private:
running_machine & m_machine; // reference to our machine
simple_list<cheat_entry> m_cheatlist; // cheat list
UINT64 m_framecount; // frame count
astring m_output[UI_TARGET_FONT_ROWS*2]; // array of output strings
std::string m_output[UI_TARGET_FONT_ROWS * 2]; // array of output strings
UINT8 m_justify[UI_TARGET_FONT_ROWS*2]; // justification for each string
UINT8 m_numlines; // number of lines available for output
INT8 m_lastline; // last line used for output

View File

@ -107,7 +107,7 @@ int cli_frontend::execute(int argc, char **argv)
try
{
// first parse options to be able to get software from it
astring option_errors;
std::string option_errors;
m_options.parse_command_line(argc, argv, option_errors);
if (*(m_options.software_name()) != 0)
@ -149,8 +149,8 @@ int cli_frontend::execute(int argc, char **argv)
// mount only if not already mounted
if (*option == 0)
{
astring val;
val.printf("%s:%s:%s", swlistdev->list_name(), m_options.software_name(), swpart->name());
std::string val;
strprintf(val, "%s:%s:%s", swlistdev->list_name(), m_options.software_name(), swpart->name());
// call this in order to set slot devices according to mounting
m_options.parse_slot_devices(argc, argv, option_errors, image->instance_name(), val.c_str());
@ -184,13 +184,13 @@ int cli_frontend::execute(int argc, char **argv)
throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "Unknown system '%s'", m_options.system_name());
// otherwise, error on the options
throw emu_fatalerror(MAMERR_INVALID_CONFIG, "%s", option_errors.trimspace().c_str());
throw emu_fatalerror(MAMERR_INVALID_CONFIG, "%s", strtrimspace(option_errors).c_str());
}
if (!option_errors.empty())
osd_printf_error("Error in command line:\n%s\n", option_errors.trimspace().c_str());
osd_printf_error("Error in command line:\n%s\n", strtrimspace(option_errors).c_str());
// determine the base name of the EXE
astring exename;
std::string exename;
core_filename_extract_base(exename, argv[0], true);
// if we have a command, execute that
@ -208,7 +208,7 @@ int cli_frontend::execute(int argc, char **argv)
m_options.parse_standard_inis(option_errors);
}
if (!option_errors.empty())
osd_printf_error("Error in command line:\n%s\n", option_errors.trimspace().c_str());
osd_printf_error("Error in command line:\n%s\n", strtrimspace(option_errors).c_str());
// if we can't find it, give an appropriate error
const game_driver *system = m_options.system();
@ -225,8 +225,9 @@ int cli_frontend::execute(int argc, char **argv)
// handle exceptions of various types
catch (emu_fatalerror &fatal)
{
astring str(fatal.string());
osd_printf_error("%s\n", str.trimspace().c_str());
std::string str(fatal.string());
strtrimspace(str);
osd_printf_error("%s\n", str.c_str());
m_result = (fatal.exitcode() != 0) ? fatal.exitcode() : MAMERR_FATALERROR;
// if a game was specified, wasn't a wildcard, and our error indicates this was the
@ -326,7 +327,7 @@ void cli_frontend::listsource(const char *gamename)
throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "No matching games found for '%s'", gamename);
// iterate through drivers and output the info
astring filename;
std::string filename;
while (drivlist.next())
osd_printf_info("%-16s %s\n", drivlist.driver().name, core_filename_extract_base(filename, drivlist.driver().source_file).c_str());
}
@ -414,7 +415,7 @@ void cli_frontend::listbrothers(const char *gamename)
// output the entries found
drivlist.reset();
astring filename;
std::string filename;
while (drivlist.next())
{
int clone_of = drivlist.clone();
@ -465,7 +466,7 @@ void cli_frontend::listroms(const char *gamename)
throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "No matching games found for '%s'", gamename);
// iterate through matches
astring tempstr;
std::string tempstr;
bool first = true;
while (drivlist.next())
{
@ -722,17 +723,17 @@ void cli_frontend::listmedia(const char *gamename)
for (const device_image_interface *imagedev = iter.first(); imagedev != NULL; imagedev = iter.next())
{
// extract the shortname with parentheses
astring paren_shortname;
paren_shortname.format("(%s)", imagedev->brief_instance_name());
std::string paren_shortname;
strprintf(paren_shortname,"(%s)", imagedev->brief_instance_name());
// output the line, up to the list of extensions
printf("%-13s%-12s%-8s ", first ? drivlist.driver().name : "", imagedev->instance_name(), paren_shortname.c_str());
// get the extensions and print them
astring extensions(imagedev->file_extensions());
for (int start = 0, end = extensions.chr(0, ','); ; start = end + 1, end = extensions.chr(start, ','))
std::string extensions(imagedev->file_extensions());
for (int start = 0, end = extensions.find_first_of(',');; start = end + 1, end = extensions.find_first_of(',', start))
{
astring curext(extensions, start, (end == -1) ? extensions.len() - start : end - start);
std::string curext(extensions, start, (end == -1) ? extensions.length() - start : end - start);
printf(".%-5s", curext.c_str());
if (end == -1)
break;
@ -780,7 +781,7 @@ void cli_frontend::verifyroms(const char *gamename)
else
{
// output the summary of the audit
astring summary_string;
std::string summary_string;
auditor.summarize(drivlist.driver().name,&summary_string);
osd_printf_info("%s", summary_string.c_str());
@ -840,7 +841,7 @@ void cli_frontend::verifyroms(const char *gamename)
else if (summary != media_auditor::NONE_NEEDED)
{
// output the summary of the audit
astring summary_string;
std::string summary_string;
auditor.summarize(dev->shortname(),&summary_string);
osd_printf_info("%s", summary_string.c_str());
@ -878,8 +879,8 @@ void cli_frontend::verifyroms(const char *gamename)
{
for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next())
{
astring temptag("_");
temptag.cat(option->name());
std::string temptag("_");
temptag.append(option->name());
device_t *dev = const_cast<machine_config &>(config).device_add(&config.root_device(), temptag.c_str(), option->devtype(), 0);
// notify this device and all its subdevices that they are now configured
@ -905,7 +906,7 @@ void cli_frontend::verifyroms(const char *gamename)
else if(summary != media_auditor::NONE_NEEDED)
{
// output the summary of the audit
astring summary_string;
std::string summary_string;
auditor.summarize(dev->shortname(),&summary_string);
osd_printf_info("%s", summary_string.c_str());
@ -1002,7 +1003,7 @@ void cli_frontend::verifysamples(const char *gamename)
else if (summary != media_auditor::NONE_NEEDED)
{
// output the summary of the audit
astring summary_string;
std::string summary_string;
auditor.summarize(drivlist.driver().name,&summary_string);
osd_printf_info("%s", summary_string.c_str());
@ -1120,7 +1121,7 @@ void cli_frontend::verifysamples(const char *gamename)
void cli_frontend::output_single_softlist(FILE *out, software_list_device &swlistdev)
{
astring tempstr;
std::string tempstr;
fprintf(out, "\t<softwarelist name=\"%s\" description=\"%s\">\n", swlistdev.list_name(), xml_normalize_string(swlistdev.description()));
for (software_info *swinfo = swlistdev.first_software_info(); swinfo != NULL; swinfo = swinfo->next())
@ -1320,7 +1321,7 @@ void cli_frontend::verifysoftware(const char *gamename)
else if(summary != media_auditor::NONE_NEEDED)
{
// output the summary of the audit
astring summary_string;
std::string summary_string;
auditor.summarize(swinfo->shortname(), &summary_string);
osd_printf_info("%s", summary_string.c_str());
@ -1442,7 +1443,7 @@ void cli_frontend::verifysoftlist(const char *gamename)
else if (summary != media_auditor::NONE_NEEDED)
{
// output the summary of the audit
astring summary_string;
std::string summary_string;
auditor.summarize(swinfo->shortname(), &summary_string);
osd_printf_info("%s", summary_string.c_str());
@ -1538,7 +1539,7 @@ void cli_frontend::execute_commands(const char *exename)
// showusage?
if (strcmp(m_options.command(), CLICOMMAND_SHOWUSAGE) == 0)
{
astring helpstring;
std::string helpstring;
emulator_info::printf_usage(exename, emulator_info::get_gamenoun());
osd_printf_info("\n\nOptions:\n%s", m_options.output_help(helpstring));
return;
@ -1553,7 +1554,7 @@ void cli_frontend::execute_commands(const char *exename)
}
// other commands need the INIs parsed
astring option_errors;
std::string option_errors;
m_options.parse_standard_inis(option_errors);
if (!option_errors.empty())
osd_printf_error("%s\n", option_errors.c_str());
@ -1567,7 +1568,7 @@ void cli_frontend::execute_commands(const char *exename)
throw emu_fatalerror("Unable to create file %s.ini\n",emulator_info::get_configname());
// generate the updated INI
astring initext;
std::string initext;
file.puts(m_options.output_ini(initext));
return;
}
@ -1576,7 +1577,7 @@ void cli_frontend::execute_commands(const char *exename)
if (strcmp(m_options.command(), CLICOMMAND_SHOWCONFIG) == 0)
{
// print the INI text
astring initext;
std::string initext;
printf("%s\n", m_options.output_ini(initext));
return;
}
@ -1686,7 +1687,7 @@ void media_identifier::identify(const char *filename)
for (const osd_directory_entry *entry = osd_readdir(directory); entry != NULL; entry = osd_readdir(directory))
if (entry->type == ENTTYPE_FILE)
{
astring curfile = astring(filename).cat(PATH_SEPARATOR).cat(entry->name);
std::string curfile = std::string(filename).append(PATH_SEPARATOR).append(entry->name);
identify(curfile.c_str());
}
@ -1778,7 +1779,7 @@ void media_identifier::identify_file(const char *name)
if (core_filename_ends_with(name, ".chd"))
{
// output the name
astring basename;
std::string basename;
osd_printf_info("%-20s", core_filename_extract_base(basename, name).c_str());
m_total++;
@ -1854,7 +1855,7 @@ void media_identifier::identify_data(const char *name, const UINT8 *data, int le
// output the name
m_total++;
astring basename;
std::string basename;
osd_printf_info("%-20s", core_filename_extract_base(basename, name).c_str());
// see if we can find a match in the ROMs

View File

@ -143,7 +143,7 @@ void n8x300_cpu_device::device_start()
m_icountptr = &m_icount;
}
void n8x300_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void n8x300_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{

View File

@ -64,7 +64,7 @@ protected:
}
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }

View File

@ -544,15 +544,15 @@ 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);
astring tempstring;
std::string tempstring;
for (int ireg = 0; ireg < 8; ireg++)
state_add(ADSP2100_I0 + ireg, tempstring.format("I%d", ireg).c_str(), m_i[ireg]).mask(0x3fff).callimport();
state_add(ADSP2100_I0 + ireg, strformat(tempstring, "I%d", ireg).c_str(), m_i[ireg]).mask(0x3fff).callimport();
for (int lreg = 0; lreg < 8; lreg++)
state_add(ADSP2100_L0 + lreg, tempstring.format("L%d", lreg).c_str(), m_l[lreg]).mask(0x3fff).callimport();
state_add(ADSP2100_L0 + lreg, strformat(tempstring, "L%d", lreg).c_str(), m_l[lreg]).mask(0x3fff).callimport();
for (int mreg = 0; mreg < 8; mreg++)
state_add(ADSP2100_M0 + mreg, tempstring.format("M%d", mreg).c_str(), m_m[mreg]).signed_mask(0x3fff);
state_add(ADSP2100_M0 + mreg, strformat(tempstring, "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 +571,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, tempstring.format("IRQ%d", irqnum).c_str(), m_irq_state[irqnum]).mask(1).callimport();
state_add(ADSP2100_IRQSTATE0 + irqnum, strformat(tempstring, "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,12 +720,12 @@ void adsp21xx_device::state_import(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
void adsp21xx_device::state_string_export(const device_state_entry &entry, astring &str)
void adsp21xx_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c",
m_astat & 0x80 ? 'X':'.',
m_astat & 0x40 ? 'M':'.',
m_astat & 0x20 ? 'Q':'.',

View File

@ -237,7 +237,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const;

View File

@ -513,12 +513,12 @@ void alpha8201_cpu_device::state_export(const device_state_entry &entry)
}
void alpha8201_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void alpha8201_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c", m_cf ? 'C' : '.', m_zf ? 'Z' : '.');
strprintf(str, "%c%c", m_cf ? 'C' : '.', m_zf ? 'Z' : '.');
break;
}
}

View File

@ -61,7 +61,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }

View File

@ -1004,15 +1004,15 @@ void alto2_cpu_device::device_start()
// for the debugger
//-------------------------------------------------
void alto2_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void alto2_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case A2_TASK:
str.printf("%s", task_name(m_task));
strprintf(str, "%s", task_name(m_task));
break;
case STATE_GENFLAGS:
str.printf("%s%s%s%s",
strprintf(str, "%s%s%s%s",
m_aluc0 ? "C":"-",
m_laluc0 ? "c":"-",
m_shifter == 0 ? "0":"-",

View File

@ -215,7 +215,7 @@ protected:
//! device (P)ROMs
virtual const rom_entry *device_rom_region() const;
//! device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
//! device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 4; }

View File

@ -402,12 +402,12 @@ void am29000_cpu_device::device_start()
}
void am29000_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void am29000_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c%c|%3d", m_alu & ALU_V ? 'V' : '.',
strprintf(str, "%c%c%c%c%c%c%c%c%c|%3d", m_alu & ALU_V ? 'V' : '.',
m_alu & ALU_Z ? 'Z' : '.',
m_alu & ALU_N ? 'N' : '.',
m_alu & ALU_C ? 'C' : '.',

View File

@ -460,7 +460,7 @@ protected:
}
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 4; }

View File

@ -72,12 +72,12 @@ 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, astring &str)
void amis2000_base_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c",
m_f & 0x20 ? '6':'.',
m_f & 0x10 ? '5':'.',
m_f & 0x08 ? '4':'.',

View File

@ -89,7 +89,7 @@ protected:
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
virtual UINT32 disasm_max_opcode_bytes() const { return 1; }
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
address_space_config m_program_config;
address_space_config m_data_config;

View File

@ -812,12 +812,12 @@ void apexc_cpu_device::state_export(const device_state_entry &entry)
}
void apexc_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void apexc_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c", m_running ? 'R' : 'S');
strprintf(str, "%c", m_running ? 'R' : 'S');
break;
}
}

View File

@ -42,7 +42,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 4; }

View File

@ -550,14 +550,14 @@ void arm_cpu_device::device_start()
}
void arm_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void arm_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
static const char *s[4] = { "USER", "FIRQ", "IRQ ", "SVC " };
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c %s",
strprintf(str, "%c%c%c%c%c%c %s",
(m_sArmRegister[15] & N_MASK) ? 'N' : '-',
(m_sArmRegister[15] & Z_MASK) ? 'Z' : '-',
(m_sArmRegister[15] & C_MASK) ? 'C' : '-',

View File

@ -59,7 +59,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 4; }

View File

@ -574,12 +574,12 @@ void arm7_cpu_device::state_export(const device_state_entry &entry)
}
void arm7_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void arm7_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c %s",
strprintf(str, "%c%c%c%c%c%c%c%c %s",
(ARM7REG(eCPSR) & N_MASK) ? 'N' : '-',
(ARM7REG(eCPSR) & Z_MASK) ? 'Z' : '-',
(ARM7REG(eCPSR) & C_MASK) ? 'C' : '-',

View File

@ -97,7 +97,7 @@ protected:
// device_state_interface overrides
virtual void state_export(const device_state_entry &entry);
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }

View File

@ -186,7 +186,7 @@ void asap_device::device_start()
m_direct = &m_program->direct();
// register our state for the debugger
astring tempstr;
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 +194,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, tempstr.format("R%d", regnum).c_str(), m_src2val[REGBASE + regnum]);
state_add(ASAP_R0 + regnum, strformat(tempstr, "R%d", regnum).c_str(), m_src2val[REGBASE + regnum]);
// register our state for saving
save_item(NAME(m_pc));
@ -281,12 +281,12 @@ void asap_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
void asap_device::state_string_export(const device_state_entry &entry, astring &str)
void asap_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c",
m_pflag ? 'P' : '.',
m_iflag ? 'I' : '.',
((INT32)m_znflag < 0) ? 'N' : '.',

View File

@ -48,7 +48,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const;

View File

@ -749,7 +749,7 @@ void avr8_device::device_start()
m_io = &space(AS_IO);
// register our state for the debugger
astring tempstr;
std::string tempstr;
state_add(STATE_GENPC, "GENPC", m_shifted_pc).noshow();
state_add(STATE_GENFLAGS, "GENFLAGS", m_r[AVR8_REGIDX_SREG]).callimport().callexport().formatstr("%8s").noshow();
state_add(AVR8_SREG, "STATUS", m_r[AVR8_REGIDX_SREG]).mask(0xff);
@ -902,12 +902,12 @@ 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, astring &str)
void avr8_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c",
(m_r[AVR8_REGIDX_SREG] & 0x80) ? 'I' : '-',
(m_r[AVR8_REGIDX_SREG] & 0x40) ? 'T' : '-',
(m_r[AVR8_REGIDX_SREG] & 0x20) ? 'H' : '-',

View File

@ -132,7 +132,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// address spaces
const address_space_config m_program_config;

View File

@ -139,12 +139,12 @@ void ccpu_cpu_device::device_start()
}
void ccpu_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void ccpu_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c",
TEST_A0 ? '0' : 'o',
TEST_NC ? 'N' : 'n',
TEST_LT ? 'L' : 'l',

View File

@ -82,7 +82,7 @@ protected:
}
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }

View File

@ -1239,12 +1239,12 @@ void cop400_cpu_device::state_export(const device_state_entry &entry)
}
}
void cop400_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void cop400_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c",
strprintf(str, "%c%c%c",
m_c ? 'C' : '.',
m_skl ? 'S' : '.',
m_skt_latch ? 'T' : '.');

View File

@ -139,7 +139,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }

View File

@ -356,9 +356,9 @@ void cosmac_device::device_start()
state_add(COSMAC_I, "I", m_i).mask(0xf);
state_add(COSMAC_N, "N", m_n).mask(0xf);
astring tempstr;
std::string tempstr;
for (int regnum = 0; regnum < 16; regnum++)
state_add(COSMAC_R0 + regnum, tempstr.format("R%x", regnum).c_str(), m_r[regnum]);
state_add(COSMAC_R0 + regnum, strformat(tempstr, "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();
@ -472,12 +472,12 @@ void cosmac_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
void cosmac_device::state_string_export(const device_state_entry &entry, astring &str)
void cosmac_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c",
strprintf(str, "%c%c%c",
m_df ? 'D' : '.',
m_ie ? 'I' : '.',
m_q ? 'Q' : '.');

View File

@ -235,7 +235,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const;

View File

@ -3427,12 +3427,12 @@ cp1610_cpu_device::cp1610_cpu_device(const machine_config &mconfig, const char *
}
void cp1610_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void cp1610_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c",
strprintf(str, "%c%c%c%c",
m_flags & 0x80 ? 'S':'.',
m_flags & 0x40 ? 'Z':'.',
m_flags & 0x20 ? 'V':'.',

View File

@ -64,7 +64,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }

View File

@ -345,12 +345,12 @@ void cquestrot_cpu_device::device_reset()
}
void cquestrot_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void cquestrot_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c", m_cflag ? 'C' : '.',
strprintf(str, "%c%c%c", m_cflag ? 'C' : '.',
m_vflag ? 'V' : '.',
m_f ? '.' : 'Z');
break;
@ -469,12 +469,12 @@ void cquestlin_cpu_device::device_reset()
}
void cquestlin_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void cquestlin_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c|%cG", m_cflag ? 'C' : '.',
strprintf(str, "%c%c%c|%cG", m_cflag ? 'C' : '.',
m_vflag ? 'V' : '.',
m_f ? '.' : 'Z',
( m_clkcnt & 3 ) ? 'B' : 'F');

View File

@ -230,7 +230,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 8; }
@ -314,7 +314,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 8; }

View File

@ -654,7 +654,7 @@ drcbe_x64::drcbe_x64(drcuml_state &drcuml, device_t &device, drc_cache &cache, U
// create the log
if (device.machine().options().drc_log_native())
{
astring filename = astring("drcbex64_").cat(device.shortname()).cat(".asm");
std::string filename = std::string("drcbex64_").append(device.shortname()).append(".asm");
m_log = x86log_create_context(filename.c_str());
}
}
@ -787,7 +787,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3
x86code *dst = base;
// generate code
astring tempstring;
std::string tempstring;
const char *blockname = NULL;
for (int inum = 0; inum < numinst; inum++)
{
@ -797,7 +797,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3
// add a comment
if (m_log != NULL)
{
astring dasm;
std::string dasm;
inst.disasm(dasm, &m_drcuml);
x86log_add_comment(m_log, dst, "%s", dasm.c_str());
}
@ -808,7 +808,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 = tempstring.format("Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str();
blockname = strformat(tempstring, "Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str();
}
// generate code

View File

@ -568,7 +568,7 @@ drcbe_x86::drcbe_x86(drcuml_state &drcuml, device_t &device, drc_cache &cache, U
// create the log
if (device.machine().options().drc_log_native())
{
astring filename = astring("drcbex86_").cat(device.shortname()).cat(".asm");
std::string filename = std::string("drcbex86_").append(device.shortname()).append(".asm");
m_log = x86log_create_context(filename.c_str());
}
}
@ -770,7 +770,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3
x86code *dst = base;
// generate code
astring tempstring;
std::string tempstring;
const char *blockname = NULL;
for (int inum = 0; inum < numinst; inum++)
{
@ -780,7 +780,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3
// add a comment
if (m_log != NULL)
{
astring dasm;
std::string dasm;
inst.disasm(dasm, &m_drcuml);
x86log_add_comment(m_log, dst, "%s", dasm.c_str());
}
@ -791,7 +791,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 = tempstring.format("Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str();
blockname = strformat(tempstring, "Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str();
}
// generate code

View File

@ -129,7 +129,7 @@ drcuml_state::drcuml_state(device_t &device, drc_cache &cache, UINT32 flags, int
// if we're to log, create the logfile
if (device.machine().options().drc_log_uml())
{
astring filename = astring("drcuml_").cat(m_device.shortname()).cat(".asm");
std::string filename = std::string("drcuml_").append(m_device.shortname()).append(".asm");
m_umllog = fopen(filename.c_str(), "w");
}
}
@ -386,14 +386,14 @@ uml::instruction &drcuml_block::append()
void drcuml_block::append_comment(const char *format, ...)
{
// do the printf
astring temp;
std::string temp;
va_list va;
va_start(va, format);
temp.vprintf(format, va);
strvprintf(temp,format, va);
va_end(va);
// allocate space in the cache to hold the comment
char *comment = (char *)m_drcuml.cache().alloc_temporary(temp.len() + 1);
char *comment = (char *)m_drcuml.cache().alloc_temporary(temp.length() + 1);
if (comment == NULL)
return;
strcpy(comment, temp.c_str());
@ -457,8 +457,8 @@ void drcuml_block::optimize()
void drcuml_block::disassemble()
{
astring comment;
astring dasm;
std::string comment;
std::string dasm;
// iterate over instructions and output
int firstcomment = -1;
@ -520,15 +520,17 @@ void drcuml_block::disassemble()
// associated with a comment or mapvar
//-------------------------------------------------
const char *drcuml_block::get_comment_text(const instruction &inst, astring &comment)
const char *drcuml_block::get_comment_text(const instruction &inst, std::string &comment)
{
// comments return their strings
if (inst.opcode() == OP_COMMENT)
return comment.cpy(inst.param(0).string()).c_str();
return comment.assign(inst.param(0).string()).c_str();
// mapvars comment about their values
else if (inst.opcode() == OP_MAPVAR)
return comment.format("m%d = $%X", (int)inst.param(0).mapvar() - MAPVAR_M0, (UINT32)inst.param(1).immediate()).c_str();
else if (inst.opcode() == OP_MAPVAR) {
strprintf(comment,"m%d = $%X", (int)inst.param(0).mapvar() - MAPVAR_M0, (UINT32)inst.param(1).immediate());
return comment.c_str();
}
// everything else is NULL
return NULL;

View File

@ -121,7 +121,7 @@ private:
// internal helpers
void optimize();
void disassemble();
const char *get_comment_text(const uml::instruction &inst, astring &comment);
const char *get_comment_text(const uml::instruction &inst, std::string &comment);
// internal state
drcuml_state & m_drcuml; // pointer back to the owning UML
@ -220,7 +220,7 @@ private:
symbol * m_next; // link to the next symbol
drccodeptr m_base; // base of the symbol
UINT32 m_length; // length of the region covered
astring m_name; // name of the symbol
std::string m_name; // name of the symbol
};
// internal state

View File

@ -212,26 +212,26 @@ 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, astring &str)
void dsp16_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("(below)");
strprintf(str, "(below)");
break;
case DSP16_AUC:
{
astring alignString;
std::string alignString;
const UINT8 align = m_auc & 0x03;
switch (align)
{
case 0x00: alignString.printf("xy"); break;
case 0x01: alignString.printf("/4"); break;
case 0x02: alignString.printf("x4"); break;
case 0x03: alignString.printf(",,"); break;
case 0x00: strprintf(alignString,"xy"); break;
case 0x01: strprintf(alignString,"/4"); break;
case 0x02: strprintf(alignString,"x4"); break;
case 0x03: strprintf(alignString,",,"); break;
}
str.printf("%c%c%c%c%c%s",
strprintf(str, "%c%c%c%c%c%s",
m_auc & 0x40 ? 'Y':'.',
m_auc & 0x20 ? '1':'.',
m_auc & 0x10 ? '0':'.',
@ -242,7 +242,7 @@ void dsp16_device::state_string_export(const device_state_entry &entry, astring
}
case DSP16_PSW:
str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
m_psw & 0x8000 ? 'M':'.',
m_psw & 0x4000 ? 'E':'.',
m_psw & 0x2000 ? 'L':'.',
@ -263,16 +263,16 @@ void dsp16_device::state_string_export(const device_state_entry &entry, astring
case DSP16_PIOC:
{
astring strobeString;
std::string strobeString;
const UINT8 strobe = (m_pioc & 0x6000) >> 13;
switch (strobe)
{
case 0x00: strobeString.printf("1T"); break;
case 0x01: strobeString.printf("2T"); break;
case 0x02: strobeString.printf("3T"); break;
case 0x03: strobeString.printf("4T"); break;
case 0x00: strprintf(strobeString, "1T"); break;
case 0x01: strprintf(strobeString, "2T"); break;
case 0x02: strprintf(strobeString, "3T"); break;
case 0x03: strprintf(strobeString, "4T"); break;
}
str.printf("%c%s%c%c%c%c%c%c%c%c%c%c%c%c%c",
strprintf(str, "%c%s%c%c%c%c%c%c%c%c%c%c%c%c%c",
m_pioc & 0x8000 ? 'I':'.',
strobeString.c_str(),
m_pioc & 0x1000 ? 'O':'I',
@ -294,16 +294,16 @@ void dsp16_device::state_string_export(const device_state_entry &entry, astring
// Placeholder for a better view later (TODO)
case DSP16_SIOC:
{
astring clkString;
std::string clkString;
const UINT8 clk = (m_sioc & 0x0180) >> 7;
switch (clk)
{
case 0x00: clkString.printf("/4"); break;
case 0x01: clkString.printf("12"); break;
case 0x02: clkString.printf("16"); break;
case 0x03: clkString.printf("20"); break;
case 0x00: strprintf(clkString, "/4"); break;
case 0x01: strprintf(clkString, "12"); break;
case 0x02: strprintf(clkString, "16"); break;
case 0x03: strprintf(clkString, "20"); break;
}
str.printf("%c%s%c%c%c%c%c%c%c",
strprintf(str, "%c%s%c%c%c%c%c%c%c",
m_sioc & 0x0200 ? 'I':'O',
clkString.c_str(),
m_sioc & 0x0040 ? 'L':'M',

View File

@ -44,7 +44,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const;

View File

@ -1,34 +1,34 @@
#include "emu.h"
#include "dsp16.h"
astring disasmF1Field(const UINT8& F1, const UINT8& D, const UINT8& S)
std::string disasmF1Field(const UINT8& F1, const UINT8& D, const UINT8& S)
{
astring ret = "";
std::string ret = "";
switch (F1)
{
case 0x00: ret.printf("a%d = p, p = x*y", D); break;
case 0x01: ret.printf("a%d = a%d + p, p = x*y", D, S); break;
case 0x02: ret.printf("p = x*y"); break;
case 0x03: ret.printf("a%d = a%d - p, p = x*y", D, S); break;
case 0x04: ret.printf("a%d = p", D); break;
case 0x05: ret.printf("a%d = a%d + p", D, S); break;
case 0x06: ret.printf("NOP"); break;
case 0x07: ret.printf("a%d = a%d - p", D, S); break;
case 0x08: ret.printf("a%d = a%d | y", D, S); break;
case 0x09: ret.printf("a%d = a%d ^ y", D, S); break;
case 0x0a: ret.printf("a%d & y", S); break;
case 0x0b: ret.printf("a%d - y", S); break;
case 0x0c: ret.printf("a%d = y", D); break;
case 0x0d: ret.printf("a%d = a%d + y", D, S); break;
case 0x0e: ret.printf("a%d = a%d & y", D, S); break;
case 0x0f: ret.printf("a%d = a%d - y", D, S); break;
case 0x00: strprintf(ret, "a%d = p, p = x*y", D); break;
case 0x01: strprintf(ret, "a%d = a%d + p, p = x*y", D, S); break;
case 0x02: strprintf(ret, "p = x*y"); break;
case 0x03: strprintf(ret, "a%d = a%d - p, p = x*y", D, S); break;
case 0x04: strprintf(ret, "a%d = p", D); break;
case 0x05: strprintf(ret, "a%d = a%d + p", D, S); break;
case 0x06: strprintf(ret, "NOP"); break;
case 0x07: strprintf(ret, "a%d = a%d - p", D, S); break;
case 0x08: strprintf(ret, "a%d = a%d | y", D, S); break;
case 0x09: strprintf(ret, "a%d = a%d ^ y", D, S); break;
case 0x0a: strprintf(ret, "a%d & y", S); break;
case 0x0b: strprintf(ret, "a%d - y", S); break;
case 0x0c: strprintf(ret, "a%d = y", D); break;
case 0x0d: strprintf(ret, "a%d = a%d + y", D, S); break;
case 0x0e: strprintf(ret, "a%d = a%d & y", D, S); break;
case 0x0f: strprintf(ret, "a%d = a%d - y", D, S); break;
default: return "UNKNOWN";
}
return ret;
}
astring disasmYField(const UINT8& Y)
std::string disasmYField(const UINT8& Y)
{
switch (Y)
{
@ -58,7 +58,7 @@ astring disasmYField(const UINT8& Y)
//return "";
}
astring disasmZField(const UINT8& Z)
std::string disasmZField(const UINT8& Z)
{
switch (Z)
{
@ -88,35 +88,35 @@ astring disasmZField(const UINT8& Z)
//return "";
}
astring disasmF2Field(const UINT8& F2, const UINT8& D, const UINT8& S)
std::string disasmF2Field(const UINT8& F2, const UINT8& D, const UINT8& S)
{
astring ret = "";
std::string ret = "";
switch (F2)
{
case 0x00: ret.printf("a%d = a%d >> 1", D, S); break;
case 0x01: ret.printf("a%d = a%d << 1", D, S); break;
case 0x02: ret.printf("a%d = a%d >> 4", D, S); break;
case 0x03: ret.printf("a%d = a%d << 4", D, S); break;
case 0x04: ret.printf("a%d = a%d >> 8", D, S); break;
case 0x05: ret.printf("a%d = a%d << 8", D, S); break;
case 0x06: ret.printf("a%d = a%d >> 16", D, S); break;
case 0x07: ret.printf("a%d = a%d << 16", D, S); break;
case 0x08: ret.printf("a%d = p", D); break;
case 0x09: ret.printf("a%dh = a%dh + 1", D, S); break;
case 0x0a: ret.printf("RESERVED"); break;
case 0x0b: ret.printf("a%d = rnd(a%d)", D, S); break;
case 0x0c: ret.printf("a%d = y", D); break;
case 0x0d: ret.printf("a%d = a%d + 1", D, S); break;
case 0x0e: ret.printf("a%d = a%d", D, S); break;
case 0x0f: ret.printf("a%d = -a%d", D, S); break;
case 0x00: strprintf(ret, "a%d = a%d >> 1", D, S); break;
case 0x01: strprintf(ret, "a%d = a%d << 1", D, S); break;
case 0x02: strprintf(ret, "a%d = a%d >> 4", D, S); break;
case 0x03: strprintf(ret, "a%d = a%d << 4", D, S); break;
case 0x04: strprintf(ret, "a%d = a%d >> 8", D, S); break;
case 0x05: strprintf(ret, "a%d = a%d << 8", D, S); break;
case 0x06: strprintf(ret, "a%d = a%d >> 16", D, S); break;
case 0x07: strprintf(ret, "a%d = a%d << 16", D, S); break;
case 0x08: strprintf(ret, "a%d = p", D); break;
case 0x09: strprintf(ret, "a%dh = a%dh + 1", D, S); break;
case 0x0a: strprintf(ret, "RESERVED"); break;
case 0x0b: strprintf(ret, "a%d = rnd(a%d)", D, S); break;
case 0x0c: strprintf(ret, "a%d = y", D); break;
case 0x0d: strprintf(ret, "a%d = a%d + 1", D, S); break;
case 0x0e: strprintf(ret, "a%d = a%d", D, S); break;
case 0x0f: strprintf(ret, "a%d = -a%d", D, S); break;
default: return "UNKNOWN";
}
return ret;
}
astring disasmCONField(const UINT8& CON)
std::string disasmCONField(const UINT8& CON)
{
switch (CON)
{
@ -145,7 +145,7 @@ astring disasmCONField(const UINT8& CON)
//return "";
}
astring disasmBField(const UINT8& B)
std::string disasmBField(const UINT8& B)
{
switch (B)
{
@ -164,7 +164,7 @@ astring disasmBField(const UINT8& B)
//return "";
}
astring disasmRImmediateField(const UINT8& R)
std::string disasmRImmediateField(const UINT8& R)
{
switch (R)
{
@ -183,7 +183,7 @@ astring disasmRImmediateField(const UINT8& R)
//return "";
}
astring disasmRField(const UINT8& R)
std::string disasmRField(const UINT8& R)
{
switch (R)
{
@ -222,7 +222,7 @@ astring disasmRField(const UINT8& R)
//return "";
}
astring disasmIField(const UINT8& I)
std::string disasmIField(const UINT8& I)
{
switch (I)
{
@ -268,8 +268,8 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 D = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
astring yString = disasmYField(Y);
astring fString = disasmF1Field(F1, D, S);
std::string yString = disasmYField(Y);
std::string fString = disasmF1Field(F1, D, S);
sprintf(buffer, "%s, %s", fString.c_str(), yString.c_str());
break;
}
@ -281,10 +281,10 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 D = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
astring yString = disasmYField(Y);
astring fString = disasmF1Field(F1, D, S);
astring aString = (opcode == 0x1c) ? "a0" : "a1";
astring xString = (X) ? "" : "l";
std::string yString = disasmYField(Y);
std::string fString = disasmF1Field(F1, D, S);
std::string aString = (opcode == 0x1c) ? "a0" : "a1";
std::string xString = (X) ? "" : "l";
sprintf(buffer, "%s = %s%s, %s", yString.c_str(), aString.c_str(), xString.c_str(), fString.c_str());
break;
}
@ -295,8 +295,8 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 D = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
astring yString = disasmYField(Y);
astring fString = disasmF1Field(F1, D, S);
std::string yString = disasmYField(Y);
std::string fString = disasmF1Field(F1, D, S);
sprintf(buffer, "%s, x = %s", fString.c_str(), yString.c_str());
break;
}
@ -308,9 +308,9 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 D = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
astring yString = disasmYField(Y);
astring fString = disasmF1Field(F1, D, S);
astring xString = (X ? "y" : "y1");
std::string yString = disasmYField(Y);
std::string fString = disasmF1Field(F1, D, S);
std::string xString = (X ? "y" : "y1");
sprintf(buffer, "%s, %s = %s", fString.c_str(), xString.c_str(), yString.c_str());
break;
}
@ -322,9 +322,9 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 D = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
astring yString = disasmYField(Y);
astring fString = disasmF1Field(F1, D, S);
astring xString = (X ? "*pt++i" : "*pt++");
std::string yString = disasmYField(Y);
std::string fString = disasmF1Field(F1, D, S);
std::string xString = (X ? "*pt++i" : "*pt++");
sprintf(buffer, "%s, y = %s, x = %s", fString.c_str(), yString.c_str(), xString.c_str());
break;
}
@ -336,9 +336,9 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 D = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
astring fString = disasmF1Field(F1, D, S);
astring xString = (X ? "*pt++i" : "*pt++");
astring aString = (opcode == 0x19) ? "a0" : "a1";
std::string fString = disasmF1Field(F1, D, S);
std::string xString = (X ? "*pt++i" : "*pt++");
std::string aString = (opcode == 0x19) ? "a0" : "a1";
sprintf(buffer, "%s, y = %s, x = %s", fString.c_str(), aString.c_str(), xString.c_str());
if (Y != 0x00) sprintf(buffer, "UNKNOWN");
break;
@ -351,9 +351,9 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 D = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
astring yString = disasmYField(Y);
astring xString = (X ? "y" : "y1");
astring fString = disasmF1Field(F1, D, S);
std::string yString = disasmYField(Y);
std::string xString = (X ? "y" : "y1");
std::string fString = disasmF1Field(F1, D, S);
sprintf(buffer, "%s, %s = %s", fString.c_str(), yString.c_str(), xString.c_str());
break;
}
@ -366,9 +366,9 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 aT = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
astring yString = disasmYField(Y);
astring atString = (aT ? "a0" : "a1");
astring fString = disasmF1Field(F1, aT, S);
std::string yString = disasmYField(Y);
std::string atString = (aT ? "a0" : "a1");
std::string fString = disasmF1Field(F1, aT, S);
sprintf(buffer, "%s, %s = %s", fString.c_str(), atString.c_str(), yString.c_str());
break;
}
@ -382,9 +382,9 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 D = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
astring zString = disasmZField(Z);
astring xString = (X ? "y" : "y1");
astring fString = disasmF1Field(F1, D, S);
std::string zString = disasmZField(Z);
std::string xString = (X ? "y" : "y1");
std::string fString = disasmF1Field(F1, D, S);
sprintf(buffer, "%s, %s <=> %s", fString.c_str(), xString.c_str(), zString.c_str());
break;
}
@ -396,9 +396,9 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 D = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
astring zString = disasmZField(Z);
astring xString = (X ? "*pt++i" : "*pt++");
astring fString = disasmF1Field(F1, D, S);
std::string zString = disasmZField(Z);
std::string xString = (X ? "*pt++i" : "*pt++");
std::string fString = disasmF1Field(F1, D, S);
sprintf(buffer, "%s, %s <=> y, x = %s", fString.c_str(), zString.c_str(), xString.c_str());
break;
}
@ -412,10 +412,10 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 aT = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
astring zString = disasmZField(Z);
astring atString = (aT ? "a0" : "a1");
std::string zString = disasmZField(Z);
std::string atString = (aT ? "a0" : "a1");
atString += X ? "" : "1"; // TODO: Figure out unclear wording.
astring fString = disasmF1Field(F1, aT, S);
std::string fString = disasmF1Field(F1, aT, S);
sprintf(buffer, "%s, %s <=> %s", fString.c_str(), zString.c_str(), atString.c_str());
break;
}
@ -429,8 +429,8 @@ CPU_DISASSEMBLE( dsp16a )
const UINT8 S = (op & 0x0200) >> 9;
const UINT8 D = (op & 0x0400) >> 10;
const UINT8 F2 = (op & 0x01e0) >> 5;
astring fString = disasmF2Field(F2, D, S);
astring conString = disasmCONField(CON);
std::string fString = disasmF2Field(F2, D, S);
std::string conString = disasmCONField(CON);
if (op & 0x0800) sprintf(buffer, "if %s : %s", conString.c_str(), fString.c_str());
else sprintf(buffer, "ifc %s : %s", conString.c_str(), fString.c_str());
break;
@ -457,7 +457,7 @@ CPU_DISASSEMBLE( dsp16a )
{
// goto B
const UINT8 B = (op & 0x0700) >> 8;
astring bString = disasmBField(B);
std::string bString = disasmBField(B);
sprintf(buffer, "%s", bString.c_str());
break;
}
@ -467,7 +467,7 @@ CPU_DISASSEMBLE( dsp16a )
{
// if CON [goto/call/return]
const UINT8 CON = (op & 0x001f);
astring conString = disasmCONField(CON);
std::string conString = disasmCONField(CON);
sprintf(buffer, "if %s:", conString.c_str());
// TODO: Test for invalid ops
// icall
@ -481,7 +481,7 @@ CPU_DISASSEMBLE( dsp16a )
// R = aS
const UINT8 R = (op & 0x03f0) >> 4;
const UINT8 S = (op & 0x1000) >> 12;
astring rString = disasmRField(R);
std::string rString = disasmRField(R);
sprintf(buffer, "%s = %s", rString.c_str(), (S ? "a1" : "a0"));
break;
}
@ -490,7 +490,7 @@ CPU_DISASSEMBLE( dsp16a )
// aT = R
const UINT8 R = (op & 0x03f0) >> 4;
const UINT8 aT = (op & 0x0400) >> 10;
astring rString = disasmRField(R);
std::string rString = disasmRField(R);
sprintf(buffer, "%s = %s", (aT ? "a0" : "a1"), rString.c_str());
break;
}
@ -499,8 +499,8 @@ CPU_DISASSEMBLE( dsp16a )
// R = Y
const UINT8 Y = (op & 0x000f);
const UINT8 R = (op & 0x03f0) >> 4;
astring yString = disasmYField(Y);
astring rString = disasmRField(R);
std::string yString = disasmYField(Y);
std::string rString = disasmRField(R);
sprintf(buffer, "%s = %s", rString.c_str(), yString.c_str());
// TODO: Special case the R == [y, y1, or x] case
break;
@ -510,8 +510,8 @@ CPU_DISASSEMBLE( dsp16a )
// Y = R
const UINT8 Y = (op & 0x000f);
const UINT8 R = (op & 0x03f0) >> 4;
astring yString = disasmYField(Y);
astring rString = disasmRField(R);
std::string yString = disasmYField(Y);
std::string rString = disasmRField(R);
// TODO: page 3-31 "special function encoding"
sprintf(buffer, "%s = %s", yString.c_str(), rString.c_str());
break;
@ -521,8 +521,8 @@ CPU_DISASSEMBLE( dsp16a )
// Z : R
const UINT8 Z = (op & 0x000f);
const UINT8 R = (op & 0x03f0) >> 4;
astring zString = disasmZField(Z);
astring rString = disasmRField(R);
std::string zString = disasmZField(Z);
std::string rString = disasmRField(R);
sprintf(buffer, "%s <=> %s", zString.c_str(), rString.c_str());
break;
}
@ -532,7 +532,7 @@ CPU_DISASSEMBLE( dsp16a )
{
// R = N
const UINT8 R = (op & 0x03f0) >> 4;
astring rString = disasmRField(R);
std::string rString = disasmRField(R);
sprintf(buffer, "%s = 0x%04x", rString.c_str(), op2);
opSize = 2;
break;
@ -544,7 +544,7 @@ CPU_DISASSEMBLE( dsp16a )
// R = M
const UINT16 M = (op & 0x01ff);
const UINT8 R = (op & 0x0e00) >> 9;
astring rString = disasmRImmediateField(R);
std::string rString = disasmRImmediateField(R);
sprintf(buffer, "%s = 0x%04x", rString.c_str(), M);
break;
}

View File

@ -194,14 +194,14 @@ void dsp32c_device::device_start()
m_direct = &m_program->direct();
// register our state for the debugger
astring tempstr;
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, tempstr.format("R%d", regnum).c_str(), m_r[regnum]).mask(0xffffff);
state_add(DSP32_R0 + regnum, strformat(tempstr, "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,12 +369,12 @@ void dsp32c_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
void dsp32c_device::state_string_export(const device_state_entry &entry, astring &str)
void dsp32c_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c",
NFLAG ? 'N':'.',
ZFLAG ? 'Z':'.',
UFLAG ? 'U':'.',
@ -389,7 +389,7 @@ void dsp32c_device::state_string_export(const device_state_entry &entry, astring
case DSP32_A1:
case DSP32_A2:
case DSP32_A3:
str.printf("%8g", *(double *)entry.dataptr());
strprintf(str, "%8g", *(double *)entry.dataptr());
break;
}
}

View File

@ -123,7 +123,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const;

View File

@ -357,14 +357,14 @@ void dsp56k_device::device_start()
}
void dsp56k_device::state_string_export(const device_state_entry &entry, astring &str)
void dsp56k_device::state_string_export(const device_state_entry &entry, std::string &str)
{
dsp56k_core *cpustate = &m_dsp56k_core;
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%s%s %s%s%s%s%s%s%s%s %s%s",
strprintf(str, "%s%s %s%s%s%s%s%s%s%s %s%s",
/* Status Register */
LF_bit(cpustate) ? "L" : ".",
FV_bit(cpustate) ? "F" : ".",
@ -384,19 +384,19 @@ void dsp56k_device::state_string_export(const device_state_entry &entry, astring
break;
case DSP56K_X:
str.printf("%04x %04x", X1, X0);
strprintf(str, "%04x %04x", X1, X0);
break;
case DSP56K_Y:
str.printf("%04x %04x", Y1, Y0);
strprintf(str, "%04x %04x", Y1, Y0);
break;
case DSP56K_A:
str.printf("%02x %04x %04x", A2, A1, A0);
strprintf(str, "%02x %04x %04x", A2, A1, A0);
break;
case DSP56K_B:
str.printf("%02x %04x %04x", B2, B1, B0);
strprintf(str, "%02x %04x %04x", B2, B1, B0);
break;
}
}

View File

@ -232,7 +232,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL ); }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@ Opcode::~Opcode()
}
astring Opcode::disassemble() const
std::string Opcode::disassemble() const
{
// Duck out early if there isn't a valid op
if (!m_instruction)
@ -29,8 +29,8 @@ astring Opcode::disassemble() const
return dcString();
// Disassemble what you can.
astring opString = "";
astring pmString = "";
std::string opString = "";
std::string pmString = "";
if (m_instruction) m_instruction->disassemble(opString);
if (m_parallelMove) m_parallelMove->disassemble(pmString);
@ -68,11 +68,11 @@ const reg_id& Opcode::instSource() const { return m_instruction->source(); }
const reg_id& Opcode::instDestination() const { return m_instruction->destination(); }
const size_t Opcode::instAccumulatorBitsModified() const { return m_instruction->accumulatorBitsModified(); }
astring Opcode::dcString() const
std::string Opcode::dcString() const
{
char tempStr[1024];
sprintf(tempStr, "dc $%x", m_word0);
return astring(tempStr);
return std::string(tempStr);
}
}

View File

@ -21,7 +21,7 @@ public:
Opcode(UINT16 w0, UINT16 w1);
virtual ~Opcode();
astring disassemble() const;
std::string disassemble() const;
void evaluate(dsp56k_core* cpustate) const;
size_t size() const;
size_t evalSize() const;
@ -38,7 +38,7 @@ private:
UINT16 m_word0;
//UINT16 m_word1;
astring dcString() const;
std::string dcString() const;
};
}

View File

@ -19,7 +19,7 @@ public:
virtual ~ParallelMove() {}
virtual bool decode(const UINT16 word0, const UINT16 word1) = 0;
virtual void disassemble(astring& retString) const = 0;
virtual void disassemble(std::string& retString) const = 0;
virtual void evaluate() = 0;
static ParallelMove* decodeParallelMove(const Opcode* opc, const UINT16 word0, const UINT16 word1);
@ -57,7 +57,7 @@ public:
reg_id SD;
decode_HHH_table(BITSn(word0,0x0e00), SD);
astring ea;
std::string ea;
assemble_ea_from_m_table(BITSn(word0,0x4000), regIDAsNum(r), ea);
assemble_arguments_from_W_table(BITSn(word0,0x0100), 'X', SD, ea,
@ -69,15 +69,15 @@ public:
return true;
}
void disassemble(astring& retString) const
void disassemble(std::string& retString) const
{
retString = m_source + "," + m_destination;
}
void evaluate() {}
private:
astring m_source;
astring m_destination;
std::string m_source;
std::string m_destination;
};
@ -91,7 +91,7 @@ public:
}
bool decode(const UINT16 word0, const UINT16 word1)
{
astring ea;
std::string ea;
if (opDestination() == iB)
ea = "(A1)";
else if (opDestination() == iA)
@ -111,15 +111,15 @@ public:
return true;
}
void disassemble(astring& retString) const
void disassemble(std::string& retString) const
{
retString = m_source + "," + m_destination;
}
void evaluate() {}
private:
astring m_source;
astring m_destination;
std::string m_source;
std::string m_destination;
};
@ -136,8 +136,8 @@ public:
reg_id r;
reg_id D1;
reg_id D2;
astring ea1 = "";
astring ea2 = "";
std::string ea1 = "";
std::string ea2 = "";
decode_rr_table(BITSn(word0,0x0060), r);
decode_KKK_table(BITSn(word0,0x0700), D1, D2);
@ -165,15 +165,15 @@ public:
return true;
}
void disassemble(astring& retString) const
void disassemble(std::string& retString) const
{
retString = parallelMove + " " + parallelMove2;
}
void evaluate() {}
private:
astring parallelMove;
astring parallelMove2;
std::string parallelMove;
std::string parallelMove2;
};
@ -212,7 +212,7 @@ public:
return true;
}
void disassemble(astring& retString) const
void disassemble(std::string& retString) const
{
// (?,?) is a parallel nop
if (m_source == iWEIRD && m_destination == iWEIRD)
@ -259,15 +259,15 @@ public:
pms2 = parallel_move_str2;
return true;
}
void disassemble(astring& retString) const
void disassemble(std::string& retString) const
{
retString = pms + " " + pms2;
}
void evaluate() {}
private:
astring pms; // TODO
astring pms2;
std::string pms; // TODO
std::string pms2;
};
@ -288,14 +288,14 @@ public:
return true;
}
void disassemble(astring& retString) const
void disassemble(std::string& retString) const
{
retString = m_ea;
}
void evaluate() {}
private:
astring m_ea;
std::string m_ea;
};
@ -313,7 +313,7 @@ public:
{
INT8 b;
reg_id SD;
astring args;
std::string args;
b = (char)(word0 & 0x00ff);
decode_HHH_table(BITSn(word1,0x0e00), SD);
@ -321,15 +321,15 @@ public:
return true;
}
void disassemble(astring& retString) const
void disassemble(std::string& retString) const
{
retString = m_source + "," + m_destination;
}
void evaluate() {}
private:
astring m_source;
astring m_destination;
std::string m_source;
std::string m_destination;
};
}

View File

@ -283,7 +283,7 @@ void decode_JF_table(const UINT16 J, const UINT16 F, reg_id& S, reg_id& D)
// NEW // }
// NEW // }
void decode_kSign_table(const UINT16 k, astring& plusMinus)
void decode_kSign_table(const UINT16 k, std::string& plusMinus)
{
switch(k)
{
@ -431,7 +431,7 @@ void decode_ss_table(const UINT16 ss, op_mnem& arithmetic)
}
}
void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, astring& arg, reg_id& S, reg_id& D)
void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, std::string& arg, reg_id& S, reg_id& D)
{
const UINT16 switchVal = (uuuu << 1) | F;
@ -473,7 +473,7 @@ void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, astring& arg, reg_id&
}
}
void decode_Z_table(const UINT16 Z, astring& ea)
void decode_Z_table(const UINT16 Z, std::string& ea)
{
/* This is fixed as per the Family Manual errata addendum */
switch(Z)
@ -483,7 +483,7 @@ void decode_Z_table(const UINT16 Z, astring& ea)
}
}
void assemble_ea_from_m_table(const UINT16 m, const int n, astring& ea)
void assemble_ea_from_m_table(const UINT16 m, const int n, std::string& ea)
{
char temp[32];
switch(m)
@ -494,7 +494,7 @@ void assemble_ea_from_m_table(const UINT16 m, const int n, astring& ea)
ea = temp;
}
void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, astring& ea1, astring& ea2)
void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, std::string& ea1, std::string& ea2)
{
char temp1[32];
char temp2[32];
@ -513,7 +513,7 @@ void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, astring& ea1, astring
ea2 = temp2;
}
void assemble_ea_from_MM_table(UINT16 MM, int n, astring& ea)
void assemble_ea_from_MM_table(UINT16 MM, int n, std::string& ea)
{
char temp[32];
switch(MM)
@ -526,7 +526,7 @@ void assemble_ea_from_MM_table(UINT16 MM, int n, astring& ea)
ea = temp;
}
void assemble_ea_from_q_table(UINT16 q, int n, astring& ea)
void assemble_ea_from_q_table(UINT16 q, int n, std::string& ea)
{
char temp[32];
switch(q)
@ -537,7 +537,7 @@ void assemble_ea_from_q_table(UINT16 q, int n, astring& ea)
ea = temp;
}
void assemble_ea_from_t_table(UINT16 t, UINT16 val, astring& ea)
void assemble_ea_from_t_table(UINT16 t, UINT16 val, std::string& ea)
{
char temp[32];
switch(t)
@ -550,7 +550,7 @@ void assemble_ea_from_t_table(UINT16 t, UINT16 val, astring& ea)
ea = temp;
}
void assemble_ea_from_z_table(UINT16 z, int n, astring& ea)
void assemble_ea_from_z_table(UINT16 z, int n, std::string& ea)
{
char temp[32];
switch(z)
@ -561,10 +561,10 @@ void assemble_ea_from_z_table(UINT16 z, int n, astring& ea)
ea = temp;
}
void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, astring& D)
void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, std::string& D)
{
char temp[32];
astring fullAddy; /* Convert Short Absolute Address to full 16-bit */
std::string fullAddy; /* Convert Short Absolute Address to full 16-bit */
switch(P)
{
@ -581,8 +581,8 @@ void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, astring& D)
D = temp;
}
void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const astring& ea,
astring& source, astring& destination)
void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const std::string& ea,
std::string& source, std::string& destination)
{
char temp[32];
sprintf(temp, "%c:%s", ma, ea.c_str());
@ -593,8 +593,8 @@ void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const
}
}
void assemble_arguments_from_W_table(UINT16 W, char ma, const astring& SD, const astring& ea,
astring& source, astring& destination)
void assemble_arguments_from_W_table(UINT16 W, char ma, const std::string& SD, const std::string& ea,
std::string& source, std::string& destination)
{
char temp[32];
sprintf(temp, "%c:%s", ma, ea.c_str());
@ -605,7 +605,7 @@ void assemble_arguments_from_W_table(UINT16 W, char ma, const astring& SD, const
}
}
void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 xx, astring& S, astring& D)
void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 xx, std::string& S, std::string& D)
{
UINT8 abs_xx;
char temp[32];
@ -627,7 +627,7 @@ void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 x
}
}
void assemble_address_from_IO_short_address(UINT16 pp, astring& ea)
void assemble_address_from_IO_short_address(UINT16 pp, std::string& ea)
{
char temp[32];
@ -751,7 +751,7 @@ void setReg16(dsp56k_core* cpustate, const UINT16& value, const reg_id& reg)
if (reg == iM3) M3 = value;
}
astring regIdAsString(const reg_id& regId)
std::string regIdAsString(const reg_id& regId)
{
switch(regId)
{
@ -799,7 +799,7 @@ astring regIdAsString(const reg_id& regId)
return "INVALID_REG_ID";
}
astring opMnemonicAsString(const op_mnem& mnem)
std::string opMnemonicAsString(const op_mnem& mnem)
{
switch(mnem)
{
@ -829,47 +829,47 @@ astring opMnemonicAsString(const op_mnem& mnem)
return "INVALID_OPCODE_MNEMONIC";
}
reg_id stringAsRegID(const astring& str)
reg_id stringAsRegID(const std::string& str)
{
if (str.cmp("X")==0) return iX;
if (str.cmp("X0") == 0) return iX0;
if (str.cmp("X1") == 0) return iX1;
if (str.cmp("Y") == 0) return iY;
if (str.cmp("Y0") == 0) return iY0;
if (str.cmp("Y1") == 0) return iY1;
if (str.cmp("A") == 0) return iA;
if (str.cmp("A0") == 0) return iA0;
if (str.cmp("A1") == 0) return iA1;
if (str.cmp("A2") == 0) return iA2;
if (str.cmp("B") == 0) return iB;
if (str.cmp("B0") == 0) return iB0;
if (str.cmp("B1") == 0) return iB1;
if (str.cmp("B2") == 0) return iB2;
if (str.cmp("R0") == 0) return iR0;
if (str.cmp("R1") == 0) return iR1;
if (str.cmp("R2") == 0) return iR2;
if (str.cmp("R3") == 0) return iR3;
if (str.cmp("N0") == 0) return iN0;
if (str.cmp("N1") == 0) return iN1;
if (str.cmp("N2") == 0) return iN2;
if (str.cmp("N3") == 0) return iN3;
if (str.cmp("M0") == 0) return iM0;
if (str.cmp("M1") == 0) return iM1;
if (str.cmp("M2") == 0) return iM2;
if (str.cmp("M3") == 0) return iM3;
if (str.cmp("LC") == 0) return iLC;
if (str.cmp("SR") == 0) return iSR;
if (str.cmp("OMR") == 0) return iOMR;
if (str.cmp("SP") == 0) return iSP;
if (str.cmp("SSH") == 0) return iSSH;
if (str.cmp("SSL") == 0) return iSSL;
if (str.cmp("LA") == 0) return iLA;
if (str.cmp("MR") == 0) return iMR;
if (str.cmp("CCR") == 0) return iCCR;
if (str.cmp("F") == 0) return iF;
if (str.cmp("^F") == 0) return iFHAT;
if (str.cmp("!!") == 0) return iINVALID;
if (str.cmp("?") == 0)return iWEIRD;
if (str.compare("X")==0) return iX;
if (str.compare("X0") == 0) return iX0;
if (str.compare("X1") == 0) return iX1;
if (str.compare("Y") == 0) return iY;
if (str.compare("Y0") == 0) return iY0;
if (str.compare("Y1") == 0) return iY1;
if (str.compare("A") == 0) return iA;
if (str.compare("A0") == 0) return iA0;
if (str.compare("A1") == 0) return iA1;
if (str.compare("A2") == 0) return iA2;
if (str.compare("B") == 0) return iB;
if (str.compare("B0") == 0) return iB0;
if (str.compare("B1") == 0) return iB1;
if (str.compare("B2") == 0) return iB2;
if (str.compare("R0") == 0) return iR0;
if (str.compare("R1") == 0) return iR1;
if (str.compare("R2") == 0) return iR2;
if (str.compare("R3") == 0) return iR3;
if (str.compare("N0") == 0) return iN0;
if (str.compare("N1") == 0) return iN1;
if (str.compare("N2") == 0) return iN2;
if (str.compare("N3") == 0) return iN3;
if (str.compare("M0") == 0) return iM0;
if (str.compare("M1") == 0) return iM1;
if (str.compare("M2") == 0) return iM2;
if (str.compare("M3") == 0) return iM3;
if (str.compare("LC") == 0) return iLC;
if (str.compare("SR") == 0) return iSR;
if (str.compare("OMR") == 0) return iOMR;
if (str.compare("SP") == 0) return iSP;
if (str.compare("SSH") == 0) return iSSH;
if (str.compare("SSL") == 0) return iSSL;
if (str.compare("LA") == 0) return iLA;
if (str.compare("MR") == 0) return iMR;
if (str.compare("CCR") == 0) return iCCR;
if (str.compare("F") == 0) return iF;
if (str.compare("^F") == 0) return iFHAT;
if (str.compare("!!") == 0) return iINVALID;
if (str.compare("?") == 0)return iWEIRD;
return iINVALID;
}

View File

@ -46,7 +46,7 @@ void decode_IIIIx_table(const UINT16 IIII, const UINT16 x, reg_id& S, reg_id& D)
void decode_JJJF_table(const UINT16 JJJ, const UINT16 F, reg_id& S, reg_id& D);
void decode_JJF_table(const UINT16 JJ, const UINT16 F, reg_id& S, reg_id& D);
void decode_JF_table(const UINT16 J, const UINT16 F, reg_id& S, reg_id& D);
void decode_kSign_table(const UINT16 k, astring& plusMinus);
void decode_kSign_table(const UINT16 k, std::string& plusMinus);
void decode_KKK_table(const UINT16 KKK, reg_id& D1, reg_id& D2);
void decode_NN_table(UINT16 NN, reg_id& ret);
void decode_TT_table(UINT16 TT, reg_id& ret);
@ -57,20 +57,20 @@ void decode_RR_table(UINT16 RR, reg_id& ret);
void decode_rr_table(UINT16 rr, reg_id& ret);
void decode_s_table(const UINT16 s, op_mnem& arithmetic);
void decode_ss_table(const UINT16 ss, op_mnem& arithmetic);
void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, astring& arg, reg_id& S, reg_id& D);
void decode_Z_table(const UINT16 Z, astring& ea);
void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, std::string& arg, reg_id& S, reg_id& D);
void decode_Z_table(const UINT16 Z, std::string& ea);
void assemble_ea_from_m_table(const UINT16 m, const int n, astring& ea);
void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, astring& ea1, astring& ea2);
void assemble_ea_from_MM_table(UINT16 MM, int n, astring& ea);
void assemble_ea_from_q_table(UINT16 q, int n, astring& ea);
void assemble_ea_from_t_table(UINT16 t, UINT16 val, astring& ea);
void assemble_ea_from_z_table(UINT16 z, int n, astring& ea);
void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, astring& D);
void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const astring& ea, astring& S, astring& D);
void assemble_arguments_from_W_table(UINT16 W, char ma, const astring& SD, const astring& ea, astring& S, astring& D);
void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 xx, astring& S, astring& D);
void assemble_address_from_IO_short_address(UINT16 pp, astring& ea);
void assemble_ea_from_m_table(const UINT16 m, const int n, std::string& ea);
void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, std::string& ea1, std::string& ea2);
void assemble_ea_from_MM_table(UINT16 MM, int n, std::string& ea);
void assemble_ea_from_q_table(UINT16 q, int n, std::string& ea);
void assemble_ea_from_t_table(UINT16 t, UINT16 val, std::string& ea);
void assemble_ea_from_z_table(UINT16 z, int n, std::string& ea);
void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, std::string& D);
void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const std::string& ea, std::string& S, std::string& D);
void assemble_arguments_from_W_table(UINT16 W, char ma, const std::string& SD, const std::string& ea, std::string& S, std::string& D);
void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 xx, std::string& S, std::string& D);
void assemble_address_from_IO_short_address(UINT16 pp, std::string& ea);
INT8 get_6_bit_signed_value(UINT16 bits);
@ -82,9 +82,9 @@ bool registerOverlap(const reg_id& r0, const size_t bmd, const reg_id& r1);
UINT16 regValue16(dsp56k_core* cpustate, const reg_id& reg);
void setReg16(dsp56k_core* cpustate, const UINT16& value, const reg_id& reg);
astring regIdAsString(const reg_id& regId);
astring opMnemonicAsString(const op_mnem& mnem);
reg_id stringAsRegID(const astring& str);
std::string regIdAsString(const reg_id& regId);
std::string opMnemonicAsString(const op_mnem& mnem);
reg_id stringAsRegID(const std::string& str);
UINT8 regIDAsNum(const reg_id& regId);

View File

@ -1560,7 +1560,7 @@ void hyperstone_device::init(int scale_mask)
m_clock_scale_mask = scale_mask;
// register our state for the debugger
astring tempstr;
std::string tempstr;
state_add(STATE_GENPC, "GENPC", m_global_regs[0]).noshow();
state_add(STATE_GENFLAGS, "GENFLAGS", m_global_regs[1]).callimport().callexport().formatstr("%40s").noshow();
state_add(E132XS_PC, "PC", m_global_regs[0]).mask(0xffffffff);
@ -1847,12 +1847,12 @@ 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, astring &str)
void hyperstone_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c%c%c%c%c FTE:%X FRM:%X ILC:%d FL:%d FP:%d",
strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c FTE:%X FRM:%X ILC:%d FL:%d FP:%d",
GET_S ? 'S':'.',
GET_P ? 'P':'.',
GET_T ? 'T':'.',

View File

@ -241,7 +241,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// address spaces
const address_space_config m_program_config;

View File

@ -191,7 +191,7 @@ void esrip_device::device_start()
m_direct = &m_program->direct();
// register our state for the debugger
astring tempstr;
std::string tempstr;
state_add(STATE_GENPC, "GENPC", m_rip_pc).noshow();
state_add(STATE_GENFLAGS, "GENFLAGS", m_status).callimport().callexport().formatstr("%8s").noshow();
state_add(ESRIP_PC, "PC:", m_rip_pc).mask(0xffff);
@ -349,12 +349,12 @@ 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, astring &str)
void esrip_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c%c",
(m_status & 0x80) ? '3' : '.',
(m_status & 0x40) ? '2' : '.',
(m_status & 0x20) ? '1' : '.',

View File

@ -150,7 +150,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// address spaces
const address_space_config m_program_config;

View File

@ -2057,12 +2057,12 @@ void f8_cpu_device::device_start()
}
void f8_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void f8_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c",
m_w & 0x10 ? 'I':'.',
m_w & 0x08 ? 'O':'.',
m_w & 0x04 ? 'Z':'.',

View File

@ -63,7 +63,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }

View File

@ -955,12 +955,12 @@ void g65816_device::state_export(const device_state_entry &entry)
}
}
void g65816_device::state_string_export(const device_state_entry &entry, astring &str)
void g65816_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c",
m_flag_n & NFLAG_SET ? 'N':'.',
m_flag_v & VFLAG_SET ? 'V':'.',
m_flag_m & MFLAG_SET ? 'M':'.',

View File

@ -85,7 +85,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }

View File

@ -2189,12 +2189,12 @@ 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, astring &str)
void h6280_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c",
(m_p & 0x80) ? 'N':'.',
(m_p & 0x40) ? 'V':'.',
(m_p & 0x20) ? 'R':'.',

View File

@ -96,7 +96,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// opcode accessors
UINT8 program_read8(offs_t addr);

View File

@ -243,12 +243,12 @@ void h8_device::state_export(const device_state_entry &entry)
{
}
void h8_device::state_string_export(const device_state_entry &entry, astring &str)
void h8_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch(entry.index()) {
case STATE_GENFLAGS:
if(has_exr)
str.printf("%c%c %c%c%c%c%c%c%c%c",
strprintf(str, "%c%c %c%c%c%c%c%c%c%c",
(EXR & EXR_T) ? 'T' : '-',
'0' + (EXR & EXR_I),
(CCR & F_I) ? 'I' : '-',
@ -260,7 +260,7 @@ void h8_device::state_string_export(const device_state_entry &entry, astring &st
(CCR & F_V) ? 'V' : '-',
(CCR & F_C) ? 'C' : '-');
else
str.printf("%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c",
(CCR & F_I) ? 'I' : '-',
(CCR & F_UI) ? 'u' : '-',
(CCR & F_H) ? 'H' : '-',
@ -279,7 +279,7 @@ void h8_device::state_string_export(const device_state_entry &entry, astring &st
case H8_R6:
case H8_R7: {
int r = entry.index() - H8_R0;
str.printf("%04x %04x", R[r + 8], R[r]);
strprintf(str, "%04x %04x", R[r + 8], R[r]);
break;
}
}

View File

@ -185,7 +185,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const;

View File

@ -361,16 +361,16 @@ void hcd62121_cpu_device::device_start()
}
void hcd62121_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void hcd62121_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENPC:
str.printf("%06X", (m_cseg << 16) | m_ip);
strprintf(str, "%06X", (m_cseg << 16) | m_ip);
break;
case STATE_GENFLAGS:
str.printf("%s-%s-%s-%c-%c",
strprintf(str, "%s-%s-%s-%c-%c",
m_f & _FLAG_ZH ? "ZH":"__",
m_f & _FLAG_CL ? "CL":"__",
m_f & _FLAG_ZL ? "ZL":"__",
@ -381,100 +381,100 @@ void hcd62121_cpu_device::state_string_export(const device_state_entry &entry, a
break;
case HCD62121_R00:
str.printf("%02X%02X%02X%02X", m_reg[0x00], m_reg[0x01], m_reg[0x02], m_reg[0x03]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x00], m_reg[0x01], m_reg[0x02], m_reg[0x03]);
break;
case HCD62121_R04:
str.printf("%02X%02X%02X%02X", m_reg[0x04], m_reg[0x05], m_reg[0x06], m_reg[0x07]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x04], m_reg[0x05], m_reg[0x06], m_reg[0x07]);
break;
case HCD62121_R08:
str.printf("%02X%02X%02X%02X", m_reg[0x08], m_reg[0x09], m_reg[0x0A], m_reg[0x0B]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x08], m_reg[0x09], m_reg[0x0A], m_reg[0x0B]);
break;
case HCD62121_R0C:
str.printf("%02X%02X%02X%02X", m_reg[0x0C], m_reg[0x0D], m_reg[0x0E], m_reg[0x0F]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x0C], m_reg[0x0D], m_reg[0x0E], m_reg[0x0F]);
break;
case HCD62121_R10:
str.printf("%02X%02X%02X%02X", m_reg[0x10], m_reg[0x11], m_reg[0x12], m_reg[0x13]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x10], m_reg[0x11], m_reg[0x12], m_reg[0x13]);
break;
case HCD62121_R14:
str.printf("%02X%02X%02X%02X", m_reg[0x14], m_reg[0x15], m_reg[0x16], m_reg[0x17]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x14], m_reg[0x15], m_reg[0x16], m_reg[0x17]);
break;
case HCD62121_R18:
str.printf("%02X%02X%02X%02X", m_reg[0x18], m_reg[0x19], m_reg[0x1A], m_reg[0x1B]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x18], m_reg[0x19], m_reg[0x1A], m_reg[0x1B]);
break;
case HCD62121_R1C:
str.printf("%02X%02X%02X%02X", m_reg[0x1C], m_reg[0x1D], m_reg[0x1E], m_reg[0x1F]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x1C], m_reg[0x1D], m_reg[0x1E], m_reg[0x1F]);
break;
case HCD62121_R20:
str.printf("%02X%02X%02X%02X", m_reg[0x20], m_reg[0x21], m_reg[0x22], m_reg[0x23]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x20], m_reg[0x21], m_reg[0x22], m_reg[0x23]);
break;
case HCD62121_R24:
str.printf("%02X%02X%02X%02X", m_reg[0x24], m_reg[0x25], m_reg[0x26], m_reg[0x27]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x24], m_reg[0x25], m_reg[0x26], m_reg[0x27]);
break;
case HCD62121_R28:
str.printf("%02X%02X%02X%02X", m_reg[0x28], m_reg[0x29], m_reg[0x2A], m_reg[0x2B]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x28], m_reg[0x29], m_reg[0x2A], m_reg[0x2B]);
break;
case HCD62121_R2C:
str.printf("%02X%02X%02X%02X", m_reg[0x2C], m_reg[0x2D], m_reg[0x2E], m_reg[0x2F]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x2C], m_reg[0x2D], m_reg[0x2E], m_reg[0x2F]);
break;
case HCD62121_R30:
str.printf("%02X%02X%02X%02X", m_reg[0x30], m_reg[0x31], m_reg[0x32], m_reg[0x33]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x30], m_reg[0x31], m_reg[0x32], m_reg[0x33]);
break;
case HCD62121_R34:
str.printf("%02X%02X%02X%02X", m_reg[0x34], m_reg[0x35], m_reg[0x36], m_reg[0x37]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x34], m_reg[0x35], m_reg[0x36], m_reg[0x37]);
break;
case HCD62121_R38:
str.printf("%02X%02X%02X%02X", m_reg[0x38], m_reg[0x39], m_reg[0x3A], m_reg[0x3B]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x38], m_reg[0x39], m_reg[0x3A], m_reg[0x3B]);
break;
case HCD62121_R3C:
str.printf("%02X%02X%02X%02X", m_reg[0x3C], m_reg[0x3D], m_reg[0x3E], m_reg[0x3F]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x3C], m_reg[0x3D], m_reg[0x3E], m_reg[0x3F]);
break;
case HCD62121_R40:
str.printf("%02X%02X%02X%02X", m_reg[0x40], m_reg[0x41], m_reg[0x42], m_reg[0x43]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x40], m_reg[0x41], m_reg[0x42], m_reg[0x43]);
break;
case HCD62121_R44:
str.printf("%02X%02X%02X%02X", m_reg[0x44], m_reg[0x45], m_reg[0x46], m_reg[0x47]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x44], m_reg[0x45], m_reg[0x46], m_reg[0x47]);
break;
case HCD62121_R48:
str.printf("%02X%02X%02X%02X", m_reg[0x48], m_reg[0x49], m_reg[0x4A], m_reg[0x4B]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x48], m_reg[0x49], m_reg[0x4A], m_reg[0x4B]);
break;
case HCD62121_R4C:
str.printf("%02X%02X%02X%02X", m_reg[0x4C], m_reg[0x4D], m_reg[0x4E], m_reg[0x4F]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x4C], m_reg[0x4D], m_reg[0x4E], m_reg[0x4F]);
break;
case HCD62121_R50:
str.printf("%02X%02X%02X%02X", m_reg[0x50], m_reg[0x51], m_reg[0x52], m_reg[0x53]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x50], m_reg[0x51], m_reg[0x52], m_reg[0x53]);
break;
case HCD62121_R54:
str.printf("%02X%02X%02X%02X", m_reg[0x54], m_reg[0x55], m_reg[0x56], m_reg[0x57]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x54], m_reg[0x55], m_reg[0x56], m_reg[0x57]);
break;
case HCD62121_R58:
str.printf("%02X%02X%02X%02X", m_reg[0x58], m_reg[0x59], m_reg[0x5A], m_reg[0x5B]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x58], m_reg[0x59], m_reg[0x5A], m_reg[0x5B]);
break;
case HCD62121_R5C:
str.printf("%02X%02X%02X%02X", m_reg[0x5C], m_reg[0x5D], m_reg[0x5E], m_reg[0x5F]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x5C], m_reg[0x5D], m_reg[0x5E], m_reg[0x5F]);
break;
case HCD62121_R60:
str.printf("%02X%02X%02X%02X", m_reg[0x60], m_reg[0x61], m_reg[0x62], m_reg[0x63]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x60], m_reg[0x61], m_reg[0x62], m_reg[0x63]);
break;
case HCD62121_R64:
str.printf("%02X%02X%02X%02X", m_reg[0x64], m_reg[0x65], m_reg[0x66], m_reg[0x67]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x64], m_reg[0x65], m_reg[0x66], m_reg[0x67]);
break;
case HCD62121_R68:
str.printf("%02X%02X%02X%02X", m_reg[0x68], m_reg[0x69], m_reg[0x6A], m_reg[0x6B]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x68], m_reg[0x69], m_reg[0x6A], m_reg[0x6B]);
break;
case HCD62121_R6C:
str.printf("%02X%02X%02X%02X", m_reg[0x6C], m_reg[0x6D], m_reg[0x6E], m_reg[0x6F]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x6C], m_reg[0x6D], m_reg[0x6E], m_reg[0x6F]);
break;
case HCD62121_R70:
str.printf("%02X%02X%02X%02X", m_reg[0x70], m_reg[0x71], m_reg[0x72], m_reg[0x73]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x70], m_reg[0x71], m_reg[0x72], m_reg[0x73]);
break;
case HCD62121_R74:
str.printf("%02X%02X%02X%02X", m_reg[0x74], m_reg[0x75], m_reg[0x76], m_reg[0x77]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x74], m_reg[0x75], m_reg[0x76], m_reg[0x77]);
break;
case HCD62121_R78:
str.printf("%02X%02X%02X%02X", m_reg[0x78], m_reg[0x79], m_reg[0x7A], m_reg[0x7B]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x78], m_reg[0x79], m_reg[0x7A], m_reg[0x7B]);
break;
case HCD62121_R7C:
str.printf("%02X%02X%02X%02X", m_reg[0x7C], m_reg[0x7D], m_reg[0x7E], m_reg[0x7F]);
strprintf(str, "%02X%02X%02X%02X", m_reg[0x7C], m_reg[0x7D], m_reg[0x7E], m_reg[0x7F]);
break;
}
}

View File

@ -52,7 +52,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }

View File

@ -183,8 +183,8 @@ void hd61700_cpu_device::device_start()
for (int ireg=0; ireg<32; ireg++)
{
astring tmpstr;
state_add(HD61700_MAINREG + ireg, tmpstr.format("R%d", ireg).c_str(), m_regmain[ireg]).callimport().callexport().formatstr("%02X");
std::string tmpstr;
state_add(HD61700_MAINREG + ireg, strformat(tmpstr, "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,12 +271,12 @@ 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, astring &str)
void hd61700_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c",
m_flags & FLAG_Z ? '.' : 'Z',
m_flags & FLAG_C ? 'C' : '.',
m_flags & FLAG_LZ ? '.' : 'L',

View File

@ -92,7 +92,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }

View File

@ -144,12 +144,12 @@ 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, astring &str)
void hmcs40_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c",
strprintf(str, "%c%c",
m_c ? 'C':'c',
m_s ? 'S':'s'
);

View File

@ -159,7 +159,7 @@ protected:
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }
virtual UINT32 disasm_max_opcode_bytes() const { return 2; }
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
address_space_config m_program_config;
address_space_config m_data_config;

View File

@ -3468,60 +3468,60 @@ void i386_device::state_export(const device_state_entry &entry)
}
}
void i386_device::state_string_export(const device_state_entry &entry, astring &str)
void i386_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%08X", get_flags());
strprintf(str, "%08X", get_flags());
break;
case X87_ST0:
str.printf("%f", fx80_to_double(ST(0)));
strprintf(str, "%f", fx80_to_double(ST(0)));
break;
case X87_ST1:
str.printf("%f", fx80_to_double(ST(1)));
strprintf(str, "%f", fx80_to_double(ST(1)));
break;
case X87_ST2:
str.printf("%f", fx80_to_double(ST(2)));
strprintf(str, "%f", fx80_to_double(ST(2)));
break;
case X87_ST3:
str.printf("%f", fx80_to_double(ST(3)));
strprintf(str, "%f", fx80_to_double(ST(3)));
break;
case X87_ST4:
str.printf("%f", fx80_to_double(ST(4)));
strprintf(str, "%f", fx80_to_double(ST(4)));
break;
case X87_ST5:
str.printf("%f", fx80_to_double(ST(5)));
strprintf(str, "%f", fx80_to_double(ST(5)));
break;
case X87_ST6:
str.printf("%f", fx80_to_double(ST(6)));
strprintf(str, "%f", fx80_to_double(ST(6)));
break;
case X87_ST7:
str.printf("%f", fx80_to_double(ST(7)));
strprintf(str, "%f", fx80_to_double(ST(7)));
break;
case SSE_XMM0:
str.printf("%08x%08x%08x%08x", XMM(0).d[3], XMM(0).d[2], XMM(0).d[1], XMM(0).d[0]);
strprintf(str, "%08x%08x%08x%08x", XMM(0).d[3], XMM(0).d[2], XMM(0).d[1], XMM(0).d[0]);
break;
case SSE_XMM1:
str.printf("%08x%08x%08x%08x", XMM(1).d[3], XMM(1).d[2], XMM(1).d[1], XMM(1).d[0]);
strprintf(str, "%08x%08x%08x%08x", XMM(1).d[3], XMM(1).d[2], XMM(1).d[1], XMM(1).d[0]);
break;
case SSE_XMM2:
str.printf("%08x%08x%08x%08x", XMM(2).d[3], XMM(2).d[2], XMM(2).d[1], XMM(2).d[0]);
strprintf(str, "%08x%08x%08x%08x", XMM(2).d[3], XMM(2).d[2], XMM(2).d[1], XMM(2).d[0]);
break;
case SSE_XMM3:
str.printf("%08x%08x%08x%08x", XMM(3).d[3], XMM(3).d[2], XMM(3).d[1], XMM(3).d[0]);
strprintf(str, "%08x%08x%08x%08x", XMM(3).d[3], XMM(3).d[2], XMM(3).d[1], XMM(3).d[0]);
break;
case SSE_XMM4:
str.printf("%08x%08x%08x%08x", XMM(4).d[3], XMM(4).d[2], XMM(4).d[1], XMM(4).d[0]);
strprintf(str, "%08x%08x%08x%08x", XMM(4).d[3], XMM(4).d[2], XMM(4).d[1], XMM(4).d[0]);
break;
case SSE_XMM5:
str.printf("%08x%08x%08x%08x", XMM(5).d[3], XMM(5).d[2], XMM(5).d[1], XMM(5).d[0]);
strprintf(str, "%08x%08x%08x%08x", XMM(5).d[3], XMM(5).d[2], XMM(5).d[1], XMM(5).d[0]);
break;
case SSE_XMM6:
str.printf("%08x%08x%08x%08x", XMM(6).d[3], XMM(6).d[2], XMM(6).d[1], XMM(6).d[0]);
strprintf(str, "%08x%08x%08x%08x", XMM(6).d[3], XMM(6).d[2], XMM(6).d[1], XMM(6).d[0]);
break;
case SSE_XMM7:
str.printf("%08x%08x%08x%08x", XMM(7).d[3], XMM(7).d[2], XMM(7).d[1], XMM(7).d[0]);
strprintf(str, "%08x%08x%08x%08x", XMM(7).d[3], XMM(7).d[2], XMM(7).d[1], XMM(7).d[0]);
break;
}
}

View File

@ -58,7 +58,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }

View File

@ -419,15 +419,15 @@ 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);
astring tempstr;
std::string tempstr;
for (int regnum = 0; regnum < 8; regnum++)
{
state_add(I4004_R01 + regnum, tempstr.format("R%X%X", regnum * 2, regnum * 2 + 1).c_str(), m_R[regnum]);
state_add(I4004_R01 + regnum, strformat(tempstr, "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, tempstr.format("ADDR%d", addrnum + 1).c_str(), m_ADDR[addrnum].w.l).mask(0xfff);
state_add(I4004_ADDR1 + addrnum, strformat(tempstr, "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,12 +507,12 @@ void i4004_cpu_device::state_export(const device_state_entry &entry)
}
}
void i4004_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void i4004_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf(".%c%c%c",
strprintf(str, ".%c%c%c",
(m_A==0) ? 'Z':'.',
m_C ? 'C':'.',
m_TEST ? 'T':'.');

View File

@ -57,7 +57,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }

View File

@ -92,9 +92,9 @@ void i8008_device::device_start()
state_add(I8008_H, "H", m_H);
state_add(I8008_L, "L", m_L);
astring tempstr;
std::string tempstr;
for (int addrnum = 0; addrnum < 8; addrnum++)
state_add(I8008_ADDR1 + addrnum, tempstr.format("ADDR%d", addrnum + 1).c_str(), m_ADDR[addrnum].w.l).mask(0xfff);
state_add(I8008_ADDR1 + addrnum, strformat(tempstr, "ADDR%d", addrnum + 1).c_str(), m_ADDR[addrnum].w.l).mask(0xfff);
init_tables();
}
@ -187,12 +187,12 @@ void i8008_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
void i8008_device::state_string_export(const device_state_entry &entry, astring &str)
void i8008_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c",
strprintf(str, "%c%c%c%c",
m_CF ? 'C':'.',
m_ZF ? 'Z':'.',
m_SF ? 'S':'.',

View File

@ -48,7 +48,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides

View File

@ -1081,12 +1081,12 @@ void i8085a_cpu_device::state_export(const device_state_entry &entry)
}
}
void i8085a_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void i8085a_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c",
m_AF.b.l & 0x80 ? 'S':'.',
m_AF.b.l & 0x40 ? 'Z':'.',
m_AF.b.l & 0x20 ? 'X':'.', // X5

View File

@ -82,7 +82,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
void state_export(const device_state_entry &entry);
void state_import(const device_state_entry &entry);

View File

@ -159,7 +159,7 @@ 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, astring &str)
void i8089_device::state_string_export(const device_state_entry &entry, std::string &str)
{
i8089_channel *ch = m_ch1;
@ -169,30 +169,30 @@ void i8089_device::state_string_export(const device_state_entry &entry, astring
switch (entry.index())
{
case SYSBUS:
str.printf("%c", sysbus_width() ? 'W' : '.');
strprintf(str, "%c", sysbus_width() ? 'W' : '.');
break;
case SOC:
str.printf("%c%c", remotebus_width() ? 'I' : '.', request_grant() ? 'R' : '.');
strprintf(str, "%c%c", remotebus_width() ? 'I' : '.', request_grant() ? 'R' : '.');
break;
case CH1_GA:
case CH2_GA:
str.printf("%d %05X", ch->m_r[i8089_channel::GA].t & 1, ch->m_r[i8089_channel::GA].w);
strprintf(str, "%d %05X", ch->m_r[i8089_channel::GA].t & 1, ch->m_r[i8089_channel::GA].w);
break;
case CH1_GB:
case CH2_GB:
str.printf("%d %05X", ch->m_r[i8089_channel::GB].t & 1, ch->m_r[i8089_channel::GB].w);
strprintf(str, "%d %05X", ch->m_r[i8089_channel::GB].t & 1, ch->m_r[i8089_channel::GB].w);
break;
case CH1_GC:
case CH2_GC:
str.printf("%d %05X", ch->m_r[i8089_channel::GC].t & 1, ch->m_r[i8089_channel::GC].w);
strprintf(str, "%d %05X", ch->m_r[i8089_channel::GC].t & 1, ch->m_r[i8089_channel::GC].w);
break;
case CH1_TP:
case CH2_TP:
str.printf("%d %05X", ch->m_r[i8089_channel::TP].t & 1, ch->m_r[i8089_channel::TP].w);
strprintf(str, "%d %05X", ch->m_r[i8089_channel::TP].t & 1, ch->m_r[i8089_channel::TP].w);
break;
case CH1_PSW:
case CH2_PSW:
str.printf("%c%s%c%s%s%s%c%c",
strprintf(str, "%c%s%c%s%s%s%c%c",
BIT(ch->m_r[i8089_channel::PSW].w, 7) ? 'P':'.',
BIT(ch->m_r[i8089_channel::PSW].w, 6) ? "XF":"..",
BIT(ch->m_r[i8089_channel::PSW].w, 5) ? 'B':'.',

View File

@ -89,7 +89,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;

View File

@ -275,18 +275,18 @@ void i80286_cpu_device::device_start()
m_out_shutdown_func.resolve_safe();
}
void i80286_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void i80286_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENPC:
str.printf("%08X", pc());
strprintf(str, "%08X", pc());
break;
case STATE_GENFLAGS:
{
UINT16 flags = CompressFlags();
str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
flags & 0x8000 ? '0':'.',
flags & 0x4000 ? 'N':'.',
flags & 0x2000 ? 'I':'.',

View File

@ -75,7 +75,7 @@ protected:
virtual void execute_run();
virtual void device_reset();
virtual void device_start();
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
virtual UINT32 execute_input_lines() const { return 1; }
virtual void execute_set_input(int inputnum, int state);
bool memory_translate(address_spacenum spacenum, int intention, offs_t &address);

View File

@ -310,18 +310,18 @@ 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, astring &str)
void i8086_common_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENPC:
str.printf("%08X", pc());
strprintf(str, "%08X", pc());
break;
case STATE_GENFLAGS:
{
UINT16 flags = CompressFlags();
str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
flags & 0x8000 ? '1':'.',
flags & 0x4000 ? '1':'.',
flags & 0x2000 ? '1':'.',

View File

@ -118,7 +118,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
virtual void interrupt(int int_num, int trap = 1);
bool common_op(UINT8 op);

View File

@ -2078,7 +2078,7 @@ void i960_cpu_device::device_start()
m_icountptr = &m_icount;
}
void i960_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void i960_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
static const char *const conditions[8] =
{
@ -2088,7 +2088,7 @@ void i960_cpu_device::state_string_export(const device_state_entry &entry, astri
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%s", conditions[m_AC & 7]);
strprintf(str, "%s", conditions[m_AC & 7]);
break;
}
}

View File

@ -93,7 +93,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 4; }

View File

@ -62,9 +62,9 @@ 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);
astring tempstring;
std::string tempstring;
for (int ireg = 0; ireg < 32; ireg++)
state_add(IE15_R0 + ireg, tempstring.format("R%d", ireg).c_str(), m_REGS[ireg]);
state_add(IE15_R0 + ireg, strformat(tempstring, "R%d", ireg).c_str(), m_REGS[ireg]);
}
//-------------------------------------------------
@ -131,12 +131,12 @@ void ie15_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
void ie15_device::state_string_export(const device_state_entry &entry, astring &str)
void ie15_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c",
strprintf(str, "%c%c%c",
m_CF ? 'C':'.',
m_ZF ? 'Z':'.',
m_RF ? 'R':'.');

View File

@ -46,7 +46,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
virtual void state_string_export(const device_state_entry &entry, astring &str);
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const;

View File

@ -403,12 +403,12 @@ void jaguar_cpu_device::device_start()
}
void jaguar_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void jaguar_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c",
FLAGS & 0x8000 ? 'D':'.',
FLAGS & 0x4000 ? 'A':'.',
FLAGS & 0x0100 ? '4':'.',

View File

@ -127,7 +127,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }

View File

@ -369,12 +369,12 @@ 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, astring &str)
void lc8670_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%s%s%s%s",
strprintf(str, "%s%s%s%s",
GET_CY ? "CY" : "..",
GET_AC ? "AC" : "..",
GET_OV ? "OV" : "..",

View File

@ -110,7 +110,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;

View File

@ -154,12 +154,12 @@ void lh5801_cpu_device::device_start()
m_icountptr = &m_icount;
}
void lh5801_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void lh5801_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c",
m_t&0x80?'1':'0',
m_t&0x40?'1':'0',
m_t&0x20?'1':'0',

View File

@ -101,7 +101,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }

View File

@ -178,16 +178,16 @@ void lr35902_cpu_device::device_start()
}
void lr35902_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void lr35902_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case LR35902_SPEED:
str.printf("%02X", 0x7E | ((m_gb_speed - 1) << 7) | m_gb_speed_change_pending);
strprintf(str, "%02X", 0x7E | ((m_gb_speed - 1) << 7) | m_gb_speed_change_pending);
break;
case STATE_GENFLAGS:
str.printf("%c%c%c%c",
strprintf(str, "%c%c%c%c",
m_F & FLAG_Z ? 'Z' : '.',
m_F & FLAG_N ? 'N' : '.',
m_F & FLAG_H ? 'H' : '.',

View File

@ -68,7 +68,7 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, astring &str);
void state_string_export(const device_state_entry &entry, std::string &str);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }

View File

@ -1134,12 +1134,12 @@ void m37710_cpu_device::state_export(const device_state_entry &entry)
}
void m37710_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
void m37710_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
str.printf("%c%c%c%c%c%c%c%c",
strprintf(str, "%c%c%c%c%c%c%c%c",
m_flag_n & NFLAG_SET ? 'N':'.',
m_flag_v & VFLAG_SET ? 'V':'.',
m_flag_m & MFLAG_SET ? 'M':'.',

Some files were not shown because too many files have changed in this diff Show More