summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-09-26 20:53:06 +1000
committer Vas Crabb <vas@vastheman.com>2019-09-26 20:53:06 +1000
commit9a12ab37afb3e43d9d3c296b34348b835bafb2ea (patch)
tree6af7ce1fc5f52b1518100a1be926514cd2f34feb /src/devices/video
parent9d4b7b02acdb79fac05606f57c3fddd08593cba8 (diff)
Make osd_printf_* use util/strformat semantics.
(nw) This has been a long time coming but it's here at last. It should be easier now that logerror, popmessage and osd_printf_* behave like string_format and stream_format. Remember the differences from printf: * Any object with a stream out operator works with %s * %d, %i, %o, %x, %X, etc. work out the size by magic * No sign extending promotion to int for short/char * No widening/narrowing conversions for characters/strings * Same rules on all platforms, insulated from C runtime library * No format warnings from compiler * Assert in debug builds if number of arguments doesn't match format (nw) Also removed a pile of redundant c_str and string_format, and some workarounds for not being able to portably format 64-bit integers or long long.
Diffstat (limited to 'src/devices/video')
-rw-r--r--src/devices/video/315_5313.cpp6
-rw-r--r--src/devices/video/zeus2.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/video/315_5313.cpp b/src/devices/video/315_5313.cpp
index 967663e42f6..d664909bfae 100644
--- a/src/devices/video/315_5313.cpp
+++ b/src/devices/video/315_5313.cpp
@@ -601,7 +601,7 @@ void sega315_5313_device::vdp_set_register(int regnum, u8 value)
// if (regnum == 0x0a)
// osd_printf_debug("Set HINT Reload Register to %d on scanline %d\n", value, get_scanline_counter());
-// osd_printf_debug("%s: Setting VDP Register #%02x to %02x\n", machine().describe_context().c_str(), regnum, value);
+// osd_printf_debug("%s: Setting VDP Register #%02x to %02x\n", machine().describe_context(), regnum, value);
}
void sega315_5313_device::update_code_and_address(void)
@@ -764,7 +764,7 @@ void sega315_5313_device::handle_dma_bits()
#if 0
const u32 source = (MEGADRIVE_REG15_DMASOURCE1 | (MEGADRIVE_REG16_DMASOURCE2 << 8) | ((MEGADRIVE_REG17_DMASOURCE3 & 0xff) << 16)) << 1;
const u16 length = (MEGADRIVE_REG13_DMALENGTH1 | (MEGADRIVE_REG14_DMALENGTH2 << 8)) << 1;
- osd_printf_debug("%s 68k DMAtran set source %06x length %04x dest %04x enabled %01x code %02x %02x\n", machine().describe_context().c_str(), source, length, m_vdp_address, MEGADRIVE_REG01_DMA_ENABLE, m_vdp_code, MEGADRIVE_REG0F_AUTO_INC);
+ osd_printf_debug("%s 68k DMAtran set source %06x length %04x dest %04x enabled %01x code %02x %02x\n", machine().describe_context(), source, length, m_vdp_address, MEGADRIVE_REG01_DMA_ENABLE, m_vdp_code, MEGADRIVE_REG0F_AUTO_INC);
#endif
if (MEGADRIVE_REG17_DMATYPE == 0x0 || MEGADRIVE_REG17_DMATYPE == 0x1)
{
@@ -1315,7 +1315,7 @@ u16 sega315_5313_device::vdp_r(offs_t offset, u16 mem_mask)
// if ((!ACCESSING_BITS_8_15) || (!ACCESSING_BITS_0_7)) osd_printf_debug("8-bit VDP read HV counter port access, offset %04x mem_mask %04x\n", offset, mem_mask);
retvalue = megadriv_read_hv_counters();
// retvalue = machine().rand();
- // osd_printf_debug("%s: Read HV counters at scanline %d hpos %d (return %04x)\n", machine().describe_context().c_str(), get_scanline_counter(), get_hposition(), retvalue);
+ // osd_printf_debug("%s: Read HV counters at scanline %d hpos %d (return %04x)\n", machine().describe_context(), get_scanline_counter(), get_hposition(), retvalue);
break;
case 0x10:
diff --git a/src/devices/video/zeus2.cpp b/src/devices/video/zeus2.cpp
index 99cb29aa8b2..5094794e97f 100644
--- a/src/devices/video/zeus2.cpp
+++ b/src/devices/video/zeus2.cpp
@@ -2071,7 +2071,7 @@ void zeus2_device::check_tex(uint32_t &texmode, float &zObj, float &zMat, float
infoStr += tex_info();
tex_map.insert(std::pair<uint32_t, std::string>(zeus_texbase, infoStr));
- osd_printf_info("%s\n", infoStr.c_str());
+ osd_printf_info("%s\n", infoStr);
}
}