Added #include <string> in emucore.h (sorry will do a full build)

Converted some astring to std::string (nw)
This commit is contained in:
Miodrag Milanovic 2015-04-12 19:55:13 +02:00
parent 7977b2a8f6
commit 6f9d015934
11 changed files with 27 additions and 27 deletions

View File

@ -31,6 +31,7 @@
// standard C++ includes
#include <exception>
#include <typeinfo>
#include <string>
// core system includes
#include "osdcomm.h"

View File

@ -114,7 +114,6 @@ WRITE_LINE_MEMBER(midway_ssio_device::reset_write)
READ8_MEMBER(midway_ssio_device::ioport_read)
{
static const char *const port[] = { "IP0", "IP1", "IP2", "IP3", "IP4" };
astring tempstr;
UINT8 result = ioport(port[offset])->read_safe(0xff);
if (!m_custom_input[offset].isnull())
result = (result & ~m_custom_input_mask[offset]) |

View File

@ -320,7 +320,7 @@ void isa8_cga_4enlinea_device::device_start()
}
}
// astring tempstring;
// std::string tempstring;
// m_chr_gen_base = memregion(subtag(tempstring, "gfx1"))->base();
// m_chr_gen = m_chr_gen_base + m_chr_gen_offset[1];
}

View File

@ -484,7 +484,7 @@ emu_file jaguar_state::*jaguar_nvram_fopen( UINT32 openflags)
emu_file *file;
if (image->exists())
{
astring fname(machine().system().name, PATH_SEPARATOR, image->basename_noext(), ".nv");
std::string fname(machine().system().name, PATH_SEPARATOR, image->basename_noext(), ".nv");
filerr = mame_fopen( SEARCHPATH_NVRAM, fname, openflags, &file);
return (filerr == FILERR_NONE) ? file : NULL;
}

View File

