mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
Moved eminline and related files into /src/osd since it's system related (nw)
Moved delegates into /src/lib/util to enable usage of delegates in other project parts Moved mame_printf_* calls into /src/osd/osdcore.c and renamed them to osd_printf_* Changed mess.mak to display compilation of ymmu100.ppm nicely
This commit is contained in:
parent
72d93bb509
commit
67663501d7
11
.gitattributes
vendored
11
.gitattributes
vendored
@ -2103,8 +2103,6 @@ src/emu/debugger.c svneol=native#text/plain
|
||||
src/emu/debugger.h svneol=native#text/plain
|
||||
src/emu/debugint/debugint.c svneol=native#text/plain
|
||||
src/emu/debugint/debugint.h svneol=native#text/plain
|
||||
src/emu/delegate.c svneol=native#text/plain
|
||||
src/emu/delegate.h svneol=native#text/plain
|
||||
src/emu/devcb.c svneol=native#text/plain
|
||||
src/emu/devcb.h svneol=native#text/plain
|
||||
src/emu/devcb2.c svneol=native#text/plain
|
||||
@ -2159,9 +2157,6 @@ src/emu/drivers/empty.c svneol=native#text/plain
|
||||
src/emu/drivers/emudummy.c svneol=native#text/plain
|
||||
src/emu/drivers/testcpu.c svneol=native#text/plain
|
||||
src/emu/drivers/xtal.h svneol=native#text/plain
|
||||
src/emu/eigccppc.h svneol=native#text/plain
|
||||
src/emu/eigccx86.h svneol=native#text/plain
|
||||
src/emu/eminline.h svneol=native#text/plain
|
||||
src/emu/emu.h svneol=native#text/plain
|
||||
src/emu/emu.mak svneol=native#text/plain
|
||||
src/emu/emualloc.c svneol=native#text/plain
|
||||
@ -3844,6 +3839,8 @@ src/lib/util/coreutil.c svneol=native#text/plain
|
||||
src/lib/util/coreutil.h svneol=native#text/plain
|
||||
src/lib/util/cstrpool.c svneol=native#text/plain
|
||||
src/lib/util/cstrpool.h svneol=native#text/plain
|
||||
src/lib/util/delegate.c svneol=native#text/plain
|
||||
src/lib/util/delegate.h svneol=native#text/plain
|
||||
src/lib/util/flac.c svneol=native#text/plain
|
||||
src/lib/util/flac.h svneol=native#text/plain
|
||||
src/lib/util/harddisk.c svneol=native#text/plain
|
||||
@ -8894,7 +8891,11 @@ src/mess/video/z88.c svneol=native#text/plain
|
||||
src/mess/video/zx.c svneol=native#text/plain
|
||||
src/mess/video/zx8301.c svneol=native#text/plain
|
||||
src/mess/video/zx8301.h svneol=native#text/plain
|
||||
src/osd/eigccppc.h svneol=native#text/plain
|
||||
src/osd/eigccx86.h svneol=native#text/plain
|
||||
src/osd/eminline.h svneol=native#text/plain
|
||||
src/osd/osdcomm.h svneol=native#text/plain
|
||||
src/osd/osdcore.c svneol=native#text/plain
|
||||
src/osd/osdcore.h svneol=native#text/plain
|
||||
src/osd/osdepend.c svneol=native#text/plain
|
||||
src/osd/osdepend.h svneol=native#text/plain
|
||||
|
@ -188,7 +188,7 @@ bool gba_cart_slot_device::call_load()
|
||||
|
||||
//printf("Type: %s\n", gba_get_slot(m_type));
|
||||
|
||||
mame_printf_info("GBA: Detected (XML) %s\n", pcb_name ? pcb_name : "NONE");
|
||||
osd_printf_info("GBA: Detected (XML) %s\n", pcb_name ? pcb_name : "NONE");
|
||||
}
|
||||
|
||||
if (m_type == GBA_SRAM)
|
||||
@ -301,7 +301,7 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
|
||||
else if (!memcmp(&ROM[i], "SIIRTC_V", 8))
|
||||
chip |= GBA_CHIP_RTC;
|
||||
}
|
||||
mame_printf_info("GBA: Detected (ROM) %s\n", gba_chip_string(chip).cstr());
|
||||
osd_printf_info("GBA: Detected (ROM) %s\n", gba_chip_string(chip).cstr());
|
||||
|
||||
// fix for games which return more than one kind of chip: either it is one of the known titles, or we default to no battery
|
||||
if (gba_chip_has_conflict(chip))
|
||||
@ -312,7 +312,7 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
|
||||
if (len >= 0xac + 4)
|
||||
memcpy(game_code, ROM + 0xac, 4);
|
||||
|
||||
mame_printf_info("GBA: Game Code \"%s\"\n", game_code);
|
||||
osd_printf_info("GBA: Game Code \"%s\"\n", game_code);
|
||||
|
||||
chip &= ~(GBA_CHIP_EEPROM | GBA_CHIP_EEPROM_4K | GBA_CHIP_EEPROM_64K | GBA_CHIP_FLASH | GBA_CHIP_FLASH_1M | GBA_CHIP_FLASH_512 | GBA_CHIP_SRAM);
|
||||
|
||||
@ -328,7 +328,7 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
|
||||
}
|
||||
}
|
||||
if (!resolved)
|
||||
mame_printf_warning("GBA: NVRAM is disabled because multiple NVRAM chips were detected!\n");
|
||||
osd_printf_warning("GBA: NVRAM is disabled because multiple NVRAM chips were detected!\n");
|
||||
}
|
||||
|
||||
// fix for games which are known to require an eeprom with 14-bit addressing (64 kbit)
|
||||
@ -339,7 +339,7 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
|
||||
if (len >= 0xac + 4)
|
||||
memcpy(game_code, ROM + 0xac, 4);
|
||||
|
||||
mame_printf_info("GBA: Game Code \"%s\"\n", game_code);
|
||||
osd_printf_info("GBA: Game Code \"%s\"\n", game_code);
|
||||
|
||||
for (int i = 0; i < sizeof(gba_chip_fix_eeprom_list) / sizeof(gba_chip_fix_eeprom_item); i++)
|
||||
{
|
||||
@ -354,11 +354,11 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
|
||||
|
||||
if (type & GBA_CHIP_RTC)
|
||||
{
|
||||
mame_printf_verbose("game has RTC - not emulated at the moment\n");
|
||||
osd_printf_verbose("game has RTC - not emulated at the moment\n");
|
||||
chip &= ~GBA_CHIP_RTC;
|
||||
}
|
||||
|
||||
mame_printf_info("GBA: Emulate %s\n", gba_chip_string(chip).cstr());
|
||||
osd_printf_info("GBA: Emulate %s\n", gba_chip_string(chip).cstr());
|
||||
|
||||
switch (chip)
|
||||
{
|
||||
|
@ -395,7 +395,7 @@ void gba_eeprom_device::write(UINT32 data)
|
||||
|
||||
if (m_bits == 0)
|
||||
{
|
||||
mame_printf_verbose("%08x: EEPROM: %02x to %x\n", machine().device("maincpu")->safe_pc(), m_eep_data, m_addr);
|
||||
osd_printf_verbose("%08x: EEPROM: %02x to %x\n", machine().device("maincpu")->safe_pc(), m_eep_data, m_addr);
|
||||
if (m_addr >= m_data_size)
|
||||
fatalerror("eeprom: invalid address (%x)\n", m_addr);
|
||||
|
||||
|
@ -487,7 +487,7 @@ int base_md_cart_slot_device::load_nonlist()
|
||||
|
||||
if (is_smd)
|
||||
{
|
||||
mame_printf_debug("SMD!\n");
|
||||
osd_printf_debug("SMD!\n");
|
||||
|
||||
for (int ptr = 0; ptr < (tmplen - 0x200) / 0x2000; ptr += 2)
|
||||
{
|
||||
@ -500,7 +500,7 @@ int base_md_cart_slot_device::load_nonlist()
|
||||
}
|
||||
else if (is_md)
|
||||
{
|
||||
mame_printf_debug("MD!\n");
|
||||
osd_printf_debug("MD!\n");
|
||||
|
||||
for (int ptr = 0; ptr < tmplen; ptr += 2)
|
||||
{
|
||||
@ -510,7 +510,7 @@ int base_md_cart_slot_device::load_nonlist()
|
||||
}
|
||||
else
|
||||
{
|
||||
mame_printf_debug("BIN!\n");
|
||||
osd_printf_debug("BIN!\n");
|
||||
|
||||
fseek(0, SEEK_SET);
|
||||
fread(ROM, len);
|
||||
|
@ -745,7 +745,7 @@ void nes_cart_slot_device::call_load_ines()
|
||||
if (prgout)
|
||||
{
|
||||
fwrite(m_cart->get_prg_base(), 1, 0x4000 * m_cart->get_prg_size(), prgout);
|
||||
mame_printf_error("Created PRG chunk\n");
|
||||
osd_printf_error("Created PRG chunk\n");
|
||||
}
|
||||
|
||||
fclose(prgout);
|
||||
@ -767,7 +767,7 @@ void nes_cart_slot_device::call_load_ines()
|
||||
if (chrout)
|
||||
{
|
||||
fwrite(m_cart->get_vrom_base(), 1, m_cart->get_vrom_size(), chrout);
|
||||
mame_printf_error("Created CHR chunk\n");
|
||||
osd_printf_error("Created CHR chunk\n");
|
||||
}
|
||||
fclose(chrout);
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ void nes_cart_slot_device::call_load_pcb()
|
||||
m_cart->set_vrc_lines(nes_cart_get_line(get_feature("vrc2-pin3")),
|
||||
nes_cart_get_line(get_feature("vrc2-pin4")),
|
||||
(nes_cart_get_line(get_feature("vrc2-pin21")) != 10) ? 1 : 0);
|
||||
// mame_printf_error("VRC-2, pin3: A%d, pin4: A%d, pin21: %d\n", nes_cart_get_line(get_feature("vrc2-pin3")), nes_cart_get_line(get_feature("vrc2-pin4")),
|
||||
// osd_printf_error("VRC-2, pin3: A%d, pin4: A%d, pin21: %d\n", nes_cart_get_line(get_feature("vrc2-pin3")), nes_cart_get_line(get_feature("vrc2-pin4")),
|
||||
// nes_cart_get_line(get_feature("vrc2-pin21")));
|
||||
}
|
||||
|
||||
@ -515,7 +515,7 @@ void nes_cart_slot_device::call_load_pcb()
|
||||
m_cart->set_vrc_lines(nes_cart_get_line(get_feature("vrc4-pin3")),
|
||||
nes_cart_get_line(get_feature("vrc4-pin4")),
|
||||
0);
|
||||
// mame_printf_error("VRC-4, pin3: A%d, pin4: A%d\n", nes_cart_get_line(get_feature("vrc4-pin3"), nes_cart_get_line(get_feature("vrc4-pin4"));
|
||||
// osd_printf_error("VRC-4, pin3: A%d, pin4: A%d\n", nes_cart_get_line(get_feature("vrc4-pin3"), nes_cart_get_line(get_feature("vrc4-pin4"));
|
||||
}
|
||||
|
||||
if (m_pcb_id == KONAMI_VRC6)
|
||||
@ -523,7 +523,7 @@ void nes_cart_slot_device::call_load_pcb()
|
||||
m_cart->set_vrc_lines(nes_cart_get_line(get_feature("vrc6-pin9")),
|
||||
nes_cart_get_line(get_feature("vrc6-pin10")),
|
||||
0);
|
||||
// mame_printf_error("VRC-6, pin9: A%d, pin10: A%d\n", nes_cart_get_line(get_feature("vrc6-pin9"), nes_cart_get_line(get_feature("vrc6-pin10"));
|
||||
// osd_printf_error("VRC-6, pin9: A%d, pin10: A%d\n", nes_cart_get_line(get_feature("vrc6-pin9"), nes_cart_get_line(get_feature("vrc6-pin10"));
|
||||
}
|
||||
|
||||
if (m_pcb_id == STD_HKROM || m_pcb_id == TAITO_X1_017)
|
||||
|
@ -477,7 +477,7 @@ void nes_cart_slot_device::call_load_unif()
|
||||
}
|
||||
|
||||
if (small_prg) // This is not supported yet, so warn users about this
|
||||
mame_printf_error("Loaded UNIF file with non-16k PRG chunk. This is not supported in MESS yet.");
|
||||
osd_printf_error("Loaded UNIF file with non-16k PRG chunk. This is not supported in MESS yet.");
|
||||
|
||||
if (vrom_size)
|
||||
{
|
||||
@ -495,7 +495,7 @@ void nes_cart_slot_device::call_load_unif()
|
||||
if (prgout)
|
||||
{
|
||||
fwrite(m_cart->get_prg_base(), 1, 0x4000 * m_cart->get_prg_size(), prgout);
|
||||
mame_printf_error("Created PRG chunk\n");
|
||||
osd_printf_error("Created PRG chunk\n");
|
||||
}
|
||||
|
||||
fclose(prgout);
|
||||
@ -513,7 +513,7 @@ void nes_cart_slot_device::call_load_unif()
|
||||
if (chrout)
|
||||
{
|
||||
fwrite(m_cart->get_vrom_base(), 1, m_cart->get_vrom_size(), chrout);
|
||||
mame_printf_error("Created CHR chunk\n");
|
||||
osd_printf_error("Created CHR chunk\n");
|
||||
}
|
||||
fclose(chrout);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ READ32_MEMBER(saturn_bram_device::read_ext_bram)
|
||||
return (m_ext_bram[offset * 2] << 16) | m_ext_bram[offset * 2 + 1];
|
||||
else
|
||||
{
|
||||
mame_printf_error("Battery RAM read beyond its boundary! offs: %X\n", offset);
|
||||
osd_printf_error("Battery RAM read beyond its boundary! offs: %X\n", offset);
|
||||
return 0xffffffff;
|
||||
}
|
||||
}
|
||||
@ -109,5 +109,5 @@ WRITE32_MEMBER(saturn_bram_device::write_ext_bram)
|
||||
m_ext_bram[offset * 2 + 1] = (data & 0x000000ff) >> 0;
|
||||
}
|
||||
else
|
||||
mame_printf_error("Battery RAM write beyond its boundary! offs: %X data: %X\n", offset, data);
|
||||
osd_printf_error("Battery RAM write beyond its boundary! offs: %X data: %X\n", offset, data);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ READ32_MEMBER(saturn_dram_device::read_ext_dram0)
|
||||
return m_ext_dram0[offset];
|
||||
else
|
||||
{
|
||||
mame_printf_error("DRAM0 read beyond its boundary! offs: %X\n", offset);
|
||||
osd_printf_error("DRAM0 read beyond its boundary! offs: %X\n", offset);
|
||||
return 0xffffffff;
|
||||
}
|
||||
}
|
||||
@ -80,7 +80,7 @@ READ32_MEMBER(saturn_dram_device::read_ext_dram1)
|
||||
return m_ext_dram1[offset];
|
||||
else
|
||||
{
|
||||
mame_printf_error("DRAM1 read beyond its boundary! offs: %X\n", offset);
|
||||
osd_printf_error("DRAM1 read beyond its boundary! offs: %X\n", offset);
|
||||
return 0xffffffff;
|
||||
}
|
||||
}
|
||||
@ -90,7 +90,7 @@ WRITE32_MEMBER(saturn_dram_device::write_ext_dram0)
|
||||
if (offset < m_size/2)
|
||||
COMBINE_DATA(&m_ext_dram0[offset]);
|
||||
else
|
||||
mame_printf_error("DRAM0 write beyond its boundary! offs: %X data: %X\n", offset, data);
|
||||
osd_printf_error("DRAM0 write beyond its boundary! offs: %X data: %X\n", offset, data);
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(saturn_dram_device::write_ext_dram1)
|
||||
@ -98,5 +98,5 @@ WRITE32_MEMBER(saturn_dram_device::write_ext_dram1)
|
||||
if (offset < m_size/2)
|
||||
COMBINE_DATA(&m_ext_dram1[offset]);
|
||||
else
|
||||
mame_printf_error("DRAM1 write beyond its boundary! offs: %X data: %X\n", offset, data);
|
||||
osd_printf_error("DRAM1 write beyond its boundary! offs: %X data: %X\n", offset, data);
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ UINT8 BSX_base::read(UINT32 offset)
|
||||
offset &= 0xffff;
|
||||
if (offset < 0x2188 || offset >= 0x21a0)
|
||||
{
|
||||
mame_printf_debug("BS-X Base Unit reg read outside correct range!\n");
|
||||
osd_printf_debug("BS-X Base Unit reg read outside correct range!\n");
|
||||
return 0x00;
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ void BSX_base::write(UINT32 offset, UINT8 data)
|
||||
offset &= 0xffff;
|
||||
if (offset < 0x2188 || offset >= 0x21a0)
|
||||
{
|
||||
mame_printf_debug("BS-X Base Unit reg write outside correct range!\n");
|
||||
osd_printf_debug("BS-X Base Unit reg write outside correct range!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,7 @@ cheat_script::cheat_script(cheat_manager &manager, symbol_table &symbols, const
|
||||
// anything else is ignored
|
||||
else
|
||||
{
|
||||
mame_printf_warning("%s.xml(%d): unknown script item '%s' will be lost if saved\n", filename, entrynode->line, entrynode->name);
|
||||
osd_printf_warning("%s.xml(%d): unknown script item '%s' will be lost if saved\n", filename, entrynode->line, entrynode->name);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -479,7 +479,7 @@ void cheat_script::script_entry::execute(cheat_manager &manager, UINT64 &arginde
|
||||
}
|
||||
catch (expression_error &err)
|
||||
{
|
||||
mame_printf_warning("Error executing conditional expression \"%s\": %s\n", m_condition.original_string(), err.code_string());
|
||||
osd_printf_warning("Error executing conditional expression \"%s\": %s\n", m_condition.original_string(), err.code_string());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -493,7 +493,7 @@ void cheat_script::script_entry::execute(cheat_manager &manager, UINT64 &arginde
|
||||
}
|
||||
catch (expression_error &err)
|
||||
{
|
||||
mame_printf_warning("Error executing expression \"%s\": %s\n", m_expression.original_string(), err.code_string());
|
||||
osd_printf_warning("Error executing expression \"%s\": %s\n", m_expression.original_string(), err.code_string());
|
||||
}
|
||||
}
|
||||
|
||||
@ -647,7 +647,7 @@ int cheat_script::script_entry::output_argument::values(UINT64 &argindex, UINT64
|
||||
}
|
||||
catch (expression_error &err)
|
||||
{
|
||||
mame_printf_warning("Error executing argument expression \"%s\": %s\n", m_expression.original_string(), err.code_string());
|
||||
osd_printf_warning("Error executing argument expression \"%s\": %s\n", m_expression.original_string(), err.code_string());
|
||||
}
|
||||
}
|
||||
return m_count;
|
||||
@ -724,7 +724,7 @@ cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, cons
|
||||
// only one comment is kept
|
||||
commentnode = xml_get_sibling(commentnode->next, "comment");
|
||||
if (commentnode != NULL)
|
||||
mame_printf_warning("%s.xml(%d): only one comment node is retained; ignoring additional nodes\n", filename, commentnode->line);
|
||||
osd_printf_warning("%s.xml(%d): only one comment node is retained; ignoring additional nodes\n", filename, commentnode->line);
|
||||
}
|
||||
|
||||
// read the first parameter node
|
||||
@ -737,7 +737,7 @@ cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, cons
|
||||
// only one parameter allowed
|
||||
paramnode = xml_get_sibling(paramnode->next, "parameter");
|
||||
if (paramnode != NULL)
|
||||
mame_printf_warning("%s.xml(%d): only one parameter node allowed; ignoring additional nodes\n", filename, paramnode->line);
|
||||
osd_printf_warning("%s.xml(%d): only one parameter node allowed; ignoring additional nodes\n", filename, paramnode->line);
|
||||
}
|
||||
|
||||
// read the script nodes
|
||||
@ -749,7 +749,7 @@ cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, cons
|
||||
// if we have a script already for this slot, it is an error
|
||||
auto_pointer<cheat_script> &slot = script_for_state(curscript->state());
|
||||
if (slot != NULL)
|
||||
mame_printf_warning("%s.xml(%d): only one on script allowed; ignoring additional scripts\n", filename, scriptnode->line);
|
||||
osd_printf_warning("%s.xml(%d): only one on script allowed; ignoring additional scripts\n", filename, scriptnode->line);
|
||||
else
|
||||
slot.reset(curscript);
|
||||
}
|
||||
@ -1202,7 +1202,7 @@ bool cheat_manager::save_all(const char *filename)
|
||||
// catch errors and cleanup
|
||||
catch (emu_fatalerror &err)
|
||||
{
|
||||
mame_printf_error("%s\n", err.string());
|
||||
osd_printf_error("%s\n", err.string());
|
||||
cheatfile.remove_on_close();
|
||||
}
|
||||
return false;
|
||||
@ -1375,7 +1375,7 @@ void cheat_manager::load_cheats(const char *filename)
|
||||
// loop over all instrances of the files found in our search paths
|
||||
while (filerr == FILERR_NONE)
|
||||
{
|
||||
mame_printf_verbose("Loading cheats file from %s\n", cheatfile.fullpath());
|
||||
osd_printf_verbose("Loading cheats file from %s\n", cheatfile.fullpath());
|
||||
|
||||
// read the XML file into internal data structures
|
||||
xml_parse_options options = { 0 };
|
||||
@ -1409,7 +1409,7 @@ void cheat_manager::load_cheats(const char *filename)
|
||||
for (scannode = m_cheatlist.first(); scannode != NULL; scannode = scannode->next())
|
||||
if (strcmp(scannode->description(), curcheat->description()) == 0)
|
||||
{
|
||||
mame_printf_verbose("Ignoring duplicate cheat '%s' from file %s\n", curcheat->description(), cheatfile.fullpath());
|
||||
osd_printf_verbose("Ignoring duplicate cheat '%s' from file %s\n", curcheat->description(), cheatfile.fullpath());
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1431,7 +1431,7 @@ void cheat_manager::load_cheats(const char *filename)
|
||||
// handle errors cleanly
|
||||
catch (emu_fatalerror &err)
|
||||
{
|
||||
mame_printf_error("%s\n", err.string());
|
||||
osd_printf_error("%s\n", err.string());
|
||||
m_cheatlist.reset();
|
||||
if (rootnode != NULL)
|
||||
xml_file_free(rootnode);
|
||||
|
@ -283,7 +283,7 @@ int cli_frontend::execute(int argc, char **argv)
|
||||
#ifdef MAME_DEBUG
|
||||
// TODO: this will only be printed when the executable is exited and not when selecting a new set via the internal UI - it needs to be placed somewhere else where it can be printed and reset after each run (check Average Speed location)
|
||||
if (*(m_options.command()) == 0)
|
||||
mame_printf_info("%d tagmap lookups\n", g_tagmap_finds);
|
||||
osd_printf_info("%d tagmap lookups\n", g_tagmap_finds);
|
||||
#endif
|
||||
|
||||
return m_result;
|
||||
@ -321,12 +321,12 @@ void cli_frontend::listfull(const char *gamename)
|
||||
throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "No matching games found for '%s'", gamename);
|
||||
|
||||
// print the header
|
||||
mame_printf_info("Name: Description:\n");
|
||||
osd_printf_info("Name: Description:\n");
|
||||
|
||||
// iterate through drivers and output the info
|
||||
while (drivlist.next())
|
||||
if ((drivlist.driver().flags & GAME_NO_STANDALONE) == 0)
|
||||
mame_printf_info("%-18s\"%s\"\n", drivlist.driver().name, drivlist.driver().description);
|
||||
osd_printf_info("%-18s\"%s\"\n", drivlist.driver().name, drivlist.driver().description);
|
||||
}
|
||||
|
||||
|
||||
@ -345,7 +345,7 @@ void cli_frontend::listsource(const char *gamename)
|
||||
// iterate through drivers and output the info
|
||||
astring filename;
|
||||
while (drivlist.next())
|
||||
mame_printf_info("%-16s %s\n", drivlist.driver().name, core_filename_extract_base(filename, drivlist.driver().source_file).cstr());
|
||||
osd_printf_info("%-16s %s\n", drivlist.driver().name, core_filename_extract_base(filename, drivlist.driver().source_file).cstr());
|
||||
}
|
||||
|
||||
|
||||
@ -377,12 +377,12 @@ void cli_frontend::listclones(const char *gamename)
|
||||
if (original_count == 0)
|
||||
throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "No matching games found for '%s'", gamename);
|
||||
else
|
||||
mame_printf_info("Found %d matches for '%s' but none were clones\n", drivlist.count(), gamename);
|
||||
osd_printf_info("Found %d matches for '%s' but none were clones\n", drivlist.count(), gamename);
|
||||
return;
|
||||
}
|
||||
|
||||
// print the header
|
||||
mame_printf_info("Name: Clone of:\n");
|
||||
osd_printf_info("Name: Clone of:\n");
|
||||
|
||||
// iterate through drivers and output the info
|
||||
drivlist.reset();
|
||||
@ -390,7 +390,7 @@ void cli_frontend::listclones(const char *gamename)
|
||||
{
|
||||
int clone_of = drivlist.clone();
|
||||
if (clone_of != -1 && (drivlist.driver(clone_of).flags & GAME_IS_BIOS_ROOT) == 0)
|
||||
mame_printf_info("%-16s %-8s\n", drivlist.driver().name, drivlist.driver(clone_of).name);
|
||||
osd_printf_info("%-16s %-8s\n", drivlist.driver().name, drivlist.driver(clone_of).name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -427,7 +427,7 @@ void cli_frontend::listbrothers(const char *gamename)
|
||||
}
|
||||
|
||||
// print the header
|
||||
mame_printf_info("Source file: Name: Parent:\n");
|
||||
osd_printf_info("Source file: Name: Parent:\n");
|
||||
|
||||
// output the entries found
|
||||
drivlist.reset();
|
||||
@ -435,7 +435,7 @@ void cli_frontend::listbrothers(const char *gamename)
|
||||
while (drivlist.next())
|
||||
{
|
||||
int clone_of = drivlist.clone();
|
||||
mame_printf_info("%-16s %-16s %-16s\n", core_filename_extract_base(filename, drivlist.driver().source_file).cstr(), drivlist.driver().name, (clone_of == -1 ? "" : drivlist.driver(clone_of).name));
|
||||
osd_printf_info("%-16s %-16s %-16s\n", core_filename_extract_base(filename, drivlist.driver().source_file).cstr(), drivlist.driver().name, (clone_of == -1 ? "" : drivlist.driver(clone_of).name));
|
||||
}
|
||||
}
|
||||
|
||||
@ -463,7 +463,7 @@ void cli_frontend::listcrc(const char *gamename)
|
||||
// if we have a CRC, display it
|
||||
UINT32 crc;
|
||||
if (hash_collection(ROM_GETHASHDATA(rom)).crc(crc))
|
||||
mame_printf_info("%08x %-16s \t %-8s \t %s\n", crc, ROM_GETNAME(rom), device->shortname(), device->name());
|
||||
osd_printf_info("%08x %-16s \t %-8s \t %s\n", crc, ROM_GETNAME(rom), device->shortname(), device->name());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -488,9 +488,9 @@ void cli_frontend::listroms(const char *gamename)
|
||||
{
|
||||
// print a header
|
||||
if (!first)
|
||||
mame_printf_info("\n");
|
||||
osd_printf_info("\n");
|
||||
first = false;
|
||||
mame_printf_info("ROMs required for driver \"%s\".\n"
|
||||
osd_printf_info("ROMs required for driver \"%s\".\n"
|
||||
"Name Size Checksum\n", drivlist.driver().name);
|
||||
|
||||
// iterate through roms
|
||||
@ -506,27 +506,27 @@ void cli_frontend::listroms(const char *gamename)
|
||||
|
||||
// start with the name
|
||||
const char *name = ROM_GETNAME(rom);
|
||||
mame_printf_info("%-20s ", name);
|
||||
osd_printf_info("%-20s ", name);
|
||||
|
||||
// output the length next
|
||||
if (length >= 0)
|
||||
mame_printf_info("%7d", length);
|
||||
osd_printf_info("%7d", length);
|
||||
else
|
||||
mame_printf_info(" ");
|
||||
osd_printf_info(" ");
|
||||
|
||||
// output the hash data
|
||||
hash_collection hashes(ROM_GETHASHDATA(rom));
|
||||
if (!hashes.flag(hash_collection::FLAG_NO_DUMP))
|
||||
{
|
||||
if (hashes.flag(hash_collection::FLAG_BAD_DUMP))
|
||||
mame_printf_info(" BAD");
|
||||
mame_printf_info(" %s", hashes.macro_string(tempstr));
|
||||
osd_printf_info(" BAD");
|
||||
osd_printf_info(" %s", hashes.macro_string(tempstr));
|
||||
}
|
||||
else
|
||||
mame_printf_info(" NO GOOD DUMP KNOWN");
|
||||
osd_printf_info(" NO GOOD DUMP KNOWN");
|
||||
|
||||
// end with a CR
|
||||
mame_printf_info("\n");
|
||||
osd_printf_info("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -555,16 +555,16 @@ void cli_frontend::listsamples(const char *gamename)
|
||||
|
||||
// print a header
|
||||
if (!first)
|
||||
mame_printf_info("\n");
|
||||
osd_printf_info("\n");
|
||||
first = false;
|
||||
mame_printf_info("Samples required for driver \"%s\".\n", drivlist.driver().name);
|
||||
osd_printf_info("Samples required for driver \"%s\".\n", drivlist.driver().name);
|
||||
|
||||
// iterate over samples devices and print the samples from each one
|
||||
for (samples_device *device = iter.first(); device != NULL; device = iter.next())
|
||||
{
|
||||
samples_iterator sampiter(*device);
|
||||
for (const char *samplename = sampiter.first(); samplename != NULL; samplename = sampiter.next())
|
||||
mame_printf_info("%s\n", samplename);
|
||||
osd_printf_info("%s\n", samplename);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -810,30 +810,30 @@ void cli_frontend::verifyroms(const char *gamename)
|
||||
// output the summary of the audit
|
||||
astring summary_string;
|
||||
auditor.summarize(drivlist.driver().name,&summary_string);
|
||||
mame_printf_info("%s", summary_string.cstr());
|
||||
osd_printf_info("%s", summary_string.cstr());
|
||||
|
||||
// output the name of the driver and its clone
|
||||
mame_printf_info("romset %s ", drivlist.driver().name);
|
||||
osd_printf_info("romset %s ", drivlist.driver().name);
|
||||
int clone_of = drivlist.clone();
|
||||
if (clone_of != -1)
|
||||
mame_printf_info("[%s] ", drivlist.driver(clone_of).name);
|
||||
osd_printf_info("[%s] ", drivlist.driver(clone_of).name);
|
||||
|
||||
// switch off of the result
|
||||
switch (summary)
|
||||
{
|
||||
case media_auditor::INCORRECT:
|
||||
mame_printf_info("is bad\n");
|
||||
osd_printf_info("is bad\n");
|
||||
incorrect++;
|
||||
break;
|
||||
|
||||
case media_auditor::CORRECT:
|
||||
mame_printf_info("is good\n");
|
||||
osd_printf_info("is good\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
case media_auditor::BEST_AVAILABLE:
|
||||
case media_auditor::NONE_NEEDED:
|
||||
mame_printf_info("is best available\n");
|
||||
osd_printf_info("is best available\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
@ -870,26 +870,26 @@ void cli_frontend::verifyroms(const char *gamename)
|
||||
// output the summary of the audit
|
||||
astring summary_string;
|
||||
auditor.summarize(dev->shortname(),&summary_string);
|
||||
mame_printf_info("%s", summary_string.cstr());
|
||||
osd_printf_info("%s", summary_string.cstr());
|
||||
|
||||
// display information about what we discovered
|
||||
mame_printf_info("romset %s ", dev->shortname());
|
||||
osd_printf_info("romset %s ", dev->shortname());
|
||||
|
||||
// switch off of the result
|
||||
switch (summary)
|
||||
{
|
||||
case media_auditor::INCORRECT:
|
||||
mame_printf_info("is bad\n");
|
||||
osd_printf_info("is bad\n");
|
||||
incorrect++;
|
||||
break;
|
||||
|
||||
case media_auditor::CORRECT:
|
||||
mame_printf_info("is good\n");
|
||||
osd_printf_info("is good\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
case media_auditor::BEST_AVAILABLE:
|
||||
mame_printf_info("is best available\n");
|
||||
osd_printf_info("is best available\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
@ -935,26 +935,26 @@ void cli_frontend::verifyroms(const char *gamename)
|
||||
// output the summary of the audit
|
||||
astring summary_string;
|
||||
auditor.summarize(dev->shortname(),&summary_string);
|
||||
mame_printf_info("%s", summary_string.cstr());
|
||||
osd_printf_info("%s", summary_string.cstr());
|
||||
|
||||
// display information about what we discovered
|
||||
mame_printf_info("romset %s ", dev->shortname());
|
||||
osd_printf_info("romset %s ", dev->shortname());
|
||||
|
||||
// switch off of the result
|
||||
switch (summary)
|
||||
{
|
||||
case media_auditor::INCORRECT:
|
||||
mame_printf_info("is bad\n");
|
||||
osd_printf_info("is bad\n");
|
||||
incorrect++;
|
||||
break;
|
||||
|
||||
case media_auditor::CORRECT:
|
||||
mame_printf_info("is good\n");
|
||||
osd_printf_info("is good\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
case media_auditor::BEST_AVAILABLE:
|
||||
mame_printf_info("is best available\n");
|
||||
osd_printf_info("is best available\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
@ -993,7 +993,7 @@ void cli_frontend::verifyroms(const char *gamename)
|
||||
{
|
||||
if (incorrect > 0)
|
||||
throw emu_fatalerror(MAMERR_MISSING_FILES, "%d romsets found, %d were OK.\n", correct + incorrect, correct);
|
||||
mame_printf_info("%d romsets found, %d were OK.\n", correct, correct);
|
||||
osd_printf_info("%d romsets found, %d were OK.\n", correct, correct);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1032,29 +1032,29 @@ void cli_frontend::verifysamples(const char *gamename)
|
||||
// output the summary of the audit
|
||||
astring summary_string;
|
||||
auditor.summarize(drivlist.driver().name,&summary_string);
|
||||
mame_printf_info("%s", summary_string.cstr());
|
||||
osd_printf_info("%s", summary_string.cstr());
|
||||
|
||||
// output the name of the driver and its clone
|
||||
mame_printf_info("sampleset %s ", drivlist.driver().name);
|
||||
osd_printf_info("sampleset %s ", drivlist.driver().name);
|
||||
int clone_of = drivlist.clone();
|
||||
if (clone_of != -1)
|
||||
mame_printf_info("[%s] ", drivlist.driver(clone_of).name);
|
||||
osd_printf_info("[%s] ", drivlist.driver(clone_of).name);
|
||||
|
||||
// switch off of the result
|
||||
switch (summary)
|
||||
{
|
||||
case media_auditor::INCORRECT:
|
||||
mame_printf_info("is bad\n");
|
||||
osd_printf_info("is bad\n");
|
||||
incorrect++;
|
||||
break;
|
||||
|
||||
case media_auditor::CORRECT:
|
||||
mame_printf_info("is good\n");
|
||||
osd_printf_info("is good\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
case media_auditor::BEST_AVAILABLE:
|
||||
mame_printf_info("is best available\n");
|
||||
osd_printf_info("is best available\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
@ -1085,7 +1085,7 @@ void cli_frontend::verifysamples(const char *gamename)
|
||||
{
|
||||
if (incorrect > 0)
|
||||
throw emu_fatalerror(MAMERR_MISSING_FILES, "%d samplesets found, %d were OK.\n", correct + incorrect, correct);
|
||||
mame_printf_info("%d samplesets found, %d were OK.\n", correct, correct);
|
||||
osd_printf_info("%d samplesets found, %d were OK.\n", correct, correct);
|
||||
}
|
||||
}
|
||||
#define SOFTLIST_XML_BEGIN "<?xml version=\"1.0\"?>\n" \
|
||||
@ -1351,26 +1351,26 @@ void cli_frontend::verifysoftware(const char *gamename)
|
||||
// output the summary of the audit
|
||||
astring summary_string;
|
||||
auditor.summarize(swinfo->shortname(), &summary_string);
|
||||
mame_printf_info("%s", summary_string.cstr());
|
||||
osd_printf_info("%s", summary_string.cstr());
|
||||
|
||||
// display information about what we discovered
|
||||
mame_printf_info("romset %s:%s ", swlistdev->list_name(), swinfo->shortname());
|
||||
osd_printf_info("romset %s:%s ", swlistdev->list_name(), swinfo->shortname());
|
||||
|
||||
// switch off of the result
|
||||
switch (summary)
|
||||
{
|
||||
case media_auditor::INCORRECT:
|
||||
mame_printf_info("is bad\n");
|
||||
osd_printf_info("is bad\n");
|
||||
incorrect++;
|
||||
break;
|
||||
|
||||
case media_auditor::CORRECT:
|
||||
mame_printf_info("is good\n");
|
||||
osd_printf_info("is good\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
case media_auditor::BEST_AVAILABLE:
|
||||
mame_printf_info("is best available\n");
|
||||
osd_printf_info("is best available\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
@ -1399,7 +1399,7 @@ void cli_frontend::verifysoftware(const char *gamename)
|
||||
{
|
||||
if (incorrect > 0)
|
||||
throw emu_fatalerror(MAMERR_MISSING_FILES, "%d romsets found in %d software lists, %d were OK.\n", correct + incorrect, nrlists, correct);
|
||||
mame_printf_info("%d romsets found in %d software lists, %d romsets were OK.\n", correct, nrlists, correct);
|
||||
osd_printf_info("%d romsets found in %d software lists, %d romsets were OK.\n", correct, nrlists, correct);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1473,26 +1473,26 @@ void cli_frontend::verifysoftlist(const char *gamename)
|
||||
// output the summary of the audit
|
||||
astring summary_string;
|
||||
auditor.summarize(swinfo->shortname(), &summary_string);
|
||||
mame_printf_info("%s", summary_string.cstr());
|
||||
osd_printf_info("%s", summary_string.cstr());
|
||||
|
||||
// display information about what we discovered
|
||||
mame_printf_info("romset %s:%s ", swlistdev->list_name(), swinfo->shortname());
|
||||
osd_printf_info("romset %s:%s ", swlistdev->list_name(), swinfo->shortname());
|
||||
|
||||
// switch off of the result
|
||||
switch (summary)
|
||||
{
|
||||
case media_auditor::INCORRECT:
|
||||
mame_printf_info("is bad\n");
|
||||
osd_printf_info("is bad\n");
|
||||
incorrect++;
|
||||
break;
|
||||
|
||||
case media_auditor::CORRECT:
|
||||
mame_printf_info("is good\n");
|
||||
osd_printf_info("is good\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
case media_auditor::BEST_AVAILABLE:
|
||||
mame_printf_info("is best available\n");
|
||||
osd_printf_info("is best available\n");
|
||||
correct++;
|
||||
break;
|
||||
|
||||
@ -1521,7 +1521,7 @@ void cli_frontend::verifysoftlist(const char *gamename)
|
||||
{
|
||||
if (incorrect > 0)
|
||||
throw emu_fatalerror(MAMERR_MISSING_FILES, "%d romsets found in %d software lists, %d were OK.\n", correct + incorrect, matched, correct);
|
||||
mame_printf_info("%d romsets found in %d software lists, %d romsets were OK.\n", correct, matched, correct);
|
||||
osd_printf_info("%d romsets found in %d software lists, %d romsets were OK.\n", correct, matched, correct);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1535,7 +1535,7 @@ void cli_frontend::romident(const char *filename)
|
||||
media_identifier ident(m_options);
|
||||
|
||||
// identify the file, then output results
|
||||
mame_printf_info("Identifying %s....\n", filename);
|
||||
osd_printf_info("Identifying %s....\n", filename);
|
||||
ident.identify(filename);
|
||||
|
||||
// return the appropriate error code
|
||||
@ -1569,7 +1569,7 @@ void cli_frontend::execute_commands(const char *exename)
|
||||
{
|
||||
astring helpstring;
|
||||
emulator_info::printf_usage(exename, emulator_info::get_gamenoun());
|
||||
mame_printf_info("\n\nOptions:\n%s", m_options.output_help(helpstring));
|
||||
osd_printf_info("\n\nOptions:\n%s", m_options.output_help(helpstring));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1660,10 +1660,10 @@ void cli_frontend::execute_commands(const char *exename)
|
||||
|
||||
void cli_frontend::display_help()
|
||||
{
|
||||
mame_printf_info("%s v%s - %s\n%s\n\n", emulator_info::get_applongname(),build_version,emulator_info::get_fulllongname(),emulator_info::get_copyright_info());
|
||||
mame_printf_info("%s\n", emulator_info::get_disclaimer());
|
||||
osd_printf_info("%s v%s - %s\n%s\n\n", emulator_info::get_applongname(),build_version,emulator_info::get_fulllongname(),emulator_info::get_copyright_info());
|
||||
osd_printf_info("%s\n", emulator_info::get_disclaimer());
|
||||
emulator_info::printf_usage(emulator_info::get_appname(),emulator_info::get_gamenoun());
|
||||
mame_printf_info("\n\n"
|
||||
osd_printf_info("\n\n"
|
||||
" %s -showusage for a brief list of options\n"
|
||||
" %s -showconfig for a list of configuration options\n"
|
||||
" %s -listmedia for a full list of supported media\n"
|
||||
@ -1808,7 +1808,7 @@ void media_identifier::identify_file(const char *name)
|
||||
{
|
||||
// output the name
|
||||
astring basename;
|
||||
mame_printf_info("%-20s", core_filename_extract_base(basename, name).cstr());
|
||||
osd_printf_info("%-20s", core_filename_extract_base(basename, name).cstr());
|
||||
m_total++;
|
||||
|
||||
// attempt to open as a CHD; fail if not
|
||||
@ -1816,7 +1816,7 @@ void media_identifier::identify_file(const char *name)
|
||||
chd_error err = chd.open(name);
|
||||
if (err != CHDERR_NONE)
|
||||
{
|
||||
mame_printf_info("NOT A CHD\n");
|
||||
osd_printf_info("NOT A CHD\n");
|
||||
m_nonroms++;
|
||||
return;
|
||||
}
|
||||
@ -1824,7 +1824,7 @@ void media_identifier::identify_file(const char *name)
|
||||
// error on writable CHDs
|
||||
if (!chd.compressed())
|
||||
{
|
||||
mame_printf_info("is a writeable CHD\n");
|
||||
osd_printf_info("is a writeable CHD\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1836,7 +1836,7 @@ void media_identifier::identify_file(const char *name)
|
||||
// determine whether this file exists
|
||||
int found = find_by_hash(hashes, chd.logical_bytes());
|
||||
if (found == 0)
|
||||
mame_printf_info("NO MATCH\n");
|
||||
osd_printf_info("NO MATCH\n");
|
||||
else
|
||||
m_matches++;
|
||||
}
|
||||
@ -1884,7 +1884,7 @@ void media_identifier::identify_data(const char *name, const UINT8 *data, int le
|
||||
// output the name
|
||||
m_total++;
|
||||
astring basename;
|
||||
mame_printf_info("%-20s", core_filename_extract_base(basename, name).cstr());
|
||||
osd_printf_info("%-20s", core_filename_extract_base(basename, name).cstr());
|
||||
|
||||
// see if we can find a match in the ROMs
|
||||
int found = find_by_hash(hashes, length);
|
||||
@ -1895,13 +1895,13 @@ void media_identifier::identify_data(const char *name, const UINT8 *data, int le
|
||||
// if not a power of 2, assume it is a non-ROM file
|
||||
if ((length & (length - 1)) != 0)
|
||||
{
|
||||
mame_printf_info("NOT A ROM\n");
|
||||
osd_printf_info("NOT A ROM\n");
|
||||
m_nonroms++;
|
||||
}
|
||||
|
||||
// otherwise, it's just not a match
|
||||
else
|
||||
mame_printf_info("NO MATCH\n");
|
||||
osd_printf_info("NO MATCH\n");
|
||||
}
|
||||
|
||||
// if we did find it, count it as a match
|
||||
@ -1936,8 +1936,8 @@ int media_identifier::find_by_hash(const hash_collection &hashes, int length)
|
||||
|
||||
// output information about the match
|
||||
if (found)
|
||||
mame_printf_info(" ");
|
||||
mame_printf_info("= %s%-20s %-10s %s\n", baddump ? "(BAD) " : "", ROM_GETNAME(rom), m_drivlist.driver().name, m_drivlist.driver().description);
|
||||
osd_printf_info(" ");
|
||||
osd_printf_info("= %s%-20s %-10s %s\n", baddump ? "(BAD) " : "", ROM_GETNAME(rom), m_drivlist.driver().name, m_drivlist.driver().description);
|
||||
found++;
|
||||
}
|
||||
}
|
||||
@ -1958,8 +1958,8 @@ int media_identifier::find_by_hash(const hash_collection &hashes, int length)
|
||||
|
||||
// output information about the match
|
||||
if (found)
|
||||
mame_printf_info(" ");
|
||||
mame_printf_info("= %s%-20s %s:%s %s\n", baddump ? "(BAD) " : "", ROM_GETNAME(rom), swlistdev->list_name(), swinfo->shortname(), swinfo->longname());
|
||||
osd_printf_info(" ");
|
||||
osd_printf_info("= %s%-20s %s:%s %s\n", baddump ? "(BAD) " : "", ROM_GETNAME(rom), swlistdev->list_name(), swinfo->shortname(), swinfo->longname());
|
||||
found++;
|
||||
}
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ static int config_load_xml(running_machine &machine, emu_file &file, int which_t
|
||||
|
||||
/* log that we are processing this entry */
|
||||
if (DEBUG_CONFIG)
|
||||
mame_printf_debug("Entry: %s -- processing\n", name);
|
||||
osd_printf_debug("Entry: %s -- processing\n", name);
|
||||
|
||||
/* loop over all registrants and call their load function */
|
||||
for (type = typelist; type; type = type->next)
|
||||
|
@ -257,7 +257,7 @@ void alpha8201_cpu_device::M_UNDEFINED()
|
||||
{
|
||||
logerror("alpha8201: PC = %03x, Unimplemented opcode = %02x\n", m_pc.w.l-1, M_RDMEM(m_pc.w.l-1));
|
||||
#if SHOW_MESSAGE_CONSOLE
|
||||
mame_printf_debug("alpha8201: PC = %03x, Unimplemented opcode = %02x\n", m_pc.w.l-1, M_RDMEM(m_pc.w.l-1));
|
||||
osd_printf_debug("alpha8201: PC = %03x, Unimplemented opcode = %02x\n", m_pc.w.l-1, M_RDMEM(m_pc.w.l-1));
|
||||
#endif
|
||||
#if BREAK_ON_UNKNOWN_OPCODE
|
||||
debugger_break(machine());
|
||||
@ -270,7 +270,7 @@ void alpha8201_cpu_device::M_UNDEFINED2()
|
||||
UINT8 imm = M_RDMEM_OPCODE();
|
||||
logerror("alpha8201: PC = %03x, Unimplemented opcode = %02x,%02x\n", m_pc.w.l-2, op,imm);
|
||||
#if SHOW_MESSAGE_CONSOLE
|
||||
mame_printf_debug("alpha8201: PC = %03x, Unimplemented opcode = %02x,%02x\n", m_pc.w.l-2, op,imm);
|
||||
osd_printf_debug("alpha8201: PC = %03x, Unimplemented opcode = %02x,%02x\n", m_pc.w.l-2, op,imm);
|
||||
#endif
|
||||
#if BREAK_ON_UNKNOWN_OPCODE
|
||||
debugger_break(machine());
|
||||
@ -581,7 +581,7 @@ void alpha8201_cpu_device::execute_run()
|
||||
{
|
||||
/* EVEN , get PC low */
|
||||
m_pc.b.l = M_RDMEM(pcptr);
|
||||
//mame_printf_debug("alpha8201 load PCL ENTRY=%02X PCL=%02X\n",pcptr, m_pc.b.l);
|
||||
//osd_printf_debug("alpha8201 load PCL ENTRY=%02X PCL=%02X\n",pcptr, m_pc.b.l);
|
||||
m_icount -= C1;
|
||||
M_WRMEM(0x001,pcptr+1);
|
||||
continue;
|
||||
@ -608,7 +608,7 @@ void alpha8201_cpu_device::execute_run()
|
||||
|
||||
#if SHOW_ENTRY_POINT
|
||||
logerror("alpha8201 START ENTRY=%02X PC=%03X\n",pcptr,m_pc.w.l);
|
||||
mame_printf_debug("alpha8201 START ENTRY=%02X PC=%03X\n",pcptr,m_pc.w.l);
|
||||
osd_printf_debug("alpha8201 START ENTRY=%02X PC=%03X\n",pcptr,m_pc.w.l);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -617,7 +617,7 @@ mame_printf_debug("alpha8201 START ENTRY=%02X PC=%03X\n",pcptr,m_pc.w.l);
|
||||
debugger_instruction_hook(this, m_pc.w.l);
|
||||
opcode =M_RDOP(m_pc.w.l);
|
||||
#if TRACE_PC
|
||||
mame_printf_debug("alpha8201: PC = %03x, opcode = %02x\n", m_pc.w.l, opcode);
|
||||
osd_printf_debug("alpha8201: PC = %03x, opcode = %02x\n", m_pc.w.l, opcode);
|
||||
#endif
|
||||
m_pc.b.l++;
|
||||
m_inst_cycles = m_opmap[opcode].cycles;
|
||||
@ -635,7 +635,7 @@ void alpha8201_cpu_device::execute_set_input(int inputnum, int state)
|
||||
if(inputnum == INPUT_LINE_HALT)
|
||||
{
|
||||
m_halt = (state==ASSERT_LINE) ? 1 : 0;
|
||||
/* mame_printf_debug("alpha8201 HALT %d\n",m_halt); */
|
||||
/* osd_printf_debug("alpha8201 HALT %d\n",m_halt); */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
#if 0
|
||||
#define LOG(x) mame_printf_debug x
|
||||
#define LOG(x) osd_printf_debug x
|
||||
#else
|
||||
#define LOG(x) logerror x
|
||||
#endif
|
||||
|
@ -14,7 +14,7 @@
|
||||
namespace DSP56K
|
||||
{
|
||||
#define ADDRESS(X) ((X)<<1)
|
||||
#define UNIMPLEMENTED_OPCODE() mame_printf_error("Unimplemented opcode: PC=%04x | %s;\n", PC, __PRETTY_FUNCTION__);
|
||||
#define UNIMPLEMENTED_OPCODE() osd_printf_error("Unimplemented opcode: PC=%04x | %s;\n", PC, __PRETTY_FUNCTION__);
|
||||
|
||||
class Opcode;
|
||||
|
||||
|
@ -719,7 +719,7 @@ UINT16 regValue16(dsp56k_core* cpustate, const reg_id& reg)
|
||||
if (reg == iM2) return M2;
|
||||
if (reg == iM3) return M3;
|
||||
|
||||
mame_printf_debug("The dsp561xx core is requesting a 16 bit value from non-16 bit register!");
|
||||
osd_printf_debug("The dsp561xx core is requesting a 16 bit value from non-16 bit register!");
|
||||
return 0xdead;
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@
|
||||
#include "e132xs.h"
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
#define DEBUG_PRINTF(x) do { mame_printf_debug x; } while (0)
|
||||
#define DEBUG_PRINTF(x) do { osd_printf_debug x; } while (0)
|
||||
#else
|
||||
#define DEBUG_PRINTF(x) do { } while (0)
|
||||
#endif
|
||||
|
@ -486,7 +486,7 @@ void i960_cpu_device::do_call(UINT32 adr, int type, UINT32 stack)
|
||||
|
||||
// set the new RIP
|
||||
m_r[I960_RIP] = m_IP;
|
||||
// mame_printf_debug("CALL (type %d): FP %x, %x => %x, stack %x, rcache_pos %d\n", type, m_r[I960_FP], m_r[I960_RIP], adr, stack, m_rcache_pos);
|
||||
// osd_printf_debug("CALL (type %d): FP %x, %x => %x, stack %x, rcache_pos %d\n", type, m_r[I960_FP], m_r[I960_RIP], adr, stack, m_rcache_pos);
|
||||
|
||||
// are we out of cache entries?
|
||||
if (m_rcache_pos >= I960_RCACHE_SIZE) {
|
||||
@ -544,7 +544,7 @@ void i960_cpu_device::do_ret_0()
|
||||
memcpy(m_r, m_rcache[m_rcache_pos], 0x10*sizeof(UINT32));
|
||||
}
|
||||
|
||||
// mame_printf_debug("RET (type %d): FP %x, %x => %x, rcache_pos %d\n", type, m_r[I960_FP], m_IP, m_r[I960_RIP], m_rcache_pos);
|
||||
// osd_printf_debug("RET (type %d): FP %x, %x => %x, rcache_pos %d\n", type, m_r[I960_FP], m_IP, m_r[I960_RIP], m_rcache_pos);
|
||||
m_IP = m_r[I960_RIP];
|
||||
}
|
||||
|
||||
|
@ -775,7 +775,7 @@ void m37710_cpu_device::m37710i_update_irqs()
|
||||
// let's do it...
|
||||
// push PB, then PC, then status
|
||||
CLK(13);
|
||||
// mame_printf_debug("taking IRQ %d: PC = %06x, SP = %04x, IPL %d\n", wantedIRQ, REG_PB | REG_PC, REG_S, m_ipl);
|
||||
// osd_printf_debug("taking IRQ %d: PC = %06x, SP = %04x, IPL %d\n", wantedIRQ, REG_PB | REG_PC, REG_S, m_ipl);
|
||||
m37710i_push_8(REG_PB>>16);
|
||||
m37710i_push_16(REG_PC);
|
||||
m37710i_push_8(m_ipl);
|
||||
|
@ -190,7 +190,7 @@ void mc68hc11_cpu_device::hc11_regs_w(UINT32 address, UINT8 value)
|
||||
m_io->write_byte(MC68HC11_IO_PORTA, value);
|
||||
return;
|
||||
case 0x01: /* DDRA */
|
||||
//mame_printf_debug("HC11: ddra = %02X\n", value);
|
||||
//osd_printf_debug("HC11: ddra = %02X\n", value);
|
||||
return;
|
||||
case 0x03: /* PORTC */
|
||||
m_io->write_byte(MC68HC11_IO_PORTC, value);
|
||||
@ -202,7 +202,7 @@ void mc68hc11_cpu_device::hc11_regs_w(UINT32 address, UINT8 value)
|
||||
m_io->write_byte(MC68HC11_IO_PORTD, value); //mask & 0x3f?
|
||||
return;
|
||||
case 0x09: /* DDRD */
|
||||
//mame_printf_debug("HC11: ddrd = %02X\n", value);
|
||||
//osd_printf_debug("HC11: ddrd = %02X\n", value);
|
||||
return;
|
||||
case 0x0a: /* PORTE */
|
||||
m_io->write_byte(MC68HC11_IO_PORTE, value);
|
||||
@ -271,13 +271,13 @@ void mc68hc11_cpu_device::hc11_regs_w(UINT32 address, UINT8 value)
|
||||
m_io->write_byte(MC68HC11_IO_PORTH, value);
|
||||
return;
|
||||
case 0x7d: /* DDRH */
|
||||
//mame_printf_debug("HC11: ddrh = %02X at %04X\n", value, m_pc);
|
||||
//osd_printf_debug("HC11: ddrh = %02X at %04X\n", value, m_pc);
|
||||
return;
|
||||
case 0x7e: /* PORTG */
|
||||
m_io->write_byte(MC68HC11_IO_PORTG, value);
|
||||
return;
|
||||
case 0x7f: /* DDRG */
|
||||
//mame_printf_debug("HC11: ddrg = %02X at %04X\n", value, m_pc);
|
||||
//osd_printf_debug("HC11: ddrg = %02X at %04X\n", value, m_pc);
|
||||
return;
|
||||
|
||||
case 0x88: /* SPCR2 */
|
||||
|
@ -216,7 +216,7 @@ INLINE void generate_exception(int exception, int backup)
|
||||
/* most exceptions go to offset 0x180, except for TLB stuff */
|
||||
if (exception >= EXCEPTION_TLBMOD && exception <= EXCEPTION_TLBSTORE)
|
||||
{
|
||||
mame_printf_debug("TLB miss @ %08X\n", (UINT32)mips3.core.cpr[0][COP0_BadVAddr]);
|
||||
osd_printf_debug("TLB miss @ %08X\n", (UINT32)mips3.core.cpr[0][COP0_BadVAddr]);
|
||||
}
|
||||
mips3.core.pc += offset;
|
||||
|
||||
|
@ -173,7 +173,7 @@ CPU_DISASSEMBLE( pic16c5x )
|
||||
{
|
||||
if (op != -1)
|
||||
{
|
||||
mame_printf_debug("Error: opcode %04Xh matches %d (%s) and %d (%s)\n",
|
||||
osd_printf_debug("Error: opcode %04Xh matches %d (%s) and %d (%s)\n",
|
||||
code,i,Op[i].fmt,op,Op[op].fmt);
|
||||
}
|
||||
op = i;
|
||||
@ -203,7 +203,7 @@ CPU_DISASSEMBLE( pic16c5x )
|
||||
|
||||
while (bit >= 0)
|
||||
{
|
||||
/* mame_printf_debug("{%c/%d}",*cp,bit); */
|
||||
/* osd_printf_debug("{%c/%d}",*cp,bit); */
|
||||
switch(*cp)
|
||||
{
|
||||
case 'a': a <<=1; a |= ((code & (1<<bit)) ? 1 : 0); bit--; break;
|
||||
|
@ -184,7 +184,7 @@ CPU_DISASSEMBLE( pic16c62x )
|
||||
{
|
||||
if (op != -1)
|
||||
{
|
||||
mame_printf_debug("Error: opcode %04Xh matches %d (%s) and %d (%s)\n",
|
||||
osd_printf_debug("Error: opcode %04Xh matches %d (%s) and %d (%s)\n",
|
||||
code,i,Op[i].fmt,op,Op[op].fmt);
|
||||
}
|
||||
op = i;
|
||||
@ -214,7 +214,7 @@ CPU_DISASSEMBLE( pic16c62x )
|
||||
|
||||
while (bit >= 0)
|
||||
{
|
||||
/* mame_printf_debug("{%c/%d}",*cp,bit); */
|
||||
/* osd_printf_debug("{%c/%d}",*cp,bit); */
|
||||
switch(*cp)
|
||||
{
|
||||
case 'a': a <<=1; a |= ((code & (1<<bit)) ? 1 : 0); bit--; break;
|
||||
|
@ -543,7 +543,7 @@ static UINT32 recompile_addx(drc_core *drc, UINT32 op)
|
||||
emit_mov_m32_r32(DRCTOP, MABS(®(RT)), REG_EDX);
|
||||
|
||||
if (OEBIT) {
|
||||
mame_printf_debug("recompile_addx: OE bit set !\n");
|
||||
osd_printf_debug("recompile_addx: OE bit set !\n");
|
||||
return RECOMPILE_UNIMPLEMENTED;
|
||||
}
|
||||
if (RCBIT) {
|
||||
@ -568,7 +568,7 @@ static UINT32 recompile_addcx(drc_core *drc, UINT32 op)
|
||||
emit_mov_m32_r32(DRCTOP, MABS(&XER), REG_EBX);
|
||||
|
||||
if (OEBIT) {
|
||||
mame_printf_debug("recompile_addcx: OE bit set !\n");
|
||||
osd_printf_debug("recompile_addcx: OE bit set !\n");
|
||||
return RECOMPILE_UNIMPLEMENTED;
|
||||
}
|
||||
if (RCBIT) {
|
||||
@ -1644,7 +1644,7 @@ static UINT32 recompile_mcrf(drc_core *drc, UINT32 op)
|
||||
|
||||
static UINT32 recompile_mcrxr(drc_core *drc, UINT32 op)
|
||||
{
|
||||
mame_printf_debug("PPCDRC: recompile mcrxr\n");
|
||||
osd_printf_debug("PPCDRC: recompile mcrxr\n");
|
||||
return RECOMPILE_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -1791,7 +1791,7 @@ static UINT32 recompile_mullwx(drc_core *drc, UINT32 op)
|
||||
emit_mov_m32_r32(DRCTOP, MABS(®(RT)), REG_EDX);
|
||||
|
||||
if (OEBIT) {
|
||||
mame_printf_debug("recompile_mullwx: OEBIT set!\n");
|
||||
osd_printf_debug("recompile_mullwx: OEBIT set!\n");
|
||||
return RECOMPILE_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -2357,7 +2357,7 @@ static UINT32 recompile_subfx(drc_core *drc, UINT32 op)
|
||||
emit_mov_m32_r32(DRCTOP, MABS(®(RT)), REG_EDX);
|
||||
|
||||
if (OEBIT) {
|
||||
mame_printf_debug("recompile_subfx: OEBIT set !\n");
|
||||
osd_printf_debug("recompile_subfx: OEBIT set !\n");
|
||||
return RECOMPILE_UNIMPLEMENTED;
|
||||
}
|
||||
if (RCBIT) {
|
||||
@ -2391,7 +2391,7 @@ static UINT32 recompile_subfcx(drc_core *drc, UINT32 op)
|
||||
emit_mov_m32_r32(DRCTOP, MABS(&XER), REG_EBX);
|
||||
|
||||
//if (OEBIT) {
|
||||
// mame_printf_debug("recompile_subfcx: OEBIT set !\n");
|
||||
// osd_printf_debug("recompile_subfcx: OEBIT set !\n");
|
||||
// return RECOMPILE_UNIMPLEMENTED;
|
||||
//}
|
||||
if (RCBIT) {
|
||||
@ -2419,7 +2419,7 @@ static UINT32 recompile_subfex(drc_core *drc, UINT32 op)
|
||||
emit_mov_m32_r32(DRCTOP, MABS(&XER), REG_EBX);
|
||||
|
||||
if (OEBIT) {
|
||||
mame_printf_debug("recompile_subfex: OEBIT set !\n");
|
||||
osd_printf_debug("recompile_subfex: OEBIT set !\n");
|
||||
return RECOMPILE_UNIMPLEMENTED;
|
||||
}
|
||||
if (RCBIT) {
|
||||
@ -2650,7 +2650,7 @@ static UINT32 recompile_icread(drc_core *drc, UINT32 op)
|
||||
|
||||
static UINT32 recompile_rfci(drc_core *drc, UINT32 op)
|
||||
{
|
||||
mame_printf_debug("PPCDRC: recompile rfci\n");
|
||||
osd_printf_debug("PPCDRC: recompile rfci\n");
|
||||
return RECOMPILE_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -2703,7 +2703,7 @@ static UINT32 recompile_wrteei(drc_core *drc, UINT32 op)
|
||||
|
||||
static UINT32 recompile_invalid(drc_core *drc, UINT32 op)
|
||||
{
|
||||
mame_printf_debug("PPCDRC: Invalid opcode %08X PC : %X\n", op, ppc.pc);
|
||||
osd_printf_debug("PPCDRC: Invalid opcode %08X PC : %X\n", op, ppc.pc);
|
||||
return RECOMPILE_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -3172,13 +3172,13 @@ static UINT32 recompile_tlbsync(drc_core *drc, UINT32 op)
|
||||
|
||||
static UINT32 recompile_eciwx(drc_core *drc, UINT32 op)
|
||||
{
|
||||
mame_printf_debug("PPCDRC: eciwx unimplemented\n");
|
||||
osd_printf_debug("PPCDRC: eciwx unimplemented\n");
|
||||
return RECOMPILE_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
static UINT32 recompile_ecowx(drc_core *drc, UINT32 op)
|
||||
{
|
||||
mame_printf_debug("PPCDRC: ecowx unimplemented\n");
|
||||
osd_printf_debug("PPCDRC: ecowx unimplemented\n");
|
||||
return RECOMPILE_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
|
@ -589,9 +589,9 @@ static void ppc403_spu_w(UINT32 a, UINT8 d)
|
||||
ppc.spu.brd &= 0xff00;
|
||||
ppc.spu.brd |= d;
|
||||
if (ppc.iocr & 0x2) {
|
||||
mame_printf_debug("ppc: SPU Baud rate: %d\n", (3686400 / (ppc.spu.brd + 1)) / 16);
|
||||
osd_printf_debug("ppc: SPU Baud rate: %d\n", (3686400 / (ppc.spu.brd + 1)) / 16);
|
||||
} else {
|
||||
mame_printf_debug("ppc: SPU Baud rate: %d\n", (33333333 / (ppc.spu.brd + 1)) / 16);
|
||||
osd_printf_debug("ppc: SPU Baud rate: %d\n", (33333333 / (ppc.spu.brd + 1)) / 16);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -619,7 +619,7 @@ static void ppc403_spu_w(UINT32 a, UINT8 d)
|
||||
{
|
||||
int i;
|
||||
int ch = (ppc.spu.sprc >> 5) & 0x3;
|
||||
// mame_printf_debug("ppc: DMA from serial port on channel %d (DA: %08X)\n", ch, ppc.dma[ch].da);
|
||||
// osd_printf_debug("ppc: DMA from serial port on channel %d (DA: %08X)\n", ch, ppc.dma[ch].da);
|
||||
|
||||
if (spu_rx_dma_handler)
|
||||
{
|
||||
@ -669,7 +669,7 @@ static void ppc403_spu_w(UINT32 a, UINT8 d)
|
||||
fatalerror("ppc: spu_w: %02X, %02X\n", a & 0xf, d);
|
||||
break;
|
||||
}
|
||||
//mame_printf_debug("spu_w: %02X, %02X at %08X\n", a & 0xf, d, ppc.pc);
|
||||
//osd_printf_debug("spu_w: %02X, %02X at %08X\n", a & 0xf, d, ppc.pc);
|
||||
}
|
||||
|
||||
void ppc403_spu_rx(UINT8 data)
|
||||
@ -795,7 +795,7 @@ static void ppc403_dma_exec(int ch)
|
||||
if( (ch == 2 && ((ppc.spu.sptc >> 5) & 0x3) == 2) ||
|
||||
(ch == 3 && ((ppc.spu.sptc >> 5) & 0x3) == 3) )
|
||||
{
|
||||
mame_printf_debug("ppc: dma_exec: DMA to serial port on channel %d (DA: %08X)\n", ch, ppc.dma[ch].da);
|
||||
osd_printf_debug("ppc: dma_exec: DMA to serial port on channel %d (DA: %08X)\n", ch, ppc.dma[ch].da);
|
||||
|
||||
if (spu_tx_dma_handler)
|
||||
{
|
||||
@ -825,7 +825,7 @@ static void ppc403_dma_exec(int ch)
|
||||
break;
|
||||
|
||||
case 2: /* software initiated mem-to-mem DMA */
|
||||
//mame_printf_debug("ppc: DMA (%d, SW mem-to-mem): SA = %08X, DA = %08X, CT = %08X\n", ch, ppc.dma[ch].sa, ppc.dma[ch].da, ppc.dma[ch].ct);
|
||||
//osd_printf_debug("ppc: DMA (%d, SW mem-to-mem): SA = %08X, DA = %08X, CT = %08X\n", ch, ppc.dma[ch].sa, ppc.dma[ch].da, ppc.dma[ch].ct);
|
||||
|
||||
switch(width)
|
||||
{
|
||||
|
@ -222,18 +222,18 @@ static int ppc_translate_address(offs_t *addr_ptr, int flags)
|
||||
|
||||
if (DUMP_PAGEFAULTS)
|
||||
{
|
||||
mame_printf_debug("PAGE FAULT: address=%08X PC=%08X SDR1=%08X MSR=%08X\n", address, ppc.pc, ppc.sdr1, ppc.msr);
|
||||
mame_printf_debug("\n");
|
||||
osd_printf_debug("PAGE FAULT: address=%08X PC=%08X SDR1=%08X MSR=%08X\n", address, ppc.pc, ppc.sdr1, ppc.msr);
|
||||
osd_printf_debug("\n");
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
bl = bat[i].u & 0x00001FFC;
|
||||
mask = (~bl << 15) & 0xFFFE0000;
|
||||
mame_printf_debug(" BAT[%d]=%08X%08X (A & %08X = %08X)\n", i, bat[i].u, bat[i].l,
|
||||
osd_printf_debug(" BAT[%d]=%08X%08X (A & %08X = %08X)\n", i, bat[i].u, bat[i].l,
|
||||
mask, bat[i].u & 0xFFFE0000);
|
||||
}
|
||||
mame_printf_debug("\n");
|
||||
mame_printf_debug(" VSID=%06X HASH=%05X HASH\'=%05X\n", vsid, hash, hash ^ 0x7FFFF);
|
||||
osd_printf_debug("\n");
|
||||
osd_printf_debug(" VSID=%06X HASH=%05X HASH\'=%05X\n", vsid, hash, hash ^ 0x7FFFF);
|
||||
|
||||
for (hash_type = 0; hash_type <= 1; hash_type++)
|
||||
{
|
||||
@ -242,7 +242,7 @@ static int ppc_translate_address(offs_t *addr_ptr, int flags)
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
pte = pteg_ptr[hash_type][i];
|
||||
mame_printf_debug(" PTE[%i%c]=%08X%08X\n",
|
||||
osd_printf_debug(" PTE[%i%c]=%08X%08X\n",
|
||||
i,
|
||||
hash_type ? '\'' : ' ',
|
||||
(unsigned) (pte >> 32),
|
||||
|
@ -191,7 +191,7 @@ INLINE void set_decrementer(powerpc_state *ppc, UINT32 newdec)
|
||||
if (PRINTF_DECREMENTER)
|
||||
{
|
||||
UINT64 total = ppc->device->total_cycles();
|
||||
mame_printf_debug("set_decrementer: olddec=%08X newdec=%08X divisor=%d totalcyc=%08X%08X timer=%08X%08X\n",
|
||||
osd_printf_debug("set_decrementer: olddec=%08X newdec=%08X divisor=%d totalcyc=%08X%08X timer=%08X%08X\n",
|
||||
curdec, newdec, ppc->tb_divisor,
|
||||
(UINT32)(total >> 32), (UINT32)total, (UINT32)(cycles_until_done >> 32), (UINT32)cycles_until_done);
|
||||
}
|
||||
@ -917,7 +917,7 @@ void ppccom_execute_mfspr(powerpc_state *ppc)
|
||||
}
|
||||
|
||||
/* default handling */
|
||||
mame_printf_debug("SPR %03X read\n", ppc->param0);
|
||||
osd_printf_debug("SPR %03X read\n", ppc->param0);
|
||||
ppc->param1 = ppc->spr[ppc->param0];
|
||||
}
|
||||
|
||||
@ -1066,7 +1066,7 @@ void ppccom_execute_mtspr(powerpc_state *ppc)
|
||||
}
|
||||
|
||||
/* default handling */
|
||||
mame_printf_debug("SPR %03X write = %08X\n", ppc->param0, ppc->param1);
|
||||
osd_printf_debug("SPR %03X write = %08X\n", ppc->param0, ppc->param1);
|
||||
ppc->spr[ppc->param0] = ppc->param1;
|
||||
}
|
||||
|
||||
@ -1121,7 +1121,7 @@ void ppccom_execute_mfdcr(powerpc_state *ppc)
|
||||
|
||||
/* default handling */
|
||||
if (ppc->dcr_read_func.isnull()) {
|
||||
mame_printf_debug("DCR %03X read\n", ppc->param0);
|
||||
osd_printf_debug("DCR %03X read\n", ppc->param0);
|
||||
if (ppc->param0 < ARRAY_LENGTH(ppc->dcr))
|
||||
ppc->param1 = ppc->dcr[ppc->param0];
|
||||
else
|
||||
@ -1213,7 +1213,7 @@ void ppccom_execute_mtdcr(powerpc_state *ppc)
|
||||
|
||||
/* default handling */
|
||||
if (ppc->dcr_write_func.isnull()) {
|
||||
mame_printf_debug("DCR %03X write = %08X\n", ppc->param0, ppc->param1);
|
||||
osd_printf_debug("DCR %03X write = %08X\n", ppc->param0, ppc->param1);
|
||||
if (ppc->param0 < ARRAY_LENGTH(ppc->dcr))
|
||||
ppc->dcr[ppc->param0] = ppc->param1;
|
||||
} else {
|
||||
|
@ -491,7 +491,7 @@ void psxmdec_device::dma_read( UINT32 *p_n_psxram, UINT32 n_address, INT32 n_siz
|
||||
{
|
||||
if( (int)n_0_size <= 0 )
|
||||
{
|
||||
mame_printf_debug( "ran out of data %08x\n", n_size );
|
||||
osd_printf_debug( "ran out of data %08x\n", n_size );
|
||||
n_0_size = 0;
|
||||
break;
|
||||
}
|
||||
@ -531,12 +531,12 @@ void psxmdec_device::dma_read( UINT32 *p_n_psxram, UINT32 n_address, INT32 n_siz
|
||||
|
||||
if( (int)n_0_size < 0 )
|
||||
{
|
||||
mame_printf_debug( "ran out of data %d\n", n_0_size );
|
||||
osd_printf_debug( "ran out of data %d\n", n_0_size );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mame_printf_debug( "mdec1_read no conversion :%08x:%08x:\n", n_0_command, n_0_size );
|
||||
osd_printf_debug( "mdec1_read no conversion :%08x:%08x:\n", n_0_command, n_0_size );
|
||||
}
|
||||
if((int)n_0_size <= 0)
|
||||
n_1_status &= ~( 1L << 29 );
|
||||
|
@ -99,7 +99,7 @@ WRITE32_MEMBER( psxrcnt_device::write )
|
||||
( ( data & 0x0100 ) != 0 && n_counter != 0 && n_counter != 1 ) ||
|
||||
( ( data & 0x0200 ) != 0 && n_counter != 2 ) )
|
||||
{
|
||||
mame_printf_debug( "mode %d 0x%04x\n", n_counter, data & 0xfca6 );
|
||||
osd_printf_debug( "mode %d 0x%04x\n", n_counter, data & 0xfca6 );
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
@ -16,13 +16,13 @@ CPU_DISASSEMBLE( rsp );
|
||||
#define SAVE_DMEM 0
|
||||
#define RSP_TEST_SYNC 0
|
||||
|
||||
#define PRINT_VECREG(x) mame_printf_debug("V%d: %04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X\n", (x), \
|
||||
#define PRINT_VECREG(x) osd_printf_debug("V%d: %04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X\n", (x), \
|
||||
(UINT16)VREG_S((x),0), (UINT16)VREG_S((x),1), \
|
||||
(UINT16)VREG_S((x),2), (UINT16)VREG_S((x),3), \
|
||||
(UINT16)VREG_S((x),4), (UINT16)VREG_S((x),5), \
|
||||
(UINT16)VREG_S((x),6), (UINT16)VREG_S((x),7))
|
||||
|
||||
#define PRINT_ACCUM(x) mame_printf_debug("A%d: %08X|%08X\n", (x), \
|
||||
#define PRINT_ACCUM(x) osd_printf_debug("A%d: %08X|%08X\n", (x), \
|
||||
(UINT32)( ( ACCUM(x) >> 32 ) & 0x00000000ffffffff ), \
|
||||
(UINT32)( ACCUM(x) & 0x00000000ffffffff ))
|
||||
|
||||
@ -222,7 +222,7 @@ static void unimplemented_opcode(rsp_state *rsp, UINT32 op)
|
||||
{
|
||||
char string[200];
|
||||
rsp_dasm_one(string, rsp->ppc, op);
|
||||
mame_printf_debug("%08X: %s\n", rsp->ppc, string);
|
||||
osd_printf_debug("%08X: %s\n", rsp->ppc, string);
|
||||
}
|
||||
|
||||
#if SAVE_DISASM
|
||||
@ -869,7 +869,7 @@ static void handle_swc2(rsp_state *rsp, UINT32 op)
|
||||
|
||||
// FIXME: only works for index 0 and index 8
|
||||
|
||||
if (index & 0x7) mame_printf_debug("RSP: SFV: index = %d at %08X\n", index, rsp->ppc);
|
||||
if (index & 0x7) osd_printf_debug("RSP: SFV: index = %d at %08X\n", index, rsp->ppc);
|
||||
|
||||
ea = (base) ? rsp->r[base] + (offset * 16) : (offset * 16);
|
||||
|
||||
|
@ -699,7 +699,7 @@ static void cfunc_unimplemented_opcode(void *param)
|
||||
{
|
||||
char string[200];
|
||||
rsp_dasm_one(string, rsp->ppc, op);
|
||||
mame_printf_debug("%08X: %s\n", rsp->ppc, string);
|
||||
osd_printf_debug("%08X: %s\n", rsp->ppc, string);
|
||||
}
|
||||
|
||||
fatalerror("RSP: unknown opcode %02X (%08X) at %08X\n", op >> 26, op, rsp->ppc);
|
||||
@ -711,7 +711,7 @@ static void unimplemented_opcode(rsp_state *rsp, UINT32 op)
|
||||
{
|
||||
char string[200];
|
||||
rsp_dasm_one(string, rsp->ppc, op);
|
||||
mame_printf_debug("%08X: %s\n", rsp->ppc, string);
|
||||
osd_printf_debug("%08X: %s\n", rsp->ppc, string);
|
||||
}
|
||||
|
||||
fatalerror("RSP: unknown opcode %02X (%08X) at %08X\n", op >> 26, op, rsp->ppc);
|
||||
|
@ -274,7 +274,7 @@ void adsp21062_device::external_iop_write(UINT32 address, UINT32 data)
|
||||
}
|
||||
else
|
||||
{
|
||||
mame_printf_debug("SHARC IOP write %08X, %08X\n", address, data);
|
||||
osd_printf_debug("SHARC IOP write %08X, %08X\n", address, data);
|
||||
sharc_iop_w(address, data);
|
||||
}
|
||||
}
|
||||
|
@ -2760,6 +2760,6 @@ void adsp21062_device::sharcop_unimplemented()
|
||||
extern CPU_DISASSEMBLE(sharc);
|
||||
char dasm[1000];
|
||||
CPU_DISASSEMBLE_NAME(sharc)(NULL, dasm, m_pc, NULL, NULL, 0);
|
||||
mame_printf_debug("SHARC: %08X: %s\n", m_pc, dasm);
|
||||
osd_printf_debug("SHARC: %08X: %s\n", m_pc, dasm);
|
||||
fatalerror("SHARC: Unimplemented opcode %04X%08X at %08X\n", (UINT16)(m_opcode >> 32), (UINT32)(m_opcode), m_pc);
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ CPU_DISASSEMBLE( tms32010 )
|
||||
{
|
||||
if (op != -1)
|
||||
{
|
||||
mame_printf_debug("Error: opcode %04Xh matches %d (%s) and %d (%s)\n",
|
||||
osd_printf_debug("Error: opcode %04Xh matches %d (%s) and %d (%s)\n",
|
||||
code,i,Op[i].fmt,op,Op[op].fmt);
|
||||
}
|
||||
op = i;
|
||||
@ -274,7 +274,7 @@ CPU_DISASSEMBLE( tms32010 )
|
||||
|
||||
while (bit >= 0)
|
||||
{
|
||||
/* mame_printf_debug("{%c/%d}",*cp,bit); */
|
||||
/* osd_printf_debug("{%c/%d}",*cp,bit); */
|
||||
switch(*cp)
|
||||
{
|
||||
case 'a': a <<=1; a |= ((code & (1<<bit)) ? 1 : 0); bit--; break;
|
||||
|
@ -407,7 +407,7 @@ CPU_DISASSEMBLE( tms32025 )
|
||||
{
|
||||
if (op != -1)
|
||||
{
|
||||
mame_printf_debug("Error: opcode %04Xh matches %d (%s) and %d (%s)\n",
|
||||
osd_printf_debug("Error: opcode %04Xh matches %d (%s) and %d (%s)\n",
|
||||
code,i,Op[i].fmt,op,Op[op].fmt);
|
||||
}
|
||||
op = i;
|
||||
@ -437,7 +437,7 @@ CPU_DISASSEMBLE( tms32025 )
|
||||
|
||||
while (bit >= 0)
|
||||
{
|
||||
/* mame_printf_debug("{%c/%d}",*cp,bit); */
|
||||
/* osd_printf_debug("{%c/%d}",*cp,bit); */
|
||||
switch(*cp)
|
||||
{
|
||||
case 'a': a <<=1; a |= ((code & (1<<bit)) ? 1 : 0); bit--; break;
|
||||
|
@ -1406,7 +1406,7 @@ static void FUNCTION_NAME(pixblt_r)(tms34010_state *tms, int src_is_linear, int
|
||||
|
||||
/* compute the starting addresses */
|
||||
saddr = src_is_linear ? SADDR(tms) : SXYTOL(tms,SADDR_XY(tms));
|
||||
if ((saddr & (BITS_PER_PIXEL - 1)) != 0) mame_printf_debug("PIXBLT_R%d with odd saddr\n", BITS_PER_PIXEL);
|
||||
if ((saddr & (BITS_PER_PIXEL - 1)) != 0) osd_printf_debug("PIXBLT_R%d with odd saddr\n", BITS_PER_PIXEL);
|
||||
saddr &= ~(BITS_PER_PIXEL - 1);
|
||||
|
||||
/* compute the bounds of the operation */
|
||||
@ -1423,7 +1423,7 @@ if ((saddr & (BITS_PER_PIXEL - 1)) != 0) mame_printf_debug("PIXBLT_R%d with odd
|
||||
}
|
||||
else
|
||||
daddr = DADDR(tms);
|
||||
if ((daddr & (BITS_PER_PIXEL - 1)) != 0) mame_printf_debug("PIXBLT_R%d with odd daddr\n", BITS_PER_PIXEL);
|
||||
if ((daddr & (BITS_PER_PIXEL - 1)) != 0) osd_printf_debug("PIXBLT_R%d with odd daddr\n", BITS_PER_PIXEL);
|
||||
daddr &= ~(BITS_PER_PIXEL - 1);
|
||||
LOGGFX((" saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(tms), DPTCH(tms)));
|
||||
|
||||
|
@ -743,7 +743,7 @@ void uml::instruction::simplify()
|
||||
astring disasm1, disasm2;
|
||||
orig.disasm(disasm1, block->drcuml);
|
||||
inst->disasm(disasm2, block->drcuml);
|
||||
mame_printf_debug("Simplified: %-50.50s -> %s\n", disasm1.cstr(), disasm2.cstr());
|
||||
osd_printf_debug("Simplified: %-50.50s -> %s\n", disasm1.cstr(), disasm2.cstr());
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -1800,7 +1800,7 @@ UINT32 v60_device::opSHAB()
|
||||
SetSZPF_Byte(appb);
|
||||
}
|
||||
|
||||
// mame_printf_debug("SHAB: %x _CY: %d _Z: %d _OV: %d _S: %d\n", appb, _CY, _Z, _OV, _S);
|
||||
// osd_printf_debug("SHAB: %x _CY: %d _Z: %d _OV: %d _S: %d\n", appb, _CY, _Z, _OV, _S);
|
||||
|
||||
F12STOREOP2BYTE();
|
||||
F12END();
|
||||
@ -1854,7 +1854,7 @@ UINT32 v60_device::opSHAH()
|
||||
SetSZPF_Word(apph);
|
||||
}
|
||||
|
||||
// mame_printf_debug("SHAH: %x >> %d = %x _CY: %d _Z: %d _OV: %d _S: %d\n", oldval, count, apph, _CY, _Z, _OV, _S);
|
||||
// osd_printf_debug("SHAH: %x >> %d = %x _CY: %d _Z: %d _OV: %d _S: %d\n", oldval, count, apph, _CY, _Z, _OV, _S);
|
||||
|
||||
F12STOREOP2HALF();
|
||||
F12END();
|
||||
@ -1908,7 +1908,7 @@ UINT32 v60_device::opSHAW()
|
||||
SetSZPF_Long(appw);
|
||||
}
|
||||
|
||||
// mame_printf_debug("SHAW: %x >> %d = %x _CY: %d _Z: %d _OV: %d _S: %d\n", oldval, count, appw, _CY, _Z, _OV, _S);
|
||||
// osd_printf_debug("SHAW: %x >> %d = %x _CY: %d _Z: %d _OV: %d _S: %d\n", oldval, count, appw, _CY, _Z, _OV, _S);
|
||||
|
||||
F12STOREOP2WORD();
|
||||
F12END();
|
||||
@ -1968,7 +1968,7 @@ UINT32 v60_device::opSHLB() /* TRUSTED */
|
||||
}
|
||||
}
|
||||
|
||||
// mame_printf_debug("SHLB: %x _CY: %d _Z: %d _OV: %d _S: %d\n", appb, _CY, _Z, _OV, _S);
|
||||
// osd_printf_debug("SHLB: %x _CY: %d _Z: %d _OV: %d _S: %d\n", appb, _CY, _Z, _OV, _S);
|
||||
|
||||
F12STOREOP2BYTE();
|
||||
F12END();
|
||||
@ -1985,7 +1985,7 @@ UINT32 v60_device::opSHLH() /* TRUSTED */
|
||||
F12LOADOP2HALF();
|
||||
|
||||
count = (INT8)(m_op1 & 0xFF);
|
||||
// mame_printf_debug("apph: %x count: %d ", apph, count);
|
||||
// osd_printf_debug("apph: %x count: %d ", apph, count);
|
||||
if (count > 0)
|
||||
{
|
||||
// left shift flags:
|
||||
@ -2028,7 +2028,7 @@ UINT32 v60_device::opSHLH() /* TRUSTED */
|
||||
}
|
||||
}
|
||||
|
||||
// mame_printf_debug("SHLH: %x _CY: %d _Z: %d _OV: %d _S: %d\n", apph, _CY, _Z, _OV, _S);
|
||||
// osd_printf_debug("SHLH: %x _CY: %d _Z: %d _OV: %d _S: %d\n", apph, _CY, _Z, _OV, _S);
|
||||
|
||||
F12STOREOP2HALF();
|
||||
F12END();
|
||||
@ -2087,7 +2087,7 @@ UINT32 v60_device::opSHLW() /* TRUSTED */
|
||||
}
|
||||
}
|
||||
|
||||
// mame_printf_debug("SHLW: %x _CY: %d _Z: %d _OV: %d _S: %d\n", appw, _CY, _Z, _OV, _S);
|
||||
// osd_printf_debug("SHLW: %x _CY: %d _Z: %d _OV: %d _S: %d\n", appw, _CY, _Z, _OV, _S);
|
||||
|
||||
F12STOREOP2WORD();
|
||||
F12END();
|
||||
|
@ -871,7 +871,7 @@ static void execute_tracelog(running_machine &machine, int ref, int params, cons
|
||||
|
||||
static void execute_quit(running_machine &machine, int ref, int params, const char *param[])
|
||||
{
|
||||
mame_printf_error("Exited via the debugger\n");
|
||||
osd_printf_error("Exited via the debugger\n");
|
||||
machine.schedule_exit();
|
||||
}
|
||||
|
||||
|
@ -611,7 +611,7 @@ void parsed_expression::copy(const parsed_expression &src)
|
||||
void parsed_expression::print_tokens(FILE *out)
|
||||
{
|
||||
#if DEBUG_TOKENS
|
||||
mame_printf_debug("----\n");
|
||||
osd_printf_debug("----\n");
|
||||
for (parse_token *token = m_tokens.first(); token != NULL; token = token->next())
|
||||
{
|
||||
switch (token->type)
|
||||
@ -689,7 +689,7 @@ void parsed_expression::print_tokens(FILE *out)
|
||||
break;
|
||||
}
|
||||
}
|
||||
mame_printf_debug("----\n");
|
||||
osd_printf_debug("----\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ void *finder_base::find_memory(UINT8 width, size_t &bytes, bool required)
|
||||
if (width != 0 && share->width() != width)
|
||||
{
|
||||
if (required)
|
||||
mame_printf_warning("Shared ptr '%s' found but is width %d, not %d as requested\n", m_tag, share->width(), width);
|
||||
osd_printf_warning("Shared ptr '%s' found but is width %d, not %d as requested\n", m_tag, share->width(), width);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ bool finder_base::report_missing(bool found, const char *objname, bool required)
|
||||
{
|
||||
if (required && strcmp(m_tag, FINDER_DUMMY_TAG)==0)
|
||||
{
|
||||
mame_printf_error("Tag not defined for required device\n");
|
||||
osd_printf_error("Tag not defined for required device\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -80,8 +80,8 @@ bool finder_base::report_missing(bool found, const char *objname, bool required)
|
||||
|
||||
// otherwise, report
|
||||
if (required)
|
||||
mame_printf_error("Required %s '%s' not found\n", objname, m_tag);
|
||||
osd_printf_error("Required %s '%s' not found\n", objname, m_tag);
|
||||
else
|
||||
mame_printf_verbose("Optional %s '%s' not found\n", objname, m_tag);
|
||||
osd_printf_verbose("Optional %s '%s' not found\n", objname, m_tag);
|
||||
return !required;
|
||||
}
|
||||
|
@ -102,8 +102,8 @@ public:
|
||||
this->m_target = dynamic_cast<_DeviceClass *>(device);
|
||||
if (device != NULL && this->m_target == NULL)
|
||||
{
|
||||
void mame_printf_warning(const char *format, ...) ATTR_PRINTF(1,2);
|
||||
mame_printf_warning("Device '%s' found but is of incorrect type (actual type is %s)\n", this->m_tag, device->name());
|
||||
void osd_printf_warning(const char *format, ...) ATTR_PRINTF(1,2);
|
||||
osd_printf_warning("Device '%s' found but is of incorrect type (actual type is %s)\n", this->m_tag, device->name());
|
||||
}
|
||||
return this->report_missing(this->m_target != NULL, "device", _Required);
|
||||
}
|
||||
|
@ -461,15 +461,15 @@ void device_execute_interface::interface_validity_check(validity_checker &valid)
|
||||
{
|
||||
screen_device_iterator iter(device().mconfig().root_device());
|
||||
if (iter.first() == NULL)
|
||||
mame_printf_error("VBLANK interrupt specified, but the driver is screenless\n");
|
||||
osd_printf_error("VBLANK interrupt specified, but the driver is screenless\n");
|
||||
else if (m_vblank_interrupt_screen != NULL && device().siblingdevice(m_vblank_interrupt_screen) == NULL)
|
||||
mame_printf_error("VBLANK interrupt references a non-existant screen tag '%s'\n", m_vblank_interrupt_screen);
|
||||
osd_printf_error("VBLANK interrupt references a non-existant screen tag '%s'\n", m_vblank_interrupt_screen);
|
||||
}
|
||||
|
||||
if (!m_timed_interrupt.isnull() && m_timed_interrupt_period == attotime::zero)
|
||||
mame_printf_error("Timed interrupt handler specified with 0 period\n");
|
||||
osd_printf_error("Timed interrupt handler specified with 0 period\n");
|
||||
else if (m_timed_interrupt.isnull() && m_timed_interrupt_period != attotime::zero)
|
||||
mame_printf_error("No timer interrupt handler specified, but has a non-0 period given\n");
|
||||
osd_printf_error("No timer interrupt handler specified, but has a non-0 period given\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -295,7 +295,7 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con
|
||||
{
|
||||
// validate palette tag
|
||||
if (m_palette_tag == NULL)
|
||||
mame_printf_error("No palette specified for device '%s'\n", device().tag());
|
||||
osd_printf_error("No palette specified for device '%s'\n", device().tag());
|
||||
else
|
||||
{
|
||||
palette_device *palette;
|
||||
@ -305,7 +305,7 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con
|
||||
palette = device().subdevice<palette_device>(m_palette_tag);
|
||||
|
||||
if (palette == NULL)
|
||||
mame_printf_error("Device '%s' specifies nonexistent %sdevice '%s' as palette\n",
|
||||
osd_printf_error("Device '%s' specifies nonexistent %sdevice '%s' as palette\n",
|
||||
device().tag(),
|
||||
(m_palette_is_sibling ? "sibling " : "sub"),
|
||||
m_palette_tag);
|
||||
@ -333,7 +333,7 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con
|
||||
|
||||
UINT32 region_length = valid.region_length(gfxregion);
|
||||
if (region_length == 0)
|
||||
mame_printf_error("gfx[%d] references nonexistent region '%s'\n", gfxnum, gfxregion.cstr());
|
||||
osd_printf_error("gfx[%d] references nonexistent region '%s'\n", gfxnum, gfxregion.cstr());
|
||||
|
||||
// if we have a valid region, and we're not using auto-sizing, check the decode against the region length
|
||||
else if (!IS_FRAC(layout.total))
|
||||
@ -353,7 +353,7 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con
|
||||
|
||||
// if not, this is an error
|
||||
if ((start + len) / 8 > avail)
|
||||
mame_printf_error("gfx[%d] extends past allocated memory of region '%s'\n", gfxnum, region);
|
||||
osd_printf_error("gfx[%d] extends past allocated memory of region '%s'\n", gfxnum, region);
|
||||
}
|
||||
}
|
||||
|
||||
@ -364,16 +364,16 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con
|
||||
if (layout.planeoffset[0] == GFX_RAW)
|
||||
{
|
||||
if (layout.total != RGN_FRAC(1,1))
|
||||
mame_printf_error("gfx[%d] with unsupported layout total\n", gfxnum);
|
||||
osd_printf_error("gfx[%d] with unsupported layout total\n", gfxnum);
|
||||
if (xscale != 1 || yscale != 1)
|
||||
mame_printf_error("gfx[%d] with unsupported xscale/yscale\n", gfxnum);
|
||||
osd_printf_error("gfx[%d] with unsupported xscale/yscale\n", gfxnum);
|
||||
}
|
||||
|
||||
// verify traditional decode doesn't have too many planes
|
||||
else
|
||||
{
|
||||
if (layout.planes > MAX_GFX_PLANES)
|
||||
mame_printf_error("gfx[%d] with invalid planes\n", gfxnum);
|
||||
osd_printf_error("gfx[%d] with invalid planes\n", gfxnum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -698,8 +698,8 @@ void device_image_interface::determine_open_plan(int is_create, UINT32 *open_pla
|
||||
static void dump_wrong_and_correct_checksums(const hash_collection &hashes, const hash_collection &acthashes)
|
||||
{
|
||||
astring tempstr;
|
||||
mame_printf_error(" EXPECTED: %s\n", hashes.macro_string(tempstr));
|
||||
mame_printf_error(" FOUND: %s\n", acthashes.macro_string(tempstr));
|
||||
osd_printf_error(" EXPECTED: %s\n", hashes.macro_string(tempstr));
|
||||
osd_printf_error(" FOUND: %s\n", acthashes.macro_string(tempstr));
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
@ -716,7 +716,7 @@ static int verify_length_and_hash(emu_file *file, const char *name, UINT32 exple
|
||||
UINT32 actlength = file->size();
|
||||
if (explength != actlength)
|
||||
{
|
||||
mame_printf_error("%s WRONG LENGTH (expected: %d found: %d)\n", name, explength, actlength);
|
||||
osd_printf_error("%s WRONG LENGTH (expected: %d found: %d)\n", name, explength, actlength);
|
||||
retVal++;
|
||||
}
|
||||
|
||||
@ -725,20 +725,20 @@ static int verify_length_and_hash(emu_file *file, const char *name, UINT32 exple
|
||||
hash_collection &acthashes = file->hashes(hashes.hash_types(tempstr));
|
||||
if (hashes.flag(hash_collection::FLAG_NO_DUMP))
|
||||
{
|
||||
mame_printf_error("%s NO GOOD DUMP KNOWN\n", name);
|
||||
osd_printf_error("%s NO GOOD DUMP KNOWN\n", name);
|
||||
}
|
||||
/* verify checksums */
|
||||
else if (hashes != acthashes)
|
||||
{
|
||||
/* otherwise, it's just bad */
|
||||
mame_printf_error("%s WRONG CHECKSUMS:\n", name);
|
||||
osd_printf_error("%s WRONG CHECKSUMS:\n", name);
|
||||
dump_wrong_and_correct_checksums(hashes, acthashes);
|
||||
retVal++;
|
||||
}
|
||||
/* If it matches, but it is actually a bad dump, write it */
|
||||
else if (hashes.flag(hash_collection::FLAG_BAD_DUMP))
|
||||
{
|
||||
mame_printf_error("%s NEEDS REDUMP\n",name);
|
||||
osd_printf_error("%s NEEDS REDUMP\n",name);
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
@ -774,9 +774,9 @@ bool device_image_interface::load_software(software_list_device &swlist, const c
|
||||
|
||||
UINT32 supported = swinfo->supported();
|
||||
if (supported == SOFTWARE_SUPPORTED_PARTIAL)
|
||||
mame_printf_error("WARNING: support for software %s (in list %s) is only partial\n", swname, swlist.list_name());
|
||||
osd_printf_error("WARNING: support for software %s (in list %s) is only partial\n", swname, swlist.list_name());
|
||||
if (supported == SOFTWARE_SUPPORTED_NO)
|
||||
mame_printf_error("WARNING: support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name());
|
||||
osd_printf_error("WARNING: support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name());
|
||||
|
||||
// attempt reading up the chain through the parents and create a locationtag astring in the format
|
||||
// " swlist % clonename % parentname "
|
||||
@ -845,7 +845,7 @@ bool device_image_interface::load_software(software_list_device &swlist, const c
|
||||
}
|
||||
if (warningcount > 0)
|
||||
{
|
||||
mame_printf_error("WARNING: the software item might not run correctly.\n");
|
||||
osd_printf_error("WARNING: the software item might not run correctly.\n");
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
@ -966,7 +966,7 @@ done:
|
||||
if (device().machine().phase() == MACHINE_PHASE_RUNNING)
|
||||
popmessage("Error: Unable to %s image '%s': %s", is_create ? "create" : "load", path, error());
|
||||
else
|
||||
mame_printf_error("Error: Unable to %s image '%s': %s\n", is_create ? "create" : "load", path, error());
|
||||
osd_printf_error("Error: Unable to %s image '%s': %s\n", is_create ? "create" : "load", path, error());
|
||||
}
|
||||
clear();
|
||||
}
|
||||
@ -981,7 +981,7 @@ done:
|
||||
if (device().machine().phase() == MACHINE_PHASE_RUNNING)
|
||||
popmessage("Image '%s' was successfully %s.", path, is_create ? "created" : "loaded");
|
||||
else
|
||||
mame_printf_info("Image '%s' was successfully %s.\n", path, is_create ? "created" : "loaded");
|
||||
osd_printf_info("Image '%s' was successfully %s.\n", path, is_create ? "created" : "loaded");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1265,7 +1265,7 @@ bool device_image_interface::load_software_part(const char *path, software_part
|
||||
|
||||
// check compatibility
|
||||
if (!swpart->is_compatible(swpart->info().list()))
|
||||
mame_printf_warning("WARNING! the set %s might not work on this system due to missing filter(s) '%s'\n", swpart->info().shortname(), swpart->info().list().filter());
|
||||
osd_printf_warning("WARNING! the set %s might not work on this system due to missing filter(s) '%s'\n", swpart->info().shortname(), swpart->info().list().filter());
|
||||
|
||||
// check requirements and load those images
|
||||
const char *requirement = swpart->feature("requirement");
|
||||
|
@ -252,9 +252,9 @@ void device_memory_interface::interface_validity_check(validity_checker &valid)
|
||||
|
||||
// validate the global map parameters
|
||||
if (map->m_spacenum != spacenum)
|
||||
mame_printf_error("Space %d has address space %d handlers!\n", spacenum, map->m_spacenum);
|
||||
osd_printf_error("Space %d has address space %d handlers!\n", spacenum, map->m_spacenum);
|
||||
if (map->m_databits != datawidth)
|
||||
mame_printf_error("Wrong memory handlers provided for %s space! (width = %d, memory = %08x)\n", spaceconfig->m_name, datawidth, map->m_databits);
|
||||
osd_printf_error("Wrong memory handlers provided for %s space! (width = %d, memory = %08x)\n", spaceconfig->m_name, datawidth, map->m_databits);
|
||||
|
||||
// loop over entries and look for errors
|
||||
for (address_map_entry *entry = map->m_entrylist.first(); entry != NULL; entry = entry->next())
|
||||
@ -271,7 +271,7 @@ void device_memory_interface::interface_validity_check(validity_checker &valid)
|
||||
((entry->m_read.m_type != AMH_NONE && scan->m_read.m_type != AMH_NONE) ||
|
||||
(entry->m_write.m_type != AMH_NONE && scan->m_write.m_type != AMH_NONE)))
|
||||
{
|
||||
mame_printf_warning("%s space has overlapping memory (%X-%X,%d,%d) vs (%X-%X,%d,%d)\n", spaceconfig->m_name, entry->m_addrstart, entry->m_addrend, entry->m_read.m_type, entry->m_write.m_type, scan->m_addrstart, scan->m_addrend, scan->m_read.m_type, scan->m_write.m_type);
|
||||
osd_printf_warning("%s space has overlapping memory (%X-%X,%d,%d) vs (%X-%X,%d,%d)\n", spaceconfig->m_name, entry->m_addrstart, entry->m_addrend, entry->m_read.m_type, entry->m_write.m_type, scan->m_addrstart, scan->m_addrend, scan->m_read.m_type, scan->m_write.m_type);
|
||||
detected_overlap = true;
|
||||
break;
|
||||
}
|
||||
@ -279,11 +279,11 @@ void device_memory_interface::interface_validity_check(validity_checker &valid)
|
||||
|
||||
// look for inverted start/end pairs
|
||||
if (byteend < bytestart)
|
||||
mame_printf_error("Wrong %s memory read handler start = %08x > end = %08x\n", spaceconfig->m_name, entry->m_addrstart, entry->m_addrend);
|
||||
osd_printf_error("Wrong %s memory read handler start = %08x > end = %08x\n", spaceconfig->m_name, entry->m_addrstart, entry->m_addrend);
|
||||
|
||||
// look for misaligned entries
|
||||
if ((bytestart & (alignunit - 1)) != 0 || (byteend & (alignunit - 1)) != (alignunit - 1))
|
||||
mame_printf_error("Wrong %s memory read handler start = %08x, end = %08x ALIGN = %d\n", spaceconfig->m_name, entry->m_addrstart, entry->m_addrend, alignunit);
|
||||
osd_printf_error("Wrong %s memory read handler start = %08x, end = %08x ALIGN = %d\n", spaceconfig->m_name, entry->m_addrstart, entry->m_addrend, alignunit);
|
||||
|
||||
// if this is a program space, auto-assign implicit ROM entries
|
||||
if (entry->m_read.m_type == AMH_ROM && entry->m_region == NULL)
|
||||
@ -312,14 +312,14 @@ void device_memory_interface::interface_validity_check(validity_checker &valid)
|
||||
// verify the address range is within the region's bounds
|
||||
offs_t length = ROMREGION_GETLENGTH(romp);
|
||||
if (entry->m_rgnoffs + (byteend - bytestart + 1) > length)
|
||||
mame_printf_error("%s space memory map entry %X-%X extends beyond region '%s' size (%X)\n", spaceconfig->m_name, entry->m_addrstart, entry->m_addrend, entry->m_region, length);
|
||||
osd_printf_error("%s space memory map entry %X-%X extends beyond region '%s' size (%X)\n", spaceconfig->m_name, entry->m_addrstart, entry->m_addrend, entry->m_region, length);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
// error if not found
|
||||
if (!found)
|
||||
mame_printf_error("%s space memory map entry %X-%X references non-existant region '%s'\n", spaceconfig->m_name, entry->m_addrstart, entry->m_addrend, entry->m_region);
|
||||
osd_printf_error("%s space memory map entry %X-%X references non-existant region '%s'\n", spaceconfig->m_name, entry->m_addrstart, entry->m_addrend, entry->m_region);
|
||||
}
|
||||
|
||||
// make sure all devices exist
|
||||
@ -327,19 +327,19 @@ void device_memory_interface::interface_validity_check(validity_checker &valid)
|
||||
{
|
||||
astring temp(entry->m_read.m_tag);
|
||||
if (device().siblingdevice(temp) == NULL)
|
||||
mame_printf_error("%s space memory map entry references nonexistant device '%s'\n", spaceconfig->m_name, entry->m_read.m_tag);
|
||||
osd_printf_error("%s space memory map entry references nonexistant device '%s'\n", spaceconfig->m_name, entry->m_read.m_tag);
|
||||
}
|
||||
if (entry->m_write.m_type == AMH_DEVICE_DELEGATE && entry->m_write.m_tag != NULL)
|
||||
{
|
||||
astring temp(entry->m_write.m_tag);
|
||||
if (device().siblingdevice(temp) == NULL)
|
||||
mame_printf_error("%s space memory map entry references nonexistant device '%s'\n", spaceconfig->m_name, entry->m_write.m_tag);
|
||||
osd_printf_error("%s space memory map entry references nonexistant device '%s'\n", spaceconfig->m_name, entry->m_write.m_tag);
|
||||
}
|
||||
|
||||
// make sure ports exist
|
||||
// if ((entry->m_read.m_type == AMH_PORT && entry->m_read.m_tag != NULL && portlist.find(entry->m_read.m_tag) == NULL) ||
|
||||
// (entry->m_write.m_type == AMH_PORT && entry->m_write.m_tag != NULL && portlist.find(entry->m_write.m_tag) == NULL))
|
||||
// mame_printf_error("%s space memory map entry references nonexistant port tag '%s'\n", spaceconfig->m_name, entry->m_read.m_tag);
|
||||
// osd_printf_error("%s space memory map entry references nonexistant port tag '%s'\n", spaceconfig->m_name, entry->m_read.m_tag);
|
||||
|
||||
// validate bank and share tags
|
||||
if (entry->m_read.m_type == AMH_BANK)
|
||||
|
@ -240,12 +240,12 @@ void device_sound_interface::interface_validity_check(validity_checker &valid) c
|
||||
// find a device with the requested tag
|
||||
const device_t *target = device().siblingdevice(route->m_target.cstr());
|
||||
if (target == NULL)
|
||||
mame_printf_error("Attempting to route sound to non-existant device '%s'\n", route->m_target.cstr());
|
||||
osd_printf_error("Attempting to route sound to non-existant device '%s'\n", route->m_target.cstr());
|
||||
|
||||
// if it's not a speaker or a sound device, error
|
||||
const device_sound_interface *sound;
|
||||
if (target != NULL && target->type() != SPEAKER && !target->interface(sound))
|
||||
mame_printf_error("Attempting to route sound to a non-sound device '%s' (%s)\n", route->m_target.cstr(), target->name());
|
||||
osd_printf_error("Attempting to route sound to a non-sound device '%s' (%s)\n", route->m_target.cstr(), target->name());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ void device_video_interface::interface_validity_check(validity_checker &valid) c
|
||||
{
|
||||
screen = device().siblingdevice<screen_device>(m_screen_tag);
|
||||
if (screen == NULL)
|
||||
mame_printf_error("Screen '%s' not found, explicitly set for device '%s'\n", m_screen_tag, device().tag());
|
||||
osd_printf_error("Screen '%s' not found, explicitly set for device '%s'\n", m_screen_tag, device().tag());
|
||||
}
|
||||
|
||||
// otherwise, look for a single match
|
||||
@ -82,13 +82,13 @@ void device_video_interface::interface_validity_check(validity_checker &valid) c
|
||||
screen_device_iterator iter(device().mconfig().root_device());
|
||||
screen = iter.first();
|
||||
if (iter.next() != NULL)
|
||||
mame_printf_error("No screen specified for device '%s', but multiple screens found\n", device().tag());
|
||||
osd_printf_error("No screen specified for device '%s', but multiple screens found\n", device().tag());
|
||||
}
|
||||
}
|
||||
|
||||
// error if no screen is found
|
||||
if (screen == NULL && m_screen_required)
|
||||
mame_printf_error("Device '%s' requires a screen\n", device().tag());
|
||||
osd_printf_error("Device '%s' requires a screen\n", device().tag());
|
||||
}
|
||||
|
||||
|
||||
|
@ -56,7 +56,6 @@ EMUOBJS = \
|
||||
$(EMUOBJ)/config.o \
|
||||
$(EMUOBJ)/crsshair.o \
|
||||
$(EMUOBJ)/debugger.o \
|
||||
$(EMUOBJ)/delegate.o \
|
||||
$(EMUOBJ)/devdelegate.o \
|
||||
$(EMUOBJ)/devcb.o \
|
||||
$(EMUOBJ)/devcb2.o \
|
||||
@ -145,6 +144,7 @@ EMUOBJS = \
|
||||
$(EMUOBJ)/debugint/debugint.o \
|
||||
$(EMUOBJ)/profiler.o \
|
||||
$(EMUOBJ)/webengine.o \
|
||||
$(OSDOBJ)/osdcore.o \
|
||||
$(OSDOBJ)/osdepend.o \
|
||||
$(OSDOBJ)/osdnet.o
|
||||
|
||||
|
@ -538,7 +538,7 @@ bool emu_options::parse_one_ini(const char *basename, int priority, astring *err
|
||||
return false;
|
||||
|
||||
// parse the file
|
||||
mame_printf_verbose("Parsing %s.ini\n", basename);
|
||||
osd_printf_verbose("Parsing %s.ini\n", basename);
|
||||
astring error;
|
||||
bool result = parse_ini_file(file, priority, OPTION_PRIORITY_DRIVER_INI, error);
|
||||
|
||||
|
@ -812,11 +812,11 @@ input_device::input_device(input_class &_class, int devindex, const char *name,
|
||||
astring tempstr;
|
||||
if (!m_joymap.parse(mapstring))
|
||||
{
|
||||
mame_printf_error("Invalid joystick map: %s\n", mapstring);
|
||||
osd_printf_error("Invalid joystick map: %s\n", mapstring);
|
||||
m_joymap.parse(joystick_map_8way);
|
||||
}
|
||||
else if (mapstring != joystick_map_8way)
|
||||
mame_printf_verbose("Input: Default joystick map = %s\n", m_joymap.to_string(tempstr));
|
||||
osd_printf_verbose("Input: Default joystick map = %s\n", m_joymap.to_string(tempstr));
|
||||
}
|
||||
}
|
||||
|
||||
@ -990,7 +990,7 @@ input_device *input_class::add_device(int devindex, const char *name, void *inte
|
||||
// update the maximum index found
|
||||
m_maxindex = MAX(m_maxindex, devindex);
|
||||
|
||||
mame_printf_verbose("Input: Adding %s #%d: %s\n", (*devclass_string_table)[m_devclass], devindex, name);
|
||||
osd_printf_verbose("Input: Adding %s #%d: %s\n", (*devclass_string_table)[m_devclass], devindex, name);
|
||||
return m_device[devindex];
|
||||
}
|
||||
|
||||
@ -2074,7 +2074,7 @@ bool input_manager::set_global_joystick_map(const char *mapstring)
|
||||
return false;
|
||||
|
||||
astring tempstr;
|
||||
mame_printf_verbose("Input: Changing default joystick map = %s\n", map.to_string(tempstr));
|
||||
osd_printf_verbose("Input: Changing default joystick map = %s\n", map.to_string(tempstr));
|
||||
|
||||
// iterate over joysticks and set the map
|
||||
for (int joynum = 0; joynum <= m_joystick_class.maxindex(); joynum++)
|
||||
|
@ -2474,7 +2474,7 @@ time_t ioport_manager::initialize()
|
||||
astring errors;
|
||||
m_portlist.append(*device, errors);
|
||||
if (errors)
|
||||
mame_printf_error("Input port errors:\n%s", errors.cstr());
|
||||
osd_printf_error("Input port errors:\n%s", errors.cstr());
|
||||
}
|
||||
|
||||
// do we have a keyboard? if so, we may need to change default UI keys in response
|
||||
@ -2624,7 +2624,7 @@ void ioport_manager::init_autoselect_devices(int type1, int type2, int type3, co
|
||||
return;
|
||||
}
|
||||
else if (strcmp(stemp, "keyboard") != 0)
|
||||
mame_printf_error("Invalid %s value %s; reverting to keyboard\n", option, stemp);
|
||||
osd_printf_error("Invalid %s value %s; reverting to keyboard\n", option, stemp);
|
||||
|
||||
// only scan the list if we haven't already enabled this class of control
|
||||
if (first_port() != NULL && !machine().input().device_class(autoenable).enabled())
|
||||
@ -2634,7 +2634,7 @@ void ioport_manager::init_autoselect_devices(int type1, int type2, int type3, co
|
||||
// if this port type is in use, apply the autoselect criteria
|
||||
if ((type1 != 0 && field->type() == type1) || (type2 != 0 && field->type() == type2) || (type3 != 0 && field->type() == type3))
|
||||
{
|
||||
mame_printf_verbose("Input: Autoenabling %s due to presence of a %s\n", autostring, ananame);
|
||||
osd_printf_verbose("Input: Autoenabling %s due to presence of a %s\n", autostring, ananame);
|
||||
machine().input().device_class(autoenable).enable();
|
||||
break;
|
||||
}
|
||||
@ -3469,16 +3469,16 @@ time_t ioport_manager::playback_init()
|
||||
fatalerror("Input file format version mismatch\n");
|
||||
|
||||
// output info to console
|
||||
mame_printf_info("Input file: %s\n", filename);
|
||||
mame_printf_info("INP version %d.%d\n", header[0x10], header[0x11]);
|
||||
osd_printf_info("Input file: %s\n", filename);
|
||||
osd_printf_info("INP version %d.%d\n", header[0x10], header[0x11]);
|
||||
time_t basetime = header[0x08] | (header[0x09] << 8) | (header[0x0a] << 16) | (header[0x0b] << 24) |
|
||||
((UINT64)header[0x0c] << 32) | ((UINT64)header[0x0d] << 40) | ((UINT64)header[0x0e] << 48) | ((UINT64)header[0x0f] << 56);
|
||||
mame_printf_info("Created %s\n", ctime(&basetime));
|
||||
mame_printf_info("Recorded using %s\n", header + 0x20);
|
||||
osd_printf_info("Created %s\n", ctime(&basetime));
|
||||
osd_printf_info("Recorded using %s\n", header + 0x20);
|
||||
|
||||
// verify the header against the current game
|
||||
if (memcmp(machine().system().name, header + 0x14, strlen(machine().system().name) + 1) != 0)
|
||||
mame_printf_info("Input file is for %s '%s', not for current %s '%s'\n", emulator_info::get_gamenoun(), header + 0x14, emulator_info::get_gamenoun(), machine().system().name);
|
||||
osd_printf_info("Input file is for %s '%s', not for current %s '%s'\n", emulator_info::get_gamenoun(), header + 0x14, emulator_info::get_gamenoun(), machine().system().name);
|
||||
|
||||
// enable compression
|
||||
m_playback_file.compress(FCOMPRESS_MEDIUM);
|
||||
@ -3504,8 +3504,8 @@ void ioport_manager::playback_end(const char *message)
|
||||
|
||||
// display speed stats
|
||||
m_playback_accumulated_speed /= m_playback_accumulated_frames;
|
||||
mame_printf_info("Total playback frames: %d\n", UINT32(m_playback_accumulated_frames));
|
||||
mame_printf_info("Average recorded speed: %d%%\n", UINT32((m_playback_accumulated_speed * 200 + 1) >> 21));
|
||||
osd_printf_info("Total playback frames: %d\n", UINT32(m_playback_accumulated_frames));
|
||||
osd_printf_info("Average recorded speed: %d%%\n", UINT32((m_playback_accumulated_speed * 200 + 1) >> 21));
|
||||
}
|
||||
}
|
||||
|
||||
@ -4521,7 +4521,7 @@ int validate_natural_keyboard_statics(void)
|
||||
{
|
||||
if (last_char >= charinfo[i].ch)
|
||||
{
|
||||
mame_printf_error("inputx: charinfo is out of order; 0x%08x should be higher than 0x%08x\n", charinfo[i].ch, last_char);
|
||||
osd_printf_error("inputx: charinfo is out of order; 0x%08x should be higher than 0x%08x\n", charinfo[i].ch, last_char);
|
||||
error = TRUE;
|
||||
}
|
||||
last_char = charinfo[i].ch;
|
||||
@ -4533,7 +4533,7 @@ int validate_natural_keyboard_statics(void)
|
||||
ci = char_info::find(charinfo[i].ch);
|
||||
if (ci != &charinfo[i])
|
||||
{
|
||||
mame_printf_error("ioport: expected char_info::find(0x%08x) to work properly\n", charinfo[i].ch);
|
||||
osd_printf_error("ioport: expected char_info::find(0x%08x) to work properly\n", charinfo[i].ch);
|
||||
error = TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ void lua_engine::close()
|
||||
if (m_lua_state) {
|
||||
// close the Lua state
|
||||
lua_close(m_lua_state);
|
||||
mame_printf_verbose("[LUA] End executing script\n");
|
||||
osd_printf_verbose("[LUA] End executing script\n");
|
||||
m_lua_state = NULL;
|
||||
}
|
||||
}
|
||||
@ -118,7 +118,7 @@ void lua_engine::close()
|
||||
void lua_engine::report_errors(int status)
|
||||
{
|
||||
if ( status!=0 ) {
|
||||
mame_printf_error("[LUA ERROR] %s\n",lua_tostring(m_lua_state, -1));
|
||||
osd_printf_error("[LUA ERROR] %s\n",lua_tostring(m_lua_state, -1));
|
||||
lua_pop(m_lua_state, 1); // remove error message
|
||||
|
||||
close(); // close in case of error
|
||||
@ -151,7 +151,7 @@ void lua_engine::execute(const char *filename)
|
||||
int s = luaL_loadfile(m_lua_state, filename);
|
||||
report_errors(s);
|
||||
|
||||
mame_printf_verbose("[LUA] Start executing script\n");
|
||||
osd_printf_verbose("[LUA] Start executing script\n");
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -165,7 +165,7 @@ void lua_engine::execute_string(const char *value)
|
||||
int s = luaL_loadstring(m_lua_state, value);
|
||||
report_errors(s);
|
||||
|
||||
mame_printf_verbose("[LUA] Start executing script\n");
|
||||
osd_printf_verbose("[LUA] Start executing script\n");
|
||||
}
|
||||
//-------------------------------------------------
|
||||
// lua_execute - execute slice of lua script
|
||||
|
@ -402,29 +402,29 @@ int running_machine::run(bool firstrun)
|
||||
}
|
||||
catch (emu_fatalerror &fatal)
|
||||
{
|
||||
mame_printf_error("FATALERROR: %s\n", fatal.string());
|
||||
osd_printf_error("FATALERROR: %s\n", fatal.string());
|
||||
error = MAMERR_FATALERROR;
|
||||
if (fatal.exitcode() != 0)
|
||||
error = fatal.exitcode();
|
||||
}
|
||||
catch (emu_exception &)
|
||||
{
|
||||
mame_printf_error("Caught unhandled emulator exception\n");
|
||||
osd_printf_error("Caught unhandled emulator exception\n");
|
||||
error = MAMERR_FATALERROR;
|
||||
}
|
||||
catch (binding_type_exception &btex)
|
||||
{
|
||||
mame_printf_error("Error performing a late bind of type %s to %s\n", btex.m_actual_type.name(), btex.m_target_type.name());
|
||||
osd_printf_error("Error performing a late bind of type %s to %s\n", btex.m_actual_type.name(), btex.m_target_type.name());
|
||||
error = MAMERR_FATALERROR;
|
||||
}
|
||||
catch (std::exception &ex)
|
||||
{
|
||||
mame_printf_error("Caught unhandled %s exception: %s\n", typeid(ex).name(), ex.what());
|
||||
osd_printf_error("Caught unhandled %s exception: %s\n", typeid(ex).name(), ex.what());
|
||||
error = MAMERR_FATALERROR;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
mame_printf_error("Caught unhandled exception\n");
|
||||
osd_printf_error("Caught unhandled exception\n");
|
||||
error = MAMERR_FATALERROR;
|
||||
}
|
||||
|
||||
@ -1078,7 +1078,7 @@ void running_machine::start_all_devices()
|
||||
device->set_machine(*this);
|
||||
|
||||
// now start the device
|
||||
mame_printf_verbose("Starting %s '%s'\n", device->name(), device->tag());
|
||||
osd_printf_verbose("Starting %s '%s'\n", device->name(), device->tag());
|
||||
device->start();
|
||||
}
|
||||
|
||||
@ -1086,7 +1086,7 @@ void running_machine::start_all_devices()
|
||||
catch (device_missing_dependencies &)
|
||||
{
|
||||
// if we're the end, fail
|
||||
mame_printf_verbose(" (missing dependencies; rescheduling)\n");
|
||||
osd_printf_verbose(" (missing dependencies; rescheduling)\n");
|
||||
failed_starts++;
|
||||
}
|
||||
}
|
||||
|
@ -48,19 +48,6 @@ enum machine_notification
|
||||
};
|
||||
|
||||
|
||||
// output channels
|
||||
enum output_channel
|
||||
{
|
||||
OUTPUT_CHANNEL_ERROR,
|
||||
OUTPUT_CHANNEL_WARNING,
|
||||
OUTPUT_CHANNEL_INFO,
|
||||
OUTPUT_CHANNEL_DEBUG,
|
||||
OUTPUT_CHANNEL_VERBOSE,
|
||||
OUTPUT_CHANNEL_LOG,
|
||||
OUTPUT_CHANNEL_COUNT
|
||||
};
|
||||
|
||||
|
||||
// debug flags
|
||||
const int DEBUG_FLAG_ENABLED = 0x00000001; // debugging is enabled
|
||||
const int DEBUG_FLAG_CALL_HOOK = 0x00000002; // CPU cores must call instruction hook
|
||||
|
@ -112,7 +112,7 @@ void lsi53c810_device::dmaop_select()
|
||||
sstat1 &= ~0x07; // clear current bus phase
|
||||
if (dcmd & 0x01000000) // select with ATN
|
||||
{
|
||||
mame_printf_debug("53c810: want select with ATN, setting message phase\n");
|
||||
osd_printf_debug("53c810: want select with ATN, setting message phase\n");
|
||||
sstat1 |= 0x7; // ATN means we want message in phase
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ READ8_MEMBER( am53cf96_device::read )
|
||||
|
||||
if (offset == REG_FIFO)
|
||||
{
|
||||
// mame_printf_debug("53cf96: read FIFO PC=%x\n", space.device().safe_pc());
|
||||
// osd_printf_debug("53cf96: read FIFO PC=%x\n", space.device().safe_pc());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ WRITE8_MEMBER( am53cf96_device::write )
|
||||
// FIFO
|
||||
if (offset == REG_FIFO)
|
||||
{
|
||||
// mame_printf_debug("%02x to FIFO @ %02d\n", data, fptr);
|
||||
// osd_printf_debug("%02x to FIFO @ %02d\n", data, fptr);
|
||||
fifo[fptr++] = data;
|
||||
if (fptr > 15)
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define PRINTF_IDE_COMMANDS 0
|
||||
|
||||
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
||||
#define LOGPRINT(x) do { if (VERBOSE) logerror x; if (PRINTF_IDE_COMMANDS) mame_printf_debug x; } while (0)
|
||||
#define LOGPRINT(x) do { if (VERBOSE) logerror x; if (PRINTF_IDE_COMMANDS) osd_printf_debug x; } while (0)
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -216,11 +216,11 @@ void eeprom_base_device::device_validity_check(validity_checker &valid) const
|
||||
{
|
||||
// ensure the number of cells is an even power of 2
|
||||
if (m_cells != (1 << m_address_bits))
|
||||
mame_printf_error("Invalid EEPROM size %d specified\n", m_cells);
|
||||
osd_printf_error("Invalid EEPROM size %d specified\n", m_cells);
|
||||
|
||||
// ensure only the sizes we support are requested
|
||||
if (m_data_bits != 8 && m_data_bits != 16)
|
||||
mame_printf_error("Invalid EEPROM data width %d specified\n", m_data_bits);
|
||||
osd_printf_error("Invalid EEPROM data width %d specified\n", m_data_bits);
|
||||
}
|
||||
|
||||
|
||||
@ -278,7 +278,7 @@ void eeprom_base_device::nvram_default()
|
||||
// handle hard-coded data from the driver
|
||||
if (m_default_data.u8 != NULL)
|
||||
{
|
||||
mame_printf_verbose("Warning: Driver-specific EEPROM defaults are going away soon.\n");
|
||||
osd_printf_verbose("Warning: Driver-specific EEPROM defaults are going away soon.\n");
|
||||
for (offs_t offs = 0; offs < m_default_data_size; offs++)
|
||||
{
|
||||
if (m_data_bits == 8)
|
||||
@ -297,7 +297,7 @@ void eeprom_base_device::nvram_default()
|
||||
fatalerror("eeprom region '%s' needs to be an 8-bit region\n", tag());
|
||||
if (m_data_bits == 16 && (m_region->width() != 2 || m_region->endianness() != ENDIANNESS_BIG))
|
||||
fatalerror("eeprom region '%s' needs to be a 16-bit big-endian region\n", tag());
|
||||
mame_printf_verbose("Loading data from EEPROM region '%s'\n", tag());
|
||||
osd_printf_verbose("Loading data from EEPROM region '%s'\n", tag());
|
||||
|
||||
for (offs_t offs = 0; offs < eeprom_length; offs++)
|
||||
if (m_data_bits == 8)
|
||||
|
@ -10,7 +10,7 @@
|
||||
#define PRINTF_IDE_COMMANDS 0
|
||||
#define PRINTF_IDE_PASSWORD 0
|
||||
|
||||
#define LOGPRINT(x) do { if (VERBOSE) logerror x; if (PRINTF_IDE_COMMANDS) mame_printf_debug x; } while (0)
|
||||
#define LOGPRINT(x) do { if (VERBOSE) logerror x; if (PRINTF_IDE_COMMANDS) osd_printf_debug x; } while (0)
|
||||
|
||||
#define TIME_PER_SECTOR (attotime::from_usec(100))
|
||||
#define TIME_PER_ROTATION (attotime::from_hz(5400/60))
|
||||
@ -480,12 +480,12 @@ void ata_mass_storage_device::process_buffer()
|
||||
for (i = 0; i < 34; i += 2)
|
||||
{
|
||||
if (i % 8 == 2)
|
||||
mame_printf_debug("\n");
|
||||
osd_printf_debug("\n");
|
||||
|
||||
mame_printf_debug("0x%02x, 0x%02x, ", m_buffer[i], m_buffer[i + 1]);
|
||||
//mame_printf_debug("0x%02x%02x, ", m_buffer[i], m_buffer[i + 1]);
|
||||
osd_printf_debug("0x%02x, 0x%02x, ", m_buffer[i], m_buffer[i + 1]);
|
||||
//osd_printf_debug("0x%02x%02x, ", m_buffer[i], m_buffer[i + 1]);
|
||||
}
|
||||
mame_printf_debug("\n");
|
||||
osd_printf_debug("\n");
|
||||
}
|
||||
|
||||
if (m_master_password_enable || m_user_password_enable)
|
||||
@ -766,8 +766,8 @@ void ide_hdd_device::device_reset()
|
||||
m_num_cylinders = hdinfo->cylinders;
|
||||
m_num_sectors = hdinfo->sectors;
|
||||
m_num_heads = hdinfo->heads;
|
||||
if (PRINTF_IDE_COMMANDS) mame_printf_debug("CHS: %d %d %d\n", m_num_cylinders, m_num_heads, m_num_sectors);
|
||||
mame_printf_debug("CHS: %d %d %d\n", m_num_cylinders, m_num_heads, m_num_sectors);
|
||||
if (PRINTF_IDE_COMMANDS) osd_printf_debug("CHS: %d %d %d\n", m_num_cylinders, m_num_heads, m_num_sectors);
|
||||
osd_printf_debug("CHS: %d %d %d\n", m_num_cylinders, m_num_heads, m_num_sectors);
|
||||
}
|
||||
|
||||
// build the features page
|
||||
|
@ -47,7 +47,7 @@ READ8_MEMBER(k056230_device::read)
|
||||
}
|
||||
}
|
||||
|
||||
// mame_printf_debug("k056230_r: %d at %08X\n", offset, space.device().safe_pc());
|
||||
// osd_printf_debug("k056230_r: %d at %08X\n", offset, space.device().safe_pc());
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -94,17 +94,17 @@ WRITE8_MEMBER(k056230_device::write)
|
||||
break;
|
||||
}
|
||||
}
|
||||
// mame_printf_debug("k056230_w: %d, %02X at %08X\n", offset, data, space.device().safe_pc());
|
||||
// osd_printf_debug("k056230_w: %d, %02X at %08X\n", offset, data, space.device().safe_pc());
|
||||
}
|
||||
|
||||
READ32_MEMBER(k056230_device::lanc_ram_r)
|
||||
{
|
||||
//mame_printf_debug("LANC_RAM_r: %08X, %08X at %08X\n", offset, mem_mask, space.device().safe_pc());
|
||||
//osd_printf_debug("LANC_RAM_r: %08X, %08X at %08X\n", offset, mem_mask, space.device().safe_pc());
|
||||
return m_ram[offset & 0x7ff];
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(k056230_device::lanc_ram_w)
|
||||
{
|
||||
//mame_printf_debug("LANC_RAM_w: %08X, %08X, %08X at %08X\n", data, offset, mem_mask, space.device().safe_pc());
|
||||
//osd_printf_debug("LANC_RAM_w: %08X, %08X, %08X at %08X\n", data, offset, mem_mask, space.device().safe_pc());
|
||||
COMBINE_DATA(m_ram + (offset & 0x7ff));
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ void laserdisc_device::device_validity_check(validity_checker &valid) const
|
||||
{
|
||||
texture_format texformat = !m_overupdate_ind16.isnull() ? TEXFORMAT_PALETTE16 : TEXFORMAT_RGB32;
|
||||
if (m_overlay_palette == NULL && texformat == TEXFORMAT_PALETTE16)
|
||||
mame_printf_error("Overlay screen does not have palette defined\n");
|
||||
osd_printf_error("Overlay screen does not have palette defined\n");
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -179,14 +179,14 @@ latch8_device::latch8_device(const machine_config &mconfig, const char *tag, dev
|
||||
|
||||
void latch8_device::device_validity_check(validity_checker &valid) const
|
||||
{
|
||||
if (!m_read_0.isnull() && !m_write_0.isnull()) mame_printf_error("Device %s: Bit 0 already has a handler.\n", tag());
|
||||
if (!m_read_1.isnull() && !m_write_1.isnull()) mame_printf_error("Device %s: Bit 1 already has a handler.\n", tag());
|
||||
if (!m_read_2.isnull() && !m_write_2.isnull()) mame_printf_error("Device %s: Bit 2 already has a handler.\n", tag());
|
||||
if (!m_read_3.isnull() && !m_write_3.isnull()) mame_printf_error("Device %s: Bit 3 already has a handler.\n", tag());
|
||||
if (!m_read_4.isnull() && !m_write_4.isnull()) mame_printf_error("Device %s: Bit 4 already has a handler.\n", tag());
|
||||
if (!m_read_5.isnull() && !m_write_5.isnull()) mame_printf_error("Device %s: Bit 5 already has a handler.\n", tag());
|
||||
if (!m_read_6.isnull() && !m_write_6.isnull()) mame_printf_error("Device %s: Bit 6 already has a handler.\n", tag());
|
||||
if (!m_read_7.isnull() && !m_write_7.isnull()) mame_printf_error("Device %s: Bit 7 already has a handler.\n", tag());
|
||||
if (!m_read_0.isnull() && !m_write_0.isnull()) osd_printf_error("Device %s: Bit 0 already has a handler.\n", tag());
|
||||
if (!m_read_1.isnull() && !m_write_1.isnull()) osd_printf_error("Device %s: Bit 1 already has a handler.\n", tag());
|
||||
if (!m_read_2.isnull() && !m_write_2.isnull()) osd_printf_error("Device %s: Bit 2 already has a handler.\n", tag());
|
||||
if (!m_read_3.isnull() && !m_write_3.isnull()) osd_printf_error("Device %s: Bit 3 already has a handler.\n", tag());
|
||||
if (!m_read_4.isnull() && !m_write_4.isnull()) osd_printf_error("Device %s: Bit 4 already has a handler.\n", tag());
|
||||
if (!m_read_5.isnull() && !m_write_5.isnull()) osd_printf_error("Device %s: Bit 5 already has a handler.\n", tag());
|
||||
if (!m_read_6.isnull() && !m_write_6.isnull()) osd_printf_error("Device %s: Bit 6 already has a handler.\n", tag());
|
||||
if (!m_read_7.isnull() && !m_write_7.isnull()) osd_printf_error("Device %s: Bit 7 already has a handler.\n", tag());
|
||||
}
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
|
@ -515,7 +515,7 @@ READ8_MEMBER( pioneer_pr8210_device::i8049_pia_r )
|
||||
break;
|
||||
|
||||
default:
|
||||
mame_printf_debug("%03X:Unknown PR-8210 PIA read from offset %02X\n", space.device().safe_pc(), offset);
|
||||
osd_printf_debug("%03X:Unknown PR-8210 PIA read from offset %02X\n", space.device().safe_pc(), offset);
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
@ -587,7 +587,7 @@ WRITE8_MEMBER( pioneer_pr8210_device::i8049_pia_w )
|
||||
|
||||
// no other writes known
|
||||
default:
|
||||
mame_printf_debug("%03X:Unknown PR-8210 PIA write to offset %02X = %02X\n", space.device().safe_pc(), offset, data);
|
||||
osd_printf_debug("%03X:Unknown PR-8210 PIA write to offset %02X = %02X\n", space.device().safe_pc(), offset, data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -393,9 +393,9 @@ WRITE8_MEMBER( phillips_22vp931_device::i8049_output1_w )
|
||||
|
||||
if (LOG_PORTS && (m_i8049_out1 ^ data) & 0x08)
|
||||
{
|
||||
mame_printf_debug("%03X:out1:", space.device().safe_pc());
|
||||
if (!(data & 0x08)) mame_printf_debug(" SMS");
|
||||
mame_printf_debug("\n");
|
||||
osd_printf_debug("%03X:out1:", space.device().safe_pc());
|
||||
if (!(data & 0x08)) osd_printf_debug(" SMS");
|
||||
osd_printf_debug("\n");
|
||||
m_i8049_out1 = data;
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ void ram_device::device_validity_check(validity_checker &valid) const
|
||||
|
||||
/* verify default ram value */
|
||||
if (default_size() == 0)
|
||||
mame_printf_error("Invalid default RAM option: %s\n", m_default_size);
|
||||
osd_printf_error("Invalid default RAM option: %s\n", m_default_size);
|
||||
|
||||
/* command line options are only parsed for the device named RAM_TAG */
|
||||
if (tag() != NULL && strcmp(tag(), ":" RAM_TAG) == 0)
|
||||
@ -97,7 +97,7 @@ void ram_device::device_validity_check(validity_checker &valid) const
|
||||
specified_ram = parse_string(ramsize_string);
|
||||
|
||||
if (specified_ram == 0)
|
||||
mame_printf_error("Cannot recognize the RAM option %s\n", ramsize_string);
|
||||
osd_printf_error("Cannot recognize the RAM option %s\n", ramsize_string);
|
||||
|
||||
if (gamename_option != NULL && *gamename_option != 0 && strcmp(gamename_option, mconfig().gamedrv().name) == 0)
|
||||
{
|
||||
@ -123,7 +123,7 @@ void ram_device::device_validity_check(validity_checker &valid) const
|
||||
UINT32 option_ram_size = parse_string(p);
|
||||
|
||||
if (option_ram_size == 0)
|
||||
mame_printf_error("Invalid RAM option: %s\n", p);
|
||||
osd_printf_error("Invalid RAM option: %s\n", p);
|
||||
|
||||
if (option_ram_size == specified_ram)
|
||||
is_valid = TRUE;
|
||||
@ -162,9 +162,9 @@ void ram_device::device_validity_check(validity_checker &valid) const
|
||||
else
|
||||
output.catprintf(").\n");
|
||||
|
||||
mame_printf_error("%s", output.cstr());
|
||||
osd_printf_error("%s", output.cstr());
|
||||
|
||||
mame_printf_warning("Setting value to default %s\n",m_default_size);
|
||||
osd_printf_warning("Setting value to default %s\n",m_default_size);
|
||||
astring error;
|
||||
mconfig().options().set_value(OPTION_RAMSIZE, m_default_size, OPTION_PRIORITY_CMDLINE, error);
|
||||
assert(!error);
|
||||
|
@ -204,7 +204,7 @@ void saturn_state::cd_exec_command( void )
|
||||
break;
|
||||
|
||||
default:
|
||||
mame_printf_error("CD: Unknown request to Get Session Info %x\n", cr1 & 0xff);
|
||||
osd_printf_error("CD: Unknown request to Get Session Info %x\n", cr1 & 0xff);
|
||||
cr1 = cd_stat;
|
||||
cr2 = 0;
|
||||
cr3 = 0;
|
||||
@ -1991,7 +1991,7 @@ READ32_MEMBER( saturn_state::stvcd_r )
|
||||
}
|
||||
else
|
||||
{
|
||||
mame_printf_error("CD: Unknown data buffer read @ mask = %08x\n", mem_mask);
|
||||
osd_printf_error("CD: Unknown data buffer read @ mask = %08x\n", mem_mask);
|
||||
}
|
||||
|
||||
break;
|
||||
@ -2115,7 +2115,7 @@ void saturn_state::read_new_dir(UINT32 fileno)
|
||||
// easy to fix, but make sure we *need* to first
|
||||
if (curroot.length > MAX_DIR_SIZE)
|
||||
{
|
||||
mame_printf_error("ERROR: root directory too big (%d)\n", curroot.length);
|
||||
osd_printf_error("ERROR: root directory too big (%d)\n", curroot.length);
|
||||
}
|
||||
|
||||
// done with all that, read the root directory now
|
||||
@ -2126,7 +2126,7 @@ void saturn_state::read_new_dir(UINT32 fileno)
|
||||
{
|
||||
if (curdir[fileno].length > MAX_DIR_SIZE)
|
||||
{
|
||||
mame_printf_error("ERROR: new directory too big (%d)!\n", curdir[fileno].length);
|
||||
osd_printf_error("ERROR: new directory too big (%d)!\n", curdir[fileno].length);
|
||||
}
|
||||
make_dir_current(curdir[fileno].firstfad);
|
||||
}
|
||||
|
168
src/emu/mame.c
168
src/emu/mame.c
@ -96,26 +96,8 @@
|
||||
/* started empty? */
|
||||
static bool started_empty;
|
||||
|
||||
static bool print_verbose = false;
|
||||
|
||||
static running_machine *global_machine;
|
||||
|
||||
/* output channels */
|
||||
static output_delegate output_cb[OUTPUT_CHANNEL_COUNT] =
|
||||
{
|
||||
output_delegate(FUNC(mame_file_output_callback), stderr), // OUTPUT_CHANNEL_ERROR
|
||||
output_delegate(FUNC(mame_file_output_callback), stderr), // OUTPUT_CHANNEL_WARNING
|
||||
output_delegate(FUNC(mame_file_output_callback), stdout), // OUTPUT_CHANNEL_INFO
|
||||
#ifdef MAME_DEBUG
|
||||
output_delegate(FUNC(mame_file_output_callback), stdout), // OUTPUT_CHANNEL_DEBUG
|
||||
#else
|
||||
output_delegate(FUNC(mame_null_output_callback), stdout), // OUTPUT_CHANNEL_DEBUG
|
||||
#endif
|
||||
output_delegate(FUNC(mame_file_output_callback), stdout), // OUTPUT_CHANNEL_VERBOSE
|
||||
output_delegate(FUNC(mame_file_output_callback), stdout) // OUTPUT_CHANNEL_LOG
|
||||
};
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
CORE IMPLEMENTATION
|
||||
@ -130,10 +112,6 @@ int mame_execute(emu_options &options, osd_interface &osd)
|
||||
bool firstgame = true;
|
||||
bool firstrun = true;
|
||||
|
||||
// extract the verbose printing option
|
||||
if (options.verbose())
|
||||
print_verbose = true;
|
||||
|
||||
// loop across multiple hard resets
|
||||
bool exit_pending = false;
|
||||
int error = MAMERR_NONE;
|
||||
@ -201,152 +179,6 @@ int mame_execute(emu_options &options, osd_interface &osd)
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
OUTPUT MANAGEMENT
|
||||
***************************************************************************/
|
||||
|
||||
/*-------------------------------------------------
|
||||
mame_set_output_channel - configure an output
|
||||
channel
|
||||
-------------------------------------------------*/
|
||||
|
||||
output_delegate mame_set_output_channel(output_channel channel, output_delegate callback)
|
||||
{
|
||||
assert(channel < OUTPUT_CHANNEL_COUNT);
|
||||
assert(!callback.isnull());
|
||||
|
||||
/* return the originals if requested */
|
||||
output_delegate prevcb = output_cb[channel];
|
||||
|
||||
/* set the new ones */
|
||||
output_cb[channel] = callback;
|
||||
return prevcb;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
mame_file_output_callback - default callback
|
||||
for file output
|
||||
-------------------------------------------------*/
|
||||
|
||||
void mame_file_output_callback(FILE *param, const char *format, va_list argptr)
|
||||
{
|
||||
vfprintf(param, format, argptr);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
mame_null_output_callback - default callback
|
||||
for no output
|
||||
-------------------------------------------------*/
|
||||
|
||||
void mame_null_output_callback(FILE *param, const char *format, va_list argptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
mame_printf_error - output an error to the
|
||||
appropriate callback
|
||||
-------------------------------------------------*/
|
||||
|
||||
void mame_printf_error(const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
/* do the output */
|
||||
va_start(argptr, format);
|
||||
output_cb[OUTPUT_CHANNEL_ERROR](format, argptr);
|
||||
va_end(argptr);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
mame_printf_warning - output a warning to the
|
||||
appropriate callback
|
||||
-------------------------------------------------*/
|
||||
|
||||
void mame_printf_warning(const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
/* do the output */
|
||||
va_start(argptr, format);
|
||||
output_cb[OUTPUT_CHANNEL_WARNING](format, argptr);
|
||||
va_end(argptr);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
mame_printf_info - output info text to the
|
||||
appropriate callback
|
||||
-------------------------------------------------*/
|
||||
|
||||
void mame_printf_info(const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
/* do the output */
|
||||
va_start(argptr, format);
|
||||
output_cb[OUTPUT_CHANNEL_INFO](format, argptr);
|
||||
va_end(argptr);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
mame_printf_verbose - output verbose text to
|
||||
the appropriate callback
|
||||
-------------------------------------------------*/
|
||||
|
||||
void mame_printf_verbose(const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
/* if we're not verbose, skip it */
|
||||
if (!print_verbose)
|
||||
return;
|
||||
|
||||
/* do the output */
|
||||
va_start(argptr, format);
|
||||
output_cb[OUTPUT_CHANNEL_VERBOSE](format, argptr);
|
||||
va_end(argptr);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
mame_printf_debug - output debug text to the
|
||||
appropriate callback
|
||||
-------------------------------------------------*/
|
||||
|
||||
void mame_printf_debug(const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
/* do the output */
|
||||
va_start(argptr, format);
|
||||
output_cb[OUTPUT_CHANNEL_DEBUG](format, argptr);
|
||||
va_end(argptr);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
mame_printf_log - output log text to the
|
||||
appropriate callback
|
||||
-------------------------------------------------*/
|
||||
|
||||
#ifdef UNUSED_FUNCTION
|
||||
void mame_printf_log(const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
/* do the output */
|
||||
va_start(argptr, format);
|
||||
output_cb[OUTPUT_CHANNEL_LOG])(format, argptr);
|
||||
va_end(argptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
MISCELLANEOUS
|
||||
***************************************************************************/
|
||||
|
@ -48,9 +48,6 @@ enum
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// output channel callback
|
||||
typedef delegate<void (const char *, va_list)> output_delegate;
|
||||
|
||||
class emulator_info
|
||||
{
|
||||
public:
|
||||
@ -97,31 +94,6 @@ extern const char build_version[];
|
||||
int mame_execute(emu_options &options, osd_interface &osd);
|
||||
|
||||
|
||||
|
||||
/* ----- output management ----- */
|
||||
|
||||
/* set the output handler for a channel, returns the current one */
|
||||
output_delegate mame_set_output_channel(output_channel channel, output_delegate callback);
|
||||
|
||||
/* built-in default callbacks */
|
||||
void mame_file_output_callback(FILE *file, const char *format, va_list argptr);
|
||||
void mame_null_output_callback(FILE *param, const char *format, va_list argptr);
|
||||
|
||||
/* calls to be used by the code */
|
||||
void mame_printf_error(const char *format, ...) ATTR_PRINTF(1,2);
|
||||
void mame_printf_warning(const char *format, ...) ATTR_PRINTF(1,2);
|
||||
void mame_printf_info(const char *format, ...) ATTR_PRINTF(1,2);
|
||||
void mame_printf_verbose(const char *format, ...) ATTR_PRINTF(1,2);
|
||||
void mame_printf_debug(const char *format, ...) ATTR_PRINTF(1,2);
|
||||
|
||||
/* discourage the use of printf directly */
|
||||
/* sadly, can't do this because of the ATTR_PRINTF under GCC */
|
||||
/*
|
||||
#undef printf
|
||||
#define printf !MUST_USE_MAME_PRINTF_*_CALLS_WITHIN_THE_CORE!
|
||||
*/
|
||||
|
||||
|
||||
/* ----- miscellaneous bits & pieces ----- */
|
||||
|
||||
// pop-up a user visible message
|
||||
|
@ -165,7 +165,7 @@ device_t *machine_config::device_replace(device_t *owner, const char *tag, devic
|
||||
device_t *device = owner->subdevice(tag);
|
||||
if (device == NULL)
|
||||
{
|
||||
mame_printf_warning("Warning: attempting to replace non-existent device '%s'\n", tag);
|
||||
osd_printf_warning("Warning: attempting to replace non-existent device '%s'\n", tag);
|
||||
return device_add(owner, tag, type, clock);
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ device_t *machine_config::device_remove(device_t *owner, const char *tag)
|
||||
device_t *device = owner->subdevice(tag);
|
||||
if (device == NULL)
|
||||
{
|
||||
mame_printf_warning("Warning: attempting to remove non-existent device '%s'\n", tag);
|
||||
osd_printf_warning("Warning: attempting to remove non-existent device '%s'\n", tag);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1654,7 +1654,7 @@ void memory_manager::dump(FILE *file)
|
||||
|
||||
memory_region *memory_manager::region_alloc(const char *name, UINT32 length, UINT8 width, endianness_t endian)
|
||||
{
|
||||
mame_printf_verbose("Region '%s' created\n", name);
|
||||
osd_printf_verbose("Region '%s' created\n", name);
|
||||
// make sure we don't have a region of the same name; also find the end of the list
|
||||
memory_region *info = m_regionlist.find(name);
|
||||
if (info != NULL)
|
||||
|
@ -1586,9 +1586,9 @@ bool render_target::load_layout_file(const char *dirname, const char *filename)
|
||||
if (rootnode == NULL)
|
||||
{
|
||||
if (filename[0] != '<')
|
||||
mame_printf_warning("Improperly formatted XML file '%s', ignoring\n", filename);
|
||||
osd_printf_warning("Improperly formatted XML file '%s', ignoring\n", filename);
|
||||
else
|
||||
mame_printf_warning("Improperly formatted XML string, ignoring\n");
|
||||
osd_printf_warning("Improperly formatted XML string, ignoring\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1601,9 +1601,9 @@ bool render_target::load_layout_file(const char *dirname, const char *filename)
|
||||
catch (emu_fatalerror &err)
|
||||
{
|
||||
if (filename[0] != '<')
|
||||
mame_printf_warning("Error in XML file '%s': %s\n", filename, err.string());
|
||||
osd_printf_warning("Error in XML file '%s': %s\n", filename, err.string());
|
||||
else
|
||||
mame_printf_warning("Error in XML string: %s\n", err.string());
|
||||
osd_printf_warning("Error in XML string: %s\n", err.string());
|
||||
result = false;
|
||||
}
|
||||
|
||||
|
@ -520,7 +520,7 @@ bool render_font::load_bdf()
|
||||
|
||||
// some progress for big fonts
|
||||
if (++charcount % 256 == 0)
|
||||
mame_printf_warning("Loading BDF font... (%d characters loaded)\n", charcount);
|
||||
osd_printf_warning("Loading BDF font... (%d characters loaded)\n", charcount);
|
||||
}
|
||||
}
|
||||
|
||||
@ -616,7 +616,7 @@ bool render_font::load_cached(emu_file &file, UINT32 hash)
|
||||
|
||||
bool render_font::save_cached(const char *filename, UINT32 hash)
|
||||
{
|
||||
mame_printf_warning("Generating cached BDF font...\n");
|
||||
osd_printf_warning("Generating cached BDF font...\n");
|
||||
|
||||
// attempt to open the file
|
||||
emu_file file(manager().machine().options().font_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE);
|
||||
|
@ -1317,9 +1317,9 @@ void layout_element::component::load_bitmap()
|
||||
|
||||
// log an error
|
||||
if (!m_alphafile[0])
|
||||
mame_printf_warning("Unable to load component bitmap '%s'\n", m_imagefile[0].cstr());
|
||||
osd_printf_warning("Unable to load component bitmap '%s'\n", m_imagefile[0].cstr());
|
||||
else
|
||||
mame_printf_warning("Unable to load component bitmap '%s'/'%s'\n", m_imagefile[0].cstr(), m_alphafile[0].cstr());
|
||||
osd_printf_warning("Unable to load component bitmap '%s'/'%s'\n", m_imagefile[0].cstr(), m_alphafile[0].cstr());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -506,7 +506,7 @@ static void display_rom_load_results(romload_private *romdata, bool from_list)
|
||||
if (romdata->errors != 0)
|
||||
{
|
||||
/* create the error message and exit fatally */
|
||||
mame_printf_error("%s", romdata->errorstring.cstr());
|
||||
osd_printf_error("%s", romdata->errorstring.cstr());
|
||||
fatalerror_exitcode(romdata->machine(), MAMERR_MISSING_FILES, "Required files are missing, the %s cannot be run.",emulator_info::get_gamenoun());
|
||||
}
|
||||
|
||||
@ -516,7 +516,7 @@ static void display_rom_load_results(romload_private *romdata, bool from_list)
|
||||
romdata->errorstring.cat("WARNING: the ");
|
||||
romdata->errorstring.cat(emulator_info::get_gamenoun());
|
||||
romdata->errorstring.cat(" might not run correctly.");
|
||||
mame_printf_warning("%s\n", romdata->errorstring.cstr());
|
||||
osd_printf_warning("%s\n", romdata->errorstring.cstr());
|
||||
}
|
||||
}
|
||||
|
||||
@ -721,7 +721,7 @@ static int read_rom_data(romload_private *romdata, const rom_entry *parent_regio
|
||||
|
||||
/* make sure the length was an even multiple of the group size */
|
||||
if (numbytes % groupsize != 0)
|
||||
mame_printf_warning("Warning in RomModule definition: %s length not an even multiple of group size\n", ROM_GETNAME(romp));
|
||||
osd_printf_warning("Warning in RomModule definition: %s length not an even multiple of group size\n", ROM_GETNAME(romp));
|
||||
|
||||
/* make sure we only fill within the region space */
|
||||
if (ROM_GETOFFSET(romp) + numgroups * groupsize + (numgroups - 1) * skip > romdata->region->bytes())
|
||||
|
@ -244,28 +244,28 @@ void screen_device::device_validity_check(validity_checker &valid) const
|
||||
{
|
||||
// sanity check dimensions
|
||||
if (m_width <= 0 || m_height <= 0)
|
||||
mame_printf_error("Invalid display dimensions\n");
|
||||
osd_printf_error("Invalid display dimensions\n");
|
||||
|
||||
// sanity check display area
|
||||
if (m_type != SCREEN_TYPE_VECTOR)
|
||||
{
|
||||
if (m_visarea.empty() || m_visarea.max_x >= m_width || m_visarea.max_y >= m_height)
|
||||
mame_printf_error("Invalid display area\n");
|
||||
osd_printf_error("Invalid display area\n");
|
||||
|
||||
// sanity check screen formats
|
||||
if (m_screen_update_ind16.isnull() && m_screen_update_rgb32.isnull())
|
||||
mame_printf_error("Missing SCREEN_UPDATE function\n");
|
||||
osd_printf_error("Missing SCREEN_UPDATE function\n");
|
||||
}
|
||||
|
||||
// check for zero frame rate
|
||||
if (m_refresh == 0)
|
||||
mame_printf_error("Invalid (zero) refresh rate\n");
|
||||
osd_printf_error("Invalid (zero) refresh rate\n");
|
||||
|
||||
texture_format texformat = !m_screen_update_ind16.isnull() ? TEXFORMAT_PALETTE16 : TEXFORMAT_RGB32;
|
||||
if (m_palette == NULL && texformat == TEXFORMAT_PALETTE16)
|
||||
mame_printf_error("Screen does not have palette defined\n");
|
||||
osd_printf_error("Screen does not have palette defined\n");
|
||||
if (m_palette != NULL && texformat == TEXFORMAT_RGB32)
|
||||
mame_printf_warning("Screen does not need palette defined\n");
|
||||
osd_printf_warning("Screen does not need palette defined\n");
|
||||
}
|
||||
|
||||
|
||||
@ -1048,5 +1048,5 @@ void screen_device::load_effect_overlay(const char *filename)
|
||||
if (m_screen_overlay_bitmap.valid())
|
||||
m_container->set_overlay(&m_screen_overlay_bitmap);
|
||||
else
|
||||
mame_printf_warning("Unable to load effect PNG file '%s'\n", fullname.cstr());
|
||||
osd_printf_warning("Unable to load effect PNG file '%s'\n", fullname.cstr());
|
||||
}
|
||||
|
@ -461,7 +461,7 @@ void software_list_device::find_approx_matches(const char *name, int matches, so
|
||||
|
||||
void software_list_device::release()
|
||||
{
|
||||
mame_printf_verbose("Resetting %s\n", m_file.filename());
|
||||
osd_printf_verbose("Resetting %s\n", m_file.filename());
|
||||
m_parsed = false;
|
||||
m_description = NULL;
|
||||
m_errors.reset();
|
||||
@ -497,7 +497,7 @@ void software_list_device::display_matches(const machine_config &config, const c
|
||||
// check if there is at least one software list
|
||||
software_list_device_iterator deviter(config.root_device());
|
||||
if (deviter.first())
|
||||
mame_printf_error("\n\"%s\" approximately matches the following\n"
|
||||
osd_printf_error("\n\"%s\" approximately matches the following\n"
|
||||
"supported software items (best match first):\n\n", name);
|
||||
|
||||
// iterate through lists
|
||||
@ -512,16 +512,16 @@ void software_list_device::display_matches(const machine_config &config, const c
|
||||
{
|
||||
// different output depending on original system or compatible
|
||||
if (swlistdev->list_type() == SOFTWARE_LIST_ORIGINAL_SYSTEM)
|
||||
mame_printf_error("* Software list \"%s\" (%s) matches: \n", swlistdev->list_name(), swlistdev->description());
|
||||
osd_printf_error("* Software list \"%s\" (%s) matches: \n", swlistdev->list_name(), swlistdev->description());
|
||||
else
|
||||
mame_printf_error("* Compatible software list \"%s\" (%s) matches: \n", swlistdev->list_name(), swlistdev->description());
|
||||
osd_printf_error("* Compatible software list \"%s\" (%s) matches: \n", swlistdev->list_name(), swlistdev->description());
|
||||
|
||||
// print them out
|
||||
for (int softnum = 0; softnum < ARRAY_LENGTH(matches); softnum++)
|
||||
if (matches[softnum] != NULL)
|
||||
mame_printf_error("%-18s%s\n", matches[softnum]->shortname(), matches[softnum]->longname());
|
||||
osd_printf_error("%-18s%s\n", matches[softnum]->shortname(), matches[softnum]->longname());
|
||||
|
||||
mame_printf_error("\n");
|
||||
osd_printf_error("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -612,7 +612,7 @@ void software_list_device::internal_validity_check(validity_checker &valid)
|
||||
// first parse and output core errors if any
|
||||
if (m_errors.len() > 0)
|
||||
{
|
||||
mame_printf_error("%s: Errors parsing software list:\n%s", filename(), errors_string());
|
||||
osd_printf_error("%s: Errors parsing software list:\n%s", filename(), errors_string());
|
||||
release();
|
||||
return;
|
||||
}
|
||||
@ -626,21 +626,21 @@ void software_list_device::internal_validity_check(validity_checker &valid)
|
||||
// Did we lost any description?
|
||||
if (swinfo->longname() == NULL)
|
||||
{
|
||||
mame_printf_error("%s: %s has no description\n", filename(), swinfo->shortname());
|
||||
osd_printf_error("%s: %s has no description\n", filename(), swinfo->shortname());
|
||||
break;
|
||||
}
|
||||
|
||||
// Did we lost any year?
|
||||
if (swinfo->year() == NULL)
|
||||
{
|
||||
mame_printf_error("%s: %s has no year\n", filename(), swinfo->shortname());
|
||||
osd_printf_error("%s: %s has no year\n", filename(), swinfo->shortname());
|
||||
break;
|
||||
}
|
||||
|
||||
// Did we lost any publisher?
|
||||
if (swinfo->publisher() == NULL)
|
||||
{
|
||||
mame_printf_error("%s: %s has no publisher\n", filename(), swinfo->shortname());
|
||||
osd_printf_error("%s: %s has no publisher\n", filename(), swinfo->shortname());
|
||||
break;
|
||||
}
|
||||
|
||||
@ -650,12 +650,12 @@ void software_list_device::internal_validity_check(validity_checker &valid)
|
||||
if (names.add(swinfo->shortname(), swinfo, false) == TMERR_DUPLICATE)
|
||||
{
|
||||
software_info *match = names.find(swinfo->shortname());
|
||||
mame_printf_error("%s: %s is a duplicate name (%s)\n", filename(), swinfo->shortname(), match->shortname());
|
||||
osd_printf_error("%s: %s is a duplicate name (%s)\n", filename(), swinfo->shortname(), match->shortname());
|
||||
}
|
||||
|
||||
// check for duplicate descriptions
|
||||
if (descriptions.add(astring(swinfo->longname()).makelower().cstr(), swinfo, false) == TMERR_DUPLICATE)
|
||||
mame_printf_error("%s: %s is a duplicate description (%s)\n", filename(), swinfo->longname(), swinfo->shortname());
|
||||
osd_printf_error("%s: %s is a duplicate description (%s)\n", filename(), swinfo->longname(), swinfo->shortname());
|
||||
|
||||
bool is_clone = false;
|
||||
if (swinfo->parentname() != NULL)
|
||||
@ -663,7 +663,7 @@ void software_list_device::internal_validity_check(validity_checker &valid)
|
||||
is_clone = true;
|
||||
if (strcmp(swinfo->parentname(), swinfo->shortname()) == 0)
|
||||
{
|
||||
mame_printf_error("%s: %s is set as a clone of itself\n", filename(), swinfo->shortname());
|
||||
osd_printf_error("%s: %s is set as a clone of itself\n", filename(), swinfo->shortname());
|
||||
break;
|
||||
}
|
||||
|
||||
@ -671,21 +671,21 @@ void software_list_device::internal_validity_check(validity_checker &valid)
|
||||
software_info *swinfo2 = find(swinfo->parentname());
|
||||
|
||||
if (swinfo2 == NULL)
|
||||
mame_printf_error("%s: parent '%s' software for '%s' not found\n", filename(), swinfo->parentname(), swinfo->shortname());
|
||||
osd_printf_error("%s: parent '%s' software for '%s' not found\n", filename(), swinfo->parentname(), swinfo->shortname());
|
||||
else if (swinfo2->parentname() != NULL)
|
||||
mame_printf_error("%s: %s is a clone of a clone\n", filename(), swinfo->shortname());
|
||||
osd_printf_error("%s: %s is a clone of a clone\n", filename(), swinfo->shortname());
|
||||
}
|
||||
|
||||
// make sure the driver name is 8 chars or less
|
||||
if ((is_clone && strlen(swinfo->shortname()) > NAME_LEN_CLONE) || (!is_clone && strlen(swinfo->shortname()) > NAME_LEN_PARENT))
|
||||
mame_printf_error("%s: %s %s driver name must be %d characters or less\n", filename(), swinfo->shortname(),
|
||||
osd_printf_error("%s: %s %s driver name must be %d characters or less\n", filename(), swinfo->shortname(),
|
||||
is_clone ? "clone" : "parent", is_clone ? NAME_LEN_CLONE : NAME_LEN_PARENT);
|
||||
|
||||
// make sure the year is only digits, '?' or '+'
|
||||
for (const char *s = swinfo->year(); *s != 0; s++)
|
||||
if (!isdigit((UINT8)*s) && *s != '?' && *s != '+')
|
||||
{
|
||||
mame_printf_error("%s: %s has an invalid year '%s'\n", filename(), swinfo->shortname(), swinfo->year());
|
||||
osd_printf_error("%s: %s has an invalid year '%s'\n", filename(), swinfo->shortname(), swinfo->year());
|
||||
break;
|
||||
}
|
||||
|
||||
@ -693,13 +693,13 @@ void software_list_device::internal_validity_check(validity_checker &valid)
|
||||
for (software_part *part = swinfo->first_part(); part != NULL; part = part->next())
|
||||
{
|
||||
if (part->interface() == NULL)
|
||||
mame_printf_error("%s: %s has a part (%s) without interface\n", filename(), swinfo->shortname(), part->name());
|
||||
osd_printf_error("%s: %s has a part (%s) without interface\n", filename(), swinfo->shortname(), part->name());
|
||||
|
||||
if (part->romdata() == NULL)
|
||||
mame_printf_error("%s: %s has a part (%s) with no data\n", filename(), swinfo->shortname(), part->name());
|
||||
osd_printf_error("%s: %s has a part (%s) with no data\n", filename(), swinfo->shortname(), part->name());
|
||||
|
||||
if (part_names.add(part->name(), swinfo, false) == TMERR_DUPLICATE)
|
||||
mame_printf_error("%s: %s has a part (%s) whose name is duplicate\n", filename(), swinfo->shortname(), part->name());
|
||||
osd_printf_error("%s: %s has a part (%s) whose name is duplicate\n", filename(), swinfo->shortname(), part->name());
|
||||
|
||||
for (const rom_entry *data = part->romdata(); data->_name != NULL; data++)
|
||||
if (data->_hashdata != NULL)
|
||||
@ -708,14 +708,14 @@ void software_list_device::internal_validity_check(validity_checker &valid)
|
||||
for (const char *str = data->_name; *str; str++)
|
||||
if (tolower((UINT8)*str) != *str)
|
||||
{
|
||||
mame_printf_error("%s: %s has upper case ROM name %s\n", filename(), swinfo->shortname(), data->_name);
|
||||
osd_printf_error("%s: %s has upper case ROM name %s\n", filename(), swinfo->shortname(), data->_name);
|
||||
break;
|
||||
}
|
||||
|
||||
// make sure the hash is valid
|
||||
hash_collection hashes;
|
||||
if (!hashes.from_internal_string(data->_hashdata))
|
||||
mame_printf_error("%s: %s has rom '%s' with an invalid hash string '%s'\n", filename(), swinfo->shortname(), data->_name, data->_hashdata);
|
||||
osd_printf_error("%s: %s has rom '%s' with an invalid hash string '%s'\n", filename(), swinfo->shortname(), data->_name, data->_hashdata);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -743,7 +743,7 @@ softlist_parser::softlist_parser(software_list_device &list, astring &errors)
|
||||
m_current_part(NULL),
|
||||
m_pos(POS_ROOT)
|
||||
{
|
||||
mame_printf_verbose("Parsing %s\n", m_list.m_file.filename());
|
||||
osd_printf_verbose("Parsing %s\n", m_list.m_file.filename());
|
||||
|
||||
// set up memory callbacks
|
||||
XML_Memory_Handling_Suite memcallbacks;
|
||||
@ -777,7 +777,7 @@ softlist_parser::softlist_parser(software_list_device &list, astring &errors)
|
||||
|
||||
// free the parser
|
||||
XML_ParserFree(m_parser);
|
||||
mame_printf_verbose("Parsing complete\n");
|
||||
osd_printf_verbose("Parsing complete\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#define VERBOSE (0)
|
||||
|
||||
#define VPRINTF(x) do { if (VERBOSE) mame_printf_debug x; } while (0)
|
||||
#define VPRINTF(x) do { if (VERBOSE) osd_printf_debug x; } while (0)
|
||||
|
||||
|
||||
|
||||
|
@ -217,9 +217,9 @@ static FILE *sample[9];
|
||||
/*
|
||||
C24 = external capacity
|
||||
|
||||
mame_printf_debug("Time constant T=R*C =%f sec.\n",R51*C24);
|
||||
mame_printf_debug("Cap fully charged after 5T=%f sec (sample=%f). Level=%f\n",(R51*C24)*5,(R51*C24)*5*sample_rate , VMAX*0.99326 );
|
||||
mame_printf_debug("Cap charged after 5T=%f sec (sample=%f). Level=%20.16f\n",(R51*C24)*5,(R51*C24)*5*sample_rate ,
|
||||
osd_printf_debug("Time constant T=R*C =%f sec.\n",R51*C24);
|
||||
osd_printf_debug("Cap fully charged after 5T=%f sec (sample=%f). Level=%f\n",(R51*C24)*5,(R51*C24)*5*sample_rate , VMAX*0.99326 );
|
||||
osd_printf_debug("Cap charged after 5T=%f sec (sample=%f). Level=%20.16f\n",(R51*C24)*5,(R51*C24)*5*sample_rate ,
|
||||
VMAX*(1.0-pow(2.718,-0.0748/(R51*C24))) );
|
||||
*/
|
||||
#endif
|
||||
|
@ -208,14 +208,14 @@ void okim9810_device::write_command(UINT8 data)
|
||||
{
|
||||
case 0x00: // START
|
||||
{
|
||||
mame_printf_debug("START channel mask %02x\n", m_TMP_register);
|
||||
osd_printf_debug("START channel mask %02x\n", m_TMP_register);
|
||||
UINT8 channelMask = 0x01;
|
||||
for (int i = 0; i < OKIM9810_VOICES; i++, channelMask <<= 1)
|
||||
{
|
||||
if (channelMask & m_TMP_register)
|
||||
{
|
||||
m_voice[i].m_playing = true;
|
||||
mame_printf_debug("\t\tPlaying channel %d: encoder type %d @ %dhz (volume = %d %d). From %08x for %d samples (looping=%d).\n",
|
||||
osd_printf_debug("\t\tPlaying channel %d: encoder type %d @ %dhz (volume = %d %d). From %08x for %d samples (looping=%d).\n",
|
||||
i,
|
||||
m_voice[i].m_playbackAlgo,
|
||||
m_voice[i].m_samplingFreq,
|
||||
@ -230,52 +230,52 @@ void okim9810_device::write_command(UINT8 data)
|
||||
}
|
||||
case 0x01: // STOP
|
||||
{
|
||||
mame_printf_debug("STOP channel mask %02x\n", m_TMP_register);
|
||||
osd_printf_debug("STOP channel mask %02x\n", m_TMP_register);
|
||||
UINT8 channelMask = 0x01;
|
||||
for (int i = 0; i < OKIM9810_VOICES; i++, channelMask <<= 1)
|
||||
{
|
||||
if (channelMask & m_TMP_register)
|
||||
{
|
||||
m_voice[i].m_playing = false;
|
||||
mame_printf_debug("\tChannel %d stopping.\n", i);
|
||||
osd_printf_debug("\tChannel %d stopping.\n", i);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x02: // LOOP
|
||||
{
|
||||
mame_printf_debug("LOOP channel mask %02x\n", m_TMP_register);
|
||||
osd_printf_debug("LOOP channel mask %02x\n", m_TMP_register);
|
||||
UINT8 channelMask = 0x01;
|
||||
for (int i = 0; i < OKIM9810_VOICES; i++, channelMask <<= 1)
|
||||
{
|
||||
if (channelMask & m_TMP_register)
|
||||
{
|
||||
m_voice[i].m_looping = true;
|
||||
mame_printf_debug("\tChannel %d looping.\n", i);
|
||||
osd_printf_debug("\tChannel %d looping.\n", i);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_voice[i].m_looping = false;
|
||||
mame_printf_debug("\tChannel %d done looping.\n", i);
|
||||
osd_printf_debug("\tChannel %d done looping.\n", i);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x03: // OPT (options)
|
||||
{
|
||||
mame_printf_debug("OPT complex data %02x\n", m_TMP_register);
|
||||
osd_printf_debug("OPT complex data %02x\n", m_TMP_register);
|
||||
m_global_volume = (m_TMP_register & 0x18) >> 3;
|
||||
m_filter_type = (m_TMP_register & 0x06) >> 1;
|
||||
m_output_level = (m_TMP_register & 0x01);
|
||||
mame_printf_debug("\tOPT setting main volume scale to Vdd/%d\n", m_global_volume+1);
|
||||
mame_printf_debug("\tOPT setting output filter type to %d\n", m_filter_type);
|
||||
mame_printf_debug("\tOPT setting output amp level to %d\n", m_output_level);
|
||||
osd_printf_debug("\tOPT setting main volume scale to Vdd/%d\n", m_global_volume+1);
|
||||
osd_printf_debug("\tOPT setting output filter type to %d\n", m_filter_type);
|
||||
osd_printf_debug("\tOPT setting output amp level to %d\n", m_output_level);
|
||||
break;
|
||||
}
|
||||
case 0x04: // MUON (silence)
|
||||
{
|
||||
mame_printf_warning("MUON channel %d length %02x\n", channel, m_TMP_register);
|
||||
mame_printf_warning("MSM9810: UNIMPLEMENTED COMMAND!\n");
|
||||
osd_printf_warning("MUON channel %d length %02x\n", channel, m_TMP_register);
|
||||
osd_printf_warning("MSM9810: UNIMPLEMENTED COMMAND!\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -324,23 +324,23 @@ void okim9810_device::write_command(UINT8 data)
|
||||
m_voice[channel].m_playbackAlgo == OKIM9810_ADPCM2_PLAYBACK)
|
||||
m_voice[channel].m_count *= 2;
|
||||
else
|
||||
mame_printf_warning("MSM9810: UNIMPLEMENTED PLAYBACK METHOD %d\n", m_voice[channel].m_playbackAlgo);
|
||||
osd_printf_warning("MSM9810: UNIMPLEMENTED PLAYBACK METHOD %d\n", m_voice[channel].m_playbackAlgo);
|
||||
|
||||
mame_printf_debug("FADR channel %d phrase offset %02x => ", channel, m_TMP_register);
|
||||
mame_printf_debug("startFlags(%02x) startAddr(%06x) endFlags(%02x) endAddr(%06x) bytes(%d)\n", startFlags, startAddr, endFlags, endAddr, endAddr-startAddr);
|
||||
osd_printf_debug("FADR channel %d phrase offset %02x => ", channel, m_TMP_register);
|
||||
osd_printf_debug("startFlags(%02x) startAddr(%06x) endFlags(%02x) endAddr(%06x) bytes(%d)\n", startFlags, startAddr, endFlags, endAddr, endAddr-startAddr);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x06: // DADR (direct address playback)
|
||||
{
|
||||
mame_printf_warning("DADR channel %d complex data %02x\n", channel, m_TMP_register);
|
||||
mame_printf_warning("MSM9810: UNIMPLEMENTED COMMAND!\n");
|
||||
osd_printf_warning("DADR channel %d complex data %02x\n", channel, m_TMP_register);
|
||||
osd_printf_warning("MSM9810: UNIMPLEMENTED COMMAND!\n");
|
||||
break;
|
||||
}
|
||||
case 0x07: // CVOL (channel volume)
|
||||
{
|
||||
mame_printf_debug("CVOL channel %d data %02x\n", channel, m_TMP_register);
|
||||
mame_printf_debug("\tChannel %d -> volume index %d.\n", channel, m_TMP_register & 0x0f);
|
||||
osd_printf_debug("CVOL channel %d data %02x\n", channel, m_TMP_register);
|
||||
osd_printf_debug("\tChannel %d -> volume index %d.\n", channel, m_TMP_register & 0x0f);
|
||||
|
||||
m_voice[channel].m_channel_volume = m_TMP_register & 0x0f;
|
||||
break;
|
||||
@ -349,15 +349,15 @@ void okim9810_device::write_command(UINT8 data)
|
||||
{
|
||||
const UINT8 leftVolIndex = (m_TMP_register & 0xf0) >> 4;
|
||||
const UINT8 rightVolIndex = m_TMP_register & 0x0f;
|
||||
mame_printf_debug("PAN channel %d left index: %02x right index: %02x (%02x)\n", channel, leftVolIndex, rightVolIndex, m_TMP_register);
|
||||
mame_printf_debug("\tChannel %d left -> %d right -> %d\n", channel, leftVolIndex, rightVolIndex);
|
||||
osd_printf_debug("PAN channel %d left index: %02x right index: %02x (%02x)\n", channel, leftVolIndex, rightVolIndex, m_TMP_register);
|
||||
osd_printf_debug("\tChannel %d left -> %d right -> %d\n", channel, leftVolIndex, rightVolIndex);
|
||||
m_voice[channel].m_pan_volume_left = leftVolIndex;
|
||||
m_voice[channel].m_pan_volume_right = rightVolIndex;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
mame_printf_warning("MSM9810: UNKNOWN COMMAND!\n");
|
||||
osd_printf_warning("MSM9810: UNKNOWN COMMAND!\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -428,11 +428,11 @@ WRITE16_MEMBER( rf5c400_device::rf5c400_w )
|
||||
|
||||
default:
|
||||
{
|
||||
//mame_printf_debug("%s:rf5c400_w: %08X, %08X, %08X\n", machine().describe_context(), data, offset, mem_mask);
|
||||
//osd_printf_debug("%s:rf5c400_w: %08X, %08X, %08X\n", machine().describe_context(), data, offset, mem_mask);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//mame_printf_debug("%s:rf5c400_w: %08X, %08X, %08X at %08X\n", machine().describe_context(), data, offset, mem_mask);
|
||||
//osd_printf_debug("%s:rf5c400_w: %08X, %08X, %08X at %08X\n", machine().describe_context(), data, offset, mem_mask);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -404,7 +404,7 @@ bool samples_device::read_sample(emu_file &file, sample_t &sample)
|
||||
UINT32 offset = file.read(buf, 4);
|
||||
if (offset < 4)
|
||||
{
|
||||
mame_printf_warning("Unable to read %s, 0-byte file?\n", file.filename());
|
||||
osd_printf_warning("Unable to read %s, 0-byte file?\n", file.filename());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -415,7 +415,7 @@ bool samples_device::read_sample(emu_file &file, sample_t &sample)
|
||||
return read_flac_sample(file, sample);
|
||||
|
||||
// if nothing appropriate, emit a warning
|
||||
mame_printf_warning("Unable to read %s, corrupt file?\n", file.filename());
|
||||
osd_printf_warning("Unable to read %s, corrupt file?\n", file.filename());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -434,7 +434,7 @@ bool samples_device::read_wav_sample(emu_file &file, sample_t &sample)
|
||||
offset += file.read(&filesize, 4);
|
||||
if (offset < 8)
|
||||
{
|
||||
mame_printf_warning("Unexpected size offset %u (%s)\n", offset, file.filename());
|
||||
osd_printf_warning("Unexpected size offset %u (%s)\n", offset, file.filename());
|
||||
return false;
|
||||
}
|
||||
filesize = LITTLE_ENDIANIZE_INT32(filesize);
|
||||
@ -444,12 +444,12 @@ bool samples_device::read_wav_sample(emu_file &file, sample_t &sample)
|
||||
offset += file.read(buf, 4);
|
||||
if (offset < 12)
|
||||
{
|
||||
mame_printf_warning("Unexpected WAVE offset %u (%s)\n", offset, file.filename());
|
||||
osd_printf_warning("Unexpected WAVE offset %u (%s)\n", offset, file.filename());
|
||||
return false;
|
||||
}
|
||||
if (memcmp(&buf[0], "WAVE", 4) != 0)
|
||||
{
|
||||
mame_printf_warning("Could not find WAVE header (%s)\n", file.filename());
|
||||
osd_printf_warning("Could not find WAVE header (%s)\n", file.filename());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -468,7 +468,7 @@ bool samples_device::read_wav_sample(emu_file &file, sample_t &sample)
|
||||
offset += length;
|
||||
if (offset >= filesize)
|
||||
{
|
||||
mame_printf_warning("Could not find fmt tag (%s)\n", file.filename());
|
||||
osd_printf_warning("Could not find fmt tag (%s)\n", file.filename());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -479,7 +479,7 @@ bool samples_device::read_wav_sample(emu_file &file, sample_t &sample)
|
||||
temp16 = LITTLE_ENDIANIZE_INT16(temp16);
|
||||
if (temp16 != 1)
|
||||
{
|
||||
mame_printf_warning("unsupported format %u - only PCM is supported (%s)\n", temp16, file.filename());
|
||||
osd_printf_warning("unsupported format %u - only PCM is supported (%s)\n", temp16, file.filename());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -488,7 +488,7 @@ bool samples_device::read_wav_sample(emu_file &file, sample_t &sample)
|
||||
temp16 = LITTLE_ENDIANIZE_INT16(temp16);
|
||||
if (temp16 != 1)
|
||||
{
|
||||
mame_printf_warning("unsupported number of channels %u - only mono is supported (%s)\n", temp16, file.filename());
|
||||
osd_printf_warning("unsupported number of channels %u - only mono is supported (%s)\n", temp16, file.filename());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -506,7 +506,7 @@ bool samples_device::read_wav_sample(emu_file &file, sample_t &sample)
|
||||
bits = LITTLE_ENDIANIZE_INT16(bits);
|
||||
if (bits != 8 && bits != 16)
|
||||
{
|
||||
mame_printf_warning("unsupported bits/sample %u - only 8 and 16 are supported (%s)\n", bits, file.filename());
|
||||
osd_printf_warning("unsupported bits/sample %u - only 8 and 16 are supported (%s)\n", bits, file.filename());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -528,7 +528,7 @@ bool samples_device::read_wav_sample(emu_file &file, sample_t &sample)
|
||||
offset += length;
|
||||
if (offset >= filesize)
|
||||
{
|
||||
mame_printf_warning("Could not find data tag (%s)\n", file.filename());
|
||||
osd_printf_warning("Could not find data tag (%s)\n", file.filename());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -536,7 +536,7 @@ bool samples_device::read_wav_sample(emu_file &file, sample_t &sample)
|
||||
// if there was a 0 length data block, we're done
|
||||
if (length == 0)
|
||||
{
|
||||
mame_printf_warning("empty data block (%s)\n", file.filename());
|
||||
osd_printf_warning("empty data block (%s)\n", file.filename());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -638,6 +638,6 @@ void samples_device::load_samples()
|
||||
if (filerr == FILERR_NONE)
|
||||
read_sample(file, m_sample[index]);
|
||||
else if (filerr == FILERR_NOT_FOUND)
|
||||
mame_printf_warning("Sample '%s' NOT FOUND\n", samplename);
|
||||
osd_printf_warning("Sample '%s' NOT FOUND\n", samplename);
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@
|
||||
|
||||
|
||||
#define DEBUG_STATES (0)
|
||||
#define DEBUG_METHOD mame_printf_debug
|
||||
#define DEBUG_METHOD osd_printf_debug
|
||||
|
||||
|
||||
|
||||
|
@ -543,7 +543,7 @@ void vlm5030_device::sound_stream_update(sound_stream &stream, stream_sample_t *
|
||||
/* is this a zero energy frame? */
|
||||
if (m_current_energy == 0)
|
||||
{
|
||||
/*mame_printf_debug("processing frame: zero energy\n");*/
|
||||
/*osd_printf_debug("processing frame: zero energy\n");*/
|
||||
m_target_energy = 0;
|
||||
m_target_pitch = m_current_pitch;
|
||||
for(i=0;i<=9;i++)
|
||||
@ -551,9 +551,9 @@ void vlm5030_device::sound_stream_update(sound_stream &stream, stream_sample_t *
|
||||
}
|
||||
else
|
||||
{
|
||||
/*mame_printf_debug("processing frame: Normal\n");*/
|
||||
/*mame_printf_debug("*** Energy = %d\n",m_current_energy);*/
|
||||
/*mame_printf_debug("proc: %d %d\n",last_fbuf_head,fbuf_head);*/
|
||||
/*osd_printf_debug("processing frame: Normal\n");*/
|
||||
/*osd_printf_debug("*** Energy = %d\n",m_current_energy);*/
|
||||
/*osd_printf_debug("proc: %d %d\n",last_fbuf_head,fbuf_head);*/
|
||||
m_target_energy = m_new_energy;
|
||||
m_target_pitch = m_new_pitch;
|
||||
for(i=0;i<=9;i++)
|
||||
|
@ -119,7 +119,7 @@ WRITE8_MEMBER( votrax_sc01_device::write )
|
||||
// only 6 bits matter
|
||||
m_phoneme = data & 0x3f;
|
||||
const UINT8 *rom = m_rom + (m_phoneme << 3);
|
||||
mame_printf_debug("%s: STROBE %s (F1=%X F2=%X FC=%X F3=%X F2Q=%X VA=%X FA=%X CL=%X CLD=%X VD=%X PAC=%X PH=%02X)\n",
|
||||
osd_printf_debug("%s: STROBE %s (F1=%X F2=%X FC=%X F3=%X F2Q=%X VA=%X FA=%X CL=%X CLD=%X VD=%X PAC=%X PH=%02X)\n",
|
||||
machine().time().as_string(3), s_phoneme_table[m_phoneme],
|
||||
rom[0] >> 4, rom[1] >> 4, rom[2] >> 4, rom[3] >> 4, rom[4] >> 4, rom[5] >> 4, rom[6] >> 4,
|
||||
rom[3] & 0xf, rom[4] & 0xf, rom[5] & 0xf, rom[6] & 0xf, rom[7]);
|
||||
@ -508,24 +508,24 @@ if (LOG_TIMING | LOG_LOWPARAM | LOG_GLOTTAL | LOG_TRANSITION)
|
||||
if (m_counter_34 % 32 == 0 && m_master_clock == 0)
|
||||
{
|
||||
if (LOG_TIMING)
|
||||
mame_printf_debug("MCLK C034 L070 L072 BET1 P1 P2 PHI1 PHI2 PH1' PH2' SUBC C088 C084 L092 IIRQ ");
|
||||
osd_printf_debug("MCLK C034 L070 L072 BET1 P1 P2 PHI1 PHI2 PH1' PH2' SUBC C088 C084 L092 IIRQ ");
|
||||
if (LOG_LOWPARAM)
|
||||
mame_printf_debug("F132 F114 F112 F142 L080 ");
|
||||
osd_printf_debug("F132 F114 F112 F142 L080 ");
|
||||
if (LOG_GLOTTAL)
|
||||
mame_printf_debug("C220 C222 C224 C234 C236 FGAT GLSY ");
|
||||
osd_printf_debug("C220 C222 C224 C234 C236 FGAT GLSY ");
|
||||
if (LOG_TRANSITION)
|
||||
mame_printf_debug("0625 C046 L046 A0-2 L168 L170 FC VA FA F1 F2 F3 F2Q ");
|
||||
mame_printf_debug("\n");
|
||||
osd_printf_debug("0625 C046 L046 A0-2 L168 L170 FC VA FA F1 F2 F3 F2Q ");
|
||||
osd_printf_debug("\n");
|
||||
}
|
||||
if (LOG_TIMING)
|
||||
mame_printf_debug("%4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X ", m_master_clock, m_counter_34, m_latch_70, m_latch_72, m_beta1, m_p1, m_p2, m_phi1, m_phi2, m_phi1_20, m_phi2_20, m_subphoneme_count, m_clock_88, m_counter_84, m_latch_92, m_internal_request);
|
||||
osd_printf_debug("%4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X ", m_master_clock, m_counter_34, m_latch_70, m_latch_72, m_beta1, m_p1, m_p2, m_phi1, m_phi2, m_phi1_20, m_phi2_20, m_subphoneme_count, m_clock_88, m_counter_84, m_latch_92, m_internal_request);
|
||||
if (LOG_LOWPARAM)
|
||||
mame_printf_debug("%4X %4X %4X %4X %4X ", m_srff_132, m_srff_114, m_srff_112, m_srff_142, m_latch_80);
|
||||
osd_printf_debug("%4X %4X %4X %4X %4X ", m_srff_132, m_srff_114, m_srff_112, m_srff_142, m_latch_80);
|
||||
if (LOG_GLOTTAL)
|
||||
mame_printf_debug("%4X %4X %4X %4X %4X %4X %4X ", m_counter_220, m_counter_222, m_counter_224, m_counter_234, m_counter_236, m_fgate, m_glottal_sync);
|
||||
osd_printf_debug("%4X %4X %4X %4X %4X %4X %4X ", m_counter_220, m_counter_222, m_counter_224, m_counter_234, m_counter_236, m_fgate, m_glottal_sync);
|
||||
if (LOG_TRANSITION)
|
||||
mame_printf_debug("%4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X ", m_0625_clock, m_counter_46, m_latch_46, m_latch_72 & 7, m_latch_168, m_latch_170, m_fc, m_va, m_fa, m_f1, m_f2, m_f3, m_f2q);
|
||||
mame_printf_debug("\n");
|
||||
osd_printf_debug("%4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X ", m_0625_clock, m_counter_46, m_latch_46, m_latch_72 & 7, m_latch_168, m_latch_170, m_fc, m_va, m_fa, m_f1, m_f2, m_f3, m_f2q);
|
||||
osd_printf_debug("\n");
|
||||
}
|
||||
|
||||
//==============================================
|
||||
@ -639,7 +639,7 @@ if (LOG_TIMING | LOG_LOWPARAM | LOG_GLOTTAL | LOG_TRANSITION)
|
||||
else if (clock_88_rising)
|
||||
{
|
||||
m_counter_84 = (m_counter_84 - 1) & 0x0f;
|
||||
mame_printf_debug("counter=%d\n", m_counter_84);
|
||||
osd_printf_debug("counter=%d\n", m_counter_84);
|
||||
}
|
||||
|
||||
// clock the zero count latch
|
||||
@ -711,7 +711,7 @@ mame_printf_debug("counter=%d\n", m_counter_84);
|
||||
if (m_latch_80 != (romdata & 0x7f))
|
||||
{
|
||||
m_latch_80 = romdata & 0x7f;
|
||||
mame_printf_debug("[PH=%02X]\n", m_latch_80);
|
||||
osd_printf_debug("[PH=%02X]\n", m_latch_80);
|
||||
UINT32 old_period = m_subphoneme_period;
|
||||
update_subphoneme_clock_period();
|
||||
m_subphoneme_count = (m_subphoneme_count * m_subphoneme_period) / old_period;
|
||||
@ -1342,7 +1342,7 @@ void votrax_sc01_device::device_timer(emu_timer &timer, device_timer_id id, int
|
||||
// if we're supposed to have fired, do it now
|
||||
if (m_internal_request == ASSERT_LINE)
|
||||
{
|
||||
mame_printf_debug("%s: REQUEST\n", timer.machine().time().as_string(3));
|
||||
osd_printf_debug("%s: REQUEST\n", timer.machine().time().as_string(3));
|
||||
m_request_cb(m_request_state = ASSERT_LINE);
|
||||
return;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#define VERBOSE (0)
|
||||
|
||||
#define VPRINTF(x) do { if (VERBOSE) mame_printf_debug x; } while (0)
|
||||
#define VPRINTF(x) do { if (VERBOSE) osd_printf_debug x; } while (0)
|
||||
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ speaker_device::~speaker_device()
|
||||
#ifdef MAME_DEBUG
|
||||
// log the maximum sample values for all speakers
|
||||
if (m_max_sample > 0)
|
||||
mame_printf_debug("Speaker \"%s\" - max = %d (gain *= %f) - %d%% samples clipped\n", tag(), m_max_sample, 32767.0 / (m_max_sample ? m_max_sample : 1), (int)((double)m_clipped_samples * 100.0 / m_total_samples));
|
||||
osd_printf_debug("Speaker \"%s\" - max = %d (gain *= %f) - %d%% samples clipped\n", tag(), m_max_sample, 32767.0 / (m_max_sample ? m_max_sample : 1), (int)((double)m_clipped_samples * 100.0 / m_total_samples));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -153,31 +153,31 @@ void timer_device::device_validity_check(validity_checker &valid) const
|
||||
{
|
||||
case TIMER_TYPE_GENERIC:
|
||||
if (m_screen_tag != NULL || m_first_vpos != 0 || m_start_delay != attotime::zero)
|
||||
mame_printf_warning("Generic timer specified parameters for a scanline timer\n");
|
||||
osd_printf_warning("Generic timer specified parameters for a scanline timer\n");
|
||||
if (m_period != attotime::zero || m_start_delay != attotime::zero)
|
||||
mame_printf_warning("Generic timer specified parameters for a periodic timer\n");
|
||||
osd_printf_warning("Generic timer specified parameters for a periodic timer\n");
|
||||
break;
|
||||
|
||||
case TIMER_TYPE_PERIODIC:
|
||||
if (m_screen_tag != NULL || m_first_vpos != 0)
|
||||
mame_printf_warning("Periodic timer specified parameters for a scanline timer\n");
|
||||
osd_printf_warning("Periodic timer specified parameters for a scanline timer\n");
|
||||
if (m_period <= attotime::zero)
|
||||
mame_printf_error("Periodic timer specified invalid period\n");
|
||||
osd_printf_error("Periodic timer specified invalid period\n");
|
||||
break;
|
||||
|
||||
case TIMER_TYPE_SCANLINE:
|
||||
if (m_period != attotime::zero || m_start_delay != attotime::zero)
|
||||
mame_printf_warning("Scanline timer specified parameters for a periodic timer\n");
|
||||
osd_printf_warning("Scanline timer specified parameters for a periodic timer\n");
|
||||
if (m_param != 0)
|
||||
mame_printf_warning("Scanline timer specified parameter which is ignored\n");
|
||||
osd_printf_warning("Scanline timer specified parameter which is ignored\n");
|
||||
// if (m_first_vpos < 0)
|
||||
// mame_printf_error("Scanline timer specified invalid initial position\n");
|
||||
// osd_printf_error("Scanline timer specified invalid initial position\n");
|
||||
// if (m_increment < 0)
|
||||
// mame_printf_error("Scanline timer specified invalid increment\n");
|
||||
// osd_printf_error("Scanline timer specified invalid increment\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
mame_printf_error("Invalid type specified\n");
|
||||
osd_printf_error("Invalid type specified\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ inline int validity_checker::get_defstr_index(const char *string, bool suppress_
|
||||
// check for strings that should be DEF_STR
|
||||
int strindex = m_defstr_map.find(string);
|
||||
if (!suppress_error && strindex != 0 && string != ioport_string_from_index(strindex))
|
||||
mame_printf_error("Must use DEF_STR( %s )\n", string);
|
||||
osd_printf_error("Must use DEF_STR( %s )\n", string);
|
||||
return strindex;
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ void validity_checker::validate_tag(const char *tag)
|
||||
{
|
||||
// some common names that are now deprecated
|
||||
if (strcmp(tag, "main") == 0 || strcmp(tag, "audio") == 0 || strcmp(tag, "sound") == 0 || strcmp(tag, "left") == 0 || strcmp(tag, "right") == 0)
|
||||
mame_printf_error("Invalid generic tag '%s' used\n", tag);
|
||||
osd_printf_error("Invalid generic tag '%s' used\n", tag);
|
||||
|
||||
// scan for invalid characters
|
||||
static const char *validchars = "abcdefghijklmnopqrstuvwxyz0123456789_.:^$";
|
||||
@ -80,17 +80,17 @@ void validity_checker::validate_tag(const char *tag)
|
||||
// only lower-case permitted
|
||||
if (*p != tolower((UINT8)*p))
|
||||
{
|
||||
mame_printf_error("Tag '%s' contains upper-case characters\n", tag);
|
||||
osd_printf_error("Tag '%s' contains upper-case characters\n", tag);
|
||||
break;
|
||||
}
|
||||
if (*p == ' ')
|
||||
{
|
||||
mame_printf_error("Tag '%s' contains spaces\n", tag);
|
||||
osd_printf_error("Tag '%s' contains spaces\n", tag);
|
||||
break;
|
||||
}
|
||||
if (strchr(validchars, *p) == NULL)
|
||||
{
|
||||
mame_printf_error("Tag '%s' contains invalid character '%c'\n", tag, *p);
|
||||
osd_printf_error("Tag '%s' contains invalid character '%c'\n", tag, *p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -104,13 +104,13 @@ void validity_checker::validate_tag(const char *tag)
|
||||
|
||||
// 0-length = bad
|
||||
if (*begin == 0)
|
||||
mame_printf_error("Found 0-length tag\n");
|
||||
osd_printf_error("Found 0-length tag\n");
|
||||
|
||||
// too short/too long = bad
|
||||
if (strlen(begin) < MIN_TAG_LENGTH)
|
||||
mame_printf_error("Tag '%s' is too short (must be at least %d characters)\n", tag, MIN_TAG_LENGTH);
|
||||
osd_printf_error("Tag '%s' is too short (must be at least %d characters)\n", tag, MIN_TAG_LENGTH);
|
||||
if (strlen(begin) > MAX_TAG_LENGTH)
|
||||
mame_printf_error("Tag '%s' is too long (must be less than %d characters)\n", tag, MAX_TAG_LENGTH);
|
||||
osd_printf_error("Tag '%s' is too long (must be less than %d characters)\n", tag, MAX_TAG_LENGTH);
|
||||
}
|
||||
|
||||
|
||||
@ -224,8 +224,8 @@ void validity_checker::check_all()
|
||||
void validity_checker::validate_begin()
|
||||
{
|
||||
// take over error and warning outputs
|
||||
m_saved_error_output = mame_set_output_channel(OUTPUT_CHANNEL_ERROR, output_delegate(FUNC(validity_checker::error_output), this));
|
||||
m_saved_warning_output = mame_set_output_channel(OUTPUT_CHANNEL_WARNING, output_delegate(FUNC(validity_checker::warning_output), this));
|
||||
m_saved_error_output = osd_set_output_channel(OSD_OUTPUT_CHANNEL_ERROR, output_delegate(FUNC(validity_checker::error_output), this));
|
||||
m_saved_warning_output = osd_set_output_channel(OSD_OUTPUT_CHANNEL_WARNING, output_delegate(FUNC(validity_checker::warning_output), this));
|
||||
|
||||
// reset all our maps
|
||||
m_names_map.reset();
|
||||
@ -249,8 +249,8 @@ void validity_checker::validate_begin()
|
||||
void validity_checker::validate_end()
|
||||
{
|
||||
// restore the original output callbacks
|
||||
mame_set_output_channel(OUTPUT_CHANNEL_ERROR, m_saved_error_output);
|
||||
mame_set_output_channel(OUTPUT_CHANNEL_WARNING, m_saved_warning_output);
|
||||
osd_set_output_channel(OSD_OUTPUT_CHANNEL_ERROR, m_saved_error_output);
|
||||
osd_set_output_channel(OSD_OUTPUT_CHANNEL_WARNING, m_saved_warning_output);
|
||||
}
|
||||
|
||||
|
||||
@ -285,7 +285,7 @@ void validity_checker::validate_one(const game_driver &driver)
|
||||
}
|
||||
catch (emu_fatalerror &err)
|
||||
{
|
||||
mame_printf_error("Fatal error %s", err.string());
|
||||
osd_printf_error("Fatal error %s", err.string());
|
||||
}
|
||||
m_current_config = NULL;
|
||||
|
||||
@ -324,32 +324,32 @@ void validity_checker::validate_core()
|
||||
// basic system checks
|
||||
UINT8 a = 0xff;
|
||||
UINT8 b = a + 1;
|
||||
if (b > a) mame_printf_error("UINT8 must be 8 bits\n");
|
||||
if (b > a) osd_printf_error("UINT8 must be 8 bits\n");
|
||||
|
||||
// check size of core integer types
|
||||
if (sizeof(INT8) != 1) mame_printf_error("INT8 must be 8 bits\n");
|
||||
if (sizeof(UINT8) != 1) mame_printf_error("UINT8 must be 8 bits\n");
|
||||
if (sizeof(INT16) != 2) mame_printf_error("INT16 must be 16 bits\n");
|
||||
if (sizeof(UINT16) != 2) mame_printf_error("UINT16 must be 16 bits\n");
|
||||
if (sizeof(INT32) != 4) mame_printf_error("INT32 must be 32 bits\n");
|
||||
if (sizeof(UINT32) != 4) mame_printf_error("UINT32 must be 32 bits\n");
|
||||
if (sizeof(INT64) != 8) mame_printf_error("INT64 must be 64 bits\n");
|
||||
if (sizeof(UINT64) != 8) mame_printf_error("UINT64 must be 64 bits\n");
|
||||
if (sizeof(INT8) != 1) osd_printf_error("INT8 must be 8 bits\n");
|
||||
if (sizeof(UINT8) != 1) osd_printf_error("UINT8 must be 8 bits\n");
|
||||
if (sizeof(INT16) != 2) osd_printf_error("INT16 must be 16 bits\n");
|
||||
if (sizeof(UINT16) != 2) osd_printf_error("UINT16 must be 16 bits\n");
|
||||
if (sizeof(INT32) != 4) osd_printf_error("INT32 must be 32 bits\n");
|
||||
if (sizeof(UINT32) != 4) osd_printf_error("UINT32 must be 32 bits\n");
|
||||
if (sizeof(INT64) != 8) osd_printf_error("INT64 must be 64 bits\n");
|
||||
if (sizeof(UINT64) != 8) osd_printf_error("UINT64 must be 64 bits\n");
|
||||
|
||||
// check pointer size
|
||||
#ifdef PTR64
|
||||
if (sizeof(void *) != 8) mame_printf_error("PTR64 flag enabled, but was compiled for 32-bit target\n");
|
||||
if (sizeof(void *) != 8) osd_printf_error("PTR64 flag enabled, but was compiled for 32-bit target\n");
|
||||
#else
|
||||
if (sizeof(void *) != 4) mame_printf_error("PTR64 flag not enabled, but was compiled for 64-bit target\n");
|
||||
if (sizeof(void *) != 4) osd_printf_error("PTR64 flag not enabled, but was compiled for 64-bit target\n");
|
||||
#endif
|
||||
|
||||
// check endianness definition
|
||||
UINT16 lsbtest = 0;
|
||||
*(UINT8 *)&lsbtest = 0xff;
|
||||
#ifdef LSB_FIRST
|
||||
if (lsbtest == 0xff00) mame_printf_error("LSB_FIRST specified, but running on a big-endian machine\n");
|
||||
if (lsbtest == 0xff00) osd_printf_error("LSB_FIRST specified, but running on a big-endian machine\n");
|
||||
#else
|
||||
if (lsbtest == 0x00ff) mame_printf_error("LSB_FIRST not specified, but running on a little-endian machine\n");
|
||||
if (lsbtest == 0x00ff) osd_printf_error("LSB_FIRST not specified, but running on a little-endian machine\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -396,32 +396,32 @@ void validity_checker::validate_inlines()
|
||||
resulti64 = mul_32x32(testi32a, testi32b);
|
||||
expectedi64 = (INT64)testi32a * (INT64)testi32b;
|
||||
if (resulti64 != expectedi64)
|
||||
mame_printf_error("Error testing mul_32x32 (%08X x %08X) = %08X%08X (expected %08X%08X)\n", testi32a, testi32b, (UINT32)(resulti64 >> 32), (UINT32)resulti64, (UINT32)(expectedi64 >> 32), (UINT32)expectedi64);
|
||||
osd_printf_error("Error testing mul_32x32 (%08X x %08X) = %08X%08X (expected %08X%08X)\n", testi32a, testi32b, (UINT32)(resulti64 >> 32), (UINT32)resulti64, (UINT32)(expectedi64 >> 32), (UINT32)expectedi64);
|
||||
|
||||
resultu64 = mulu_32x32(testu32a, testu32b);
|
||||
expectedu64 = (UINT64)testu32a * (UINT64)testu32b;
|
||||
if (resultu64 != expectedu64)
|
||||
mame_printf_error("Error testing mulu_32x32 (%08X x %08X) = %08X%08X (expected %08X%08X)\n", testu32a, testu32b, (UINT32)(resultu64 >> 32), (UINT32)resultu64, (UINT32)(expectedu64 >> 32), (UINT32)expectedu64);
|
||||
osd_printf_error("Error testing mulu_32x32 (%08X x %08X) = %08X%08X (expected %08X%08X)\n", testu32a, testu32b, (UINT32)(resultu64 >> 32), (UINT32)resultu64, (UINT32)(expectedu64 >> 32), (UINT32)expectedu64);
|
||||
|
||||
resulti32 = mul_32x32_hi(testi32a, testi32b);
|
||||
expectedi32 = ((INT64)testi32a * (INT64)testi32b) >> 32;
|
||||
if (resulti32 != expectedi32)
|
||||
mame_printf_error("Error testing mul_32x32_hi (%08X x %08X) = %08X (expected %08X)\n", testi32a, testi32b, resulti32, expectedi32);
|
||||
osd_printf_error("Error testing mul_32x32_hi (%08X x %08X) = %08X (expected %08X)\n", testi32a, testi32b, resulti32, expectedi32);
|
||||
|
||||
resultu32 = mulu_32x32_hi(testu32a, testu32b);
|
||||
expectedu32 = ((INT64)testu32a * (INT64)testu32b) >> 32;
|
||||
if (resultu32 != expectedu32)
|
||||
mame_printf_error("Error testing mulu_32x32_hi (%08X x %08X) = %08X (expected %08X)\n", testu32a, testu32b, resultu32, expectedu32);
|
||||
osd_printf_error("Error testing mulu_32x32_hi (%08X x %08X) = %08X (expected %08X)\n", testu32a, testu32b, resultu32, expectedu32);
|
||||
|
||||
resulti32 = mul_32x32_shift(testi32a, testi32b, 7);
|
||||
expectedi32 = ((INT64)testi32a * (INT64)testi32b) >> 7;
|
||||
if (resulti32 != expectedi32)
|
||||
mame_printf_error("Error testing mul_32x32_shift (%08X x %08X) >> 7 = %08X (expected %08X)\n", testi32a, testi32b, resulti32, expectedi32);
|
||||
osd_printf_error("Error testing mul_32x32_shift (%08X x %08X) >> 7 = %08X (expected %08X)\n", testi32a, testi32b, resulti32, expectedi32);
|
||||
|
||||
resultu32 = mulu_32x32_shift(testu32a, testu32b, 7);
|
||||
expectedu32 = ((INT64)testu32a * (INT64)testu32b) >> 7;
|
||||
if (resultu32 != expectedu32)
|
||||
mame_printf_error("Error testing mulu_32x32_shift (%08X x %08X) >> 7 = %08X (expected %08X)\n", testu32a, testu32b, resultu32, expectedu32);
|
||||
osd_printf_error("Error testing mulu_32x32_shift (%08X x %08X) >> 7 = %08X (expected %08X)\n", testu32a, testu32b, resultu32, expectedu32);
|
||||
|
||||
while ((INT64)testi32a * (INT64)0x7fffffff < testi64a)
|
||||
testi64a /= 2;
|
||||
@ -431,34 +431,34 @@ void validity_checker::validate_inlines()
|
||||
resulti32 = div_64x32(testi64a, testi32a);
|
||||
expectedi32 = testi64a / (INT64)testi32a;
|
||||
if (resulti32 != expectedi32)
|
||||
mame_printf_error("Error testing div_64x32 (%08X%08X / %08X) = %08X (expected %08X)\n", (UINT32)(testi64a >> 32), (UINT32)testi64a, testi32a, resulti32, expectedi32);
|
||||
osd_printf_error("Error testing div_64x32 (%08X%08X / %08X) = %08X (expected %08X)\n", (UINT32)(testi64a >> 32), (UINT32)testi64a, testi32a, resulti32, expectedi32);
|
||||
|
||||
resultu32 = divu_64x32(testu64a, testu32a);
|
||||
expectedu32 = testu64a / (UINT64)testu32a;
|
||||
if (resultu32 != expectedu32)
|
||||
mame_printf_error("Error testing divu_64x32 (%08X%08X / %08X) = %08X (expected %08X)\n", (UINT32)(testu64a >> 32), (UINT32)testu64a, testu32a, resultu32, expectedu32);
|
||||
osd_printf_error("Error testing divu_64x32 (%08X%08X / %08X) = %08X (expected %08X)\n", (UINT32)(testu64a >> 32), (UINT32)testu64a, testu32a, resultu32, expectedu32);
|
||||
|
||||
resulti32 = div_64x32_rem(testi64a, testi32a, &remainder);
|
||||
expectedi32 = testi64a / (INT64)testi32a;
|
||||
expremainder = testi64a % (INT64)testi32a;
|
||||
if (resulti32 != expectedi32 || remainder != expremainder)
|
||||
mame_printf_error("Error testing div_64x32_rem (%08X%08X / %08X) = %08X,%08X (expected %08X,%08X)\n", (UINT32)(testi64a >> 32), (UINT32)testi64a, testi32a, resulti32, remainder, expectedi32, expremainder);
|
||||
osd_printf_error("Error testing div_64x32_rem (%08X%08X / %08X) = %08X,%08X (expected %08X,%08X)\n", (UINT32)(testi64a >> 32), (UINT32)testi64a, testi32a, resulti32, remainder, expectedi32, expremainder);
|
||||
|
||||
resultu32 = divu_64x32_rem(testu64a, testu32a, &uremainder);
|
||||
expectedu32 = testu64a / (UINT64)testu32a;
|
||||
expuremainder = testu64a % (UINT64)testu32a;
|
||||
if (resultu32 != expectedu32 || uremainder != expuremainder)
|
||||
mame_printf_error("Error testing divu_64x32_rem (%08X%08X / %08X) = %08X,%08X (expected %08X,%08X)\n", (UINT32)(testu64a >> 32), (UINT32)testu64a, testu32a, resultu32, uremainder, expectedu32, expuremainder);
|
||||
osd_printf_error("Error testing divu_64x32_rem (%08X%08X / %08X) = %08X,%08X (expected %08X,%08X)\n", (UINT32)(testu64a >> 32), (UINT32)testu64a, testu32a, resultu32, uremainder, expectedu32, expuremainder);
|
||||
|
||||
resulti32 = mod_64x32(testi64a, testi32a);
|
||||
expectedi32 = testi64a % (INT64)testi32a;
|
||||
if (resulti32 != expectedi32)
|
||||
mame_printf_error("Error testing mod_64x32 (%08X%08X / %08X) = %08X (expected %08X)\n", (UINT32)(testi64a >> 32), (UINT32)testi64a, testi32a, resulti32, expectedi32);
|
||||
osd_printf_error("Error testing mod_64x32 (%08X%08X / %08X) = %08X (expected %08X)\n", (UINT32)(testi64a >> 32), (UINT32)testi64a, testi32a, resulti32, expectedi32);
|
||||
|
||||
resultu32 = modu_64x32(testu64a, testu32a);
|
||||
expectedu32 = testu64a % (UINT64)testu32a;
|
||||
if (resultu32 != expectedu32)
|
||||
mame_printf_error("Error testing modu_64x32 (%08X%08X / %08X) = %08X (expected %08X)\n", (UINT32)(testu64a >> 32), (UINT32)testu64a, testu32a, resultu32, expectedu32);
|
||||
osd_printf_error("Error testing modu_64x32 (%08X%08X / %08X) = %08X (expected %08X)\n", (UINT32)(testu64a >> 32), (UINT32)testu64a, testu32a, resultu32, expectedu32);
|
||||
|
||||
while ((INT64)testi32a * (INT64)0x7fffffff < ((INT32)testi64a << 3))
|
||||
testi64a /= 2;
|
||||
@ -468,39 +468,39 @@ void validity_checker::validate_inlines()
|
||||
resulti32 = div_32x32_shift((INT32)testi64a, testi32a, 3);
|
||||
expectedi32 = ((INT64)(INT32)testi64a << 3) / (INT64)testi32a;
|
||||
if (resulti32 != expectedi32)
|
||||
mame_printf_error("Error testing div_32x32_shift (%08X << 3) / %08X = %08X (expected %08X)\n", (INT32)testi64a, testi32a, resulti32, expectedi32);
|
||||
osd_printf_error("Error testing div_32x32_shift (%08X << 3) / %08X = %08X (expected %08X)\n", (INT32)testi64a, testi32a, resulti32, expectedi32);
|
||||
|
||||
resultu32 = divu_32x32_shift((UINT32)testu64a, testu32a, 3);
|
||||
expectedu32 = ((UINT64)(UINT32)testu64a << 3) / (UINT64)testu32a;
|
||||
if (resultu32 != expectedu32)
|
||||
mame_printf_error("Error testing divu_32x32_shift (%08X << 3) / %08X = %08X (expected %08X)\n", (UINT32)testu64a, testu32a, resultu32, expectedu32);
|
||||
osd_printf_error("Error testing divu_32x32_shift (%08X << 3) / %08X = %08X (expected %08X)\n", (UINT32)testu64a, testu32a, resultu32, expectedu32);
|
||||
|
||||
if (fabs(recip_approx(100.0) - 0.01) > 0.0001)
|
||||
mame_printf_error("Error testing recip_approx\n");
|
||||
osd_printf_error("Error testing recip_approx\n");
|
||||
|
||||
testi32a = (testi32a & 0x0000ffff) | 0x400000;
|
||||
if (count_leading_zeros(testi32a) != 9)
|
||||
mame_printf_error("Error testing count_leading_zeros\n");
|
||||
osd_printf_error("Error testing count_leading_zeros\n");
|
||||
testi32a = (testi32a | 0xffff0000) & ~0x400000;
|
||||
if (count_leading_ones(testi32a) != 9)
|
||||
mame_printf_error("Error testing count_leading_ones\n");
|
||||
osd_printf_error("Error testing count_leading_ones\n");
|
||||
|
||||
testi32b = testi32a;
|
||||
if (compare_exchange32(&testi32a, testi32b, 1000) != testi32b || testi32a != 1000)
|
||||
mame_printf_error("Error testing compare_exchange32\n");
|
||||
osd_printf_error("Error testing compare_exchange32\n");
|
||||
#ifdef PTR64
|
||||
testi64b = testi64a;
|
||||
if (compare_exchange64(&testi64a, testi64b, 1000) != testi64b || testi64a != 1000)
|
||||
mame_printf_error("Error testing compare_exchange64\n");
|
||||
osd_printf_error("Error testing compare_exchange64\n");
|
||||
#endif
|
||||
if (atomic_exchange32(&testi32a, testi32b) != 1000)
|
||||
mame_printf_error("Error testing atomic_exchange32\n");
|
||||
osd_printf_error("Error testing atomic_exchange32\n");
|
||||
if (atomic_add32(&testi32a, 45) != testi32b + 45)
|
||||
mame_printf_error("Error testing atomic_add32\n");
|
||||
osd_printf_error("Error testing atomic_add32\n");
|
||||
if (atomic_increment32(&testi32a) != testi32b + 46)
|
||||
mame_printf_error("Error testing atomic_increment32\n");
|
||||
osd_printf_error("Error testing atomic_increment32\n");
|
||||
if (atomic_decrement32(&testi32a) != testi32b + 45)
|
||||
mame_printf_error("Error testing atomic_decrement32\n");
|
||||
osd_printf_error("Error testing atomic_decrement32\n");
|
||||
}
|
||||
|
||||
|
||||
@ -516,14 +516,14 @@ void validity_checker::validate_driver()
|
||||
if (m_names_map.add(m_current_driver->name, m_current_driver, false) == TMERR_DUPLICATE)
|
||||
{
|
||||
const game_driver *match = m_names_map.find(m_current_driver->name);
|
||||
mame_printf_error("Driver name is a duplicate of %s(%s)\n", core_filename_extract_base(tempstr, match->source_file).cstr(), match->name);
|
||||
osd_printf_error("Driver name is a duplicate of %s(%s)\n", core_filename_extract_base(tempstr, match->source_file).cstr(), match->name);
|
||||
}
|
||||
|
||||
// check for duplicate descriptions
|
||||
if (m_descriptions_map.add(m_current_driver->description, m_current_driver, false) == TMERR_DUPLICATE)
|
||||
{
|
||||
const game_driver *match = m_descriptions_map.find(m_current_driver->description);
|
||||
mame_printf_error("Driver description is a duplicate of %s(%s)\n", core_filename_extract_base(tempstr, match->source_file).cstr(), match->name);
|
||||
osd_printf_error("Driver description is a duplicate of %s(%s)\n", core_filename_extract_base(tempstr, match->source_file).cstr(), match->name);
|
||||
}
|
||||
|
||||
// determine if we are a clone
|
||||
@ -535,27 +535,27 @@ void validity_checker::validate_driver()
|
||||
// if we have at least 100 drivers, validate the clone
|
||||
// (100 is arbitrary, but tries to avoid tiny.mak dependencies)
|
||||
if (driver_list::total() > 100 && clone_of == -1 && is_clone)
|
||||
mame_printf_error("Driver is a clone of nonexistant driver %s\n", m_current_driver->parent);
|
||||
osd_printf_error("Driver is a clone of nonexistant driver %s\n", m_current_driver->parent);
|
||||
|
||||
// look for recursive cloning
|
||||
if (clone_of != -1 && &m_drivlist.driver(clone_of) == m_current_driver)
|
||||
mame_printf_error("Driver is a clone of itself\n");
|
||||
osd_printf_error("Driver is a clone of itself\n");
|
||||
|
||||
// look for clones that are too deep
|
||||
if (clone_of != -1 && (clone_of = m_drivlist.non_bios_clone(clone_of)) != -1)
|
||||
mame_printf_error("Driver is a clone of a clone\n");
|
||||
osd_printf_error("Driver is a clone of a clone\n");
|
||||
|
||||
// make sure the driver name is not too long
|
||||
if (!is_clone && strlen(m_current_driver->name) > 8)
|
||||
mame_printf_error("Parent driver name must be 8 characters or less\n");
|
||||
osd_printf_error("Parent driver name must be 8 characters or less\n");
|
||||
if (is_clone && strlen(m_current_driver->name) > 16)
|
||||
mame_printf_error("Clone driver name must be 16 characters or less\n");
|
||||
osd_printf_error("Clone driver name must be 16 characters or less\n");
|
||||
|
||||
// make sure the year is only digits, '?' or '+'
|
||||
for (const char *s = m_current_driver->year; *s != 0; s++)
|
||||
if (!isdigit((UINT8)*s) && *s != '?' && *s != '+')
|
||||
{
|
||||
mame_printf_error("Driver has an invalid year '%s'\n", m_current_driver->year);
|
||||
osd_printf_error("Driver has an invalid year '%s'\n", m_current_driver->year);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -566,24 +566,24 @@ void validity_checker::validate_driver()
|
||||
|
||||
// check for this driver being compatible with a non-existant driver
|
||||
if (compatible_with != NULL && m_drivlist.find(m_current_driver->compatible_with) == -1)
|
||||
mame_printf_error("Driver is listed as compatible with nonexistant driver %s\n", m_current_driver->compatible_with);
|
||||
osd_printf_error("Driver is listed as compatible with nonexistant driver %s\n", m_current_driver->compatible_with);
|
||||
|
||||
// check for clone_of and compatible_with being specified at the same time
|
||||
if (m_drivlist.clone(*m_current_driver) != -1 && compatible_with != NULL)
|
||||
mame_printf_error("Driver cannot be both a clone and listed as compatible with another system\n");
|
||||
osd_printf_error("Driver cannot be both a clone and listed as compatible with another system\n");
|
||||
|
||||
// find any recursive dependencies on the current driver
|
||||
for (int other_drv = m_drivlist.compatible_with(*m_current_driver); other_drv != -1; other_drv = m_drivlist.compatible_with(other_drv))
|
||||
if (m_current_driver == &m_drivlist.driver(other_drv))
|
||||
{
|
||||
mame_printf_error("Driver is recursively compatible with itself\n");
|
||||
osd_printf_error("Driver is recursively compatible with itself\n");
|
||||
break;
|
||||
}
|
||||
|
||||
// make sure sound-less drivers are flagged
|
||||
sound_interface_iterator iter(m_current_config->root_device());
|
||||
if ((m_current_driver->flags & GAME_IS_BIOS_ROOT) == 0 && iter.first() == NULL && (m_current_driver->flags & GAME_NO_SOUND) == 0 && (m_current_driver->flags & GAME_NO_SOUND_HW) == 0)
|
||||
mame_printf_error("Driver is missing GAME_NO_SOUND flag\n");
|
||||
osd_printf_error("Driver is missing GAME_NO_SOUND flag\n");
|
||||
}
|
||||
|
||||
|
||||
@ -614,7 +614,7 @@ void validity_checker::validate_roms()
|
||||
{
|
||||
// if we haven't seen any items since the last region, print a warning
|
||||
if (items_since_region == 0)
|
||||
mame_printf_warning("Empty ROM region '%s' (warning)\n", last_region_name);
|
||||
osd_printf_warning("Empty ROM region '%s' (warning)\n", last_region_name);
|
||||
|
||||
// reset our region tracking states
|
||||
const char *basetag = ROMREGION_GETTAG(romp);
|
||||
@ -624,7 +624,7 @@ void validity_checker::validate_roms()
|
||||
// check for a valid tag
|
||||
if (basetag == NULL)
|
||||
{
|
||||
mame_printf_error("ROM_REGION tag with NULL name\n");
|
||||
osd_printf_error("ROM_REGION tag with NULL name\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -638,7 +638,7 @@ void validity_checker::validate_roms()
|
||||
// attempt to add it to the map, reporting duplicates as errors
|
||||
current_length = ROMREGION_GETLENGTH(romp);
|
||||
if (m_region_map.add(fulltag, current_length, false) == TMERR_DUPLICATE)
|
||||
mame_printf_error("Multiple ROM_REGIONs with the same tag '%s' defined\n", fulltag.cstr());
|
||||
osd_printf_error("Multiple ROM_REGIONs with the same tag '%s' defined\n", fulltag.cstr());
|
||||
}
|
||||
|
||||
// If this is a system bios, make sure it is using the next available bios number
|
||||
@ -646,7 +646,7 @@ void validity_checker::validate_roms()
|
||||
{
|
||||
int bios_flags = ROM_GETBIOSFLAGS(romp);
|
||||
if (bios_flags != last_bios + 1)
|
||||
mame_printf_error("Non-sequential bios %s (specified as %d, expected to be %d)\n", ROM_GETNAME(romp), bios_flags, last_bios + 1);
|
||||
osd_printf_error("Non-sequential bios %s (specified as %d, expected to be %d)\n", ROM_GETNAME(romp), bios_flags, last_bios + 1);
|
||||
last_bios = bios_flags;
|
||||
}
|
||||
|
||||
@ -661,14 +661,14 @@ void validity_checker::validate_roms()
|
||||
for (const char *s = last_name; *s != 0; s++)
|
||||
if (tolower((UINT8)*s) != *s)
|
||||
{
|
||||
mame_printf_error("ROM name '%s' contains upper case characters\n", last_name);
|
||||
osd_printf_error("ROM name '%s' contains upper case characters\n", last_name);
|
||||
break;
|
||||
}
|
||||
|
||||
// make sure the hash is valid
|
||||
hash_collection hashes;
|
||||
if (!hashes.from_internal_string(ROM_GETHASHDATA(romp)))
|
||||
mame_printf_error("ROM '%s' has an invalid hash string '%s'\n", last_name, ROM_GETHASHDATA(romp));
|
||||
osd_printf_error("ROM '%s' has an invalid hash string '%s'\n", last_name, ROM_GETHASHDATA(romp));
|
||||
}
|
||||
|
||||
// for any non-region ending entries, make sure they don't extend past the end
|
||||
@ -676,13 +676,13 @@ void validity_checker::validate_roms()
|
||||
{
|
||||
items_since_region++;
|
||||
if (ROM_GETOFFSET(romp) + ROM_GETLENGTH(romp) > current_length)
|
||||
mame_printf_error("ROM '%s' extends past the defined memory region\n", last_name);
|
||||
osd_printf_error("ROM '%s' extends past the defined memory region\n", last_name);
|
||||
}
|
||||
}
|
||||
|
||||
// final check for empty regions
|
||||
if (items_since_region == 0)
|
||||
mame_printf_warning("Empty ROM region '%s' (warning)\n", last_region_name);
|
||||
osd_printf_warning("Empty ROM region '%s' (warning)\n", last_region_name);
|
||||
|
||||
|
||||
// reset the current device
|
||||
@ -700,11 +700,11 @@ void validity_checker::validate_analog_input_field(ioport_field &field)
|
||||
{
|
||||
// analog ports must have a valid sensitivity
|
||||
if (field.sensitivity() == 0)
|
||||
mame_printf_error("Analog port with zero sensitivity\n");
|
||||
osd_printf_error("Analog port with zero sensitivity\n");
|
||||
|
||||
// check that the default falls in the bitmask range
|
||||
if (field.defvalue() & ~field.mask())
|
||||
mame_printf_error("Analog port with a default value (%X) out of the bitmask range (%X)\n", field.defvalue(), field.mask());
|
||||
osd_printf_error("Analog port with a default value (%X) out of the bitmask range (%X)\n", field.defvalue(), field.mask());
|
||||
|
||||
// tests for positional devices
|
||||
if (field.type() == IPT_POSITIONAL || field.type() == IPT_POSITIONAL_V)
|
||||
@ -718,7 +718,7 @@ void validity_checker::validate_analog_input_field(ioport_field &field)
|
||||
|
||||
// positional port size must fit in bits used
|
||||
if ((field.mask() >> shift) + 1 < field.maxval())
|
||||
mame_printf_error("Analog port with a positional port size bigger then the mask size\n");
|
||||
osd_printf_error("Analog port with a positional port size bigger then the mask size\n");
|
||||
}
|
||||
|
||||
// tests for absolute devices
|
||||
@ -737,20 +737,20 @@ void validity_checker::validate_analog_input_field(ioport_field &field)
|
||||
|
||||
// check that the default falls in the MINMAX range
|
||||
if (default_value < analog_min || default_value > analog_max)
|
||||
mame_printf_error("Analog port with a default value (%X) out of PORT_MINMAX range (%X-%X)\n", field.defvalue(), field.minval(), field.maxval());
|
||||
osd_printf_error("Analog port with a default value (%X) out of PORT_MINMAX range (%X-%X)\n", field.defvalue(), field.minval(), field.maxval());
|
||||
|
||||
// check that the MINMAX falls in the bitmask range
|
||||
// we use the unadjusted min for testing
|
||||
if (field.minval() & ~field.mask() || analog_max & ~field.mask())
|
||||
mame_printf_error("Analog port with a PORT_MINMAX (%X-%X) value out of the bitmask range (%X)\n", field.minval(), field.maxval(), field.mask());
|
||||
osd_printf_error("Analog port with a PORT_MINMAX (%X-%X) value out of the bitmask range (%X)\n", field.minval(), field.maxval(), field.mask());
|
||||
|
||||
// absolute analog ports do not use PORT_RESET
|
||||
if (field.analog_reset())
|
||||
mame_printf_error("Absolute analog port using PORT_RESET\n");
|
||||
osd_printf_error("Absolute analog port using PORT_RESET\n");
|
||||
|
||||
// absolute analog ports do not use PORT_WRAPS
|
||||
if (field.analog_wraps())
|
||||
mame_printf_error("Absolute analog port using PORT_WRAPS\n");
|
||||
osd_printf_error("Absolute analog port using PORT_WRAPS\n");
|
||||
}
|
||||
|
||||
// tests for non IPT_POSITIONAL relative devices
|
||||
@ -758,16 +758,16 @@ void validity_checker::validate_analog_input_field(ioport_field &field)
|
||||
{
|
||||
// relative devices do not use PORT_MINMAX
|
||||
if (field.minval() != 0 || field.maxval() != field.mask())
|
||||
mame_printf_error("Relative port using PORT_MINMAX\n");
|
||||
osd_printf_error("Relative port using PORT_MINMAX\n");
|
||||
|
||||
// relative devices do not use a default value
|
||||
// the counter is at 0 on power up
|
||||
if (field.defvalue() != 0)
|
||||
mame_printf_error("Relative port using non-0 default value\n");
|
||||
osd_printf_error("Relative port using non-0 default value\n");
|
||||
|
||||
// relative analog ports do not use PORT_WRAPS
|
||||
if (field.analog_wraps())
|
||||
mame_printf_error("Absolute analog port using PORT_WRAPS\n");
|
||||
osd_printf_error("Absolute analog port using PORT_WRAPS\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -794,15 +794,15 @@ void validity_checker::validate_dip_settings(ioport_field &field)
|
||||
|
||||
// make sure demo sounds default to on
|
||||
if (field.name() == demo_sounds && strindex == INPUT_STRING_On && field.defvalue() != setting->value())
|
||||
mame_printf_error("Demo Sounds must default to On\n");
|
||||
osd_printf_error("Demo Sounds must default to On\n");
|
||||
|
||||
// check for bad demo sounds options
|
||||
if (field.name() == demo_sounds && (strindex == INPUT_STRING_Yes || strindex == INPUT_STRING_No))
|
||||
mame_printf_error("Demo Sounds option must be Off/On, not %s\n", setting->name());
|
||||
osd_printf_error("Demo Sounds option must be Off/On, not %s\n", setting->name());
|
||||
|
||||
// check for bad flip screen options
|
||||
if (field.name() == flipscreen && (strindex == INPUT_STRING_Yes || strindex == INPUT_STRING_No))
|
||||
mame_printf_error("Flip Screen option must be Off/On, not %s\n", setting->name());
|
||||
osd_printf_error("Flip Screen option must be Off/On, not %s\n", setting->name());
|
||||
|
||||
// if we have a neighbor, compare ourselves to him
|
||||
if (setting->next() != NULL)
|
||||
@ -810,21 +810,21 @@ void validity_checker::validate_dip_settings(ioport_field &field)
|
||||
// check for inverted off/on dispswitch order
|
||||
int next_strindex = get_defstr_index(setting->next()->name(), true);
|
||||
if (strindex == INPUT_STRING_On && next_strindex == INPUT_STRING_Off)
|
||||
mame_printf_error("%s option must have Off/On options in the order: Off, On\n", field.name());
|
||||
osd_printf_error("%s option must have Off/On options in the order: Off, On\n", field.name());
|
||||
|
||||
// check for inverted yes/no dispswitch order
|
||||
else if (strindex == INPUT_STRING_Yes && next_strindex == INPUT_STRING_No)
|
||||
mame_printf_error("%s option must have Yes/No options in the order: No, Yes\n", field.name());
|
||||
osd_printf_error("%s option must have Yes/No options in the order: No, Yes\n", field.name());
|
||||
|
||||
// check for inverted upright/cocktail dispswitch order
|
||||
else if (strindex == INPUT_STRING_Cocktail && next_strindex == INPUT_STRING_Upright)
|
||||
mame_printf_error("%s option must have Upright/Cocktail options in the order: Upright, Cocktail\n", field.name());
|
||||
osd_printf_error("%s option must have Upright/Cocktail options in the order: Upright, Cocktail\n", field.name());
|
||||
|
||||
// check for proper coin ordering
|
||||
else if (strindex >= __input_string_coinage_start && strindex <= __input_string_coinage_end && next_strindex >= __input_string_coinage_start && next_strindex <= __input_string_coinage_end &&
|
||||
strindex >= next_strindex && setting->condition() == setting->next()->condition())
|
||||
{
|
||||
mame_printf_error("%s option has unsorted coinage %s > %s\n", field.name(), setting->name(), setting->next()->name());
|
||||
osd_printf_error("%s option has unsorted coinage %s > %s\n", field.name(), setting->name(), setting->next()->name());
|
||||
coin_error = true;
|
||||
}
|
||||
}
|
||||
@ -854,7 +854,7 @@ void validity_checker::validate_condition(ioport_condition &condition, device_t
|
||||
|
||||
// then find a matching port
|
||||
if (port_map.find(porttag) == 0)
|
||||
mame_printf_error("Condition referencing non-existent ioport tag '%s'\n", condition.tag());
|
||||
osd_printf_error("Condition referencing non-existent ioport tag '%s'\n", condition.tag());
|
||||
}
|
||||
|
||||
|
||||
@ -884,12 +884,12 @@ void validity_checker::validate_inputs()
|
||||
|
||||
// report any errors during construction
|
||||
if (errorbuf)
|
||||
mame_printf_error("I/O port error during construction:\n%s\n", errorbuf.cstr());
|
||||
osd_printf_error("I/O port error during construction:\n%s\n", errorbuf.cstr());
|
||||
|
||||
// do a first pass over ports to add their names and find duplicates
|
||||
for (ioport_port *port = portlist.first(); port != NULL; port = port->next())
|
||||
if (port_map.add(port->tag(), 1, false) == TMERR_DUPLICATE)
|
||||
mame_printf_error("Multiple I/O ports with the same tag '%s' defined\n", port->tag());
|
||||
osd_printf_error("Multiple I/O ports with the same tag '%s' defined\n", port->tag());
|
||||
|
||||
// iterate over ports
|
||||
for (ioport_port *port = portlist.first(); port != NULL; port = port->next())
|
||||
@ -905,14 +905,14 @@ void validity_checker::validate_inputs()
|
||||
|
||||
// look for invalid (0) types which should be mapped to IPT_OTHER
|
||||
if (field->type() == IPT_INVALID)
|
||||
mame_printf_error("Field has an invalid type (0); use IPT_OTHER instead\n");
|
||||
osd_printf_error("Field has an invalid type (0); use IPT_OTHER instead\n");
|
||||
|
||||
// verify dip switches
|
||||
if (field->type() == IPT_DIPSWITCH)
|
||||
{
|
||||
// dip switch fields must have a name
|
||||
if (field->name() == NULL)
|
||||
mame_printf_error("DIP switch has a NULL name\n");
|
||||
osd_printf_error("DIP switch has a NULL name\n");
|
||||
|
||||
// verify the settings list
|
||||
validate_dip_settings(*field);
|
||||
@ -924,15 +924,15 @@ void validity_checker::validate_inputs()
|
||||
{
|
||||
// check for empty string
|
||||
if (name[0] == 0)
|
||||
mame_printf_error("Field name is an empty string\n");
|
||||
osd_printf_error("Field name is an empty string\n");
|
||||
|
||||
// check for trailing spaces
|
||||
if (name[0] != 0 && name[strlen(name) - 1] == ' ')
|
||||
mame_printf_error("Field '%s' has trailing spaces\n", name);
|
||||
osd_printf_error("Field '%s' has trailing spaces\n", name);
|
||||
|
||||
// check for invalid UTF-8
|
||||
if (!utf8_is_valid_string(name))
|
||||
mame_printf_error("Field '%s' has invalid characters\n", name);
|
||||
osd_printf_error("Field '%s' has invalid characters\n", name);
|
||||
|
||||
// look up the string and print an error if default strings are not used
|
||||
/*strindex =get_defstr_index(defstr_map, name, driver, &error);*/
|
||||
@ -985,15 +985,15 @@ void validity_checker::validate_devices()
|
||||
|
||||
// look for duplicates
|
||||
if (device_map.add(device->tag(), 0, false) == TMERR_DUPLICATE)
|
||||
mame_printf_error("Multiple devices with the same tag '%s' defined\n", device->tag());
|
||||
osd_printf_error("Multiple devices with the same tag '%s' defined\n", device->tag());
|
||||
|
||||
// all devices must have a shortname
|
||||
if (strcmp(device->shortname(), "") == 0)
|
||||
mame_printf_error("Device does not have short name defined\n");
|
||||
osd_printf_error("Device does not have short name defined\n");
|
||||
|
||||
// all devices must have a source file defined
|
||||
if (strcmp(device->source(), "") == 0)
|
||||
mame_printf_error("Device does not have source file location defined\n");
|
||||
osd_printf_error("Device does not have source file location defined\n");
|
||||
|
||||
// check for device-specific validity check
|
||||
device->validity_check(*this);
|
||||
@ -1021,7 +1021,7 @@ void validity_checker::validate_devices()
|
||||
|
||||
if (strcmp(dev->shortname(), "") == 0) {
|
||||
if (slot_device_map.add(dev->name(), 0, false) != TMERR_DUPLICATE)
|
||||
mame_printf_error("Device '%s' is slot cart device but does not have short name defined\n",dev->name());
|
||||
osd_printf_error("Device '%s' is slot cart device but does not have short name defined\n",dev->name());
|
||||
}
|
||||
|
||||
const_cast<machine_config &>(*m_current_config).device_remove(&m_current_config->root_device(), temptag.cstr());
|
||||
|
@ -316,7 +316,7 @@ void video_manager::save_snapshot(screen_device *screen, emu_file &file)
|
||||
int entries = (screen !=NULL && screen->palette() != NULL) ? screen->palette()->entries() : 0;
|
||||
png_error error = png_write_bitmap(file, &pnginfo, m_snap_bitmap, entries, palette);
|
||||
if (error != PNGERR_NONE)
|
||||
mame_printf_error("Error generating PNG for snapshot: png_error = %d\n", error);
|
||||
osd_printf_error("Error generating PNG for snapshot: png_error = %d\n", error);
|
||||
|
||||
// free any data allocated
|
||||
png_free(&pnginfo);
|
||||
@ -417,7 +417,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
|
||||
avi_error avierr = avi_create(fullpath, &info, &m_avi_file);
|
||||
if (avierr != AVIERR_NONE)
|
||||
{
|
||||
mame_printf_error("Error creating AVI: %s\n", avi_error_string(avierr));
|
||||
osd_printf_error("Error creating AVI: %s\n", avi_error_string(avierr));
|
||||
return end_recording(format);
|
||||
}
|
||||
}
|
||||
@ -448,7 +448,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
|
||||
png_error pngerr = mng_capture_start(*m_mng_file, m_snap_bitmap, rate);
|
||||
if (pngerr != PNGERR_NONE)
|
||||
{
|
||||
mame_printf_error("Error capturing MNG, png_error=%d\n", pngerr);
|
||||
osd_printf_error("Error capturing MNG, png_error=%d\n", pngerr);
|
||||
return end_recording(format);
|
||||
}
|
||||
|
||||
@ -457,7 +457,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
|
||||
}
|
||||
else
|
||||
{
|
||||
mame_printf_error("Error creating MNG, file_error=%d\n", filerr);
|
||||
osd_printf_error("Error creating MNG, file_error=%d\n", filerr);
|
||||
m_mng_file.reset();
|
||||
}
|
||||
}
|
||||
@ -542,7 +542,7 @@ void video_manager::exit()
|
||||
osd_ticks_t tps = osd_ticks_per_second();
|
||||
double final_real_time = (double)m_overall_real_seconds + (double)m_overall_real_ticks / (double)tps;
|
||||
double final_emu_time = m_overall_emutime.as_double();
|
||||
mame_printf_info("Average speed: %.2f%% (%d seconds)\n", 100 * final_emu_time / final_real_time, (m_overall_emutime + attotime(0, ATTOSECONDS_PER_SECOND / 2)).seconds);
|
||||
osd_printf_info("Average speed: %.2f%% (%d seconds)\n", 100 * final_emu_time / final_real_time, (m_overall_emutime + attotime(0, ATTOSECONDS_PER_SECOND / 2)).seconds);
|
||||
}
|
||||
}
|
||||
|
||||
@ -970,7 +970,7 @@ void video_manager::update_refresh_speed()
|
||||
// if we changed, log that verbosely
|
||||
if (target_speed != m_speed)
|
||||
{
|
||||
mame_printf_verbose("Adjusting target speed to %.1f%% (hw=%.2fHz, game=%.2fHz, adjusted=%.2fHz)\n", target_speed / 10.0, minrefresh, ATTOSECONDS_TO_HZ(min_frame_period), ATTOSECONDS_TO_HZ(min_frame_period * 1000.0 / target_speed));
|
||||
osd_printf_verbose("Adjusting target speed to %.1f%% (hw=%.2fHz, game=%.2fHz, adjusted=%.2fHz)\n", target_speed / 10.0, minrefresh, ATTOSECONDS_TO_HZ(min_frame_period), ATTOSECONDS_TO_HZ(min_frame_period * 1000.0 / target_speed));
|
||||
m_speed = target_speed;
|
||||
}
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ void sega315_5313_device::vdp_vram_write(UINT16 data)
|
||||
for some funky effects, as used by Castlevania Bloodlines Stage 6-3 */
|
||||
if (m_vdp_address>=lowlimit && m_vdp_address<highlimit)
|
||||
{
|
||||
// mame_printf_debug("spritebase is %04x-%04x vram address is %04x, write %04x\n",lowlimit, highlimit-1, m_vdp_address, data);
|
||||
// osd_printf_debug("spritebase is %04x-%04x vram address is %04x, write %04x\n",lowlimit, highlimit-1, m_vdp_address, data);
|
||||
m_internal_sprite_attribute_table[(m_vdp_address&(spritetable_size-1))>>1] = data;
|
||||
}
|
||||
|
||||
@ -406,7 +406,7 @@ void sega315_5313_device::vdp_set_register(int regnum, UINT8 value)
|
||||
|
||||
if (regnum == 0x00)
|
||||
{
|
||||
//mame_printf_debug("setting reg 0, irq enable is now %d\n",MEGADRIVE_REG0_IRQ4_ENABLE);
|
||||
//osd_printf_debug("setting reg 0, irq enable is now %d\n",MEGADRIVE_REG0_IRQ4_ENABLE);
|
||||
|
||||
if (m_irq4_pending)
|
||||
{
|
||||
@ -442,9 +442,9 @@ void sega315_5313_device::vdp_set_register(int regnum, UINT8 value)
|
||||
|
||||
|
||||
// if (regnum == 0x0a)
|
||||
// mame_printf_debug("Set HINT Reload Register to %d on scanline %d\n",value, get_scanline_counter());
|
||||
// osd_printf_debug("Set HINT Reload Register to %d on scanline %d\n",value, get_scanline_counter());
|
||||
|
||||
// mame_printf_debug("%s: Setting VDP Register #%02x to %02x\n",machine().describe_context(), 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)
|
||||
@ -510,7 +510,7 @@ void sega315_5313_device::insta_vram_copy(UINT32 source, UINT16 length)
|
||||
{
|
||||
UINT8 source_byte;
|
||||
|
||||
//mame_printf_debug("vram copy length %04x source %04x dest %04x\n",length, source, m_vdp_address );
|
||||
//osd_printf_debug("vram copy length %04x source %04x dest %04x\n",length, source, m_vdp_address );
|
||||
if (source&1) source_byte = MEGADRIV_VDP_VRAM((source&0xffff)>>1)&0x00ff;
|
||||
else source_byte = (MEGADRIV_VDP_VRAM((source&0xffff)>>1)&0xff00)>>8;
|
||||
|
||||
@ -622,12 +622,12 @@ void sega315_5313_device::handle_dma_bits()
|
||||
UINT16 length;
|
||||
source = (MEGADRIVE_REG15_DMASOURCE1 | (MEGADRIVE_REG16_DMASOURCE2<<8) | ((MEGADRIVE_REG17_DMASOURCE3&0xff)<<16))<<1;
|
||||
length = (MEGADRIVE_REG13_DMALENGTH1 | (MEGADRIVE_REG14_DMALENGTH2<<8))<<1;
|
||||
mame_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);
|
||||
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 (m_vdp_code==0x20)
|
||||
{
|
||||
mame_printf_debug("DMA bit set 0x20 but invalid??\n");
|
||||
osd_printf_debug("DMA bit set 0x20 but invalid??\n");
|
||||
}
|
||||
else if (m_vdp_code==0x21 || m_vdp_code==0x31) /* 0x31 used by tecmo cup */
|
||||
{
|
||||
@ -639,13 +639,13 @@ void sega315_5313_device::handle_dma_bits()
|
||||
length = (MEGADRIVE_REG13_DMALENGTH1 | (MEGADRIVE_REG14_DMALENGTH2<<8))<<1;
|
||||
|
||||
/* The 68k is frozen during this transfer, it should be safe to throw a few cycles away and do 'instant' DMA because the 68k can't detect it being in progress (can the z80?) */
|
||||
//mame_printf_debug("68k->VRAM DMA transfer source %06x length %04x dest %04x enabled %01x\n", source, length, m_vdp_address,MEGADRIVE_REG01_DMA_ENABLE);
|
||||
//osd_printf_debug("68k->VRAM DMA transfer source %06x length %04x dest %04x enabled %01x\n", source, length, m_vdp_address,MEGADRIVE_REG01_DMA_ENABLE);
|
||||
if (MEGADRIVE_REG01_DMA_ENABLE) insta_68k_to_vram_dma(source,length);
|
||||
|
||||
}
|
||||
else if (MEGADRIVE_REG17_DMATYPE==0x2)
|
||||
{
|
||||
//mame_printf_debug("vram fill length %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
//osd_printf_debug("vram fill length %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
if (MEGADRIVE_REG01_DMA_ENABLE)
|
||||
{
|
||||
m_vram_fill_pending = 1;
|
||||
@ -658,7 +658,7 @@ void sega315_5313_device::handle_dma_bits()
|
||||
UINT16 length;
|
||||
source = (MEGADRIVE_REG15_DMASOURCE1 | (MEGADRIVE_REG16_DMASOURCE2<<8)); // source (byte offset)
|
||||
length = (MEGADRIVE_REG13_DMALENGTH1 | (MEGADRIVE_REG14_DMALENGTH2<<8)); // length in bytes
|
||||
//mame_printf_debug("setting vram copy mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
//osd_printf_debug("setting vram copy mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
|
||||
if (MEGADRIVE_REG01_DMA_ENABLE) insta_vram_copy(source, length);
|
||||
}
|
||||
@ -673,12 +673,12 @@ void sega315_5313_device::handle_dma_bits()
|
||||
length = (MEGADRIVE_REG13_DMALENGTH1 | (MEGADRIVE_REG14_DMALENGTH2<<8))<<1;
|
||||
|
||||
/* The 68k is frozen during this transfer, it should be safe to throw a few cycles away and do 'instant' DMA because the 68k can't detect it being in progress (can the z80?) */
|
||||
//mame_printf_debug("68k->CRAM DMA transfer source %06x length %04x dest %04x enabled %01x\n", source, length, m_vdp_address,MEGADRIVE_REG01_DMA_ENABLE);
|
||||
//osd_printf_debug("68k->CRAM DMA transfer source %06x length %04x dest %04x enabled %01x\n", source, length, m_vdp_address,MEGADRIVE_REG01_DMA_ENABLE);
|
||||
if (MEGADRIVE_REG01_DMA_ENABLE) insta_68k_to_cram_dma(source,length);
|
||||
}
|
||||
else if (MEGADRIVE_REG17_DMATYPE==0x2)
|
||||
{
|
||||
//mame_printf_debug("vram fill length %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
//osd_printf_debug("vram fill length %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
if (MEGADRIVE_REG01_DMA_ENABLE)
|
||||
{
|
||||
m_vram_fill_pending = 1;
|
||||
@ -687,7 +687,7 @@ void sega315_5313_device::handle_dma_bits()
|
||||
}
|
||||
else if (MEGADRIVE_REG17_DMATYPE==0x3)
|
||||
{
|
||||
mame_printf_debug("setting vram copy (INVALID?) mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
osd_printf_debug("setting vram copy (INVALID?) mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
}
|
||||
}
|
||||
else if (m_vdp_code==0x25)
|
||||
@ -700,12 +700,12 @@ void sega315_5313_device::handle_dma_bits()
|
||||
length = (MEGADRIVE_REG13_DMALENGTH1 | (MEGADRIVE_REG14_DMALENGTH2<<8))<<1;
|
||||
|
||||
/* The 68k is frozen during this transfer, it should be safe to throw a few cycles away and do 'instant' DMA because the 68k can't detect it being in progress (can the z80?) */
|
||||
//mame_printf_debug("68k->VSRAM DMA transfer source %06x length %04x dest %04x enabled %01x\n", source, length, m_vdp_address,MEGADRIVE_REG01_DMA_ENABLE);
|
||||
//osd_printf_debug("68k->VSRAM DMA transfer source %06x length %04x dest %04x enabled %01x\n", source, length, m_vdp_address,MEGADRIVE_REG01_DMA_ENABLE);
|
||||
if (MEGADRIVE_REG01_DMA_ENABLE) insta_68k_to_vsram_dma(source,length);
|
||||
}
|
||||
else if (MEGADRIVE_REG17_DMATYPE==0x2)
|
||||
{
|
||||
//mame_printf_debug("vram fill length %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
//osd_printf_debug("vram fill length %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
if (MEGADRIVE_REG01_DMA_ENABLE)
|
||||
{
|
||||
m_vram_fill_pending = 1;
|
||||
@ -714,22 +714,22 @@ void sega315_5313_device::handle_dma_bits()
|
||||
}
|
||||
else if (MEGADRIVE_REG17_DMATYPE==0x3)
|
||||
{
|
||||
mame_printf_debug("setting vram copy (INVALID?) mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
osd_printf_debug("setting vram copy (INVALID?) mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
}
|
||||
}
|
||||
else if (m_vdp_code==0x30)
|
||||
{
|
||||
if (MEGADRIVE_REG17_DMATYPE==0x0)
|
||||
{
|
||||
mame_printf_debug("setting vram 68k->vram (INVALID?) mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
osd_printf_debug("setting vram 68k->vram (INVALID?) mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
}
|
||||
else if (MEGADRIVE_REG17_DMATYPE==0x1)
|
||||
{
|
||||
mame_printf_debug("setting vram 68k->vram (INVALID?) mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
osd_printf_debug("setting vram 68k->vram (INVALID?) mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
}
|
||||
else if (MEGADRIVE_REG17_DMATYPE==0x2)
|
||||
{
|
||||
mame_printf_debug("setting vram fill (INVALID?) mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
osd_printf_debug("setting vram fill (INVALID?) mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
}
|
||||
else if (MEGADRIVE_REG17_DMATYPE==0x3)
|
||||
{
|
||||
@ -737,7 +737,7 @@ void sega315_5313_device::handle_dma_bits()
|
||||
UINT16 length;
|
||||
source = (MEGADRIVE_REG15_DMASOURCE1 | (MEGADRIVE_REG16_DMASOURCE2<<8)); // source (byte offset)
|
||||
length = (MEGADRIVE_REG13_DMALENGTH1 | (MEGADRIVE_REG14_DMALENGTH2<<8)); // length in bytes
|
||||
//mame_printf_debug("setting vram copy mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
//osd_printf_debug("setting vram copy mode length registers are %02x %02x other regs! %02x %02x %02x(Mode Bits %02x) Enable %02x\n", MEGADRIVE_REG13_DMALENGTH1, MEGADRIVE_REG14_DMALENGTH2, MEGADRIVE_REG15_DMASOURCE1, MEGADRIVE_REG16_DMASOURCE2, MEGADRIVE_REG17_DMASOURCE3, MEGADRIVE_REG17_DMATYPE, MEGADRIVE_REG01_DMA_ENABLE);
|
||||
|
||||
if (MEGADRIVE_REG01_DMA_ENABLE) insta_vram_copy(source, length);
|
||||
}
|
||||
@ -768,7 +768,7 @@ void sega315_5313_device::ctrl_port_w(int data)
|
||||
int regnum = (data & 0x3f00) >> 8;
|
||||
int value = (data & 0x00ff);
|
||||
|
||||
if (regnum &0x20) mame_printf_debug("reg error\n");
|
||||
if (regnum &0x20) osd_printf_debug("reg error\n");
|
||||
|
||||
vdp_set_register(regnum & 0x1f, value);
|
||||
m_vdp_code = 0;
|
||||
@ -794,19 +794,19 @@ WRITE16_MEMBER( sega315_5313_device::vdp_w )
|
||||
if (!ACCESSING_BITS_8_15)
|
||||
{
|
||||
data = (data&0x00ff) | data<<8;
|
||||
// mame_printf_debug("8-bit write VDP data port access, offset %04x data %04x mem_mask %04x\n",offset,data,mem_mask);
|
||||
// osd_printf_debug("8-bit write VDP data port access, offset %04x data %04x mem_mask %04x\n",offset,data,mem_mask);
|
||||
}
|
||||
else if (!ACCESSING_BITS_0_7)
|
||||
{
|
||||
data = (data&0xff00) | data>>8;
|
||||
// mame_printf_debug("8-bit write VDP data port access, offset %04x data %04x mem_mask %04x\n",offset,data,mem_mask);
|
||||
// osd_printf_debug("8-bit write VDP data port access, offset %04x data %04x mem_mask %04x\n",offset,data,mem_mask);
|
||||
}
|
||||
data_port_w(data);
|
||||
break;
|
||||
|
||||
case 0x04:
|
||||
case 0x06:
|
||||
if ((!ACCESSING_BITS_8_15) || (!ACCESSING_BITS_0_7)) mame_printf_debug("8-bit write VDP control port access, offset %04x data %04x mem_mask %04x\n",offset,data,mem_mask);
|
||||
if ((!ACCESSING_BITS_8_15) || (!ACCESSING_BITS_0_7)) osd_printf_debug("8-bit write VDP control port access, offset %04x data %04x mem_mask %04x\n",offset,data,mem_mask);
|
||||
ctrl_port_w(data);
|
||||
break;
|
||||
|
||||
@ -830,7 +830,7 @@ WRITE16_MEMBER( sega315_5313_device::vdp_w )
|
||||
}
|
||||
|
||||
default:
|
||||
mame_printf_debug("write to unmapped vdp port\n");
|
||||
osd_printf_debug("write to unmapped vdp port\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -897,7 +897,7 @@ UINT16 sega315_5313_device::data_port_r()
|
||||
break;
|
||||
}
|
||||
|
||||
// mame_printf_debug("vdp_data_port_r %04x %04x %04x\n",m_vdp_code, m_vdp_address, retdata);
|
||||
// osd_printf_debug("vdp_data_port_r %04x %04x %04x\n",m_vdp_code, m_vdp_address, retdata);
|
||||
|
||||
// logerror("Read VDP Data Port\n");
|
||||
return retdata;
|
||||
@ -1182,7 +1182,7 @@ UINT16 sega315_5313_device::megadriv_read_hv_counters()
|
||||
if (vpos<0)
|
||||
{
|
||||
vpos = m_total_scanlines;
|
||||
mame_printf_debug("negative vpos?!\n");
|
||||
osd_printf_debug("negative vpos?!\n");
|
||||
}
|
||||
|
||||
if (MEGADRIVE_REG01_240_LINE)
|
||||
@ -1212,26 +1212,26 @@ READ16_MEMBER( sega315_5313_device::vdp_r )
|
||||
{
|
||||
case 0x00:
|
||||
case 0x02:
|
||||
if ((!ACCESSING_BITS_8_15) || (!ACCESSING_BITS_0_7)) mame_printf_debug("8-bit VDP read data port access, offset %04x mem_mask %04x\n",offset,mem_mask);
|
||||
if ((!ACCESSING_BITS_8_15) || (!ACCESSING_BITS_0_7)) osd_printf_debug("8-bit VDP read data port access, offset %04x mem_mask %04x\n",offset,mem_mask);
|
||||
retvalue = data_port_r();
|
||||
break;
|
||||
|
||||
case 0x04:
|
||||
case 0x06:
|
||||
// if ((!ACCESSING_BITS_8_15) || (!ACCESSING_BITS_0_7)) mame_printf_debug("8-bit VDP read control port access, offset %04x mem_mask %04x\n",offset,mem_mask);
|
||||
// if ((!ACCESSING_BITS_8_15) || (!ACCESSING_BITS_0_7)) osd_printf_debug("8-bit VDP read control port access, offset %04x mem_mask %04x\n",offset,mem_mask);
|
||||
retvalue = ctrl_port_r();
|
||||
// retvalue = machine().rand();
|
||||
// mame_printf_debug("%06x: Read Control Port at scanline %d hpos %d (return %04x)\n",space.device().safe_pc(),get_scanline_counter(), get_hposition(),retvalue);
|
||||
// osd_printf_debug("%06x: Read Control Port at scanline %d hpos %d (return %04x)\n",space.device().safe_pc(),get_scanline_counter(), get_hposition(),retvalue);
|
||||
break;
|
||||
|
||||
case 0x08:
|
||||
case 0x0a:
|
||||
case 0x0c:
|
||||
case 0x0e:
|
||||
// if ((!ACCESSING_BITS_8_15) || (!ACCESSING_BITS_0_7)) mame_printf_debug("8-bit VDP read HV counter port access, offset %04x mem_mask %04x\n",offset,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();
|
||||
// mame_printf_debug("%06x: Read HV counters at scanline %d hpos %d (return %04x)\n",space.device().safe_pc(),get_scanline_counter(), get_hposition(),retvalue);
|
||||
// osd_printf_debug("%06x: Read HV counters at scanline %d hpos %d (return %04x)\n",space.device().safe_pc(),get_scanline_counter(), get_hposition(),retvalue);
|
||||
break;
|
||||
|
||||
case 0x10:
|
||||
@ -1320,7 +1320,7 @@ void sega315_5313_device::render_spriteline_to_spritebuffer(int scanline)
|
||||
/* Get Sprite Attribs */
|
||||
spritenum = 0;
|
||||
|
||||
//if (scanline==40) mame_printf_debug("spritelist start base %04x\n",base_address);
|
||||
//if (scanline==40) osd_printf_debug("spritelist start base %04x\n",base_address);
|
||||
|
||||
do
|
||||
{
|
||||
@ -1352,7 +1352,7 @@ void sega315_5313_device::render_spriteline_to_spritebuffer(int scanline)
|
||||
|
||||
|
||||
|
||||
//if (scanline==40) mame_printf_debug("xpos %04x ypos %04x\n",xpos,ypos);
|
||||
//if (scanline==40) osd_printf_debug("xpos %04x ypos %04x\n",xpos,ypos);
|
||||
|
||||
if ((drawypos<=scanline) && ((drawypos+drawheight)>scanline))
|
||||
{
|
||||
@ -1518,7 +1518,7 @@ void sega315_5313_device::render_videoline_to_videobuffer(int scanline)
|
||||
/* is this line enabled? */
|
||||
if (!MEGADRIVE_REG01_DISP_ENABLE)
|
||||
{
|
||||
//mame_printf_debug("line disabled %d\n",scanline);
|
||||
//osd_printf_debug("line disabled %d\n",scanline);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1549,7 +1549,7 @@ void sega315_5313_device::render_videoline_to_videobuffer(int scanline)
|
||||
case 3: numcolumns = 40; window_hsize = 64; window_vsize = 32; base_w = (MEGADRIVE_REG03_PATTERN_ADDR_W&0x1e) << 11; break; // talespin cares about base mask, used for status bar
|
||||
}
|
||||
|
||||
//mame_printf_debug("screenwidth %d\n",screenwidth);
|
||||
//osd_printf_debug("screenwidth %d\n",screenwidth);
|
||||
|
||||
//base_w = machine().rand()&0xff;
|
||||
|
||||
@ -1605,23 +1605,23 @@ void sega315_5313_device::render_videoline_to_videobuffer(int scanline)
|
||||
{
|
||||
case 0x00: hsize = 32; vsize = 32; break;
|
||||
case 0x01: hsize = 64; vsize = 32; break;
|
||||
case 0x02: hsize = 64; vsize = 1; /* mame_printf_debug("Invalid HSize! %02x\n",size);*/ break;
|
||||
case 0x02: hsize = 64; vsize = 1; /* osd_printf_debug("Invalid HSize! %02x\n",size);*/ break;
|
||||
case 0x03: hsize = 128;vsize = 32; break;
|
||||
|
||||
case 0x10: hsize = 32; vsize = 64; break;
|
||||
case 0x11: hsize = 64; vsize = 64; break;
|
||||
case 0x12: hsize = 64; vsize = 1; /*mame_printf_debug("Invalid HSize! %02x\n",size);*/ break;
|
||||
case 0x13: hsize = 128;vsize = 32;/*mame_printf_debug("Invalid Total Size! %02x\n",size);*/break;
|
||||
case 0x12: hsize = 64; vsize = 1; /*osd_printf_debug("Invalid HSize! %02x\n",size);*/ break;
|
||||
case 0x13: hsize = 128;vsize = 32;/*osd_printf_debug("Invalid Total Size! %02x\n",size);*/break;
|
||||
|
||||
case 0x20: hsize = 32; vsize = 64; mame_printf_debug("Invalid VSize!\n"); break;
|
||||
case 0x21: hsize = 64; vsize = 64; mame_printf_debug("Invalid VSize!\n"); break;
|
||||
case 0x22: hsize = 64; vsize = 1; /*mame_printf_debug("Invalid HSize & Invalid VSize!\n");*/ break;
|
||||
case 0x23: hsize = 128;vsize = 64; mame_printf_debug("Invalid VSize!\n"); break;
|
||||
case 0x20: hsize = 32; vsize = 64; osd_printf_debug("Invalid VSize!\n"); break;
|
||||
case 0x21: hsize = 64; vsize = 64; osd_printf_debug("Invalid VSize!\n"); break;
|
||||
case 0x22: hsize = 64; vsize = 1; /*osd_printf_debug("Invalid HSize & Invalid VSize!\n");*/ break;
|
||||
case 0x23: hsize = 128;vsize = 64; osd_printf_debug("Invalid VSize!\n"); break;
|
||||
|
||||
case 0x30: hsize = 32; vsize = 128; break;
|
||||
case 0x31: hsize = 64; vsize = 64; /*mame_printf_debug("Invalid Total Size! %02x\n",size);*/break; // super skidmarks attempts this..
|
||||
case 0x32: hsize = 64; vsize = 1; /*mame_printf_debug("Invalid HSize & Invalid Total Size!\n");*/ break;
|
||||
case 0x33: hsize = 128;vsize = 128; mame_printf_debug("Invalid Total Size! %02x\n",size);break;
|
||||
case 0x31: hsize = 64; vsize = 64; /*osd_printf_debug("Invalid Total Size! %02x\n",size);*/break; // super skidmarks attempts this..
|
||||
case 0x32: hsize = 64; vsize = 1; /*osd_printf_debug("Invalid HSize & Invalid Total Size!\n");*/ break;
|
||||
case 0x33: hsize = 128;vsize = 128; osd_printf_debug("Invalid Total Size! %02x\n",size);break;
|
||||
}
|
||||
|
||||
switch (MEGADRIVE_REG0B_HSCROLL_MODE)
|
||||
@ -2592,7 +2592,7 @@ void sega315_5313_device::render_scanline()
|
||||
|
||||
if (scanline >= 0 && scanline < m_visible_scanlines)
|
||||
{
|
||||
//if (MEGADRIVE_REG01_DMA_ENABLE==0) mame_printf_debug("off\n");
|
||||
//if (MEGADRIVE_REG01_DMA_ENABLE==0) osd_printf_debug("off\n");
|
||||
render_spriteline_to_spritebuffer(get_scanline_counter());
|
||||
render_videoline_to_videobuffer(scanline);
|
||||
render_videobuffer_to_screenbuffer(scanline);
|
||||
@ -2611,12 +2611,12 @@ void sega315_5313_device::vdp_handle_scanline_callback(int scanline)
|
||||
if (get_scanline_counter() != (m_total_scanlines - 1))
|
||||
{
|
||||
if (!m_use_alt_timing) m_scanline_counter++;
|
||||
// mame_printf_debug("scanline %d\n",get_scanline_counter());
|
||||
// osd_printf_debug("scanline %d\n",get_scanline_counter());
|
||||
m_render_timer->adjust(attotime::from_usec(1));
|
||||
|
||||
if (get_scanline_counter() == m_irq6_scanline)
|
||||
{
|
||||
// mame_printf_debug("x %d",get_scanline_counter());
|
||||
// osd_printf_debug("x %d",get_scanline_counter());
|
||||
m_irq6_on_timer->adjust(attotime::from_usec(6));
|
||||
m_irq6_pending = 1;
|
||||
m_vblank_flag = 1;
|
||||
@ -2640,7 +2640,7 @@ void sega315_5313_device::vdp_handle_scanline_callback(int scanline)
|
||||
if (MEGADRIVE_REG0_IRQ4_ENABLE)
|
||||
{
|
||||
m_irq4_on_timer->adjust(attotime::from_usec(1));
|
||||
//mame_printf_debug("irq4 on scanline %d reload %d\n",get_scanline_counter(),MEGADRIVE_REG0A_HINT_VALUE);
|
||||
//osd_printf_debug("irq4 on scanline %d reload %d\n",get_scanline_counter(),MEGADRIVE_REG0A_HINT_VALUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2721,7 +2721,7 @@ void sega315_5313_device::vdp_handle_eof()
|
||||
case 2:scr_width = 320;break;
|
||||
case 3:scr_width = 320;break;
|
||||
}
|
||||
// mame_printf_debug("my mode %02x", m_regs[0x0c]);
|
||||
// osd_printf_debug("my mode %02x", m_regs[0x0c]);
|
||||
|
||||
visarea.set(0, scr_width - 1, 0, m_visible_scanlines - 1);
|
||||
|
||||
|
@ -2674,7 +2674,7 @@ void snes_ppu_device::write(address_space &space, UINT32 offset, UINT8 data)
|
||||
m_direct_color = BIT(data, 0);
|
||||
#ifdef SNES_DBG_REG_W
|
||||
if ((data & 0x2) != (PPU_REG(CGWSEL) & 0x2))
|
||||
mame_printf_debug("Add/Sub Layer: %s\n", ((data & 0x2) >> 1) ? "Subscreen" : "Fixed colour");
|
||||
osd_printf_debug("Add/Sub Layer: %s\n", ((data & 0x2) >> 1) ? "Subscreen" : "Fixed colour");
|
||||
#endif
|
||||
break;
|
||||
case CGADSUB: /* Addition/Subtraction designation for each screen */
|
||||
@ -2713,7 +2713,7 @@ void snes_ppu_device::write(address_space &space, UINT32 offset, UINT8 data)
|
||||
dynamic_res_change(space.machine());
|
||||
#ifdef SNES_DBG_REG_W
|
||||
if ((data & 0x8) != (PPU_REG(SETINI) & 0x8))
|
||||
mame_printf_debug("Pseudo 512 mode: %s\n", (data & 0x8) ? "on" : "off");
|
||||
osd_printf_debug("Pseudo 512 mode: %s\n", (data & 0x8) ? "on" : "off");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ const device_type T6A04 = &device_creator<t6a04_device>;
|
||||
void t6a04_device::device_validity_check(validity_checker &valid) const
|
||||
{
|
||||
if (m_height == 0 || m_width == 0)
|
||||
mame_printf_error("Configured with invalid parameter\n");
|
||||
osd_printf_error("Configured with invalid parameter\n");
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
|
@ -128,7 +128,7 @@ void tms9927_device::device_reset()
|
||||
|
||||
void tms9927_device::device_stop()
|
||||
{
|
||||
mame_printf_debug("TMS9937: Final params: (%d, %d, %d, %d, %d, %d, %d)\n",
|
||||
osd_printf_debug("TMS9937: Final params: (%d, %d, %d, %d, %d, %d, %d)\n",
|
||||
m_clock,
|
||||
m_total_hpix,
|
||||
0, m_visible_hpix,
|
||||
@ -199,7 +199,7 @@ void tms9927_device::generic_access(address_space &space, offs_t offset)
|
||||
break;
|
||||
|
||||
case 0x0b: /* Up scroll */
|
||||
mame_printf_debug("Up scroll\n");
|
||||
osd_printf_debug("Up scroll\n");
|
||||
m_screen->update_now();
|
||||
m_start_datarow = (m_start_datarow + 1) % DATA_ROWS_PER_FRAME;
|
||||
break;
|
||||
@ -233,7 +233,7 @@ WRITE8_MEMBER( tms9927_device::write )
|
||||
|
||||
case 0x0c: /* LOAD CURSOR CHARACTER ADDRESS */
|
||||
case 0x0d: /* LOAD CURSOR ROW ADDRESS */
|
||||
mame_printf_debug("Cursor address changed\n");
|
||||
osd_printf_debug("Cursor address changed\n");
|
||||
m_reg[offset - 0x0c + 7] = data;
|
||||
recompute_parameters(FALSE);
|
||||
break;
|
||||
@ -308,7 +308,7 @@ void tms9927_device::recompute_parameters(int postload)
|
||||
offset_hpix = HSYNC_DELAY * m_hpixels_per_column;
|
||||
offset_vpix = VERTICAL_DATA_START;
|
||||
|
||||
mame_printf_debug("TMS9937: Total = %dx%d, Visible = %dx%d, Offset=%dx%d, Skew=%d\n", m_total_hpix, m_total_vpix, m_visible_hpix, m_visible_vpix, offset_hpix, offset_vpix, SKEW_BITS);
|
||||
osd_printf_debug("TMS9937: Total = %dx%d, Visible = %dx%d, Offset=%dx%d, Skew=%d\n", m_total_hpix, m_total_vpix, m_visible_hpix, m_visible_vpix, offset_hpix, offset_vpix, SKEW_BITS);
|
||||
|
||||
/* see if it all makes sense */
|
||||
m_valid_config = TRUE;
|
||||
|
@ -2213,7 +2213,7 @@ void v99x8_device::interrupt_start_vblank()
|
||||
#if 0
|
||||
if (machine.input().code_pressed (KEYCODE_D) )
|
||||
{
|
||||
for (i=0;i<24;i++) mame_printf_debug ("R#%d = %02x\n", i, m_cont_reg[i]);
|
||||
for (i=0;i<24;i++) osd_printf_debug ("R#%d = %02x\n", i, m_cont_reg[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1144,7 +1144,7 @@ static void recompute_video_memory(voodoo_state *v)
|
||||
if (v->fbi.auxoffs != ~0 && v->fbi.auxoffs > v->fbi.mask)
|
||||
v->fbi.auxoffs = v->fbi.mask;
|
||||
|
||||
/* mame_printf_debug("rgb[0] = %08X rgb[1] = %08X rgb[2] = %08X aux = %08X\n",
|
||||
/* osd_printf_debug("rgb[0] = %08X rgb[1] = %08X rgb[2] = %08X aux = %08X\n",
|
||||
v->fbi.rgboffs[0], v->fbi.rgboffs[1], v->fbi.rgboffs[2], v->fbi.auxoffs);*/
|
||||
|
||||
/* compute the memory FIFO location and size */
|
||||
@ -1362,7 +1362,7 @@ static void recompute_texture_params(tmu_state *t)
|
||||
|
||||
/* start with the base of LOD 0 */
|
||||
if (t->texaddr_shift == 0 && (t->reg[texBaseAddr].u & 1))
|
||||
mame_printf_debug("Tiled texture\n");
|
||||
osd_printf_debug("Tiled texture\n");
|
||||
base = (t->reg[texBaseAddr].u & t->texaddr_mask) << t->texaddr_shift;
|
||||
t->lodoffset[0] = base & t->mask;
|
||||
|
||||
@ -1597,7 +1597,7 @@ static int cmdfifo_compute_expected_depth(voodoo_state *v, cmdfifo_info *f)
|
||||
return 2 + ((command >> 3) & 0x7ffff);
|
||||
|
||||
default:
|
||||
mame_printf_debug("UNKNOWN PACKET TYPE %d\n", command & 7);
|
||||
osd_printf_debug("UNKNOWN PACKET TYPE %d\n", command & 7);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -1648,7 +1648,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f)
|
||||
|
||||
case 1: /* JSR */
|
||||
if (LOG_CMDFIFO) logerror(" JSR $%06X\n", target);
|
||||
mame_printf_debug("JSR in CMDFIFO!\n");
|
||||
osd_printf_debug("JSR in CMDFIFO!\n");
|
||||
src = &fifobase[target / 4];
|
||||
break;
|
||||
|
||||
@ -1669,7 +1669,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f)
|
||||
break;
|
||||
|
||||
default:
|
||||
mame_printf_debug("INVALID JUMP COMMAND!\n");
|
||||
osd_printf_debug("INVALID JUMP COMMAND!\n");
|
||||
fatalerror(" INVALID JUMP COMMAND\n");
|
||||
break;
|
||||
}
|
||||
@ -2618,25 +2618,25 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data)
|
||||
vgadiff = vgaperiod - refresh;
|
||||
if (vgadiff < 0) vgadiff = -vgadiff;
|
||||
|
||||
mame_printf_debug("hSync=%08X vSync=%08X backPorch=%08X videoDimensions=%08X\n",
|
||||
osd_printf_debug("hSync=%08X vSync=%08X backPorch=%08X videoDimensions=%08X\n",
|
||||
v->reg[hSync].u, v->reg[vSync].u, v->reg[backPorch].u, v->reg[videoDimensions].u);
|
||||
mame_printf_debug("Horiz: %d-%d (%d total) Vert: %d-%d (%d total) -- ", visarea.min_x, visarea.max_x, htotal, visarea.min_y, visarea.max_y, vtotal);
|
||||
osd_printf_debug("Horiz: %d-%d (%d total) Vert: %d-%d (%d total) -- ", visarea.min_x, visarea.max_x, htotal, visarea.min_y, visarea.max_y, vtotal);
|
||||
|
||||
/* configure the screen based on which one matches the closest */
|
||||
if (stddiff < meddiff && stddiff < vgadiff)
|
||||
{
|
||||
v->screen->configure(htotal, vtotal, visarea, stdperiod);
|
||||
mame_printf_debug("Standard resolution, %f Hz\n", ATTOSECONDS_TO_HZ(stdperiod));
|
||||
osd_printf_debug("Standard resolution, %f Hz\n", ATTOSECONDS_TO_HZ(stdperiod));
|
||||
}
|
||||
else if (meddiff < vgadiff)
|
||||
{
|
||||
v->screen->configure(htotal, vtotal, visarea, medperiod);
|
||||
mame_printf_debug("Medium resolution, %f Hz\n", ATTOSECONDS_TO_HZ(medperiod));
|
||||
osd_printf_debug("Medium resolution, %f Hz\n", ATTOSECONDS_TO_HZ(medperiod));
|
||||
}
|
||||
else
|
||||
{
|
||||
v->screen->configure(htotal, vtotal, visarea, vgaperiod);
|
||||
mame_printf_debug("VGA resolution, %f Hz\n", ATTOSECONDS_TO_HZ(vgaperiod));
|
||||
osd_printf_debug("VGA resolution, %f Hz\n", ATTOSECONDS_TO_HZ(vgaperiod));
|
||||
}
|
||||
|
||||
/* configure the new framebuffer info */
|
||||
|
@ -60,7 +60,7 @@ const char * emulator_info::get_usage() { return USAGE;}
|
||||
const char * emulator_info::get_xml_root() { return XML_ROOT;}
|
||||
const char * emulator_info::get_xml_top() { return XML_TOP;}
|
||||
const char * emulator_info::get_state_magic_num() { return STATE_MAGIC_NUM;}
|
||||
void emulator_info::printf_usage(const char *par1, const char *par2) { mame_printf_info(USAGE, par1, par2); }
|
||||
void emulator_info::printf_usage(const char *par1, const char *par2) { osd_printf_info(USAGE, par1, par2); }
|
||||
|
||||
/*************************************
|
||||
*
|
||||
|
@ -46,6 +46,7 @@ UTILOBJS = \
|
||||
$(LIBOBJ)/util/corestr.o \
|
||||
$(LIBOBJ)/util/coreutil.o \
|
||||
$(LIBOBJ)/util/cstrpool.o \
|
||||
$(LIBOBJ)/util/delegate.o \
|
||||
$(LIBOBJ)/util/flac.o \
|
||||
$(LIBOBJ)/util/harddisk.o \
|
||||
$(LIBOBJ)/util/hashing.o \
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emucore.h"
|
||||
#include "osdcomm.h"
|
||||
#include "delegate.h"
|
||||
|
||||
|
@ -79,6 +79,7 @@
|
||||
#define __DELEGATE_H__
|
||||
|
||||
// standard C++ includes
|
||||
#include <assert.h>
|
||||
#include <exception>
|
||||
#include <typeinfo>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user