@ -642,25 +642,25 @@ MACHINE_RESET_MEMBER(mtech_state, megatech)
m_mt_bank_addr = 0;
MACHINE_RESET_CALL_MEMBER(megadriv);
astring region_tag;
std::string region_tag;
if (m_cart1)
m_cart_reg[0] = memregion(region_tag.cpy(m_cart1->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[0] = memregion(region_tag.assign(m_cart1->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
else
m_cart_reg[0] = memregion("cart");
if (m_cart2)
m_cart_reg[1] = memregion(region_tag.cpy(m_cart2->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[1] = memregion(region_tag.assign(m_cart2->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
if (m_cart3)
m_cart_reg[2] = memregion(region_tag.cpy(m_cart3->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[2] = memregion(region_tag.assign(m_cart3->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
if (m_cart4)
m_cart_reg[3] = memregion(region_tag.cpy(m_cart4->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[3] = memregion(region_tag.assign(m_cart4->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
if (m_cart5)
m_cart_reg[4] = memregion(region_tag.cpy(m_cart5->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[4] = memregion(region_tag.assign(m_cart5->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
if (m_cart6)
m_cart_reg[5] = memregion(region_tag.cpy(m_cart6->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[5] = memregion(region_tag.assign(m_cart6->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
if (m_cart7)
m_cart_reg[6] = memregion(region_tag.cpy(m_cart7->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[6] = memregion(region_tag.assign(m_cart7->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
if (m_cart8)
m_cart_reg[7] = memregion(region_tag.cpy(m_cart8->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[7] = memregion(region_tag.assign(m_cart8->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
switch_cart(0);
}

View File

@ -5891,7 +5891,7 @@ ROM_END
DRIVER_INIT_MEMBER(model2_state,genprot)
{
//astring key = parameter(":315_5881:key");
//std::string key = parameter(":315_5881:key");
m_maincpu->space(AS_PROGRAM).install_ram(0x01d80000, 0x01d8ffff);
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x01d90000, 0x01d9ffff, read32_delegate(FUNC(model2_state::model2_5881prot_r), this), write32_delegate(FUNC(model2_state::model2_5881prot_w), this));
}

View File

@ -5629,7 +5629,7 @@ static void interleave_vroms(running_machine &machine)
DRIVER_INIT_MEMBER(model3_state, genprot)
{
// astring key = parameter(":315_5881:key");
// std::string key = parameter(":315_5881:key");
m_maincpu->space(AS_PROGRAM).install_ram(0xf0180000, 0xf019ffff, 0, 0x0e000000);

View File

@ -1237,17 +1237,17 @@ MACHINE_RESET_MEMBER(stv_state,stv)
m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
m_scudsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
astring region_tag;
std::string region_tag;
if (m_cart1)
m_cart_reg[0] = memregion(region_tag.cpy(m_cart1->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[0] = memregion(region_tag.assign(m_cart1->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
else
m_cart_reg[0] = memregion("cart");
if (m_cart2)
m_cart_reg[1] = memregion(region_tag.cpy(m_cart2->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[1] = memregion(region_tag.assign(m_cart2->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
if (m_cart3)
m_cart_reg[2] = memregion(region_tag.cpy(m_cart3->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[2] = memregion(region_tag.assign(m_cart3->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
if (m_cart4)
m_cart_reg[3] = memregion(region_tag.cpy(m_cart4->tag()).cat(GENERIC_ROM_REGION_TAG).c_str());
m_cart_reg[3] = memregion(region_tag.assign(m_cart4->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
m_en_68k = 0;
m_NMI_reset = 0;

View File

@ -45,8 +45,8 @@ void sega_315_5881_crypt_device::device_start()
save_item(NAME(line_buffer_pos));
save_item(NAME(line_buffer_size));
astring skey = parameter("key");
if(skey)
std::string skey = parameter("key").c_str();
if(!skey.empty())
key = strtoll(skey.c_str(), 0, 16);
else
{

View File

@ -48,7 +48,7 @@
devcb = &atari_vad_device::static_set_scanline_int_cb(*device, DEVCB_##_intcb);
#define MCFG_ATARI_VAD_PLAYFIELD(_class, _gfxtag, _getinfo) \
{ astring fulltag(device->tag(), ":playfield"); device_t *device; \
{ std::string fulltag(device->tag(), ":playfield"); device_t *device; \
MCFG_TILEMAP_ADD(fulltag.c_str()) \
MCFG_TILEMAP_GFXDECODE("^" _gfxtag) \
MCFG_TILEMAP_BYTES_PER_ENTRY(2) \
@ -57,7 +57,7 @@
MCFG_TILEMAP_LAYOUT_STANDARD(SCAN_COLS, 64,64) }
#define MCFG_ATARI_VAD_PLAYFIELD2(_class, _gfxtag, _getinfo) \
{ astring fulltag(device->tag(), ":playfield2"); device_t *device; \
{ std::string fulltag(device->tag(), ":playfield2"); device_t *device; \
MCFG_TILEMAP_ADD(fulltag.c_str()) \
MCFG_TILEMAP_GFXDECODE("^" _gfxtag) \
MCFG_TILEMAP_BYTES_PER_ENTRY(2) \
@ -67,7 +67,7 @@
MCFG_TILEMAP_TRANSPARENT_PEN(0) }
#define MCFG_ATARI_VAD_ALPHA(_class, _gfxtag, _getinfo) \
{ astring fulltag(device->tag(), ":alpha"); device_t *device; \
{ std::string fulltag(device->tag(), ":alpha"); device_t *device; \
MCFG_TILEMAP_ADD(fulltag.c_str()) \
MCFG_TILEMAP_GFXDECODE("^" _gfxtag) \
MCFG_TILEMAP_BYTES_PER_ENTRY(2) \
@ -77,7 +77,7 @@
MCFG_TILEMAP_TRANSPARENT_PEN(0) }
#define MCFG_ATARI_VAD_MOB(_config, _gfxtag) \
{ astring fulltag(device->tag(), ":mob"); device_t *device; \
{ std::string fulltag(device->tag(), ":mob"); device_t *device; \
MCFG_ATARI_MOTION_OBJECTS_ADD(fulltag.c_str(), "^^screen", _config) \
MCFG_ATARI_MOTION_OBJECTS_GFXDECODE("^" _gfxtag) }

View File

@ -30,8 +30,8 @@ void naomi_m1_board::device_start()
{
naomi_board::device_start();
astring skey = parameter("key");
if(skey)
std::string skey = parameter("key").c_str();
if(!skey.empty())
key = strtoll(skey.c_str(), 0, 16);
else
{