diff --git a/.gitattributes b/.gitattributes index fe441cd07df..0bf9b517613 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/src/emu/bus/gba/gba_slot.c b/src/emu/bus/gba/gba_slot.c index 6118f7ec097..480f40d7a02 100644 --- a/src/emu/bus/gba/gba_slot.c +++ b/src/emu/bus/gba/gba_slot.c @@ -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) { diff --git a/src/emu/bus/gba/rom.c b/src/emu/bus/gba/rom.c index 2af83930733..1abd0fe060a 100644 --- a/src/emu/bus/gba/rom.c +++ b/src/emu/bus/gba/rom.c @@ -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); diff --git a/src/emu/bus/megadrive/md_slot.c b/src/emu/bus/megadrive/md_slot.c index 09b61e539eb..c15bcef24b1 100644 --- a/src/emu/bus/megadrive/md_slot.c +++ b/src/emu/bus/megadrive/md_slot.c @@ -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); diff --git a/src/emu/bus/nes/nes_ines.inc b/src/emu/bus/nes/nes_ines.inc index 0a464506667..49304387c7e 100644 --- a/src/emu/bus/nes/nes_ines.inc +++ b/src/emu/bus/nes/nes_ines.inc @@ -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); } diff --git a/src/emu/bus/nes/nes_pcb.inc b/src/emu/bus/nes/nes_pcb.inc index 870922634b9..b26411821b3 100644 --- a/src/emu/bus/nes/nes_pcb.inc +++ b/src/emu/bus/nes/nes_pcb.inc @@ -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) diff --git a/src/emu/bus/nes/nes_unif.inc b/src/emu/bus/nes/nes_unif.inc index e4b76d0edb7..9ac648ed1a5 100644 --- a/src/emu/bus/nes/nes_unif.inc +++ b/src/emu/bus/nes/nes_unif.inc @@ -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); } diff --git a/src/emu/bus/saturn/bram.c b/src/emu/bus/saturn/bram.c index c693084780b..64c5250b57e 100644 --- a/src/emu/bus/saturn/bram.c +++ b/src/emu/bus/saturn/bram.c @@ -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); } diff --git a/src/emu/bus/saturn/dram.c b/src/emu/bus/saturn/dram.c index 40af31cb29f..de800e60b15 100644 --- a/src/emu/bus/saturn/dram.c +++ b/src/emu/bus/saturn/dram.c @@ -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); } diff --git a/src/emu/bus/snes/bsx.c b/src/emu/bus/snes/bsx.c index 1efa7378d25..25bedf54d6d 100644 --- a/src/emu/bus/snes/bsx.c +++ b/src/emu/bus/snes/bsx.c @@ -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; } diff --git a/src/emu/cheat.c b/src/emu/cheat.c index bd4e10ca58d..1ccd40a7daf 100644 --- a/src/emu/cheat.c +++ b/src/emu/cheat.c @@ -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 &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); diff --git a/src/emu/clifront.c b/src/emu/clifront.c index ec613f40dcd..50e01e58ebd 100644 --- a/src/emu/clifront.c +++ b/src/emu/clifront.c @@ -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 "\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++; } } diff --git a/src/emu/config.c b/src/emu/config.c index ca43f2f080d..3a4b603432d 100644 --- a/src/emu/config.c +++ b/src/emu/config.c @@ -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) diff --git a/src/emu/cpu/alph8201/alph8201.c b/src/emu/cpu/alph8201/alph8201.c index 63fa0c66818..688b60664dc 100644 --- a/src/emu/cpu/alph8201/alph8201.c +++ b/src/emu/cpu/alph8201/alph8201.c @@ -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); */ } } diff --git a/src/emu/cpu/arm7/arm7help.h b/src/emu/cpu/arm7/arm7help.h index a2a405eaa56..8c3ad96bdc4 100644 --- a/src/emu/cpu/arm7/arm7help.h +++ b/src/emu/cpu/arm7/arm7help.h @@ -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 diff --git a/src/emu/cpu/dsp56k/inst.h b/src/emu/cpu/dsp56k/inst.h index 34f19534976..533aee475c1 100644 --- a/src/emu/cpu/dsp56k/inst.h +++ b/src/emu/cpu/dsp56k/inst.h @@ -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; diff --git a/src/emu/cpu/dsp56k/tables.c b/src/emu/cpu/dsp56k/tables.c index edbe3b32a9d..1cf6e556afb 100644 --- a/src/emu/cpu/dsp56k/tables.c +++ b/src/emu/cpu/dsp56k/tables.c @@ -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; } diff --git a/src/emu/cpu/e132xs/e132xs.c b/src/emu/cpu/e132xs/e132xs.c index ffb6c44762d..8884265d8e4 100644 --- a/src/emu/cpu/e132xs/e132xs.c +++ b/src/emu/cpu/e132xs/e132xs.c @@ -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 diff --git a/src/emu/cpu/i960/i960.c b/src/emu/cpu/i960/i960.c index b30f9dc865a..3d841cd1175 100644 --- a/src/emu/cpu/i960/i960.c +++ b/src/emu/cpu/i960/i960.c @@ -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]; } diff --git a/src/emu/cpu/m37710/m37710.c b/src/emu/cpu/m37710/m37710.c index 6de5592c37d..cfad4414570 100644 --- a/src/emu/cpu/m37710/m37710.c +++ b/src/emu/cpu/m37710/m37710.c @@ -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); diff --git a/src/emu/cpu/mc68hc11/mc68hc11.c b/src/emu/cpu/mc68hc11/mc68hc11.c index 7e628c138e0..bc350278c48 100644 --- a/src/emu/cpu/mc68hc11/mc68hc11.c +++ b/src/emu/cpu/mc68hc11/mc68hc11.c @@ -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 */ diff --git a/src/emu/cpu/mips/mips3.c b/src/emu/cpu/mips/mips3.c index b7752a60130..f8e597b16ca 100644 --- a/src/emu/cpu/mips/mips3.c +++ b/src/emu/cpu/mips/mips3.c @@ -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; diff --git a/src/emu/cpu/pic16c5x/16c5xdsm.c b/src/emu/cpu/pic16c5x/16c5xdsm.c index 146bb0cf9a3..d4710ae745c 100644 --- a/src/emu/cpu/pic16c5x/16c5xdsm.c +++ b/src/emu/cpu/pic16c5x/16c5xdsm.c @@ -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<= 0) { - /* mame_printf_debug("{%c/%d}",*cp,bit); */ + /* osd_printf_debug("{%c/%d}",*cp,bit); */ switch(*cp) { case 'a': a <<=1; a |= ((code & (1<> 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) { diff --git a/src/emu/cpu/powerpc/ppc_mem.inc b/src/emu/cpu/powerpc/ppc_mem.inc index a2802ce767f..1350bb158c1 100644 --- a/src/emu/cpu/powerpc/ppc_mem.inc +++ b/src/emu/cpu/powerpc/ppc_mem.inc @@ -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), diff --git a/src/emu/cpu/powerpc/ppccom.c b/src/emu/cpu/powerpc/ppccom.c index 4532c7a5232..50fd1cbea26 100644 --- a/src/emu/cpu/powerpc/ppccom.c +++ b/src/emu/cpu/powerpc/ppccom.c @@ -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 { diff --git a/src/emu/cpu/psx/mdec.c b/src/emu/cpu/psx/mdec.c index e21e5e0d225..33afd2a3d7f 100644 --- a/src/emu/cpu/psx/mdec.c +++ b/src/emu/cpu/psx/mdec.c @@ -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 ); diff --git a/src/emu/cpu/psx/rcnt.c b/src/emu/cpu/psx/rcnt.c index 8f06f44246f..fccb3736481 100644 --- a/src/emu/cpu/psx/rcnt.c +++ b/src/emu/cpu/psx/rcnt.c @@ -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; diff --git a/src/emu/cpu/rsp/rsp.c b/src/emu/cpu/rsp/rsp.c index d5fd24e78dd..7e0ae05f5ca 100644 --- a/src/emu/cpu/rsp/rsp.c +++ b/src/emu/cpu/rsp/rsp.c @@ -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); diff --git a/src/emu/cpu/rsp/rspdrc.c b/src/emu/cpu/rsp/rspdrc.c index 4d99d52e480..2b5629afa67 100644 --- a/src/emu/cpu/rsp/rspdrc.c +++ b/src/emu/cpu/rsp/rspdrc.c @@ -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); diff --git a/src/emu/cpu/sharc/sharc.c b/src/emu/cpu/sharc/sharc.c index cfd28c76d65..a06196bfe88 100644 --- a/src/emu/cpu/sharc/sharc.c +++ b/src/emu/cpu/sharc/sharc.c @@ -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); } } diff --git a/src/emu/cpu/sharc/sharcops.inc b/src/emu/cpu/sharc/sharcops.inc index 3980fcc00f9..e1140c9885b 100644 --- a/src/emu/cpu/sharc/sharcops.inc +++ b/src/emu/cpu/sharc/sharcops.inc @@ -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); } diff --git a/src/emu/cpu/tms32010/32010dsm.c b/src/emu/cpu/tms32010/32010dsm.c index 886d07bc97e..44362d1a855 100644 --- a/src/emu/cpu/tms32010/32010dsm.c +++ b/src/emu/cpu/tms32010/32010dsm.c @@ -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<= 0) { - /* mame_printf_debug("{%c/%d}",*cp,bit); */ + /* osd_printf_debug("{%c/%d}",*cp,bit); */ switch(*cp) { case 'a': a <<=1; a |= ((code & (1<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()); } */ diff --git a/src/emu/cpu/v60/op12.inc b/src/emu/cpu/v60/op12.inc index f43a3a5a5d4..32dcafe4622 100644 --- a/src/emu/cpu/v60/op12.inc +++ b/src/emu/cpu/v60/op12.inc @@ -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(); diff --git a/src/emu/debug/debugcmd.c b/src/emu/debug/debugcmd.c index 4fc97c29235..8fc54e29f4f 100644 --- a/src/emu/debug/debugcmd.c +++ b/src/emu/debug/debugcmd.c @@ -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(); } diff --git a/src/emu/debug/express.c b/src/emu/debug/express.c index f16e0935f0d..77ed9bb89c1 100644 --- a/src/emu/debug/express.c +++ b/src/emu/debug/express.c @@ -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 } diff --git a/src/emu/devfind.c b/src/emu/devfind.c index cf07a9c73d6..101d393a157 100644 --- a/src/emu/devfind.c +++ b/src/emu/devfind.c @@ -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; } diff --git a/src/emu/devfind.h b/src/emu/devfind.h index 9f75cde7cb4..38e26836364 100644 --- a/src/emu/devfind.h +++ b/src/emu/devfind.h @@ -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); } diff --git a/src/emu/diexec.c b/src/emu/diexec.c index b7aa0d959e1..76987d3c7aa 100644 --- a/src/emu/diexec.c +++ b/src/emu/diexec.c @@ -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"); } diff --git a/src/emu/digfx.c b/src/emu/digfx.c index 2aa3e08e80a..432e41f7f37 100644 --- a/src/emu/digfx.c +++ b/src/emu/digfx.c @@ -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(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); } } } diff --git a/src/emu/diimage.c b/src/emu/diimage.c index f5560b1d6f7..e99778667a1 100644 --- a/src/emu/diimage.c +++ b/src/emu/diimage.c @@ -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"); diff --git a/src/emu/dimemory.c b/src/emu/dimemory.c index 5b6871d8333..7508243bdfc 100644 --- a/src/emu/dimemory.c +++ b/src/emu/dimemory.c @@ -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) diff --git a/src/emu/disound.c b/src/emu/disound.c index 61fb8c001d0..b8293563677 100644 --- a/src/emu/disound.c +++ b/src/emu/disound.c @@ -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()); } } diff --git a/src/emu/divideo.c b/src/emu/divideo.c index 2da74fb92fd..16b3d83a713 100644 --- a/src/emu/divideo.c +++ b/src/emu/divideo.c @@ -73,7 +73,7 @@ void device_video_interface::interface_validity_check(validity_checker &valid) c { screen = device().siblingdevice(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()); } diff --git a/src/emu/emu.mak b/src/emu/emu.mak index 0da81554044..a410655665e 100644 --- a/src/emu/emu.mak +++ b/src/emu/emu.mak @@ -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 diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c index 9c27aeaf88c..68a60331b58 100644 --- a/src/emu/emuopts.c +++ b/src/emu/emuopts.c @@ -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); diff --git a/src/emu/input.c b/src/emu/input.c index 1be996adadb..01c32e8d0b9 100644 --- a/src/emu/input.c +++ b/src/emu/input.c @@ -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++) diff --git a/src/emu/ioport.c b/src/emu/ioport.c index 9bd8956dfb1..a229bb11481 100644 --- a/src/emu/ioport.c +++ b/src/emu/ioport.c @@ -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; } } diff --git a/src/emu/luaengine.c b/src/emu/luaengine.c index d5ea307289c..0063ac0d5ad 100644 --- a/src/emu/luaengine.c +++ b/src/emu/luaengine.c @@ -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 diff --git a/src/emu/machine.c b/src/emu/machine.c index ee00e281941..37ae528576f 100644 --- a/src/emu/machine.c +++ b/src/emu/machine.c @@ -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++; } } diff --git a/src/emu/machine.h b/src/emu/machine.h index b6e8ee1384f..69e9c39b815 100644 --- a/src/emu/machine.h +++ b/src/emu/machine.h @@ -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 diff --git a/src/emu/machine/53c810.c b/src/emu/machine/53c810.c index c907a4056cc..9bdc38a7b2e 100644 --- a/src/emu/machine/53c810.c +++ b/src/emu/machine/53c810.c @@ -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 } } diff --git a/src/emu/machine/am53cf96.c b/src/emu/machine/am53cf96.c index 1cd67996282..58e1cf59edf 100644 --- a/src/emu/machine/am53cf96.c +++ b/src/emu/machine/am53cf96.c @@ -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) { diff --git a/src/emu/machine/atahle.c b/src/emu/machine/atahle.c index 46ba79a379a..1780b744dbf 100644 --- a/src/emu/machine/atahle.c +++ b/src/emu/machine/atahle.c @@ -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 { diff --git a/src/emu/machine/eeprom.c b/src/emu/machine/eeprom.c index 5d93479c34f..1e99dc3c9ad 100644 --- a/src/emu/machine/eeprom.c +++ b/src/emu/machine/eeprom.c @@ -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) diff --git a/src/emu/machine/idehd.c b/src/emu/machine/idehd.c index b910685fa2c..d8434bd4d50 100644 --- a/src/emu/machine/idehd.c +++ b/src/emu/machine/idehd.c @@ -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 diff --git a/src/emu/machine/k056230.c b/src/emu/machine/k056230.c index 5dcc11c92e5..337945598d8 100644 --- a/src/emu/machine/k056230.c +++ b/src/emu/machine/k056230.c @@ -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)); } diff --git a/src/emu/machine/laserdsc.c b/src/emu/machine/laserdsc.c index cc0c46e8461..b647330a6d9 100644 --- a/src/emu/machine/laserdsc.c +++ b/src/emu/machine/laserdsc.c @@ -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"); } //------------------------------------------------- diff --git a/src/emu/machine/latch8.c b/src/emu/machine/latch8.c index 5d8444b6a0a..43ceb1f5f5a 100644 --- a/src/emu/machine/latch8.c +++ b/src/emu/machine/latch8.c @@ -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 diff --git a/src/emu/machine/ldpr8210.c b/src/emu/machine/ldpr8210.c index 3872ba4f24c..d578576ad0c 100644 --- a/src/emu/machine/ldpr8210.c +++ b/src/emu/machine/ldpr8210.c @@ -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; } } diff --git a/src/emu/machine/ldvp931.c b/src/emu/machine/ldvp931.c index b176c06e4bd..31cc88d87f5 100644 --- a/src/emu/machine/ldvp931.c +++ b/src/emu/machine/ldvp931.c @@ -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; } diff --git a/src/emu/machine/ram.c b/src/emu/machine/ram.c index b19b05a7833..110587f8908 100644 --- a/src/emu/machine/ram.c +++ b/src/emu/machine/ram.c @@ -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); diff --git a/src/emu/machine/stvcd.c b/src/emu/machine/stvcd.c index f4cbae08d11..59f368ce4d7 100644 --- a/src/emu/machine/stvcd.c +++ b/src/emu/machine/stvcd.c @@ -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); } diff --git a/src/emu/mame.c b/src/emu/mame.c index 01a8ce2667c..c54d578ebea 100644 --- a/src/emu/mame.c +++ b/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 ***************************************************************************/ diff --git a/src/emu/mame.h b/src/emu/mame.h index 5afcd655819..9bc19d29e6d 100644 --- a/src/emu/mame.h +++ b/src/emu/mame.h @@ -48,9 +48,6 @@ enum // TYPE DEFINITIONS //************************************************************************** -// output channel callback -typedef delegate 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 diff --git a/src/emu/mconfig.c b/src/emu/mconfig.c index 1c9c591baa9..fb23ec79724 100644 --- a/src/emu/mconfig.c +++ b/src/emu/mconfig.c @@ -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; } diff --git a/src/emu/memory.c b/src/emu/memory.c index 78f4e560b37..08814c467be 100644 --- a/src/emu/memory.c +++ b/src/emu/memory.c @@ -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) diff --git a/src/emu/render.c b/src/emu/render.c index cb793df002f..bfcd6fbe7b9 100644 --- a/src/emu/render.c +++ b/src/emu/render.c @@ -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; } diff --git a/src/emu/rendfont.c b/src/emu/rendfont.c index 27d183b88c7..ee27e5e0f78 100644 --- a/src/emu/rendfont.c +++ b/src/emu/rendfont.c @@ -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); diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c index 27e888df16c..1409390effb 100644 --- a/src/emu/rendlay.c +++ b/src/emu/rendlay.c @@ -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()); } } diff --git a/src/emu/romload.c b/src/emu/romload.c index 38b7c23645d..b33cb4935b2 100644 --- a/src/emu/romload.c +++ b/src/emu/romload.c @@ -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()) diff --git a/src/emu/screen.c b/src/emu/screen.c index 496d152e19e..eb1049cce6c 100644 --- a/src/emu/screen.c +++ b/src/emu/screen.c @@ -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()); } diff --git a/src/emu/softlist.c b/src/emu/softlist.c index d031b3041aa..f81663ab7b0 100644 --- a/src/emu/softlist.c +++ b/src/emu/softlist.c @@ -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"); } diff --git a/src/emu/sound.c b/src/emu/sound.c index 9cefb7fb722..385c02c8824 100644 --- a/src/emu/sound.c +++ b/src/emu/sound.c @@ -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) diff --git a/src/emu/sound/msm5232.c b/src/emu/sound/msm5232.c index fadae1a6ae7..f7dc2f58642 100644 --- a/src/emu/sound/msm5232.c +++ b/src/emu/sound/msm5232.c @@ -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 diff --git a/src/emu/sound/okim9810.c b/src/emu/sound/okim9810.c index 29af99ed4bf..9b041fda765 100644 --- a/src/emu/sound/okim9810.c +++ b/src/emu/sound/okim9810.c @@ -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; } } diff --git a/src/emu/sound/rf5c400.c b/src/emu/sound/rf5c400.c index 91bbb6117b0..1a94be3fa0f 100644 --- a/src/emu/sound/rf5c400.c +++ b/src/emu/sound/rf5c400.c @@ -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 { diff --git a/src/emu/sound/samples.c b/src/emu/sound/samples.c index f84f64511e5..8877906f01a 100644 --- a/src/emu/sound/samples.c +++ b/src/emu/sound/samples.c @@ -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); } } diff --git a/src/emu/sound/upd7759.c b/src/emu/sound/upd7759.c index 11305f49533..2d76b33f225 100644 --- a/src/emu/sound/upd7759.c +++ b/src/emu/sound/upd7759.c @@ -126,7 +126,7 @@ #define DEBUG_STATES (0) -#define DEBUG_METHOD mame_printf_debug +#define DEBUG_METHOD osd_printf_debug diff --git a/src/emu/sound/vlm5030.c b/src/emu/sound/vlm5030.c index 6e8097b349d..646c95a18d6 100644 --- a/src/emu/sound/vlm5030.c +++ b/src/emu/sound/vlm5030.c @@ -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++) diff --git a/src/emu/sound/votrax.c b/src/emu/sound/votrax.c index 0c1c9c2d34b..f6b857c5dea 100644 --- a/src/emu/sound/votrax.c +++ b/src/emu/sound/votrax.c @@ -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; } diff --git a/src/emu/speaker.c b/src/emu/speaker.c index fdfa7c31bf2..c12b36b87d7 100644 --- a/src/emu/speaker.c +++ b/src/emu/speaker.c @@ -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 } diff --git a/src/emu/timer.c b/src/emu/timer.c index 8a5e3c5f600..43b9683fc8d 100644 --- a/src/emu/timer.c +++ b/src/emu/timer.c @@ -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; } } diff --git a/src/emu/validity.c b/src/emu/validity.c index 50b66778042..ff374053e55 100644 --- a/src/emu/validity.c +++ b/src/emu/validity.c @@ -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(*m_current_config).device_remove(&m_current_config->root_device(), temptag.cstr()); diff --git a/src/emu/video.c b/src/emu/video.c index 9cc30c0506f..99453ab0d5a 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -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; } } diff --git a/src/emu/video/315_5313.c b/src/emu/video/315_5313.c index 86ad88c8509..251c1f21ec9 100644 --- a/src/emu/video/315_5313.c +++ b/src/emu/video/315_5313.c @@ -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>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); diff --git a/src/emu/video/snes_ppu.c b/src/emu/video/snes_ppu.c index dbbd4b901f6..d5093ad31ab 100644 --- a/src/emu/video/snes_ppu.c +++ b/src/emu/video/snes_ppu.c @@ -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; } diff --git a/src/emu/video/t6a04.c b/src/emu/video/t6a04.c index 105eac807c5..89bf9cf716a 100644 --- a/src/emu/video/t6a04.c +++ b/src/emu/video/t6a04.c @@ -25,7 +25,7 @@ const device_type T6A04 = &device_creator; 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"); } //************************************************************************** diff --git a/src/emu/video/tms9927.c b/src/emu/video/tms9927.c index 4dd20217a86..d46a4cce153 100644 --- a/src/emu/video/tms9927.c +++ b/src/emu/video/tms9927.c @@ -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; diff --git a/src/emu/video/v9938.c b/src/emu/video/v9938.c index b1600bea6d3..2b0c658889c 100644 --- a/src/emu/video/v9938.c +++ b/src/emu/video/v9938.c @@ -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 diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c index d3e6e651289..24198fa0feb 100644 --- a/src/emu/video/voodoo.c +++ b/src/emu/video/voodoo.c @@ -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 */ diff --git a/src/ldplayer/ldplayer.c b/src/ldplayer/ldplayer.c index f15510d350b..6f29d3b88a8 100644 --- a/src/ldplayer/ldplayer.c +++ b/src/ldplayer/ldplayer.c @@ -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); } /************************************* * diff --git a/src/lib/lib.mak b/src/lib/lib.mak index 31f4bcf3fe6..ef64d002df1 100644 --- a/src/lib/lib.mak +++ b/src/lib/lib.mak @@ -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 \ diff --git a/src/emu/delegate.c b/src/lib/util/delegate.c similarity index 98% rename from src/emu/delegate.c rename to src/lib/util/delegate.c index 4771c889913..ad66cc09168 100644 --- a/src/emu/delegate.c +++ b/src/lib/util/delegate.c @@ -8,7 +8,7 @@ ***************************************************************************/ -#include "emucore.h" +#include "osdcomm.h" #include "delegate.h" diff --git a/src/emu/delegate.h b/src/lib/util/delegate.h similarity index 99% rename from src/emu/delegate.h rename to src/lib/util/delegate.h index 029d9cb239e..733600790e0 100644 --- a/src/emu/delegate.h +++ b/src/lib/util/delegate.h @@ -79,6 +79,7 @@ #define __DELEGATE_H__ // standard C++ includes +#include #include #include diff --git a/src/mame/audio/blockade.c b/src/mame/audio/blockade.c index 88a50fc5cc3..b4c5e892ca2 100644 --- a/src/mame/audio/blockade.c +++ b/src/mame/audio/blockade.c @@ -44,14 +44,14 @@ WRITE8_MEMBER(blockade_state::blockade_sound_freq_w) WRITE8_MEMBER(blockade_state::blockade_env_on_w) { - if (BLOCKADE_LOG) mame_printf_debug("Boom Start\n"); + if (BLOCKADE_LOG) osd_printf_debug("Boom Start\n"); m_samples->start(0,0); return; } WRITE8_MEMBER(blockade_state::blockade_env_off_w) { - if (BLOCKADE_LOG) mame_printf_debug("Boom End\n"); + if (BLOCKADE_LOG) osd_printf_debug("Boom End\n"); return; } diff --git a/src/mame/audio/dcs.c b/src/mame/audio/dcs.c index 1d4e2f21fc9..c31622f5bd5 100644 --- a/src/mame/audio/dcs.c +++ b/src/mame/audio/dcs.c @@ -1831,12 +1831,12 @@ static void timer_enable_callback(adsp21xx_device &device, int enable) dcs.timer_ignore = 0; if (enable) { - //mame_printf_debug("Timer enabled @ %d cycles/int, or %f Hz\n", dcs.timer_scale * (dcs.timer_period + 1), 1.0 / dcs.cpu->cycles_to_attotime(dcs.timer_scale * (dcs.timer_period + 1))); + //osd_printf_debug("Timer enabled @ %d cycles/int, or %f Hz\n", dcs.timer_scale * (dcs.timer_period + 1), 1.0 / dcs.cpu->cycles_to_attotime(dcs.timer_scale * (dcs.timer_period + 1))); reset_timer(device.machine()); } else { - //mame_printf_debug("Timer disabled\n"); + //osd_printf_debug("Timer disabled\n"); dcs.internal_timer->reset(); } } diff --git a/src/mame/audio/gottlieb.c b/src/mame/audio/gottlieb.c index dafa1d0ec0a..28179b2cb98 100644 --- a/src/mame/audio/gottlieb.c +++ b/src/mame/audio/gottlieb.c @@ -131,7 +131,7 @@ logerror("Votrax: intonation %d, phoneme %02x %s\n",data >> 6,data & 0x3f,Phonem else strcat(phonemes,PhonemeTable[phoneme]); } - mame_printf_debug("Votrax played '%s'\n", phonemes); + osd_printf_debug("Votrax played '%s'\n", phonemes); if (strcmp(phonemes, "[0] HEH3LOOW AH1EH3I3YMTERI2NDAHN") == 0) /* Q-Bert & Tylz - Hello, I am turned on */ m_samples->start(0, 42); @@ -415,7 +415,7 @@ WRITE8_MEMBER( gottlieb_sound_r1_device::speech_clock_dac_w ) // nominal clock is 0xa0 if (data != m_last_speech_clock) { - mame_printf_debug("clock = %02X\n", data); + osd_printf_debug("clock = %02X\n", data); // totally random guesswork; would like to get real measurements on a board if (m_votrax != NULL) diff --git a/src/mame/audio/midway.c b/src/mame/audio/midway.c index 0ee2a71d8f5..7e6d70ca031 100644 --- a/src/mame/audio/midway.c +++ b/src/mame/audio/midway.c @@ -748,7 +748,7 @@ WRITE8_MEMBER(midway_sounds_good_device::write) WRITE_LINE_MEMBER(midway_sounds_good_device::reset_write) { -//if (state) mame_printf_debug("SG Reset\n"); +//if (state) osd_printf_debug("SG Reset\n"); m_cpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/audio/segag80r.c b/src/mame/audio/segag80r.c index 6efbf89d914..1795e0eec4c 100644 --- a/src/mame/audio/segag80r.c +++ b/src/mame/audio/segag80r.c @@ -504,7 +504,7 @@ inline void segag80r_state::sega005_update_sound_data() UINT8 newval = memregion("005")->base()[m_sound_addr]; UINT8 diff = newval ^ m_sound_data; - //mame_printf_debug(" [%03X] = %02X\n", m_sound_addr, newval); + //osd_printf_debug(" [%03X] = %02X\n", m_sound_addr, newval); /* latch the new value */ m_sound_data = newval; @@ -512,14 +512,14 @@ inline void segag80r_state::sega005_update_sound_data() /* if bit 5 goes high, we reset the timer */ if ((diff & 0x20) && !(newval & 0x20)) { - //mame_printf_debug("Stopping timer\n"); + //osd_printf_debug("Stopping timer\n"); m_005snd->m_sega005_sound_timer->adjust(attotime::never); } /* if bit 5 goes low, we start the timer again */ if ((diff & 0x20) && (newval & 0x20)) { - //mame_printf_debug("Starting timer\n"); + //osd_printf_debug("Starting timer\n"); m_005snd->m_sega005_sound_timer->adjust(attotime::from_hz(SEGA005_555_TIMER_FREQ), 0, attotime::from_hz(SEGA005_555_TIMER_FREQ)); } } @@ -536,7 +536,7 @@ WRITE8_MEMBER(segag80r_state::sega005_sound_b_w) UINT8 diff = data ^ m_sound_state[1]; m_sound_state[1] = data; - //mame_printf_debug("sound[%d] = %02X\n", 1, data); + //osd_printf_debug("sound[%d] = %02X\n", 1, data); /* force a stream update */ m_005snd->m_sega005_stream->update(); diff --git a/src/mame/audio/snes_snd.c b/src/mame/audio/snes_snd.c index 588ded60b4c..b16b47dbd63 100644 --- a/src/mame/audio/snes_snd.c +++ b/src/mame/audio/snes_snd.c @@ -1071,7 +1071,7 @@ READ8_MEMBER( snes_sound_device::spc_io_r ) case 0x5: /* Port 1 */ case 0x6: /* Port 2 */ case 0x7: /* Port 3 */ - // mame_printf_debug("SPC: rd %02x @ %d, PC=%x\n", m_port_in[offset - 4], offset - 4, space.device().safe_pc()); + // osd_printf_debug("SPC: rd %02x @ %d, PC=%x\n", m_port_in[offset - 4], offset - 4, space.device().safe_pc()); return m_port_in[offset - 4]; case 0x8: //normal RAM, can be read even if the ram disabled flag ($f0 bit 1) is active case 0x9: @@ -1137,7 +1137,7 @@ WRITE8_MEMBER( snes_sound_device::spc_io_w ) case 0x5: /* Port 1 */ case 0x6: /* Port 2 */ case 0x7: /* Port 3 */ - // mame_printf_debug("SPC: %02x to APU @ %d (PC=%x)\n", data, offset & 3, space.device().safe_pc()); + // osd_printf_debug("SPC: %02x to APU @ %d (PC=%x)\n", data, offset & 3, space.device().safe_pc()); m_port_out[offset - 4] = data; space.machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20)); break; diff --git a/src/mame/audio/tiamc1.c b/src/mame/audio/tiamc1.c index b8958254ccd..f88f9636ac0 100644 --- a/src/mame/audio/tiamc1.c +++ b/src/mame/audio/tiamc1.c @@ -218,7 +218,7 @@ void tiamc1_sound_device::timer8253_wr(struct timer8253struct *t, int reg, UINT8 break; default: - mame_printf_debug("unhandled val mode %i\n", t->channel[chn].valMode); + osd_printf_debug("unhandled val mode %i\n", t->channel[chn].valMode); } switch (t->channel[chn].cntMode) @@ -238,7 +238,7 @@ void tiamc1_sound_device::timer8253_wr(struct timer8253struct *t, int reg, UINT8 break; default: - mame_printf_debug("unhandled cnt mode %i\n", t->channel[chn].cntMode); + osd_printf_debug("unhandled cnt mode %i\n", t->channel[chn].cntMode); } } break; @@ -258,7 +258,7 @@ void tiamc1_sound_device::timer8253_wr(struct timer8253struct *t, int reg, UINT8 t->channel[chn].cnval = (t->channel[chn].cnval >> 8) | (val << 8); break; default: - mame_printf_debug("unhandled val mode %i\n", t->channel[chn].valMode); + osd_printf_debug("unhandled val mode %i\n", t->channel[chn].valMode); } if (t->channel[chn].cntMode==0) @@ -282,7 +282,7 @@ void tiamc1_sound_device::timer8253_wr(struct timer8253struct *t, int reg, UINT8 break; default: - mame_printf_debug("unhandled val mode %i\n", t->channel[chn].valMode); + osd_printf_debug("unhandled val mode %i\n", t->channel[chn].valMode); } switch (t->channel[chn].cntMode) @@ -299,7 +299,7 @@ void tiamc1_sound_device::timer8253_wr(struct timer8253struct *t, int reg, UINT8 break; default: - mame_printf_debug("unhandled cnt mode %i\n", t->channel[chn].cntMode); + osd_printf_debug("unhandled cnt mode %i\n", t->channel[chn].cntMode); } } } diff --git a/src/mame/audio/turbo.c b/src/mame/audio/turbo.c index 1302946f299..609d60701dc 100644 --- a/src/mame/audio/turbo.c +++ b/src/mame/audio/turbo.c @@ -53,10 +53,10 @@ static TIMER_CALLBACK( update_sound_a ) discrete->write(5, !(data & 0x20)); discrete->write(6, !(data & 0x40)); -if (!((data >> 1) & 1)) mame_printf_debug("/TRIG1\n"); -if (!((data >> 2) & 1)) mame_printf_debug("/TRIG2\n"); -if (!((data >> 3) & 1)) mame_printf_debug("/TRIG3\n"); -if (!((data >> 4) & 1)) mame_printf_debug("/TRIG4\n"); +if (!((data >> 1) & 1)) osd_printf_debug("/TRIG1\n"); +if (!((data >> 2) & 1)) osd_printf_debug("/TRIG2\n"); +if (!((data >> 3) & 1)) osd_printf_debug("/TRIG3\n"); +if (!((data >> 4) & 1)) osd_printf_debug("/TRIG4\n"); // osel = (osel & 6) | ((data >> 5) & 1); // turbo_update_samples(samples); diff --git a/src/mame/audio/tx1.c b/src/mame/audio/tx1.c index 0de9c28c6e6..451571d5c89 100644 --- a/src/mame/audio/tx1.c +++ b/src/mame/audio/tx1.c @@ -150,13 +150,13 @@ WRITE8_MEMBER( tx1_sound_device::pit8253_w ) m_pit8253.counts[cntsel].val = 0; } else - mame_printf_debug("PIT8253: Unsupported mode %d.\n", mode); + osd_printf_debug("PIT8253: Unsupported mode %d.\n", mode); } } READ8_MEMBER( tx1_sound_device::pit8253_r ) { - mame_printf_debug("PIT R: %x", offset); + osd_printf_debug("PIT R: %x", offset); return 0; } diff --git a/src/mame/drivers/alg.c b/src/mame/drivers/alg.c index 6e73eb499da..7658aa321ce 100644 --- a/src/mame/drivers/alg.c +++ b/src/mame/drivers/alg.c @@ -145,7 +145,7 @@ TIMER_CALLBACK_MEMBER(alg_state::response_timer) { UINT8 data = m_laserdisc->data_r(); if (data != 0x0a) - mame_printf_debug("Sending serial data = %02X\n", data); + osd_printf_debug("Sending serial data = %02X\n", data); amiga_serial_in_w(machine(), data); } diff --git a/src/mame/drivers/astrocde.c b/src/mame/drivers/astrocde.c index 0c5c97a171b..8aebd195dc8 100644 --- a/src/mame/drivers/astrocde.c +++ b/src/mame/drivers/astrocde.c @@ -315,7 +315,7 @@ READ8_MEMBER(astrocde_state::gorf_io_1_r) m_votrax->set_output_gain(0, data ? 1.0 : 0.0); #endif break; - case 7: mame_printf_debug("io_1:%d\n", data); break; + case 7: osd_printf_debug("io_1:%d\n", data); break; } return 0xff; } @@ -334,7 +334,7 @@ READ8_MEMBER(astrocde_state::gorf_io_2_r) case 4: output_set_lamp_value(4, data); break; case 5: output_set_lamp_value(5, data); break; case 6: /* n/c */ break; - case 7: mame_printf_debug("io_2:%d\n", data); break; + case 7: osd_printf_debug("io_2:%d\n", data); break; } return 0xff; } @@ -526,7 +526,7 @@ WRITE8_MEMBER(astrocde_state::tenpindx_lamp_w) WRITE8_MEMBER(astrocde_state::tenpindx_counter_w) { coin_counter_w(machine(), 0, (data >> 0) & 1); - if (data & 0xfc) mame_printf_debug("tenpindx_counter_w = %02X\n", data); + if (data & 0xfc) osd_printf_debug("tenpindx_counter_w = %02X\n", data); } diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c index 9897226a1d9..2caab928601 100644 --- a/src/mame/drivers/backfire.c +++ b/src/mame/drivers/backfire.c @@ -450,7 +450,7 @@ INTERRUPT_GEN_MEMBER(backfire_state::deco32_vbl_interrupt) DECO16IC_BANK_CB_MEMBER(backfire_state::bank_callback) { - // mame_printf_debug("bank callback %04x\n",bank); // bit 1 gets set too? + // osd_printf_debug("bank callback %04x\n",bank); // bit 1 gets set too? bank = bank >> 4; bank = (bank & 1) | ((bank & 4) >> 1) | ((bank & 2) << 1); @@ -710,7 +710,7 @@ void backfire_state::descramble_sound() READ32_MEMBER(backfire_state::backfire_speedup_r) { - //mame_printf_debug( "%08x\n",space.device().safe_pc()); + //osd_printf_debug( "%08x\n",space.device().safe_pc()); if (space.device() .safe_pc()== 0xce44) space.device().execute().spin_until_time(attotime::from_usec(400)); // backfire if (space.device().safe_pc() == 0xcee4) space.device().execute().spin_until_time(attotime::from_usec(400)); // backfirea diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c index 50a13ae7554..eaeafe4fba3 100644 --- a/src/mame/drivers/bfcobra.c +++ b/src/mame/drivers/bfcobra.c @@ -505,31 +505,31 @@ void bfcobra_state::RunBlit(address_space &space) /* This debug is now wrong ! */ if (DEBUG_BLITTER) { - mame_printf_debug("\n%s:Blitter: Running command from 0x%.5x\n\n", device->machine().describe_context(), blitter.program.addr - 12); - mame_printf_debug("Command Reg %.2x", blitter.command); - mame_printf_debug(" %s %s %s %s %s %s %s\n", + osd_printf_debug("\n%s:Blitter: Running command from 0x%.5x\n\n", device->machine().describe_context(), blitter.program.addr - 12); + osd_printf_debug("Command Reg %.2x", blitter.command); + osd_printf_debug(" %s %s %s %s %s %s %s\n", blitter.command & CMD_RUN ? "RUN" : " ", blitter.command & CMD_COLST ? "COLST" : " ", blitter.command & CMD_PARRD ? "PARRD" : " ", blitter.command & CMD_SRCUP ? "SRCUP" : " ", blitter.command & CMD_DSTUP ? "DSTUP" : " "); - mame_printf_debug("Src Address Byte 0 %.2x\n", blitter.source.addr0); - mame_printf_debug("Src Address Byte 1 %.2x\n", blitter.source.addr1); - mame_printf_debug("Src Control %.2x\n", blitter.source.addr2); - mame_printf_debug(" Src Address %.5x\n", blitter.source.addr & 0xfffff); - mame_printf_debug("Dest Address Byte 0 %.2x\n", blitter.dest.addr0); - mame_printf_debug("Dest Address Byte 1 %.2x\n", blitter.dest.addr1); - mame_printf_debug("Dest Control %.2x\n", blitter.dest.addr2); - mame_printf_debug(" Dst. Address %.5x\n", blitter.dest.addr & 0xfffff); - mame_printf_debug("Mode Control %.2x", blitter.modectl); - mame_printf_debug(" %s\n", blitter.modectl & MODE_BITTOBYTE ? "BIT_TO_BYTE" : ""); + osd_printf_debug("Src Address Byte 0 %.2x\n", blitter.source.addr0); + osd_printf_debug("Src Address Byte 1 %.2x\n", blitter.source.addr1); + osd_printf_debug("Src Control %.2x\n", blitter.source.addr2); + osd_printf_debug(" Src Address %.5x\n", blitter.source.addr & 0xfffff); + osd_printf_debug("Dest Address Byte 0 %.2x\n", blitter.dest.addr0); + osd_printf_debug("Dest Address Byte 1 %.2x\n", blitter.dest.addr1); + osd_printf_debug("Dest Control %.2x\n", blitter.dest.addr2); + osd_printf_debug(" Dst. Address %.5x\n", blitter.dest.addr & 0xfffff); + osd_printf_debug("Mode Control %.2x", blitter.modectl); + osd_printf_debug(" %s\n", blitter.modectl & MODE_BITTOBYTE ? "BIT_TO_BYTE" : ""); - mame_printf_debug("Comp. and LFU %.2x\n", blitter.compfunc); - mame_printf_debug("Outer Loop Count %.2x (%d)\n", blitter.outercnt, blitter.outercnt); - mame_printf_debug("Inner Loop Count %.2x (%d)\n", blitter.innercnt, blitter.innercnt); - mame_printf_debug("Step Value %.2x\n", blitter.step); - mame_printf_debug("Pattern Byte %.2x\n", blitter.pattern); + osd_printf_debug("Comp. and LFU %.2x\n", blitter.compfunc); + osd_printf_debug("Outer Loop Count %.2x (%d)\n", blitter.outercnt, blitter.outercnt); + osd_printf_debug("Inner Loop Count %.2x (%d)\n", blitter.innercnt, blitter.innercnt); + osd_printf_debug("Step Value %.2x\n", blitter.step); + osd_printf_debug("Pattern Byte %.2x\n", blitter.pattern); } #endif @@ -795,7 +795,7 @@ READ8_MEMBER(bfcobra_state::ramdac_r) } default: { - mame_printf_debug("Unhandled RAMDAC read (PC:%.4x)\n", space.device().safe_pcbase()); + osd_printf_debug("Unhandled RAMDAC read (PC:%.4x)\n", space.device().safe_pcbase()); } } @@ -945,7 +945,7 @@ READ8_MEMBER(bfcobra_state::chipset_r) } default: { - mame_printf_debug("Flare One unknown read: 0x%.2x (PC:0x%.4x)\n", offset, space.device().safe_pcbase()); + osd_printf_debug("Flare One unknown read: 0x%.2x (PC:0x%.4x)\n", offset, space.device().safe_pcbase()); } } @@ -1024,7 +1024,7 @@ WRITE8_MEMBER(bfcobra_state::chipset_w) if (data & CMD_RUN) RunBlit(space); else - mame_printf_debug("Blitter stopped by IO.\n"); + osd_printf_debug("Blitter stopped by IO.\n"); break; } @@ -1035,7 +1035,7 @@ WRITE8_MEMBER(bfcobra_state::chipset_w) } default: { - mame_printf_debug("Flare One unknown write: 0x%.2x with 0x%.2x (PC:0x%.4x)\n", offset, data, space.device().safe_pcbase()); + osd_printf_debug("Flare One unknown write: 0x%.2x with 0x%.2x (PC:0x%.4x)\n", offset, data, space.device().safe_pcbase()); } } } @@ -1218,7 +1218,7 @@ WRITE8_MEMBER(bfcobra_state::fdctrl_w) } default: { - mame_printf_debug("Unknown FDC phase?!"); + osd_printf_debug("Unknown FDC phase?!"); } } } @@ -1236,7 +1236,7 @@ void bfcobra_state::command_phase(struct fdc_t &fdc, UINT8 data) /* Specify */ case READ_DATA: { -// mame_printf_debug("Read data\n"); +// osd_printf_debug("Read data\n"); fdc.cmd_len = 9; fdc.res_len = 7; fdc.next_phase = EXECUTION_R; @@ -1245,7 +1245,7 @@ void bfcobra_state::command_phase(struct fdc_t &fdc, UINT8 data) } case SPECIFY: { -// mame_printf_debug("Specify\n"); +// osd_printf_debug("Specify\n"); fdc.cmd_len = 3; fdc.res_len = 0; fdc.next_phase = COMMAND; @@ -1253,7 +1253,7 @@ void bfcobra_state::command_phase(struct fdc_t &fdc, UINT8 data) } case RECALIBRATE: { -// mame_printf_debug("Recalibrate\n"); +// osd_printf_debug("Recalibrate\n"); fdc.cmd_len = 2; fdc.res_len = 0; fdc.next_phase = COMMAND; @@ -1262,7 +1262,7 @@ void bfcobra_state::command_phase(struct fdc_t &fdc, UINT8 data) } case SENSE_INTERRUPT_STATUS: { -// mame_printf_debug("Sense interrupt status\n"); +// osd_printf_debug("Sense interrupt status\n"); fdc.cmd_len = 1; fdc.res_len = 2; fdc.phase = RESULTS; @@ -1276,7 +1276,7 @@ void bfcobra_state::command_phase(struct fdc_t &fdc, UINT8 data) } case SEEK: { -// mame_printf_debug("Seek\n"); +// osd_printf_debug("Seek\n"); fdc.cmd_len = 3; fdc.res_len = 0; fdc.next_phase = COMMAND; @@ -1284,14 +1284,14 @@ void bfcobra_state::command_phase(struct fdc_t &fdc, UINT8 data) } default: { -// mame_printf_debug("%x\n",data & 0x1f); +// osd_printf_debug("%x\n",data & 0x1f); } } } else { fdc.cmd[fdc.cmd_cnt++] = data; - //mame_printf_debug(" %x\n",data); + //osd_printf_debug(" %x\n",data); } if (fdc.cmd_cnt == fdc.cmd_len) diff --git a/src/mame/drivers/blockade.c b/src/mame/drivers/blockade.c index 2d34bfd8963..fc7e2c44939 100644 --- a/src/mame/drivers/blockade.c +++ b/src/mame/drivers/blockade.c @@ -87,7 +87,7 @@ WRITE8_MEMBER(blockade_state::blockade_coin_latch_w) { if (data & 0x80) { - if (BLOCKADE_LOG) mame_printf_debug("Reset Coin Latch\n"); + if (BLOCKADE_LOG) osd_printf_debug("Reset Coin Latch\n"); if (m_just_been_reset) { m_just_been_reset = 0; @@ -99,11 +99,11 @@ WRITE8_MEMBER(blockade_state::blockade_coin_latch_w) if (data & 0x20) { - if (BLOCKADE_LOG) mame_printf_debug("Pin 19 High\n"); + if (BLOCKADE_LOG) osd_printf_debug("Pin 19 High\n"); } else { - if (BLOCKADE_LOG) mame_printf_debug("Pin 19 Low\n"); + if (BLOCKADE_LOG) osd_printf_debug("Pin 19 Low\n"); } return; diff --git a/src/mame/drivers/calchase.c b/src/mame/drivers/calchase.c index be9dbc7d814..bd5b4991dd0 100644 --- a/src/mame/drivers/calchase.c +++ b/src/mame/drivers/calchase.c @@ -164,7 +164,7 @@ public: static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, int reg) { calchase_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("MXTC: read %d, %02X\n", function, reg); +// osd_printf_debug("MXTC: read %d, %02X\n", function, reg); return state->m_mxtc_config_reg[reg]; } @@ -172,7 +172,7 @@ static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, static void mxtc_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { calchase_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("%s:MXTC: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); +// osd_printf_debug("%s:MXTC: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); /* memory banking with North Bridge: @@ -261,14 +261,14 @@ static void intel82439tx_pci_w(device_t *busdevice, device_t *device, int functi static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, int reg) { calchase_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("PIIX4: read %d, %02X\n", function, reg); +// osd_printf_debug("PIIX4: read %d, %02X\n", function, reg); return state->m_piix4_config_reg[function][reg]; } static void piix4_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { calchase_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); +// osd_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); state->m_piix4_config_reg[function][reg] = data; } diff --git a/src/mame/drivers/cdi.c b/src/mame/drivers/cdi.c index 163515e2443..38fe4741c39 100644 --- a/src/mame/drivers/cdi.c +++ b/src/mame/drivers/cdi.c @@ -310,8 +310,8 @@ static DEVICE_IMAGE_DISPLAY_INFO(cdi_cdinfo) { if (!core_stricmp(compatibility, "DVC")) { - mame_printf_warning("This software requires the Digital Video Cartridge to work.\n"); - mame_printf_warning("Therefore, it might not work in MESS at present.\n"); + osd_printf_warning("This software requires the Digital Video Cartridge to work.\n"); + osd_printf_warning("Therefore, it might not work in MESS at present.\n"); } } } diff --git a/src/mame/drivers/changela.c b/src/mame/drivers/changela.c index 93fd517588b..521ebe88bf1 100644 --- a/src/mame/drivers/changela.c +++ b/src/mame/drivers/changela.c @@ -19,7 +19,7 @@ Tomasz Slanina READ8_MEMBER(changela_state::mcu_r) { - //mame_printf_debug("Z80 MCU R = %x\n", m_mcu_out); + //osd_printf_debug("Z80 MCU R = %x\n", m_mcu_out); return m_mcu_out; } diff --git a/src/mame/drivers/deco_ld.c b/src/mame/drivers/deco_ld.c index 58a214ec83f..9a57d5cb158 100644 --- a/src/mame/drivers/deco_ld.c +++ b/src/mame/drivers/deco_ld.c @@ -246,7 +246,7 @@ UINT32 deco_ld_state::screen_update_rblaster(screen_device &screen, bitmap_rgb32 READ8_MEMBER(deco_ld_state::laserdisc_r) { UINT8 result = m_laserdisc->status_r(); -// mame_printf_debug("laserdisc_r = %02X\n", result); +// osd_printf_debug("laserdisc_r = %02X\n", result); return result; } diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c index 115b8a3df54..cfc5bb1b368 100644 --- a/src/mame/drivers/dlair.c +++ b/src/mame/drivers/dlair.c @@ -382,7 +382,7 @@ CUSTOM_INPUT_MEMBER(dlair_state::laserdisc_command_r) READ8_MEMBER(dlair_state::laserdisc_r) { UINT8 result = laserdisc_data_r(); - mame_printf_debug("laserdisc_r = %02X\n", result); + osd_printf_debug("laserdisc_r = %02X\n", result); return result; } diff --git a/src/mame/drivers/dorachan.c b/src/mame/drivers/dorachan.c index b618e54233f..00681a9a9dc 100644 --- a/src/mame/drivers/dorachan.c +++ b/src/mame/drivers/dorachan.c @@ -59,7 +59,7 @@ CUSTOM_INPUT_MEMBER(dorachan_state::dorachan_protection_r) case 0x72b5: ret = 0xcb; break; default: - mame_printf_debug("unhandled $2400 read @ %x\n", m_maincpu->pcbase()); + osd_printf_debug("unhandled $2400 read @ %x\n", m_maincpu->pcbase()); break; } diff --git a/src/mame/drivers/esripsys.c b/src/mame/drivers/esripsys.c index b43450671d4..9305e94de0e 100644 --- a/src/mame/drivers/esripsys.c +++ b/src/mame/drivers/esripsys.c @@ -63,7 +63,7 @@ static const ptm6840_interface ptm_intf = WRITE8_MEMBER(esripsys_state::uart_w) { if ((offset & 1) == 0) - mame_printf_debug("%c",data); + osd_printf_debug("%c",data); } READ8_MEMBER(esripsys_state::uart_r) diff --git a/src/mame/drivers/fitfight.c b/src/mame/drivers/fitfight.c index 09dc3c0834f..456a90a4fae 100644 --- a/src/mame/drivers/fitfight.c +++ b/src/mame/drivers/fitfight.c @@ -220,35 +220,35 @@ ADDRESS_MAP_END READ8_MEMBER(fitfight_state::snd_porta_r) { - //mame_printf_debug("PA R @%x\n",space.device().safe_pc()); + //osd_printf_debug("PA R @%x\n",space.device().safe_pc()); return machine().rand(); } READ8_MEMBER(fitfight_state::snd_portb_r) { - //mame_printf_debug("PB R @%x\n",space.device().safe_pc()); + //osd_printf_debug("PB R @%x\n",space.device().safe_pc()); return machine().rand(); } READ8_MEMBER(fitfight_state::snd_portc_r) { - //mame_printf_debug("PC R @%x\n",space.device().safe_pc()); + //osd_printf_debug("PC R @%x\n",space.device().safe_pc()); return machine().rand(); } WRITE8_MEMBER(fitfight_state::snd_porta_w) { - //mame_printf_debug("PA W %x @%x\n",data,space.device().safe_pc()); + //osd_printf_debug("PA W %x @%x\n",data,space.device().safe_pc()); } WRITE8_MEMBER(fitfight_state::snd_portb_w) { - //mame_printf_debug("PB W %x @%x\n",data,space.device().safe_pc()); + //osd_printf_debug("PB W %x @%x\n",data,space.device().safe_pc()); } WRITE8_MEMBER(fitfight_state::snd_portc_w) { - //mame_printf_debug("PC W %x @%x\n",data,space.device().safe_pc()); + //osd_printf_debug("PC W %x @%x\n",data,space.device().safe_pc()); } static ADDRESS_MAP_START( snd_io, AS_IO, 8, fitfight_state ) diff --git a/src/mame/drivers/funkball.c b/src/mame/drivers/funkball.c index c90b5912a49..c5eacfad3c7 100644 --- a/src/mame/drivers/funkball.c +++ b/src/mame/drivers/funkball.c @@ -195,7 +195,7 @@ static UINT32 cx5510_pci_r(device_t *busdevice, device_t *device, int function, { funkball_state *state = busdevice->machine().driver_data(); - //mame_printf_debug("CX5510: PCI read %d, %02X, %08X\n", function, reg, mem_mask); + //osd_printf_debug("CX5510: PCI read %d, %02X, %08X\n", function, reg, mem_mask); switch (reg) { case 0: return 0x00001078; @@ -208,7 +208,7 @@ static void cx5510_pci_w(device_t *busdevice, device_t *device, int function, in { funkball_state *state = busdevice->machine().driver_data(); - //mame_printf_debug("CX5510: PCI write %d, %02X, %08X, %08X\n", function, reg, data, mem_mask); + //osd_printf_debug("CX5510: PCI write %d, %02X, %08X, %08X\n", function, reg, data, mem_mask); COMBINE_DATA(state->m_cx5510_regs + (reg/4)); } @@ -234,13 +234,13 @@ WRITE8_MEMBER( funkball_state::serial_w ) UINT8 funkball_state::funkball_config_reg_r() { - //mame_printf_debug("funkball_config_reg_r %02X\n", funkball_config_reg_sel); + //osd_printf_debug("funkball_config_reg_r %02X\n", funkball_config_reg_sel); return m_funkball_config_regs[m_funkball_config_reg_sel]; } void funkball_state::funkball_config_reg_w(UINT8 data) { - //mame_printf_debug("funkball_config_reg_w %02X, %02X\n", funkball_config_reg_sel, data); + //osd_printf_debug("funkball_config_reg_w %02X, %02X\n", funkball_config_reg_sel, data); m_funkball_config_regs[m_funkball_config_reg_sel] = data; } @@ -341,7 +341,7 @@ READ32_MEMBER(funkball_state::biu_ctrl_r) WRITE32_MEMBER(funkball_state::biu_ctrl_w) { - //mame_printf_debug("biu_ctrl_w %08X, %08X, %08X\n", data, offset, mem_mask); + //osd_printf_debug("biu_ctrl_w %08X, %08X, %08X\n", data, offset, mem_mask); COMBINE_DATA(m_biu_ctrl_reg + offset); if (offset == 0x0c/4) // BC_XMAP_3 register diff --git a/src/mame/drivers/gaelco.c b/src/mame/drivers/gaelco.c index 8e193639e01..3d1b0ce0cd5 100644 --- a/src/mame/drivers/gaelco.c +++ b/src/mame/drivers/gaelco.c @@ -72,7 +72,7 @@ WRITE16_MEMBER(gaelco_state::OKIM6295_bankswitch_w) WRITE16_MEMBER(gaelco_state::gaelco_vram_encrypted_w) { - // mame_printf_debug("gaelco_vram_encrypted_w!!\n"); + // osd_printf_debug("gaelco_vram_encrypted_w!!\n"); data = gaelco_decrypt(space, offset, data, 0x0f, 0x4228); COMBINE_DATA(&m_videoram[offset]); @@ -82,7 +82,7 @@ WRITE16_MEMBER(gaelco_state::gaelco_vram_encrypted_w) WRITE16_MEMBER(gaelco_state::gaelco_encrypted_w) { - // mame_printf_debug("gaelco_encrypted_w!!\n"); + // osd_printf_debug("gaelco_encrypted_w!!\n"); data = gaelco_decrypt(space, offset, data, 0x0f, 0x4228); COMBINE_DATA(&m_screenram[offset]); } @@ -91,7 +91,7 @@ WRITE16_MEMBER(gaelco_state::gaelco_encrypted_w) WRITE16_MEMBER(gaelco_state::thoop_vram_encrypted_w) { - // mame_printf_debug("gaelco_vram_encrypted_w!!\n"); + // osd_printf_debug("gaelco_vram_encrypted_w!!\n"); data = gaelco_decrypt(space, offset, data, 0x0e, 0x4228); COMBINE_DATA(&m_videoram[offset]); @@ -100,7 +100,7 @@ WRITE16_MEMBER(gaelco_state::thoop_vram_encrypted_w) WRITE16_MEMBER(gaelco_state::thoop_encrypted_w) { - // mame_printf_debug("gaelco_encrypted_w!!\n"); + // osd_printf_debug("gaelco_encrypted_w!!\n"); data = gaelco_decrypt(space, offset, data, 0x0e, 0x4228); COMBINE_DATA(&m_screenram[offset]); } diff --git a/src/mame/drivers/gamecstl.c b/src/mame/drivers/gamecstl.c index 32d2d47a5f9..277077634eb 100644 --- a/src/mame/drivers/gamecstl.c +++ b/src/mame/drivers/gamecstl.c @@ -310,7 +310,7 @@ WRITE32_MEMBER(gamecstl_state::pnp_config_w) { if (ACCESSING_BITS_8_15) { -// mame_printf_debug("PNP Config: %02X\n", (data >> 8) & 0xff); +// osd_printf_debug("PNP Config: %02X\n", (data >> 8) & 0xff); } } @@ -318,7 +318,7 @@ WRITE32_MEMBER(gamecstl_state::pnp_data_w) { if (ACCESSING_BITS_8_15) { -// mame_printf_debug("PNP Data: %02X\n", (data >> 8) & 0xff); +// osd_printf_debug("PNP Data: %02X\n", (data >> 8) & 0xff); } } diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c index 5b88c33c043..83e3e360548 100644 --- a/src/mame/drivers/grchamp.c +++ b/src/mame/drivers/grchamp.c @@ -176,7 +176,7 @@ WRITE8_MEMBER(grchamp_state::cpu0_outputs_w) /* bit 5: n/c */ /* bit 6: G-Z */ if (diff) - mame_printf_debug("OUT10=%02X\n", data); + osd_printf_debug("OUT10=%02X\n", data); break; case 0x0d: /* OUT13 */ diff --git a/src/mame/drivers/gsword.c b/src/mame/drivers/gsword.c index 51d5c10f396..814b4697c74 100644 --- a/src/mame/drivers/gsword.c +++ b/src/mame/drivers/gsword.c @@ -172,7 +172,7 @@ READ8_MEMBER(gsword_state::gsword_hack_r) { UINT8 data = m_cpu2_ram[offset + 4]; - /*if(offset==1)mame_printf_debug("CNT %02X%02X\n",m_cpu2_ram[5],m_cpu2_ram[4]); */ + /*if(offset==1)osd_printf_debug("CNT %02X%02X\n",m_cpu2_ram[5],m_cpu2_ram[4]); */ /* speedup timeout cound down */ if(m_protect_hack) @@ -240,7 +240,7 @@ INTERRUPT_GEN_MEMBER(gsword_state::gsword_snd_interrupt) WRITE8_MEMBER(gsword_state::gsword_nmi_set_w) { -/* mame_printf_debug("AY write %02X\n",data);*/ +/* osd_printf_debug("AY write %02X\n",data);*/ m_protect_hack = (data&0x80) ? 0 : 1; #if 0 diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c index 2bac4c45c68..b8ad829aa4f 100644 --- a/src/mame/drivers/gticlub.c +++ b/src/mame/drivers/gticlub.c @@ -397,7 +397,7 @@ READ8_MEMBER(gticlub_state::sysreg_r) } default: - mame_printf_debug("sysreg_r %d\n", offset); + osd_printf_debug("sysreg_r %d\n", offset); break; } return 0; diff --git a/src/mame/drivers/guab.c b/src/mame/drivers/guab.c index b86abbbe9ac..43881fd0de1 100644 --- a/src/mame/drivers/guab.c +++ b/src/mame/drivers/guab.c @@ -37,7 +37,7 @@ *************************************/ #define LOG_FDC_COMMANDS 0 -#define FDC_LOG(x) do { if (LOG_FDC_COMMANDS) mame_printf_debug x; } while(0) +#define FDC_LOG(x) do { if (LOG_FDC_COMMANDS) osd_printf_debug x; } while(0) enum int_levels @@ -586,7 +586,7 @@ READ16_MEMBER(guab_state::io_r) } default: { - mame_printf_debug("Unknown IO R:0x%x\n", 0xc0000 + (offset * 2)); + osd_printf_debug("Unknown IO R:0x%x\n", 0xc0000 + (offset * 2)); return 0; } } @@ -669,7 +669,7 @@ WRITE16_MEMBER(guab_state::io_w) } default: { - mame_printf_debug("Unknown IO W:0x%x with %x\n", 0xc0000 + (offset * 2), data); + osd_printf_debug("Unknown IO W:0x%x with %x\n", 0xc0000 + (offset * 2), data); } } } diff --git a/src/mame/drivers/hng64.c b/src/mame/drivers/hng64.c index dba03547db2..b76bd7259bf 100644 --- a/src/mame/drivers/hng64.c +++ b/src/mame/drivers/hng64.c @@ -877,7 +877,7 @@ WRITE32_MEMBER(hng64_state::dl_w) #if 0 READ32_MEMBER(hng64_state::dl_r) { - //mame_printf_debug("dl R (%08x) : %x %x\n", space.device().safe_pc(), offset, hng64_dl[offset]); + //osd_printf_debug("dl R (%08x) : %x %x\n", space.device().safe_pc(), offset, hng64_dl[offset]); //usrintf_showmessage("dl R (%08x) : %x %x", space.device().safe_pc(), offset, hng64_dl[offset]); return hng64_dl[offset]; } @@ -933,7 +933,7 @@ WRITE32_MEMBER(hng64_state::dl_control_w) // This handles framebuffers WRITE32_MEMBER(hng64_state::activate_3d_buffer) { COMBINE_DATA (&active_3d_buffer[offset]); - mame_printf_debug("COMBINED %d\n", active_3d_buffer[offset]); + osd_printf_debug("COMBINED %d\n", active_3d_buffer[offset]); } #endif diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c index 7375b72a5fb..d38ce3efa22 100644 --- a/src/mame/drivers/hornet.c +++ b/src/mame/drivers/hornet.c @@ -555,7 +555,7 @@ WRITE8_MEMBER(hornet_state::sysreg_w) break; case 2: /* Parallel data register */ - mame_printf_debug("Parallel data = %02X\n", data); + osd_printf_debug("Parallel data = %02X\n", data); break; case 3: /* System Register 0 */ @@ -570,7 +570,7 @@ WRITE8_MEMBER(hornet_state::sysreg_w) 0x01 = LAMP0 */ m_eepromout->write(data, 0xff); - mame_printf_debug("System register 0 = %02X\n", data); + osd_printf_debug("System register 0 = %02X\n", data); break; case 4: /* System Register 1 */ @@ -590,7 +590,7 @@ WRITE8_MEMBER(hornet_state::sysreg_w) m_adc12138->sclk_w(space, 0, data & 0x1); m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); - mame_printf_debug("System register 1 = %02X\n", data); + osd_printf_debug("System register 1 = %02X\n", data); break; case 5: /* Sound Control Register */ @@ -604,7 +604,7 @@ WRITE8_MEMBER(hornet_state::sysreg_w) 0x02 = DEEN0 0x01 = ATCK0 */ - mame_printf_debug("Sound control register = %02X\n", data); + osd_printf_debug("Sound control register = %02X\n", data); break; case 6: /* WDT Register */ diff --git a/src/mame/drivers/hotblock.c b/src/mame/drivers/hotblock.c index 8f58a3b1214..e51a83b03fa 100644 --- a/src/mame/drivers/hotblock.c +++ b/src/mame/drivers/hotblock.c @@ -93,14 +93,14 @@ READ8_MEMBER(hotblock_state::hotblock_video_read) /* port 4 is some kind of eeprom / storage .. used to store the scores */ READ8_MEMBER(hotblock_state::hotblock_port4_r) { -// mame_printf_debug("port4_r\n"); +// osd_printf_debug("port4_r\n"); return 0x00; } WRITE8_MEMBER(hotblock_state::hotblock_port4_w) { -// mame_printf_debug("port4_w: pc = %06x : data %04x\n", space.device().safe_pc(), data); +// osd_printf_debug("port4_w: pc = %06x : data %04x\n", space.device().safe_pc(), data); // popmessage("port4_w: pc = %06x : data %04x", space.device().safe_pc(), data); m_port4 = data; diff --git a/src/mame/drivers/jpmimpct.c b/src/mame/drivers/jpmimpct.c index 279f813ef94..262a7c062bb 100644 --- a/src/mame/drivers/jpmimpct.c +++ b/src/mame/drivers/jpmimpct.c @@ -283,7 +283,7 @@ WRITE16_MEMBER(jpmimpct_state::duart_1_w) } case 0x3: { - //mame_printf_debug("%c", data); + //osd_printf_debug("%c", data); break; } case 0x4: @@ -314,7 +314,7 @@ WRITE16_MEMBER(jpmimpct_state::duart_1_w) } case 0xb: { - //mame_printf_debug("%c",data); + //osd_printf_debug("%c",data); break; } case 0xc: diff --git a/src/mame/drivers/konamigv.c b/src/mame/drivers/konamigv.c index 38f7a102a87..c9189a1a7b7 100644 --- a/src/mame/drivers/konamigv.c +++ b/src/mame/drivers/konamigv.c @@ -526,7 +526,7 @@ INPUT_PORTS_END READ16_MEMBER(konamigv_state::btc_trackball_r) { -// mame_printf_debug( "r %08x %08x %08x\n", space.device().safe_pc(), offset, mem_mask ); +// osd_printf_debug( "r %08x %08x %08x\n", space.device().safe_pc(), offset, mem_mask ); if( offset == 3 ) { @@ -550,7 +550,7 @@ READ16_MEMBER(konamigv_state::btc_trackball_r) WRITE16_MEMBER(konamigv_state::btc_trackball_w) { -// mame_printf_debug( "w %08x %08x %08x %08x\n", space.device().safe_pc(), offset, data, mem_mask ); +// osd_printf_debug( "w %08x %08x %08x %08x\n", space.device().safe_pc(), offset, data, mem_mask ); } static MACHINE_CONFIG_DERIVED( btchamp, konamigv ) diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c index d60d44373ea..59e1510e838 100644 --- a/src/mame/drivers/konamigx.c +++ b/src/mame/drivers/konamigx.c @@ -876,7 +876,7 @@ WRITE32_MEMBER(konamigx_state::type4_prot_w) { if (last_prot_op != -1) { -// mame_printf_debug("type 4 prot command: %x\n", last_prot_op); +// osd_printf_debug("type 4 prot command: %x\n", last_prot_op); /* known commands: rng2 rushhero vsnet winspike what diff --git a/src/mame/drivers/konamim2.c b/src/mame/drivers/konamim2.c index 93e60f277a2..cfe95dc6848 100644 --- a/src/mame/drivers/konamim2.c +++ b/src/mame/drivers/konamim2.c @@ -379,7 +379,7 @@ WRITE64_MEMBER(konamim2_state::unk4_w) { if (data & 0x800000) { -// mame_printf_debug("CPU '%s': CPU1 IRQ at %08X\n", device().tag(), space.device().safe_pc()); +// osd_printf_debug("CPU '%s': CPU1 IRQ at %08X\n", device().tag(), space.device().safe_pc()); m_subcpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); } @@ -456,11 +456,11 @@ WRITE64_MEMBER(konamim2_state::unk4000010_w) { if ((data & 0xff) == 0xd) { -// mame_printf_debug("\n"); +// osd_printf_debug("\n"); } else { -// mame_printf_debug("%c", (UINT8)(data & 0xff)); +// osd_printf_debug("%c", (UINT8)(data & 0xff)); } } @@ -543,7 +543,7 @@ void konamim2_state::cde_handle_command() m_cde_status_bytes[0] = 0x04; m_cde_status_byte_ptr = 0; -// mame_printf_debug("CDE: SET SPEED %02X, %02X\n", m_cde_command_bytes[1], m_cde_command_bytes[2]); +// osd_printf_debug("CDE: SET SPEED %02X, %02X\n", m_cde_command_bytes[1], m_cde_command_bytes[2]); break; } case 0x06: // Audio Format / Data Format @@ -555,11 +555,11 @@ void konamim2_state::cde_handle_command() if (m_cde_command_bytes[1] == 0x00) // Audio Format { -// mame_printf_debug("CDE: AUDIO FORMAT\n"); +// osd_printf_debug("CDE: AUDIO FORMAT\n"); } else if (m_cde_command_bytes[1] == 0x78) // Data Format { -// mame_printf_debug("CDE: DATA FORMAT\n"); +// osd_printf_debug("CDE: DATA FORMAT\n"); } else { @@ -576,16 +576,16 @@ void konamim2_state::cde_handle_command() if (m_cde_command_bytes[1] == 0x00) // Eject { -// mame_printf_debug("CDE: EJECT command\n"); +// osd_printf_debug("CDE: EJECT command\n"); } else if (m_cde_command_bytes[1] == 0x02) // Pause { -// mame_printf_debug("CDE: PAUSE command\n"); +// osd_printf_debug("CDE: PAUSE command\n"); m_cde_drive_state = CDE_DRIVE_STATE_PAUSED; } else if (m_cde_command_bytes[1] == 0x03) // Play { -// mame_printf_debug("CDE: PLAY command\n"); +// osd_printf_debug("CDE: PLAY command\n"); } else { @@ -602,7 +602,7 @@ void konamim2_state::cde_handle_command() m_cde_drive_state = CDE_DRIVE_STATE_SEEK_DONE; -// mame_printf_debug("CDE: SEEK %08X\n", (m_cde_command_bytes[1] << 16) | (m_cde_command_bytes[2] << 8) | (m_cde_command_bytes[3])); +// osd_printf_debug("CDE: SEEK %08X\n", (m_cde_command_bytes[1] << 16) | (m_cde_command_bytes[2] << 8) | (m_cde_command_bytes[3])); break; } case 0x0b: // Get Drive State @@ -623,7 +623,7 @@ void konamim2_state::cde_handle_command() m_cde_enable_seek_reports = 0; } -// mame_printf_debug("CDE: GET DRIVE STATE %02X\n", m_cde_command_bytes[1]); +// osd_printf_debug("CDE: GET DRIVE STATE %02X\n", m_cde_command_bytes[1]); break; } case 0x0c: // ? @@ -643,7 +643,7 @@ void konamim2_state::cde_handle_command() m_cde_enable_qchannel_reports = 0; } -// mame_printf_debug("CDE: UNKNOWN CMD 0x0c %02X\n", m_cde_command_bytes[1]); +// osd_printf_debug("CDE: UNKNOWN CMD 0x0c %02X\n", m_cde_command_bytes[1]); break; } case 0x0d: // Get Switch State @@ -655,7 +655,7 @@ void konamim2_state::cde_handle_command() m_cde_status_bytes[2] = 0x02; m_cde_status_byte_ptr = 0; -// mame_printf_debug("CDE: GET SWITCH STATE %02X\n", m_cde_command_bytes[1]); +// osd_printf_debug("CDE: GET SWITCH STATE %02X\n", m_cde_command_bytes[1]); break; } case 0x21: // Mech type @@ -673,7 +673,7 @@ void konamim2_state::cde_handle_command() m_cde_status_byte_ptr = 0; -// mame_printf_debug("CDE: MECH TYPE %02X, %02X, %02X\n", m_cde_command_bytes[1], m_cde_command_bytes[2], m_cde_command_bytes[3]); +// osd_printf_debug("CDE: MECH TYPE %02X, %02X, %02X\n", m_cde_command_bytes[1], m_cde_command_bytes[2], m_cde_command_bytes[3]); break; } case 0x83: // Read ID @@ -695,7 +695,7 @@ void konamim2_state::cde_handle_command() m_cde_status_byte_ptr = 0; -// mame_printf_debug("CDE: READ ID\n"); +// osd_printf_debug("CDE: READ ID\n"); break; } default: @@ -721,7 +721,7 @@ void konamim2_state::cde_handle_reports() m_cde_command_bytes[0] = 0x0c; -// mame_printf_debug("CDE: SEEK REPORT\n"); +// osd_printf_debug("CDE: SEEK REPORT\n"); } break; } @@ -817,7 +817,7 @@ void konamim2_state::cde_handle_reports() m_cde_status_byte_ptr = 0; m_cde_command_bytes[0] = 0x0c; -// mame_printf_debug("CDE: QCHANNEL REPORT\n"); +// osd_printf_debug("CDE: QCHANNEL REPORT\n"); break; } } @@ -908,7 +908,7 @@ READ64_MEMBER(konamim2_state::cde_r) default: { -// mame_printf_debug("cde_r: %08X at %08X\n", reg*4, space.device().safe_pc()); +// osd_printf_debug("cde_r: %08X at %08X\n", reg*4, space.device().safe_pc()); break; } } @@ -975,7 +975,7 @@ WRITE64_MEMBER(konamim2_state::cde_w) case 0x300/4: // DMA Channel 0 enable { -// mame_printf_debug("CDE: DMA0 enable %08X\n", d); +// osd_printf_debug("CDE: DMA0 enable %08X\n", d); if (d & 0x20) { @@ -993,28 +993,28 @@ WRITE64_MEMBER(konamim2_state::cde_w) } case 0x308/4: // DMA Channel 0 destination address { -// mame_printf_debug("CDE: DMA0 dst addr %08X\n", d); +// osd_printf_debug("CDE: DMA0 dst addr %08X\n", d); m_cde_dma[0].dst_addr = d; break; } case 0x30c/4: // DMA Channel 0 length? { -// mame_printf_debug("CDE: DMA0 length %08X\n", d); +// osd_printf_debug("CDE: DMA0 length %08X\n", d); m_cde_dma[0].length = d; break; } case 0x318/4: // DMA Channel 0 next destination address { -// mame_printf_debug("CDE: DMA0 next dst addr %08X\n", d); +// osd_printf_debug("CDE: DMA0 next dst addr %08X\n", d); m_cde_dma[0].next_dst_addr = d; break; } case 0x31c/4: // DMA Channel 0 next length? { -// mame_printf_debug("CDE: DMA0 next length %08X\n", d); +// osd_printf_debug("CDE: DMA0 next length %08X\n", d); m_cde_dma[0].next_length = d; break; @@ -1022,33 +1022,33 @@ WRITE64_MEMBER(konamim2_state::cde_w) case 0x320/4: // DMA Channel 1 enable { -// mame_printf_debug("CDE: DMA1 enable %08X\n", d); +// osd_printf_debug("CDE: DMA1 enable %08X\n", d); break; } case 0x328/4: // DMA Channel 1 destination address { -// mame_printf_debug("CDE: DMA1 dst addr %08X\n", d); +// osd_printf_debug("CDE: DMA1 dst addr %08X\n", d); m_cde_dma[1].dst_addr = d; break; } case 0x32c/4: // DMA Channel 1 length? { -// mame_printf_debug("CDE: DMA1 length %08X\n", d); +// osd_printf_debug("CDE: DMA1 length %08X\n", d); m_cde_dma[1].length = d; break; } case 0x338/4: // DMA Channel 1 next destination address { -// mame_printf_debug("CDE: DMA1 next dst addr %08X\n", d); +// osd_printf_debug("CDE: DMA1 next dst addr %08X\n", d); m_cde_dma[1].next_dst_addr = d; break; } case 0x33c/4: // DMA Channel 1 next length? { -// mame_printf_debug("CDE: DMA1 next length %08X\n", d); +// osd_printf_debug("CDE: DMA1 next length %08X\n", d); m_cde_dma[1].next_length = d; break; @@ -1070,7 +1070,7 @@ WRITE64_MEMBER(konamim2_state::cde_w) default: { -// mame_printf_debug("cde_w: %08X, %08X at %08X\n", d, reg*4, space.device().safe_pc()); +// osd_printf_debug("cde_w: %08X, %08X at %08X\n", d, reg*4, space.device().safe_pc()); break; } } diff --git a/src/mame/drivers/konendev.c b/src/mame/drivers/konendev.c index e3a7aa2d320..1674a2f3914 100644 --- a/src/mame/drivers/konendev.c +++ b/src/mame/drivers/konendev.c @@ -84,7 +84,7 @@ WRITE32_MEMBER(konendev_state::gcu_w) switch (reg) { default: - mame_printf_debug("[%x] %.4x\n", reg, data); + osd_printf_debug("[%x] %.4x\n", reg, data); } } diff --git a/src/mame/drivers/ksys573.c b/src/mame/drivers/ksys573.c index 38f20cb4a3c..a165390683c 100644 --- a/src/mame/drivers/ksys573.c +++ b/src/mame/drivers/ksys573.c @@ -656,7 +656,7 @@ WRITE16_MEMBER( ksys573_state::atapi_reset_w ) void ksys573_state::cdrom_dma_read( UINT32 *ram, UINT32 n_address, INT32 n_size ) { verboselog( 2, "cdrom_dma_read( %08x, %08x )\n", n_address, n_size ); -// mame_printf_debug( "DMA read: address %08x size %08x\n", n_address, n_size ); +// osd_printf_debug( "DMA read: address %08x size %08x\n", n_address, n_size ); } void ksys573_state::cdrom_dma_write( UINT32 *ram, UINT32 n_address, INT32 n_size ) @@ -664,7 +664,7 @@ void ksys573_state::cdrom_dma_write( UINT32 *ram, UINT32 n_address, INT32 n_size m_p_n_psxram = ram; verboselog( 2, "cdrom_dma_write( %08x, %08x )\n", n_address, n_size ); -// mame_printf_debug( "DMA write: address %08x size %08x\n", n_address, n_size ); +// osd_printf_debug( "DMA write: address %08x size %08x\n", n_address, n_size ); m_atapi_xferbase = n_address; m_atapi_xfersize = n_size; diff --git a/src/mame/drivers/ladybug.c b/src/mame/drivers/ladybug.c index 0736560db11..b01bacbe04e 100644 --- a/src/mame/drivers/ladybug.c +++ b/src/mame/drivers/ladybug.c @@ -118,7 +118,7 @@ WRITE8_MEMBER(ladybug_state::sraider_misc_w) m_sraider_0x38 = data&0x3f; break; default: - mame_printf_debug("(%04X) write to %02X\n", space.device().safe_pc(), offset); + osd_printf_debug("(%04X) write to %02X\n", space.device().safe_pc(), offset); break; } } diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c index 80675b83bfb..03c32b22650 100644 --- a/src/mame/drivers/looping.c +++ b/src/mame/drivers/looping.c @@ -447,7 +447,7 @@ WRITE8_MEMBER(looping_state::speech_enable_w) WRITE8_MEMBER(looping_state::ballon_enable_w) { if (m_last != data) - mame_printf_debug("ballon_enable_w = %d\n", data); + osd_printf_debug("ballon_enable_w = %d\n", data); m_last = data; } @@ -459,11 +459,11 @@ WRITE8_MEMBER(looping_state::ballon_enable_w) * *************************************/ -WRITE8_MEMBER(looping_state::out_0_w){ mame_printf_debug("out0 = %02X\n", data); } -WRITE8_MEMBER(looping_state::out_2_w){ mame_printf_debug("out2 = %02X\n", data); } +WRITE8_MEMBER(looping_state::out_0_w){ osd_printf_debug("out0 = %02X\n", data); } +WRITE8_MEMBER(looping_state::out_2_w){ osd_printf_debug("out2 = %02X\n", data); } -READ8_MEMBER(looping_state::adc_r){ mame_printf_debug("%04X:ADC read\n", space.device().safe_pc()); return 0xff; } -WRITE8_MEMBER(looping_state::adc_w){ mame_printf_debug("%04X:ADC write = %02X\n", space.device().safe_pc(), data); } +READ8_MEMBER(looping_state::adc_r){ osd_printf_debug("%04X:ADC read\n", space.device().safe_pc()); return 0xff; } +WRITE8_MEMBER(looping_state::adc_w){ osd_printf_debug("%04X:ADC write = %02X\n", space.device().safe_pc(), data); } WRITE8_MEMBER(looping_state::plr2_w) { diff --git a/src/mame/drivers/magictg.c b/src/mame/drivers/magictg.c index 94b1b62e1d9..fdcf41ac161 100644 --- a/src/mame/drivers/magictg.c +++ b/src/mame/drivers/magictg.c @@ -273,7 +273,7 @@ UINT32 magictg_state::screen_update_magictg(screen_device &screen, bitmap_rgb32 static UINT32 pci_dev0_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) { - mame_printf_debug("PCI[0] READ: %x\n", reg); + osd_printf_debug("PCI[0] READ: %x\n", reg); return 0x00000000; // TODO } @@ -299,7 +299,7 @@ static UINT32 voodoo_0_pci_r(device_t *busdevice, device_t *device, int function val = state->m_voodoo_pci_regs[0].init_enable; break; default: - mame_printf_debug("Voodoo[0] PCI R: %x\n", reg); + osd_printf_debug("Voodoo[0] PCI R: %x\n", reg); } return val; } @@ -325,7 +325,7 @@ static void voodoo_0_pci_w(device_t *busdevice, device_t *device, int function, break; default: - mame_printf_debug("Voodoo [%x]: %x\n", reg, data); + osd_printf_debug("Voodoo [%x]: %x\n", reg, data); } } @@ -347,7 +347,7 @@ static UINT32 voodoo_1_pci_r(device_t *busdevice, device_t *device, int function val = state->m_voodoo_pci_regs[1].init_enable; break; default: - mame_printf_debug("Voodoo[1] PCI R: %x\n", reg); + osd_printf_debug("Voodoo[1] PCI R: %x\n", reg); } return val; } @@ -373,7 +373,7 @@ static void voodoo_1_pci_w(device_t *busdevice, device_t *device, int function, break; default: - mame_printf_debug("Voodoo [%x]: %x\n", reg, data); + osd_printf_debug("Voodoo [%x]: %x\n", reg, data); } } #endif @@ -432,7 +432,7 @@ static UINT32 zr36120_pci_r(device_t* busdevice, device_t* device, int function, val = state->m_zr36120.base_addr; break; default: - mame_printf_debug("ZR36120 R[%x]\n", reg); + osd_printf_debug("ZR36120 R[%x]\n", reg); } return val; } @@ -450,7 +450,7 @@ static void zr36120_pci_w(device_t* busdevice, device_t* device, int function, i state->m_zr36120.base_addr = data & 0xfffff000; break; default: - mame_printf_debug("ZR36120 [%x]: %x\n", reg, data); + osd_printf_debug("ZR36120 [%x]: %x\n", reg, data); } } @@ -473,7 +473,7 @@ READ32_MEMBER( magictg_state::zr36120_r ) /* Post office */ res = 0;//mame_rand(space.machine);//m_zr36120.as_regs[0x48/4]; } - mame_printf_debug("PINKEYE_R[%x]\n", offset); + osd_printf_debug("PINKEYE_R[%x]\n", offset); return res; } @@ -483,7 +483,7 @@ WRITE32_MEMBER( magictg_state::zr36120_w ) if (offset < 0x200) { - mame_printf_debug("PINKEYE_W[%x] %x\n", offset, data); + osd_printf_debug("PINKEYE_W[%x] %x\n", offset, data); switch (offset) { case 0x00/4: @@ -506,7 +506,7 @@ WRITE32_MEMBER( magictg_state::zr36120_w ) // zr36120_guest_write(guest, g_data, g_reg); // 2 - ZR36050 JPEG decoder // 3 - ZR36016 color-space converter - mame_printf_debug("GUEST (%.8x): %d REG: %d DATA: %x\n", data, guest, g_reg, g_data); + osd_printf_debug("GUEST (%.8x): %d REG: %d DATA: %x\n", data, guest, g_reg, g_data); } } @@ -554,21 +554,21 @@ WRITE32_MEMBER( magictg_state::f0_w ) case 0x808: case 0x80c: m_dma_ch[ch].count = data; -// mame_printf_debug("DMA%d COUNT: %.8x\n", ch, data); +// osd_printf_debug("DMA%d COUNT: %.8x\n", ch, data); break; case 0x814: case 0x818: case 0x81c: m_dma_ch[ch].src_addr = data; -// mame_printf_debug("DMA%d SRC: %.8x\n", ch, data); +// osd_printf_debug("DMA%d SRC: %.8x\n", ch, data); break; case 0x824: case 0x828: case 0x82c: m_dma_ch[ch].dst_addr = data; -// mame_printf_debug("DMA%d DST: %.8x\n", ch, data); +// osd_printf_debug("DMA%d DST: %.8x\n", ch, data); break; case 0x844: @@ -576,7 +576,7 @@ WRITE32_MEMBER( magictg_state::f0_w ) case 0x84c: { m_dma_ch[ch].ctrl = data; -// mame_printf_debug("DMA%d CTRL: %.8x\n", ch, data); +// osd_printf_debug("DMA%d CTRL: %.8x\n", ch, data); if (data & 0x1000) { @@ -622,7 +622,7 @@ WRITE32_MEMBER( magictg_state::f0_w ) break; } // default: -// mame_printf_debug("W: %.8x: %.8x\n", 0x0f000000 + offset, data); +// osd_printf_debug("W: %.8x: %.8x\n", 0x0f000000 + offset, data); } } @@ -659,7 +659,7 @@ READ32_MEMBER( magictg_state::f0_r ) break; } // default: -// mame_printf_debug("R: %.8x\n", 0x0f000000 + offset); +// osd_printf_debug("R: %.8x\n", 0x0f000000 + offset); } return FLIPENDIAN_INT32(val); @@ -685,7 +685,7 @@ READ32_MEMBER( magictg_state::adsp_idma_data_r ) // TODO: Set /IACK appropriately if (ACCESSING_BITS_0_15) { - //mame_printf_debug("RD %.8x %.8x\n", offset, mem_mask); + //osd_printf_debug("RD %.8x %.8x\n", offset, mem_mask); return m_adsp->idma_addr_r(); } else @@ -701,7 +701,7 @@ WRITE32_MEMBER( magictg_state::adsp_idma_addr_w ) if (ACCESSING_BITS_16_31) { m_adsp->idma_addr_w(data >> 16); - //mame_printf_debug("WR %.8x %.8x %.8x\n", offset, mem_mask, data >> 16); + //osd_printf_debug("WR %.8x %.8x %.8x\n", offset, mem_mask, data >> 16); } else fatalerror("????\n"); @@ -726,7 +726,7 @@ READ16_MEMBER( magictg_state::adsp_control_r ) res = space.machine().rand() & 0xff; break; default: - mame_printf_debug("Unhandled register: %x\n", 0x3fe0 + offset); + osd_printf_debug("Unhandled register: %x\n", 0x3fe0 + offset); } return res; } @@ -804,10 +804,10 @@ WRITE16_MEMBER( magictg_state::adsp_control_w ) break; } case 5: - mame_printf_debug("PFLAGS: %x\n", data); + osd_printf_debug("PFLAGS: %x\n", data); break; default: - mame_printf_debug("Unhandled register: %x %x\n", 0x3fe0 + offset, data); + osd_printf_debug("Unhandled register: %x %x\n", 0x3fe0 + offset, data); } } diff --git a/src/mame/drivers/marinedt.c b/src/mame/drivers/marinedt.c index 4ae3534b1a5..2fbe03f14fe 100644 --- a/src/mame/drivers/marinedt.c +++ b/src/mame/drivers/marinedt.c @@ -295,14 +295,14 @@ WRITE8_MEMBER(marinedt_state::marinedt_pf_w) //if ((m_pf & 0x07) != (data & 0x07)) - // mame_printf_debug("marinedt_pf_w: %02x\n", data & 0x07); + // osd_printf_debug("marinedt_pf_w: %02x\n", data & 0x07); if ((m_pf & 0x02) != (data & 0x02)) { if (data & 0x02) - mame_printf_debug("tile flip\n"); + osd_printf_debug("tile flip\n"); else - mame_printf_debug("tile non-flip\n"); + osd_printf_debug("tile non-flip\n"); if (data & 0x02) m_tx_tilemap->set_flip(TILEMAP_FLIPX | TILEMAP_FLIPY); diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c index be39c63422c..6570501cbc4 100644 --- a/src/mame/drivers/mediagx.c +++ b/src/mame/drivers/mediagx.c @@ -468,12 +468,12 @@ READ32_MEMBER(mediagx_state::biu_ctrl_r) WRITE32_MEMBER(mediagx_state::biu_ctrl_w) { - //mame_printf_debug("biu_ctrl_w %08X, %08X, %08X\n", data, offset, mem_mask); + //osd_printf_debug("biu_ctrl_w %08X, %08X, %08X\n", data, offset, mem_mask); COMBINE_DATA(m_biu_ctrl_reg + offset); if (offset == 3) // BC_XMAP_3 register { - //mame_printf_debug("BC_XMAP_3: %08X, %08X, %08X\n", data, offset, mem_mask); + //osd_printf_debug("BC_XMAP_3: %08X, %08X, %08X\n", data, offset, mem_mask); } } @@ -633,7 +633,7 @@ static UINT32 cx5510_pci_r(device_t *busdevice, device_t *device, int function, { mediagx_state *state = busdevice->machine().driver_data(); - //mame_printf_debug("CX5510: PCI read %d, %02X, %08X\n", function, reg, mem_mask); + //osd_printf_debug("CX5510: PCI read %d, %02X, %08X\n", function, reg, mem_mask); switch (reg) { case 0: return 0x00001078; @@ -646,7 +646,7 @@ static void cx5510_pci_w(device_t *busdevice, device_t *device, int function, in { mediagx_state *state = busdevice->machine().driver_data(); - //mame_printf_debug("CX5510: PCI write %d, %02X, %08X, %08X\n", function, reg, data, mem_mask); + //osd_printf_debug("CX5510: PCI write %d, %02X, %08X, %08X\n", function, reg, data, mem_mask); COMBINE_DATA(state->m_cx5510_regs + (reg/4)); } diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c index 71e40685358..f4ab0381502 100644 --- a/src/mame/drivers/megatech.c +++ b/src/mame/drivers/megatech.c @@ -770,17 +770,17 @@ DEVICE_IMAGE_LOAD_MEMBER( mtech_state, megatech_cart ) { if (!core_stricmp("genesis", pcb_name)) { - mame_printf_debug("%s is genesis\n", mt_cart->tag); + osd_printf_debug("%s is genesis\n", mt_cart->tag); m_cart_is_genesis[this_cart->slot] = 1; } else if (!core_stricmp("sms", pcb_name)) { - mame_printf_debug("%s is sms\n", mt_cart->tag); + osd_printf_debug("%s is sms\n", mt_cart->tag); m_cart_is_genesis[this_cart->slot] = 0; } else { - mame_printf_debug("%s is invalid\n", mt_cart->tag); + osd_printf_debug("%s is invalid\n", mt_cart->tag); } } diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c index 2e43fb88296..84a7f1fdd6d 100644 --- a/src/mame/drivers/merit.c +++ b/src/mame/drivers/merit.c @@ -2090,7 +2090,7 @@ DRIVER_INIT_MEMBER(merit_state,couple) if(ROM[0x14000+i] == ROM[0x16000+i]) r++; } - mame_printf_debug("%02x (in HEX) identical bytes (no offset done)\n",r); + osd_printf_debug("%02x (in HEX) identical bytes (no offset done)\n",r); } #endif diff --git a/src/mame/drivers/midqslvr.c b/src/mame/drivers/midqslvr.c index f484752e08d..0abdf43e3e6 100644 --- a/src/mame/drivers/midqslvr.c +++ b/src/mame/drivers/midqslvr.c @@ -68,7 +68,7 @@ public: static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, int reg) { midqslvr_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("MXTC: read %d, %02X\n", function, reg); +// osd_printf_debug("MXTC: read %d, %02X\n", function, reg); if((reg & 0xfc) == 0 && function == 0) // return vendor ID return (0x71008086 >> (reg & 3)*8) & 0xff; diff --git a/src/mame/drivers/midvunit.c b/src/mame/drivers/midvunit.c index 921239269fc..4ee0c75083d 100644 --- a/src/mame/drivers/midvunit.c +++ b/src/mame/drivers/midvunit.c @@ -446,7 +446,7 @@ WRITE32_MEMBER(midvunit_state::midvplus_misc_w) static void midvplus_xf1_w(tms3203x_device &device, UINT8 val) { midvunit_state *state = device.machine().driver_data(); -// mame_printf_debug("xf1_w = %d\n", val); +// osd_printf_debug("xf1_w = %d\n", val); if (state->m_lastval && !val) memcpy(state->m_ram_base, state->m_fastram_base, 0x20000*4); diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index 335d328b443..7c4036a69eb 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -692,7 +692,7 @@ WRITE32_MEMBER(model2_state::copro_prg_w) } else { - //mame_printf_debug("COPRO: push %08X\n", data); + //osd_printf_debug("COPRO: push %08X\n", data); } } @@ -766,7 +766,7 @@ WRITE32_MEMBER(model2_state::copro_fifo_w) // if(m_coprocnt == 0) // return; - //mame_printf_debug("copro_fifo_w: %08X, %08X, %08X at %08X\n", data, offset, mem_mask, space.device().safe_pc()); + //osd_printf_debug("copro_fifo_w: %08X, %08X, %08X at %08X\n", data, offset, mem_mask, space.device().safe_pc()); if (m_dsp_type == DSP_TYPE_SHARC) copro_fifoin_push(machine().device("dsp"), data); else @@ -883,7 +883,7 @@ WRITE32_MEMBER(model2_state::geo_sharc_fifo_w) } else { - //mame_printf_debug("copro_fifo_w: %08X, %08X, %08X at %08X\n", data, offset, mem_mask, space.device().safe_pc()); + //osd_printf_debug("copro_fifo_w: %08X, %08X, %08X at %08X\n", data, offset, mem_mask, space.device().safe_pc()); } } @@ -912,7 +912,7 @@ WRITE32_MEMBER(model2_state::geo_sharc_iop_w) void model2_state::push_geo_data(UINT32 data) { - //mame_printf_debug("push_geo_data: %08X: %08X\n", 0x900000+m_geo_write_start_address, data); + //osd_printf_debug("push_geo_data: %08X: %08X\n", 0x900000+m_geo_write_start_address, data); m_bufferram[m_geo_write_start_address/4] = data; m_geo_write_start_address += 4; } @@ -932,7 +932,7 @@ WRITE32_MEMBER(model2_state::geo_prg_w) } else { - //mame_printf_debug("GEO: %08X: push %08X\n", m_geo_write_start_address, data); + //osd_printf_debug("GEO: %08X: push %08X\n", m_geo_write_start_address, data); push_geo_data(data); } } @@ -950,7 +950,7 @@ READ32_MEMBER(model2_state::geo_r) } // fatalerror("geo_r: %08X, %08X\n", address, mem_mask); - mame_printf_debug("geo_r: PC:%08x - %08X\n", space.device().safe_pc(), address); + osd_printf_debug("geo_r: PC:%08x - %08X\n", space.device().safe_pc(), address); return 0; } @@ -965,11 +965,11 @@ WRITE32_MEMBER(model2_state::geo_w) { int i; UINT32 a; - mame_printf_debug("GEO: jump to %08X\n", (data & 0xfffff)); + osd_printf_debug("GEO: jump to %08X\n", (data & 0xfffff)); a = (data & 0xfffff) / 4; for (i=0; i < 4; i++) { - mame_printf_debug(" %08X: %08X %08X %08X %08X\n", 0x900000+(a*4)+(i*16), + osd_printf_debug(" %08X: %08X %08X %08X %08X\n", 0x900000+(a*4)+(i*16), m_bufferram[a+(i*4)+0], m_bufferram[a+(i*4)+1], m_bufferram[a+(i*4)+2], m_bufferram[a+(i*4)+3]); } } @@ -980,12 +980,12 @@ WRITE32_MEMBER(model2_state::geo_w) { case 0x0: { - mame_printf_debug("GEO: function %02X (%08X, %08X)\n", function, address, data); + osd_printf_debug("GEO: function %02X (%08X, %08X)\n", function, address, data); break; } - case 0x4: mame_printf_debug("GEO: function %02X, command length %d\n", function, data & 0x3f); break; - case 0x8: mame_printf_debug("GEO: function %02X, data length %d\n", function, data & 0x7f); break; + case 0x4: osd_printf_debug("GEO: function %02X, command length %d\n", function, data & 0x3f); break; + case 0x8: osd_printf_debug("GEO: function %02X, data length %d\n", function, data & 0x7f); break; } }*/ @@ -1018,12 +1018,12 @@ WRITE32_MEMBER(model2_state::geo_w) } else if (address == 0x1008) { - //mame_printf_debug("GEO: Write Start Address: %08X\n", data); + //osd_printf_debug("GEO: Write Start Address: %08X\n", data); m_geo_write_start_address = data & 0xfffff; } else if (address == 0x3008) { - //mame_printf_debug("GEO: Read Start Address: %08X\n", data); + //osd_printf_debug("GEO: Read Start Address: %08X\n", data); m_geo_read_start_address = data & 0xfffff; } else @@ -1413,19 +1413,19 @@ WRITE32_MEMBER(model2_state::copro_w) int function = (address & 0xfff) >> 4; switch (address & 0xf) { - case 0x0: mame_printf_debug("COPRO: function %02X, command %d\n", function, (data >> 23) & 0x3f); break; - case 0x4: mame_printf_debug("COPRO: function %02X, command length %d\n", function, data & 0x3f); break; - case 0x8: mame_printf_debug("COPRO: function %02X, data length %d\n", function, data & 0x7f); break; + case 0x0: osd_printf_debug("COPRO: function %02X, command %d\n", function, (data >> 23) & 0x3f); break; + case 0x4: osd_printf_debug("COPRO: function %02X, command length %d\n", function, data & 0x3f); break; + case 0x8: osd_printf_debug("COPRO: function %02X, data length %d\n", function, data & 0x7f); break; } } - //mame_printf_debug("COPRO: %08X = %08X\n", offset, data); + //osd_printf_debug("COPRO: %08X = %08X\n", offset, data); } #endif WRITE32_MEMBER(model2_state::mode_w) { - mame_printf_debug("Mode = %08X\n", data); + osd_printf_debug("Mode = %08X\n", data); } WRITE32_MEMBER(model2_state::model2o_tex_w0) @@ -2187,7 +2187,7 @@ WRITE8_MEMBER(model2_state::scsp_irq) READ32_MEMBER(model2_state::copro_sharc_input_fifo_r) { UINT32 result = 0; - //mame_printf_debug("SHARC FIFOIN pop at %08X\n", space.device().safe_pc()); + //osd_printf_debug("SHARC FIFOIN pop at %08X\n", space.device().safe_pc()); copro_fifoin_pop(machine().device("dsp"), &result); return result; @@ -2195,7 +2195,7 @@ READ32_MEMBER(model2_state::copro_sharc_input_fifo_r) WRITE32_MEMBER(model2_state::copro_sharc_output_fifo_w) { - //mame_printf_debug("SHARC FIFOOUT push %08X\n", data); + //osd_printf_debug("SHARC FIFOOUT push %08X\n", data); copro_fifoout_push(machine().device("dsp"), data); } @@ -2206,7 +2206,7 @@ READ32_MEMBER(model2_state::copro_sharc_buffer_r) WRITE32_MEMBER(model2_state::copro_sharc_buffer_w) { - //mame_printf_debug("sharc_buffer_w: %08X at %08X, %08X, %f\n", offset, space.device().safe_pc(), data, *(float*)&data); + //osd_printf_debug("sharc_buffer_w: %08X at %08X, %08X, %f\n", offset, space.device().safe_pc(), data, *(float*)&data); m_bufferram[offset & 0x7fff] = data; } diff --git a/src/mame/drivers/model3.c b/src/mame/drivers/model3.c index c4c6bcb2897..6f2ad5243de 100644 --- a/src/mame/drivers/model3.c +++ b/src/mame/drivers/model3.c @@ -1079,7 +1079,7 @@ READ64_MEMBER(model3_state::real3d_dma_r) } break; } - mame_printf_debug("real3d_dma_r: %08X, %08X%08X\n", offset, (UINT32)(mem_mask >> 32), (UINT32)(mem_mask)); + osd_printf_debug("real3d_dma_r: %08X, %08X%08X\n", offset, (UINT32)(mem_mask >> 32), (UINT32)(mem_mask)); return 0; } @@ -1424,7 +1424,7 @@ WRITE64_MEMBER(model3_state::model3_ctrl_w) } break; default: - //mame_printf_debug("Lightgun: Unknown command %02X at %08X\n", (UINT32)(data >> 24), space.device().safe_pc()); + //osd_printf_debug("Lightgun: Unknown command %02X at %08X\n", (UINT32)(data >> 24), space.device().safe_pc()); break; } } @@ -1631,14 +1631,14 @@ WRITE8_MEMBER(model3_state::model3_sound_w) READ64_MEMBER(model3_state::network_r) { - mame_printf_debug("network_r: %02X at %08X\n", offset, space.device().safe_pc()); + osd_printf_debug("network_r: %02X at %08X\n", offset, space.device().safe_pc()); return m_network_ram[offset]; } WRITE64_MEMBER(model3_state::network_w) { COMBINE_DATA(m_network_ram + offset); - mame_printf_debug("network_w: %02X, %08X%08X at %08X\n", offset, (UINT32)(data >> 32), (UINT32)(data), space.device().safe_pc()); + osd_printf_debug("network_w: %02X, %08X%08X at %08X\n", offset, (UINT32)(data >> 32), (UINT32)(data), space.device().safe_pc()); } diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c index 71b3cf32dcb..d4ac0259db2 100644 --- a/src/mame/drivers/mystwarr.c +++ b/src/mame/drivers/mystwarr.c @@ -279,7 +279,7 @@ WRITE16_MEMBER(mystwarr_state::k053247_scattered_word_w) { if (offset & 0x0078) { -// mame_printf_debug("spr write %x to %x (PC=%x)\n", data, offset, space.device().safe_pc()); +// osd_printf_debug("spr write %x to %x (PC=%x)\n", data, offset, space.device().safe_pc()); COMBINE_DATA(m_spriteram+offset); } else diff --git a/src/mame/drivers/naomi.c b/src/mame/drivers/naomi.c index 2512ba97099..e20c1170eae 100644 --- a/src/mame/drivers/naomi.c +++ b/src/mame/drivers/naomi.c @@ -1689,7 +1689,7 @@ inline int naomi_state::decode_reg32_64(UINT32 offset, UINT64 mem_mask, UINT64 * // non 32-bit accesses have not yet been seen here, we need to know when they are if ((mem_mask != U64(0xffffffff00000000)) && (mem_mask != U64(0x00000000ffffffff))) { - mame_printf_verbose("%s:Wrong mask!\n", machine().describe_context()); + osd_printf_verbose("%s:Wrong mask!\n", machine().describe_context()); // debugger_break(machine); } @@ -1725,7 +1725,7 @@ READ64_MEMBER(naomi_state::aw_modem_r ) return U64(0xffffffffffffffff); } - mame_printf_verbose("MODEM: Unmapped read %08x\n", 0x600000+reg*4); + osd_printf_verbose("MODEM: Unmapped read %08x\n", 0x600000+reg*4); return 0; } @@ -1737,7 +1737,7 @@ WRITE64_MEMBER(naomi_state::aw_modem_w ) reg = decode_reg32_64(offset, mem_mask, &shift); dat = (UINT32)(data >> shift); - mame_printf_verbose("MODEM: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x600000+reg*4, dat, data, offset, mem_mask); + osd_printf_verbose("MODEM: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x600000+reg*4, dat, data, offset, mem_mask); } static ADDRESS_MAP_START( aw_map, AS_PROGRAM, 64, naomi_state ) diff --git a/src/mame/drivers/pinball2k.c b/src/mame/drivers/pinball2k.c index 3d6acfd2f48..1aa330cc689 100644 --- a/src/mame/drivers/pinball2k.c +++ b/src/mame/drivers/pinball2k.c @@ -372,12 +372,12 @@ READ32_MEMBER(pinball2k_state::biu_ctrl_r) WRITE32_MEMBER(pinball2k_state::biu_ctrl_w) { - //mame_printf_debug("biu_ctrl_w %08X, %08X, %08X\n", data, offset, mem_mask); + //osd_printf_debug("biu_ctrl_w %08X, %08X, %08X\n", data, offset, mem_mask); COMBINE_DATA(m_biu_ctrl_reg + offset); if (offset == 3) // BC_XMAP_3 register { - //mame_printf_debug("BC_XMAP_3: %08X, %08X, %08X\n", data, offset, mem_mask); + //osd_printf_debug("BC_XMAP_3: %08X, %08X, %08X\n", data, offset, mem_mask); } } @@ -430,7 +430,7 @@ static UINT32 cx5510_pci_r(device_t *busdevice, device_t *device, int function, { pinball2k_state *state = busdevice->machine().driver_data(); - //mame_printf_debug("CX5510: PCI read %d, %02X, %08X\n", function, reg, mem_mask); + //osd_printf_debug("CX5510: PCI read %d, %02X, %08X\n", function, reg, mem_mask); switch (reg) { case 0: return 0x00001078; @@ -443,7 +443,7 @@ static void cx5510_pci_w(device_t *busdevice, device_t *device, int function, in { pinball2k_state *state = busdevice->machine().driver_data(); - //mame_printf_debug("CX5510: PCI write %d, %02X, %08X, %08X\n", function, reg, data, mem_mask); + //osd_printf_debug("CX5510: PCI write %d, %02X, %08X, %08X\n", function, reg, data, mem_mask); COMBINE_DATA(state->m_cx5510_regs + (reg/4)); } diff --git a/src/mame/drivers/queen.c b/src/mame/drivers/queen.c index 9a2208c0341..7a554c37d6c 100644 --- a/src/mame/drivers/queen.c +++ b/src/mame/drivers/queen.c @@ -60,7 +60,7 @@ public: static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, int reg) { queen_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("MXTC: read %d, %02X\n", function, reg); +// osd_printf_debug("MXTC: read %d, %02X\n", function, reg); return state->m_mxtc_config_reg[reg]; } @@ -152,14 +152,14 @@ static void intel82439tx_pci_w(device_t *busdevice, device_t *device, int functi static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, int reg) { queen_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("PIIX4: read %d, %02X\n", function, reg); +// osd_printf_debug("PIIX4: read %d, %02X\n", function, reg); return state->m_piix4_config_reg[function][reg]; } static void piix4_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { queen_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); +// osd_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); state->m_piix4_config_reg[function][reg] = data; } diff --git a/src/mame/drivers/rabbit.c b/src/mame/drivers/rabbit.c index ce5d117dc5c..408893e84ff 100644 --- a/src/mame/drivers/rabbit.c +++ b/src/mame/drivers/rabbit.c @@ -583,7 +583,7 @@ void rabbit_state::rabbit_do_blit() int mask,shift; - if(BLITCMDLOG) mame_printf_debug("BLIT command %08x %08x %08x\n", m_blitterregs[0], m_blitterregs[1], m_blitterregs[2]); + if(BLITCMDLOG) osd_printf_debug("BLIT command %08x %08x %08x\n", m_blitterregs[0], m_blitterregs[1], m_blitterregs[2]); if (blt_oddflg&1) { @@ -615,12 +615,12 @@ void rabbit_state::rabbit_do_blit() case 0x00: /* copy nn bytes */ if (!blt_amount) { - if(BLITLOG) mame_printf_debug("end of blit list\n"); + if(BLITLOG) osd_printf_debug("end of blit list\n"); timer_set(attotime::from_usec(500), TIMER_BLIT_DONE); return; } - if(BLITLOG) mame_printf_debug("blit copy %02x bytes\n", blt_amount); + if(BLITLOG) osd_printf_debug("blit copy %02x bytes\n", blt_amount); for (loopcount=0;loopcount>16; /* --CC---- */ blt_oddflg+=128; break; default: /* unknown / illegal */ - if(BLITLOG) mame_printf_debug("unknown blit command %02x\n",blt_commnd); + if(BLITLOG) osd_printf_debug("unknown blit command %02x\n",blt_commnd); break; } } diff --git a/src/mame/drivers/savquest.c b/src/mame/drivers/savquest.c index 8865f75da60..71f90b5e6ec 100644 --- a/src/mame/drivers/savquest.c +++ b/src/mame/drivers/savquest.c @@ -120,7 +120,7 @@ public: static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, int reg) { savquest_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("MXTC: read %d, %02X\n", function, reg); +// osd_printf_debug("MXTC: read %d, %02X\n", function, reg); if((reg & 0xfe) == 0) return (reg & 1) ? 0x80 : 0x86; // Vendor ID, Intel @@ -134,7 +134,7 @@ static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, static void mxtc_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { savquest_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("%s:MXTC: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); +// osd_printf_debug("%s:MXTC: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); #if 1 switch(reg) @@ -259,7 +259,7 @@ static void intel82439tx_pci_w(device_t *busdevice, device_t *device, int functi static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, int reg) { savquest_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("PIIX4: read %d, %02X\n", function, reg); +// osd_printf_debug("PIIX4: read %d, %02X\n", function, reg); if((reg & 0xfe) == 0) return (reg & 1) ? 0x80 : 0x86; // Vendor ID, Intel @@ -279,7 +279,7 @@ static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, static void piix4_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { savquest_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); +// osd_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); state->m_piix4_config_reg[function][reg] = data; } diff --git a/src/mame/drivers/segag80r.c b/src/mame/drivers/segag80r.c index 678ade9be6f..9e603d88867 100644 --- a/src/mame/drivers/segag80r.c +++ b/src/mame/drivers/segag80r.c @@ -292,7 +292,7 @@ WRITE8_MEMBER(segag80r_state::sindbadm_soundport_w) WRITE8_MEMBER(segag80r_state::sindbadm_misc_w) { coin_counter_w(machine(), 0, data & 0x02); -// mame_printf_debug("Unknown = %02X\n", data); +// osd_printf_debug("Unknown = %02X\n", data); } diff --git a/src/mame/drivers/segag80v.c b/src/mame/drivers/segag80v.c index 95dad5efd85..a47e517cbb9 100644 --- a/src/mame/drivers/segag80v.c +++ b/src/mame/drivers/segag80v.c @@ -359,7 +359,7 @@ WRITE8_MEMBER(segag80v_state::unknown_w) /* writing an 0x04 here enables interrupts */ /* some games write 0x00/0x01 here as well */ if (data != 0x00 && data != 0x01 && data != 0x04) - mame_printf_debug("%04X:unknown_w = %02X\n", space.device().safe_pc(), data); + osd_printf_debug("%04X:unknown_w = %02X\n", space.device().safe_pc(), data); } diff --git a/src/mame/drivers/segas24.c b/src/mame/drivers/segas24.c index 7f7147e76a0..1f6c1a188e0 100644 --- a/src/mame/drivers/segas24.c +++ b/src/mame/drivers/segas24.c @@ -689,7 +689,7 @@ void segas24_state::reset_reset() if(resetcontrol & 2) { m_subcpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); m_subcpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); -// mame_printf_debug("enable 2nd cpu!\n"); +// osd_printf_debug("enable 2nd cpu!\n"); // debugger_break(machine); } else diff --git a/src/mame/drivers/segas32.c b/src/mame/drivers/segas32.c index 4737ca2ca4c..461b0f1a490 100644 --- a/src/mame/drivers/segas32.c +++ b/src/mame/drivers/segas32.c @@ -1128,7 +1128,7 @@ WRITE16_MEMBER(segas32_state::sonic_custom_io_w) WRITE16_MEMBER(segas32_state::random_number_16_w) { -// mame_printf_debug("%06X:random_seed_w(%04X) = %04X & %04X\n", space.device().safe_pc(), offset*2, data, mem_mask); +// osd_printf_debug("%06X:random_seed_w(%04X) = %04X & %04X\n", space.device().safe_pc(), offset*2, data, mem_mask); } READ16_MEMBER(segas32_state::random_number_16_r) @@ -1138,7 +1138,7 @@ READ16_MEMBER(segas32_state::random_number_16_r) WRITE32_MEMBER(segas32_state::random_number_32_w) { -// mame_printf_debug("%06X:random_seed_w(%04X) = %04X & %04X\n", space.device().safe_pc(), offset*2, data, mem_mask); +// osd_printf_debug("%06X:random_seed_w(%04X) = %04X & %04X\n", space.device().safe_pc(), offset*2, data, mem_mask); } READ32_MEMBER(segas32_state::random_number_32_r) diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c index e40dd1f0ecd..4a75da12f47 100644 --- a/src/mame/drivers/seibuspi.c +++ b/src/mame/drivers/seibuspi.c @@ -2107,7 +2107,7 @@ READ32_MEMBER(seibuspi_state::viprp1_speedup_r) /* viprp1ot */ if (space.device().safe_pc()==0x02026bd) space.device().execute().spin_until_interrupt(); // idle -// mame_printf_debug("%08x\n",space.device().safe_pc()); +// osd_printf_debug("%08x\n",space.device().safe_pc()); return m_mainram[0x001e2e0/4]; } @@ -2116,7 +2116,7 @@ READ32_MEMBER(seibuspi_state::viprp1o_speedup_r) { /* viperp1o */ if (space.device().safe_pc()==0x0201f99) space.device().execute().spin_until_interrupt(); // idle -// mame_printf_debug("%08x\n",space.device().safe_pc()); +// osd_printf_debug("%08x\n",space.device().safe_pc()); return m_mainram[0x001d49c/4]; } @@ -2124,7 +2124,7 @@ READ32_MEMBER(seibuspi_state::viprp1o_speedup_r) // causes input problems? READ32_MEMBER(seibuspi_state::ejanhs_speedup_r) { -// mame_printf_debug("%08x\n",space.device().safe_pc()); +// osd_printf_debug("%08x\n",space.device().safe_pc()); if (space.device().safe_pc()==0x03032c7) space.device().execute().spin_until_interrupt(); // idle return m_mainram[0x002d224/4]; } @@ -2147,7 +2147,7 @@ READ32_MEMBER(seibuspi_state::rdft_speedup_r) /* rdftu */ if (space.device().safe_pc()==0x0203f3a) space.device().execute().spin_until_interrupt(); // idle -// mame_printf_debug("%08x\n",space.device().safe_pc()); +// osd_printf_debug("%08x\n",space.device().safe_pc()); return m_mainram[0x00298d0/4]; } @@ -2166,7 +2166,7 @@ READ32_MEMBER(seibuspi_state::rf2_speedup_r) /* rdft2a */ if (space.device().safe_pc()==0x0204366) space.device().execute().spin_until_interrupt(); // idle -// mame_printf_debug("%08x\n",space.device().safe_pc()); +// osd_printf_debug("%08x\n",space.device().safe_pc()); return m_mainram[0x0282ac/4]; } @@ -2189,7 +2189,7 @@ READ32_MEMBER(seibuspi_state::rfjet_speedup_r) /* rfjetj */ if (space.device().safe_pc()==0x0205f2e) space.device().execute().spin_until_interrupt(); // idle -// mame_printf_debug("%08x\n",space.device().safe_pc()); +// osd_printf_debug("%08x\n",space.device().safe_pc()); return m_mainram[0x002894c/4]; } diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index 44d885288dc..789177a5bd0 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -2862,14 +2862,14 @@ READ16_MEMBER(seta_state::pairlove_prot_r) int retdata; retdata = m_pairslove_protram[offset]; - //mame_printf_debug("pairs love protection? read %06x %04x %04x\n",space.device().safe_pc(), offset,retdata); + //osd_printf_debug("pairs love protection? read %06x %04x %04x\n",space.device().safe_pc(), offset,retdata); m_pairslove_protram[offset] = m_pairslove_protram_old[offset]; return retdata; } WRITE16_MEMBER(seta_state::pairlove_prot_w) { - //mame_printf_debug("pairs love protection? write %06x %04x %04x\n",space.device().safe_pc(), offset,data); + //osd_printf_debug("pairs love protection? write %06x %04x %04x\n",space.device().safe_pc(), offset,data); m_pairslove_protram_old[offset] = m_pairslove_protram[offset]; m_pairslove_protram[offset] = data; } diff --git a/src/mame/drivers/solomon.c b/src/mame/drivers/solomon.c index 6890953d60e..bb65d814714 100644 --- a/src/mame/drivers/solomon.c +++ b/src/mame/drivers/solomon.c @@ -33,7 +33,7 @@ READ8_MEMBER(solomon_state::solomon_0xe603_r) } else { - mame_printf_debug("unhandled solomon_0xe603_r %04x\n", space.device().safe_pc()); + osd_printf_debug("unhandled solomon_0xe603_r %04x\n", space.device().safe_pc()); return 0; } } diff --git a/src/mame/drivers/splus.c b/src/mame/drivers/splus.c index c0dacd240ac..3ef49e96a16 100644 --- a/src/mame/drivers/splus.c +++ b/src/mame/drivers/splus.c @@ -176,7 +176,7 @@ WRITE8_MEMBER(splus_state::splus_io_w) } #if DEBUG_OUTPUT if ((data & 0x1f) == 0x01) - mame_printf_info("Steppers %02X-%02X-%02X-%02X-%02X Motor=%02X Dir=%02X reels=%02X unk=%02X\n", m_stop_pos[0],m_stop_pos[1],m_stop_pos[2],m_stop_pos[3],m_stop_pos[4],((m_bank40 >> 0) & 1),((m_bank10 >> 5) & 1),(data & 0x1f), m_p1_unknown); + osd_printf_info("Steppers %02X-%02X-%02X-%02X-%02X Motor=%02X Dir=%02X reels=%02X unk=%02X\n", m_stop_pos[0],m_stop_pos[1],m_stop_pos[2],m_stop_pos[3],m_stop_pos[4],((m_bank40 >> 0) & 1),((m_bank10 >> 5) & 1),(data & 0x1f), m_p1_unknown); #endif } @@ -199,40 +199,40 @@ WRITE8_MEMBER(splus_state::splus_serial_w) case 0x00: // Bank 10 if (((m_bank10 >> 0) & 1) != ((data >> 0) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Coin Drop Meter =%02X\n",(data >> 0) & 1); + osd_printf_info("Coin Drop Meter =%02X\n",(data >> 0) & 1); #endif } if (((m_bank10 >> 1) & 1) != ((data >> 1) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Coin Out Meter =%02X\n",(data >> 1) & 1); + osd_printf_info("Coin Out Meter =%02X\n",(data >> 1) & 1); #endif } if (((m_bank10 >> 2) & 1) != ((data >> 2) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Coin In Meter =%02X\n",(data >> 2) & 1); + osd_printf_info("Coin In Meter =%02X\n",(data >> 2) & 1); #endif } if (((m_bank10 >> 3) & 1) != ((data >> 3) & 1)) { - //mame_printf_info("B Switch for SDS =%02X\n",(data >> 3) & 1); + //osd_printf_info("B Switch for SDS =%02X\n",(data >> 3) & 1); } if (((m_bank10 >> 4) & 1) != ((data >> 4) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Hopper Drive 2 =%02X\n",(data >> 4) & 1); + osd_printf_info("Hopper Drive 2 =%02X\n",(data >> 4) & 1); #endif } if (((m_bank10 >> 5) & 1) != ((data >> 5) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Stepper Motor Direction =%02X\n",(data >> 5) & 1); + osd_printf_info("Stepper Motor Direction =%02X\n",(data >> 5) & 1); #endif } if (((m_bank10 >> 6) & 1) != ((data >> 6) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Mechanical Bell =%02X\n",(data >> 6) & 1); + osd_printf_info("Mechanical Bell =%02X\n",(data >> 6) & 1); #endif } if (((m_bank10 >> 7) & 1) != ((data >> 7) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Cancelled Credits Meter =%02X\n",(data >> 7) & 1); + osd_printf_info("Cancelled Credits Meter =%02X\n",(data >> 7) & 1); #endif } m_bank10 = data; @@ -249,17 +249,17 @@ WRITE8_MEMBER(splus_state::splus_serial_w) case 0x01: // Bank 20 if (((m_bank20 >> 5) & 1) != ((data >> 5) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Games Played Meter =%02X\n",(data >> 5) & 1); + osd_printf_info("Games Played Meter =%02X\n",(data >> 5) & 1); #endif } if (((m_bank20 >> 6) & 1) != ((data >> 6) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Bill Acceptor Enable =%02X\n",(data >> 6) & 1); + osd_printf_info("Bill Acceptor Enable =%02X\n",(data >> 6) & 1); #endif } if (((m_bank20 >> 7) & 1) != ((data >> 7) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Jackpots Meter =%02X\n",(data >> 7) & 1); + osd_printf_info("Jackpots Meter =%02X\n",(data >> 7) & 1); #endif } m_bank20 = data; @@ -276,22 +276,22 @@ WRITE8_MEMBER(splus_state::splus_serial_w) case 0x02: // Bank 30 if (((m_bank30 >> 2) & 1) != ((data >> 2) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Handle Release =%02X\n",(data >> 2) & 1); + osd_printf_info("Handle Release =%02X\n",(data >> 2) & 1); #endif } if (((m_bank30 >> 3) & 1) != ((data >> 3) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Diverter =%02X\n",(data >> 3) & 1); + osd_printf_info("Diverter =%02X\n",(data >> 3) & 1); #endif } if (((m_bank30 >> 4) & 1) != ((data >> 4) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Coin Lockout =%02X\n",(data >> 4) & 1); + osd_printf_info("Coin Lockout =%02X\n",(data >> 4) & 1); #endif } if (((m_bank30 >> 5) & 1) != ((data >> 5) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Hopper Drive 1 =%02X\n",(data >> 5) & 1); + osd_printf_info("Hopper Drive 1 =%02X\n",(data >> 5) & 1); #endif } m_bank30 = data; @@ -308,12 +308,12 @@ WRITE8_MEMBER(splus_state::splus_serial_w) case 0x04: // Bank 40 if (((m_bank40 >> 0) & 1) != ((data >> 0) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Stepper Motor Power Supply =%02X\n",(data >> 0) & 1); + osd_printf_info("Stepper Motor Power Supply =%02X\n",(data >> 0) & 1); #endif } if (((m_bank40 >> 3) & 1) != ((data >> 3) & 1)) { #if DEBUG_OUTPUT - mame_printf_info("Jackpot/Hand Pay Lamp =%02X\n",(data >> 3) & 1); + osd_printf_info("Jackpot/Hand Pay Lamp =%02X\n",(data >> 3) & 1); #endif } m_bank40 = data; @@ -391,7 +391,7 @@ READ8_MEMBER(splus_state::splus_serial_r) m_coin_state = 1; // Start Coin Cycle m_last_cycles = m_maincpu->total_cycles(); #if DEBUG_OUTPUT - mame_printf_info("coin=%02X\n", m_coin_state); + osd_printf_info("coin=%02X\n", m_coin_state); #endif } else { /* Process Next Coin Optic State */ @@ -401,7 +401,7 @@ READ8_MEMBER(splus_state::splus_serial_r) m_coin_state = 0; m_last_cycles = m_maincpu->total_cycles(); #if DEBUG_OUTPUT - mame_printf_info("coin=%02X\n", m_coin_state); + osd_printf_info("coin=%02X\n", m_coin_state); #endif } } diff --git a/src/mame/drivers/ssfindo.c b/src/mame/drivers/ssfindo.c index 2838077a43f..831da7493b1 100644 --- a/src/mame/drivers/ssfindo.c +++ b/src/mame/drivers/ssfindo.c @@ -388,7 +388,7 @@ READ32_MEMBER(ssfindo_state::PS7500_IO_r) case IOLINES: //TODO: eeprom 24c01 #if 0 - mame_printf_debug("IOLINESR %i @%x\n", offset, space.device().safe_pc()); + osd_printf_debug("IOLINESR %i @%x\n", offset, space.device().safe_pc()); #endif if(m_flashType == 1) @@ -546,7 +546,7 @@ WRITE32_MEMBER(ssfindo_state::io_w) WRITE32_MEMBER(ssfindo_state::debug_w) { #if 0 - mame_printf_debug("%c",data&0xff); //debug texts - malloc (ie "64 KBytes allocated, elapsed : 378 KBytes, free : 2231 KBytes") + osd_printf_debug("%c",data&0xff); //debug texts - malloc (ie "64 KBytes allocated, elapsed : 378 KBytes, free : 2231 KBytes") #endif } diff --git a/src/mame/drivers/statriv2.c b/src/mame/drivers/statriv2.c index ad69d664d60..f327caf3adf 100644 --- a/src/mame/drivers/statriv2.c +++ b/src/mame/drivers/statriv2.c @@ -1129,13 +1129,13 @@ READ8_MEMBER(statriv2_state::laserdisc_io_r) UINT8 result = 0x00; if (offset == 1) result = 0x18; - mame_printf_debug("%s:ld read ($%02X) = %02X\n", machine().describe_context(), 0x28 + offset, result); + osd_printf_debug("%s:ld read ($%02X) = %02X\n", machine().describe_context(), 0x28 + offset, result); return result; } WRITE8_MEMBER(statriv2_state::laserdisc_io_w) { - mame_printf_debug("%s:ld write ($%02X) = %02X\n", machine().describe_context(), 0x28 + offset, data); + osd_printf_debug("%s:ld write ($%02X) = %02X\n", machine().describe_context(), 0x28 + offset, data); } DRIVER_INIT_MEMBER(statriv2_state,laserdisc) diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c index 3404276eb63..06ab6389a57 100644 --- a/src/mame/drivers/stv.c +++ b/src/mame/drivers/stv.c @@ -1044,7 +1044,7 @@ READ16_MEMBER( stv_state::adsp_control_r ) res = soundlatch_word_r(space,0); break; default: - mame_printf_debug("Unhandled register: %x\n", 0x3fe0 + offset); + osd_printf_debug("Unhandled register: %x\n", 0x3fe0 + offset); } return res; } @@ -1122,10 +1122,10 @@ WRITE16_MEMBER( stv_state::adsp_control_w ) break; } case 5: - mame_printf_debug("PFLAGS: %x\n", data); + osd_printf_debug("PFLAGS: %x\n", data); break; default: - mame_printf_debug("Unhandled register: %x %x\n", 0x3fe0 + offset, data); + osd_printf_debug("Unhandled register: %x %x\n", 0x3fe0 + offset, data); } } diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c index 9bab8b69571..5d50bdf86a3 100644 --- a/src/mame/drivers/suprgolf.c +++ b/src/mame/drivers/suprgolf.c @@ -272,7 +272,7 @@ WRITE8_MEMBER(suprgolf_state::rom_bank_select_w) //popmessage("%08x %02x",((data & 0x3f) * 0x4000),data); -// mame_printf_debug("ROM_BANK 0x8000 - %X @%X\n",data,space.device().safe_pcbase()); +// osd_printf_debug("ROM_BANK 0x8000 - %X @%X\n",data,space.device().safe_pcbase()); membank("bank2")->set_base(region_base + (data&0x3f ) * 0x4000); m_msm_nmi_mask = data & 0x40; @@ -282,7 +282,7 @@ WRITE8_MEMBER(suprgolf_state::rom_bank_select_w) WRITE8_MEMBER(suprgolf_state::rom2_bank_select_w) { UINT8 *region_base = memregion("user2")->base(); -// mame_printf_debug("ROM_BANK 0x4000 - %X @%X\n",data,space.device().safe_pcbase()); +// osd_printf_debug("ROM_BANK 0x4000 - %X @%X\n",data,space.device().safe_pcbase()); membank("bank1")->set_base(region_base + (data&0x0f) * 0x4000); @@ -416,12 +416,12 @@ INPUT_PORTS_END WRITE8_MEMBER(suprgolf_state::suprgolf_writeA) { - mame_printf_debug("ymwA\n"); + osd_printf_debug("ymwA\n"); } WRITE8_MEMBER(suprgolf_state::suprgolf_writeB) { - mame_printf_debug("ymwA\n"); + osd_printf_debug("ymwA\n"); } WRITE_LINE_MEMBER(suprgolf_state::irqhandler) diff --git a/src/mame/drivers/taitojc.c b/src/mame/drivers/taitojc.c index 2126b9cc413..f8d078ae453 100644 --- a/src/mame/drivers/taitojc.c +++ b/src/mame/drivers/taitojc.c @@ -590,7 +590,7 @@ void taitojc_state::debug_dsp_command() WRITE32_MEMBER(taitojc_state::dsp_shared_w) { - //mame_printf_debug("dsp_shared: %08X, %04X at %08X\n", offset, data >> 16, space.device().safe_pc()); + //osd_printf_debug("dsp_shared: %08X, %04X at %08X\n", offset, data >> 16, space.device().safe_pc()); if (ACCESSING_BITS_24_31) { m_dsp_shared_ram[offset] &= 0x00ff; @@ -973,7 +973,7 @@ WRITE16_MEMBER(taitojc_state::dsp_texture_w) { int index; int x, y; - //mame_printf_debug("texture write %08X, %04X\n", dsp_addr1, data); + //osd_printf_debug("texture write %08X, %04X\n", dsp_addr1, data); x = (m_dsp_tex_offset >> 0 & 0x1f) | (m_dsp_tex_offset >> 5 & 0x20); y = (m_dsp_tex_offset >> 5 & 0x1f) | (m_dsp_tex_offset >> 6 & 0x20); @@ -992,7 +992,7 @@ READ16_MEMBER(taitojc_state::dsp_texaddr_r) WRITE16_MEMBER(taitojc_state::dsp_texaddr_w) { m_dsp_tex_address = data; -// mame_printf_debug("texaddr = %08X at %08X\n", data, space.device().safe_pc()); +// osd_printf_debug("texaddr = %08X at %08X\n", data, space.device().safe_pc()); m_texture_x = (((data >> 0) & 0x1f) << 1) | ((data >> 12) & 0x1); m_texture_y = (((data >> 5) & 0x1f) << 1) | ((data >> 13) & 0x1); diff --git a/src/mame/drivers/taitowlf.c b/src/mame/drivers/taitowlf.c index f96961d1e2e..21078345c42 100644 --- a/src/mame/drivers/taitowlf.c +++ b/src/mame/drivers/taitowlf.c @@ -100,7 +100,7 @@ UINT32 taitowlf_state::screen_update_taitowlf(screen_device &screen, bitmap_rgb3 static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, int reg) { taitowlf_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("MXTC: read %d, %02X\n", function, reg); +// osd_printf_debug("MXTC: read %d, %02X\n", function, reg); return state->m_mxtc_config_reg[reg]; } @@ -108,7 +108,7 @@ static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, static void mxtc_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { taitowlf_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("%s:MXTC: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); +// osd_printf_debug("%s:MXTC: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); switch(reg) { @@ -186,14 +186,14 @@ static void intel82439tx_pci_w(device_t *busdevice, device_t *device, int functi static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, int reg) { taitowlf_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("PIIX4: read %d, %02X\n", function, reg); +// osd_printf_debug("PIIX4: read %d, %02X\n", function, reg); return state->m_piix4_config_reg[function][reg]; } static void piix4_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { taitowlf_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); +// osd_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); state->m_piix4_config_reg[function][reg] = data; } @@ -244,7 +244,7 @@ WRITE32_MEMBER(taitowlf_state::pnp_config_w) { if (ACCESSING_BITS_8_15) { -// mame_printf_debug("PNP Config: %02X\n", (data >> 8) & 0xff); +// osd_printf_debug("PNP Config: %02X\n", (data >> 8) & 0xff); } } @@ -252,7 +252,7 @@ WRITE32_MEMBER(taitowlf_state::pnp_data_w) { if (ACCESSING_BITS_8_15) { -// mame_printf_debug("PNP Data: %02X\n", (data >> 8) & 0xff); +// osd_printf_debug("PNP Data: %02X\n", (data >> 8) & 0xff); } } diff --git a/src/mame/drivers/tmmjprd.c b/src/mame/drivers/tmmjprd.c index 846a08d559c..762cc581704 100644 --- a/src/mame/drivers/tmmjprd.c +++ b/src/mame/drivers/tmmjprd.c @@ -406,7 +406,7 @@ void tmmjprd_state::tmmjprd_do_blit() int mask,shift; - if(BLITCMDLOG) mame_printf_debug("BLIT command %08x %08x %08x\n", tmmjprd_blitterregs[0], tmmjprd_blitterregs[1], tmmjprd_blitterregs[2]); + if(BLITCMDLOG) osd_printf_debug("BLIT command %08x %08x %08x\n", tmmjprd_blitterregs[0], tmmjprd_blitterregs[1], tmmjprd_blitterregs[2]); if (blt_oddflg&1) { @@ -438,12 +438,12 @@ void tmmjprd_state::tmmjprd_do_blit() case 0x00: /* copy nn bytes */ if (!blt_amount) { - if(BLITLOG) mame_printf_debug("end of blit list\n"); + if(BLITLOG) osd_printf_debug("end of blit list\n"); machine().scheduler().timer_set(attotime::from_usec(500), timer_expired_delegate(FUNC(tmmjprd_state::tmmjprd_blit_done),this)); return; } - if(BLITLOG) mame_printf_debug("blit copy %02x bytes\n", blt_amount); + if(BLITLOG) osd_printf_debug("blit copy %02x bytes\n", blt_amount); for (loopcount=0;loopcount>16; /* --CC---- */ blt_oddflg+=128; break; default: /* unknown / illegal */ - if(BLITLOG) mame_printf_debug("uknown blit command %02x\n",blt_commnd); + if(BLITLOG) osd_printf_debug("uknown blit command %02x\n",blt_commnd); break; } } diff --git a/src/mame/drivers/tumbleb.c b/src/mame/drivers/tumbleb.c index 3bf3db2a0e8..68d960d04ac 100644 --- a/src/mame/drivers/tumbleb.c +++ b/src/mame/drivers/tumbleb.c @@ -611,7 +611,7 @@ WRITE16_MEMBER(tumbleb_state::tumbleb2_soundmcu_w) if (sound == 0x00) { /* pangpang has more commands than tumbleb2, extra sounds */ - //mame_printf_debug("Command %04x\n", data); + //osd_printf_debug("Command %04x\n", data); } else if (sound == -2) { @@ -3506,7 +3506,7 @@ DRIVER_INIT_MEMBER(tumbleb_state,fncywld) READ16_MEMBER(tumbleb_state::bcstory_1a0_read) { - //mame_printf_debug("bcstory_io %06x\n",space.device().safe_pc()); + //osd_printf_debug("bcstory_io %06x\n",space.device().safe_pc()); if (space.device().safe_pc()==0x0560) return 0x1a0; else return ioport("SYSTEM")->read(); diff --git a/src/mame/drivers/vegas.c b/src/mame/drivers/vegas.c index 279d23c446e..16632cf270a 100644 --- a/src/mame/drivers/vegas.c +++ b/src/mame/drivers/vegas.c @@ -1214,7 +1214,7 @@ WRITE32_MEMBER( vegas_state::nile_w ) break; case NREG_UARTTHR: /* serial port output */ - if (PRINTF_SERIAL) mame_printf_debug("%c", data & 0xff); + if (PRINTF_SERIAL) osd_printf_debug("%c", data & 0xff); logit = 0; break; case NREG_UARTIER: /* serial interrupt enable */ diff --git a/src/mame/drivers/voyager.c b/src/mame/drivers/voyager.c index eda9d3d7349..58bbe2c263a 100644 --- a/src/mame/drivers/voyager.c +++ b/src/mame/drivers/voyager.c @@ -46,7 +46,7 @@ public: static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, int reg) { voyager_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("MXTC: read %d, %02X\n", function, reg); +// osd_printf_debug("MXTC: read %d, %02X\n", function, reg); return state->m_mxtc_config_reg[reg]; } @@ -54,7 +54,7 @@ static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, static void mxtc_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { voyager_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("%s:MXTC: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); +// osd_printf_debug("%s:MXTC: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); switch(reg) { @@ -148,14 +148,14 @@ static void intel82439tx_pci_w(device_t *busdevice, device_t *device, int functi static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, int reg) { voyager_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("PIIX4: read %d, %02X\n", function, reg); +// osd_printf_debug("PIIX4: read %d, %02X\n", function, reg); return state->m_piix4_config_reg[function][reg]; } static void piix4_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { voyager_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); +// osd_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); state->m_piix4_config_reg[function][reg] = data; } diff --git a/src/mame/drivers/xtom3d.c b/src/mame/drivers/xtom3d.c index 2ba05905f96..ce05a476d97 100644 --- a/src/mame/drivers/xtom3d.c +++ b/src/mame/drivers/xtom3d.c @@ -83,7 +83,7 @@ public: static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, int reg) { xtom3d_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("MXTC: read %d, %02X\n", function, reg); +// osd_printf_debug("MXTC: read %d, %02X\n", function, reg); return state->m_mxtc_config_reg[reg]; } @@ -227,14 +227,14 @@ static void intel82439tx_pci_w(device_t *busdevice, device_t *device, int functi static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, int reg) { xtom3d_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("PIIX4: read %d, %02X\n", function, reg); +// osd_printf_debug("PIIX4: read %d, %02X\n", function, reg); return state->m_piix4_config_reg[function][reg]; } static void piix4_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { xtom3d_state *state = busdevice->machine().driver_data(); -// mame_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); +// osd_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", machine.describe_context(), function, reg, data); state->m_piix4_config_reg[function][reg] = data; } diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c index 69c4e841fec..c9b37b02664 100644 --- a/src/mame/drivers/zr107.c +++ b/src/mame/drivers/zr107.c @@ -365,7 +365,7 @@ WRITE8_MEMBER(zr107_state::sysreg_w) break; case 2: /* Parallel data register */ - mame_printf_debug("Parallel data = %02X\n", data); + osd_printf_debug("Parallel data = %02X\n", data); break; case 3: /* System Register 0 */ @@ -381,7 +381,7 @@ WRITE8_MEMBER(zr107_state::sysreg_w) */ m_eepromout->write(data & 0x07, 0xff); m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); - mame_printf_debug("System register 0 = %02X\n", data); + osd_printf_debug("System register 0 = %02X\n", data); break; case 4: /* System Register 1 */ @@ -401,7 +401,7 @@ WRITE8_MEMBER(zr107_state::sysreg_w) m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); set_cgboard_id((data >> 4) & 3); m_out4->write(data, 0xff); - mame_printf_debug("System register 1 = %02X\n", data); + osd_printf_debug("System register 1 = %02X\n", data); break; case 5: /* System Register 2 */ diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c index 4415a7f1446..980f1258982 100644 --- a/src/mame/machine/amiga.c +++ b/src/mame/machine/amiga.c @@ -1550,7 +1550,7 @@ void amiga_serial_in_w(running_machine &machine, UINT16 data) /* set overrun if we weren't cleared */ if (CUSTOM_REG(REG_INTREQ) & INTENA_RBF) { - mame_printf_debug("Serial data overflow\n"); + osd_printf_debug("Serial data overflow\n"); CUSTOM_REG(REG_SERDATR) |= 0x8000; } diff --git a/src/mame/machine/cdicdic.c b/src/mame/machine/cdicdic.c index 9f8c5000163..4d35db91e32 100644 --- a/src/mame/machine/cdicdic.c +++ b/src/mame/machine/cdicdic.c @@ -805,7 +805,7 @@ void cdicdic_device::process_delayed_command() if(!cdrom_read_data(m_cd, lba, buffer, CD_TRACK_RAW_DONTCARE)) { - mame_printf_verbose("Unable to read CD-ROM data.\n"); + osd_printf_verbose("Unable to read CD-ROM data.\n"); } if(!(msf & 0x0000ff)) diff --git a/src/mame/machine/dc.c b/src/mame/machine/dc.c index 9247c9e6028..6fda3d8162f 100644 --- a/src/mame/machine/dc.c +++ b/src/mame/machine/dc.c @@ -241,7 +241,7 @@ int dc_state::decode_reg32_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift) // non 32-bit accesses have not yet been seen here, we need to know when they are if ((mem_mask != U64(0xffffffff00000000)) && (mem_mask != U64(0x00000000ffffffff))) { - mame_printf_verbose("%s:Wrong mask!\n", machine().describe_context()); + osd_printf_verbose("%s:Wrong mask!\n", machine().describe_context()); // debugger_break(machine); } @@ -265,7 +265,7 @@ int dc_state::decode_reg3216_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift) if ((mem_mask != U64(0x0000ffff00000000)) && (mem_mask != U64(0x000000000000ffff)) && (mem_mask != U64(0xffffffff00000000)) && (mem_mask != U64(0x00000000ffffffff))) { - mame_printf_verbose("%s:Wrong mask!\n", machine().describe_context()); + osd_printf_verbose("%s:Wrong mask!\n", machine().describe_context()); // debugger_break(machine); } @@ -369,7 +369,7 @@ READ64_MEMBER(dc_state::dc_sysctrl_r ) #if DEBUG_SYSCTRL if ((reg != 0x40) && (reg != 0x41) && (reg != 0x42) && (reg != 0x23) && (reg > 2)) // filter out IRQ status reads { - mame_printf_verbose("SYSCTRL: [%08x] read %x @ %x (reg %x: %s), mask %" I64FMT "x (PC=%x)\n", 0x5f6800+reg*4, dc_sysctrl_regs[reg], offset, reg, sysctrl_names[reg], mem_mask, space.device().safe_pc()); + osd_printf_verbose("SYSCTRL: [%08x] read %x @ %x (reg %x: %s), mask %" I64FMT "x (PC=%x)\n", 0x5f6800+reg*4, dc_sysctrl_regs[reg], offset, reg, sysctrl_names[reg], mem_mask, space.device().safe_pc()); } #endif @@ -413,18 +413,18 @@ WRITE64_MEMBER(dc_state::dc_sysctrl_w ) if (dc_sysctrl_regs[SB_LMMODE0]) printf("SYSCTRL: Ch2 direct display lists dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", dc_sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, dc_sysctrl_regs[SB_C2DSTAT],dc_sysctrl_regs[SB_LMMODE0],dc_sysctrl_regs[SB_LMMODE1]); // 1 else - mame_printf_verbose("SYSCTRL: Ch2 direct textures dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", dc_sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, dc_sysctrl_regs[SB_C2DSTAT],dc_sysctrl_regs[SB_LMMODE0],dc_sysctrl_regs[SB_LMMODE1]); // 0 + osd_printf_verbose("SYSCTRL: Ch2 direct textures dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", dc_sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, dc_sysctrl_regs[SB_C2DSTAT],dc_sysctrl_regs[SB_LMMODE0],dc_sysctrl_regs[SB_LMMODE1]); // 0 else if ((address >= 0x13000000) && (address <= 0x13FFFFFF)) if (dc_sysctrl_regs[SB_LMMODE1]) printf("SYSCTRL: Ch2 direct display lists dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", dc_sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, dc_sysctrl_regs[SB_C2DSTAT],dc_sysctrl_regs[SB_LMMODE0],dc_sysctrl_regs[SB_LMMODE1]); // 1 else - mame_printf_verbose("SYSCTRL: Ch2 direct textures dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", dc_sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, dc_sysctrl_regs[SB_C2DSTAT],dc_sysctrl_regs[SB_LMMODE0],dc_sysctrl_regs[SB_LMMODE1]); // 0 + osd_printf_verbose("SYSCTRL: Ch2 direct textures dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", dc_sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, dc_sysctrl_regs[SB_C2DSTAT],dc_sysctrl_regs[SB_LMMODE0],dc_sysctrl_regs[SB_LMMODE1]); // 0 else if ((address >= 0x10800000) && (address <= 0x10ffffff)) printf("SYSCTRL: Ch2 YUV dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", dc_sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, dc_sysctrl_regs[SB_C2DSTAT],dc_sysctrl_regs[SB_LMMODE0],dc_sysctrl_regs[SB_LMMODE1]); else if ((address >= 0x10000000) && (address <= 0x107fffff)) - mame_printf_verbose("SYSCTRL: Ch2 TA Display List dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", dc_sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, dc_sysctrl_regs[SB_C2DSTAT],dc_sysctrl_regs[SB_LMMODE0],dc_sysctrl_regs[SB_LMMODE1]); + osd_printf_verbose("SYSCTRL: Ch2 TA Display List dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", dc_sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, dc_sysctrl_regs[SB_C2DSTAT],dc_sysctrl_regs[SB_LMMODE0],dc_sysctrl_regs[SB_LMMODE1]); else - mame_printf_verbose("SYSCTRL: Ch2 unknown dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", dc_sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, dc_sysctrl_regs[SB_C2DSTAT],dc_sysctrl_regs[SB_LMMODE0],dc_sysctrl_regs[SB_LMMODE1]); + osd_printf_verbose("SYSCTRL: Ch2 unknown dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", dc_sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, dc_sysctrl_regs[SB_C2DSTAT],dc_sysctrl_regs[SB_LMMODE0],dc_sysctrl_regs[SB_LMMODE1]); #endif if ((!(address & 0x01000000))) @@ -467,7 +467,7 @@ WRITE64_MEMBER(dc_state::dc_sysctrl_w ) #if DEBUG_SYSCTRL if ((reg != 0x40) && (reg != 0x42) && (reg > 2)) // filter out IRQ acks and ch2 dma { - mame_printf_verbose("SYSCTRL: write %" I64FMT "x to %x (reg %x), mask %" I64FMT "x\n", data>>shift, offset, reg, /*sysctrl_names[reg],*/ mem_mask); + osd_printf_verbose("SYSCTRL: write %" I64FMT "x to %x (reg %x), mask %" I64FMT "x\n", data>>shift, offset, reg, /*sysctrl_names[reg],*/ mem_mask); } #endif } @@ -508,7 +508,7 @@ WRITE64_MEMBER(dc_state::dc_gdrom_w ) off=offset << 1; } - mame_printf_verbose("GDROM: [%08x=%x]write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x5f7000+off*4, dat, data, offset, mem_mask); + osd_printf_verbose("GDROM: [%08x=%x]write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x5f7000+off*4, dat, data, offset, mem_mask); } READ64_MEMBER(dc_state::dc_g2_ctrl_r ) @@ -517,7 +517,7 @@ READ64_MEMBER(dc_state::dc_g2_ctrl_r ) UINT64 shift; reg = decode_reg32_64(offset, mem_mask, &shift); - mame_printf_verbose("G2CTRL: Unmapped read %08x\n", 0x5f7800+reg*4); + osd_printf_verbose("G2CTRL: Unmapped read %08x\n", 0x5f7800+reg*4); return (UINT64)g2bus_regs[reg] << shift; } @@ -564,7 +564,7 @@ WRITE64_MEMBER(dc_state::dc_g2_ctrl_w ) printf("SEL %08x ST %08x FLAG %08x DIR %02x\n",m_wave_dma.sel,m_wave_dma.start,m_wave_dma.flag,m_wave_dma.dir); #endif - //mame_printf_verbose("SB_ADST data %08x\n",dat); + //osd_printf_verbose("SB_ADST data %08x\n",dat); if(((old & 1) == 0) && m_wave_dma.flag && m_wave_dma.start && ((m_wave_dma.sel & 2) == 0)) // 0 -> 1 wave_dma_execute(space); break; @@ -626,7 +626,7 @@ READ64_MEMBER(dc_state::dc_modem_r ) return U64(0xffffffffffffffff); } - mame_printf_verbose("MODEM: Unmapped read %08x\n", 0x600000+reg*4); + osd_printf_verbose("MODEM: Unmapped read %08x\n", 0x600000+reg*4); return 0; } @@ -638,7 +638,7 @@ WRITE64_MEMBER(dc_state::dc_modem_w ) reg = decode_reg32_64(offset, mem_mask, &shift); dat = (UINT32)(data >> shift); - mame_printf_verbose("MODEM: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x600000+reg*4, dat, data, offset, mem_mask); + osd_printf_verbose("MODEM: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x600000+reg*4, dat, data, offset, mem_mask); } @@ -675,7 +675,7 @@ void dc_state::machine_reset() READ32_MEMBER(dc_state::dc_aica_reg_r) { -// mame_printf_verbose("AICA REG: [%08x] read %" I64FMT "x, mask %" I64FMT "x\n", 0x700000+reg*4, (UINT64)offset, mem_mask); +// osd_printf_verbose("AICA REG: [%08x] read %" I64FMT "x, mask %" I64FMT "x\n", 0x700000+reg*4, (UINT64)offset, mem_mask); if(offset == 0x2c00/4) return m_armrst; @@ -706,7 +706,7 @@ WRITE32_MEMBER(dc_state::dc_aica_reg_w) m_aica->write(space, offset*2, data, 0xffff); -// mame_printf_verbose("AICA REG: [%08x=%x] write %x to %x, mask %" I64FMT "x\n", 0x700000+reg*4, data, offset, mem_mask); +// osd_printf_verbose("AICA REG: [%08x=%x] write %x to %x, mask %" I64FMT "x\n", 0x700000+reg*4, data, offset, mem_mask); } READ32_MEMBER(dc_state::dc_arm_aica_r) diff --git a/src/mame/machine/igs022.c b/src/mame/machine/igs022.c index bf45d09c288..cf046486b6a 100644 --- a/src/mame/machine/igs022.c +++ b/src/mame/machine/igs022.c @@ -166,7 +166,7 @@ void igs022_device::IGS022_do_dma(UINT16 src, UINT16 dst, UINT16 size, UINT16 mo } else { - mame_printf_debug("unhandled copy mode %04x!\n", mode); + osd_printf_debug("unhandled copy mode %04x!\n", mode); printf ("DMA MODE: %d, src: %4.4x, dst: %4.4x, size: %4.4x, param: %2.2x\n", mode, src, dst, size, param); // not used by killing blade /* invalid? */ diff --git a/src/mame/machine/konppc.c b/src/mame/machine/konppc.c index 18b94ef948c..0755c3be1fd 100644 --- a/src/mame/machine/konppc.c +++ b/src/mame/machine/konppc.c @@ -129,7 +129,7 @@ READ32_HANDLER( cgboard_dsp_comm_r_ppc ) { if (cgboard_id < MAX_CG_BOARDS) { -// mame_printf_debug("dsp_cmd_r: (board %d) %08X, %08X at %08X\n", cgboard_id, offset, mem_mask, space.device().safe_pc()); +// osd_printf_debug("dsp_cmd_r: (board %d) %08X, %08X at %08X\n", cgboard_id, offset, mem_mask, space.device().safe_pc()); return dsp_comm_sharc[cgboard_id][offset] | (dsp_state[cgboard_id] << 16); } else @@ -144,7 +144,7 @@ WRITE32_HANDLER( cgboard_dsp_comm_w_ppc ) const char *pcitag = (cgboard_id == 0) ? "k033906_1" : "k033906_2"; device_t *dsp = space.machine().device(dsptag); k033906_device *k033906 = space.machine().device(pcitag); -// mame_printf_debug("dsp_cmd_w: (board %d) %08X, %08X, %08X at %08X\n", cgboard_id, data, offset, mem_mask, space.device().safe_pc()); +// osd_printf_debug("dsp_cmd_w: (board %d) %08X, %08X, %08X at %08X\n", cgboard_id, data, offset, mem_mask, space.device().safe_pc()); if (cgboard_id < MAX_CG_BOARDS) { diff --git a/src/mame/machine/megadriv.c b/src/mame/machine/megadriv.c index ce9af87f50b..8c49fbccf4b 100644 --- a/src/mame/machine/megadriv.c +++ b/src/mame/machine/megadriv.c @@ -59,7 +59,7 @@ WRITE8_MEMBER(md_base_state::megadriv_z80_z80_bank_w) READ8_MEMBER(md_base_state::megadriv_68k_YM2612_read) { - //mame_printf_debug("megadriv_68k_YM2612_read %02x %04x\n",offset,mem_mask); + //osd_printf_debug("megadriv_68k_YM2612_read %02x %04x\n",offset,mem_mask); if ((m_genz80.z80_has_bus == 0) && (m_genz80.z80_is_reset == 0)) { return m_ymsnd->read(space, offset); @@ -76,7 +76,7 @@ READ8_MEMBER(md_base_state::megadriv_68k_YM2612_read) WRITE8_MEMBER(md_base_state::megadriv_68k_YM2612_write) { - //mame_printf_debug("megadriv_68k_YM2612_write %02x %04x %04x\n",offset,data,mem_mask); + //osd_printf_debug("megadriv_68k_YM2612_write %02x %04x %04x\n",offset,data,mem_mask); if ((m_genz80.z80_has_bus == 0) && (m_genz80.z80_is_reset == 0)) { m_ymsnd->write(space, offset, data); @@ -244,7 +244,7 @@ READ8_MEMBER(md_base_state::megadrive_io_read_data_port_6button) } } -// mame_printf_debug("read io data port stage %d port %d %02x\n",m_io_stage[portnum],portnum,retdata); +// osd_printf_debug("read io data port stage %d port %d %02x\n",m_io_stage[portnum],portnum,retdata); return retdata | (retdata << 8); } @@ -277,7 +277,7 @@ UINT8 md_base_state::megadrive_io_read_ctrl_port(int portnum) { UINT8 retdata; retdata = m_megadrive_io_ctrl_regs[portnum]; - //mame_printf_debug("read io ctrl port %d %02x\n",portnum,retdata); + //osd_printf_debug("read io ctrl port %d %02x\n",portnum,retdata); return retdata | (retdata << 8); } @@ -367,7 +367,7 @@ WRITE16_MEMBER(md_base_state::megadrive_io_write_data_port_3button) { int portnum = offset; m_megadrive_io_data_regs[portnum] = data; - //mame_printf_debug("Writing IO Data Register #%d data %04x\n",portnum,data); + //osd_printf_debug("Writing IO Data Register #%d data %04x\n",portnum,data); } @@ -388,7 +388,7 @@ WRITE16_MEMBER(md_base_state::megadrive_io_write_data_port_6button) } m_megadrive_io_data_regs[portnum] = data; - //mame_printf_debug("Writing IO Data Register #%d data %04x\n",portnum,data); + //osd_printf_debug("Writing IO Data Register #%d data %04x\n",portnum,data); } @@ -398,7 +398,7 @@ WRITE16_MEMBER(md_base_state::megadrive_io_write_data_port_6button) void md_base_state::megadrive_io_write_ctrl_port(int portnum, UINT16 data) { m_megadrive_io_ctrl_regs[portnum] = data; -// mame_printf_debug("Setting IO Control Register #%d data %04x\n",portnum,data); +// osd_printf_debug("Setting IO Control Register #%d data %04x\n",portnum,data); } void md_base_state::megadrive_io_write_tx_port(int portnum, UINT16 data) @@ -417,13 +417,13 @@ void md_base_state::megadrive_io_write_sctrl_port(int portnum, UINT16 data) WRITE16_MEMBER(md_base_state::megadriv_68k_io_write ) { -// mame_printf_debug("IO Write #%02x data %04x mem_mask %04x\n",offset,data,mem_mask); +// osd_printf_debug("IO Write #%02x data %04x mem_mask %04x\n",offset,data,mem_mask); switch (offset) { case 0x0: - mame_printf_debug("Write to Version Register?!\n"); + osd_printf_debug("Write to Version Register?!\n"); break; /* Joypad Port Registers */ @@ -492,7 +492,7 @@ ADDRESS_MAP_END READ16_MEMBER(md_base_state::megadriv_68k_read_z80_ram ) { - //mame_printf_debug("read z80 ram %04x\n",mem_mask); + //osd_printf_debug("read z80 ram %04x\n",mem_mask); if ((m_genz80.z80_has_bus == 0) && (m_genz80.z80_is_reset == 0)) { @@ -569,7 +569,7 @@ READ16_MEMBER(md_base_state::megadriv_68k_check_z80_bus ) if (m_genz80.z80_has_bus || m_genz80.z80_is_reset) retvalue = nextvalue | 0x0100; else retvalue = (nextvalue & 0xfeff); - // mame_printf_debug("%06x: 68000 check z80 Bus (word access) %04x %04x\n", space.device().safe_pc(),mem_mask, retvalue); + // osd_printf_debug("%06x: 68000 check z80 Bus (word access) %04x %04x\n", space.device().safe_pc(),mem_mask, retvalue); return retvalue; } } @@ -719,7 +719,7 @@ WRITE8_MEMBER(md_base_state::megadriv_z80_vdp_write ) break; default: - mame_printf_debug("unhandled z80 vdp write %02x %02x\n",offset,data); + osd_printf_debug("unhandled z80 vdp write %02x %02x\n",offset,data); } } @@ -728,7 +728,7 @@ WRITE8_MEMBER(md_base_state::megadriv_z80_vdp_write ) READ8_MEMBER(md_base_state::megadriv_z80_vdp_read ) { - mame_printf_debug("megadriv_z80_vdp_read %02x\n",offset); + osd_printf_debug("megadriv_z80_vdp_read %02x\n",offset); return space.machine().rand(); } @@ -836,7 +836,7 @@ MACHINE_START_MEMBER(md_base_state,megadriv) MACHINE_RESET_MEMBER(md_base_state,megadriv) { /* default state of z80 = reset, with bus */ - mame_printf_debug("Resetting Megadrive / Genesis\n"); + osd_printf_debug("Resetting Megadrive / Genesis\n"); if (m_z80snd) { diff --git a/src/mame/machine/micro3d.c b/src/mame/machine/micro3d.c index de9d8ece400..06ef87aa250 100644 --- a/src/mame/machine/micro3d.c +++ b/src/mame/machine/micro3d.c @@ -192,7 +192,7 @@ WRITE32_MEMBER(micro3d_state::micro3d_scc_w) { #if DRMATH_MONITOR_DISPLAY if (offset == 1) - mame_printf_debug("%c", data); + osd_printf_debug("%c", data); #endif } diff --git a/src/mame/machine/midwayic.c b/src/mame/machine/midwayic.c index 7a3c5adb665..f39cd06e226 100644 --- a/src/mame/machine/midwayic.c +++ b/src/mame/machine/midwayic.c @@ -988,7 +988,7 @@ WRITE32_HANDLER( midway_ioasic_w ) update_ioasic_irq(space.machine()); } else if (PRINTF_DEBUG) - mame_printf_debug("%c", data & 0xff); + osd_printf_debug("%c", data & 0xff); break; case IOASIC_SOUNDCTL: diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c index 1f6a2abe18d..0299180ac12 100644 --- a/src/mame/machine/n64.c +++ b/src/mame/machine/n64.c @@ -1247,7 +1247,7 @@ void n64_periphs::ai_fifo_push(UINT32 address, UINT32 length) { if (ai_fifo_num == AUDIO_DMA_DEPTH) { - mame_printf_debug("ai_fifo_push: tried to push to full DMA FIFO!!!\n"); + osd_printf_debug("ai_fifo_push: tried to push to full DMA FIFO!!!\n"); } ai_fifo[ai_fifo_wpos].address = address; @@ -1324,7 +1324,7 @@ void n64_periphs::ai_dma() ram = &ram[current->address/2]; - //mame_printf_debug("DACDMA: %x for %x bytes\n", current->address, current->length); + //osd_printf_debug("DACDMA: %x for %x bytes\n", current->address, current->length); dmadac_transfer(&ai_dac[0], 2, 1, 2, current->length/4, ram); @@ -1779,7 +1779,7 @@ int n64_periphs::pif_channel_handle_command(int channel, int slength, UINT8 *sda } case 5: { - mame_printf_debug("EEPROM2? read status\n"); + osd_printf_debug("EEPROM2? read status\n"); return 1; } } @@ -1972,7 +1972,7 @@ int n64_periphs::pif_channel_handle_command(int channel, int slength, UINT8 *sda default: { - mame_printf_debug("handle_pif: unknown/unimplemented command %02X\n", command); + osd_printf_debug("handle_pif: unknown/unimplemented command %02X\n", command); return 1; } } diff --git a/src/mame/machine/namcos2.c b/src/mame/machine/namcos2.c index 1fe9089110d..fdb7328e045 100644 --- a/src/mame/machine/namcos2.c +++ b/src/mame/machine/namcos2.c @@ -522,7 +522,7 @@ ReadWriteC148( address_space &space, offs_t offset, UINT16 data, int bWrite ) case 0x1d0000: /* ? NAMCOS2_C148_0 */ if( bWrite ) { - // mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); + // osd_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); /* Dubious to assert IRQ for other CPU here, but Starblade seems to rely on it. It fails to show large polygons otherwise. */ altcpu->execute().set_input_line(pC148RegAlt[NAMCOS2_C148_CPUIRQ], ASSERT_LINE); @@ -534,7 +534,7 @@ ReadWriteC148( address_space &space, offs_t offset, UINT16 data, int bWrite ) case 0x1d4000: /* ? NAMCOS2_C148_2 */ if( bWrite ) { - // mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); + // osd_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); /* Dubious to assert IRQ for other CPU here: Rolling Thunder 2 and Fine Hour break. */ // altcpu->execute().set_input_line(pC148RegAlt[NAMCOS2_C148_CPUIRQ], ASSERT_LINE); } @@ -543,22 +543,22 @@ ReadWriteC148( address_space &space, offs_t offset, UINT16 data, int bWrite ) /* IRQ ack */ case 0x1d6000: /* NAMCOS2_C148_CPUIRQ */ - // if( bWrite ) mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); + // if( bWrite ) osd_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); space.device().execute().set_input_line(pC148Reg[NAMCOS2_C148_CPUIRQ], CLEAR_LINE); break; case 0x1d8000: /* NAMCOS2_C148_EXIRQ */ - // if( bWrite ) mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); + // if( bWrite ) osd_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); space.device().execute().set_input_line(pC148Reg[NAMCOS2_C148_EXIRQ], CLEAR_LINE); break; case 0x1da000: /* NAMCOS2_C148_POSIRQ */ - // if( bWrite ) mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); + // if( bWrite ) osd_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); space.device().execute().set_input_line(pC148Reg[NAMCOS2_C148_POSIRQ], CLEAR_LINE); break; case 0x1dc000: /* NAMCOS2_C148_SERIRQ */ - // if( bWrite ) mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); + // if( bWrite ) osd_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); space.device().execute().set_input_line(pC148Reg[NAMCOS2_C148_SERIRQ], CLEAR_LINE); break; diff --git a/src/mame/machine/segaic16.c b/src/mame/machine/segaic16.c index 2fdea7422e5..1d780e50e7d 100644 --- a/src/mame/machine/segaic16.c +++ b/src/mame/machine/segaic16.c @@ -230,7 +230,7 @@ WRITE8_MEMBER( sega_315_5195_mapper_device::write ) // wraps every 32 bytes offset &= 0x1f; -if (LOG_MEMORY_MAP) mame_printf_debug("(Write %02X = %02X)\n", offset, data); +if (LOG_MEMORY_MAP) osd_printf_debug("(Write %02X = %02X)\n", offset, data); // remember the previous value and swap in the new one UINT8 oldval = m_regs[offset]; @@ -361,9 +361,9 @@ void sega_315_5195_mapper_device::map_as_rom(UINT32 offset, UINT32 length, offs_ compute_region(info, m_curregion, length, mirror, offset); if (LOG_MEMORY_MAP) { - mame_printf_debug("Map %06X-%06X (%06X) as ROM+%06X(%s)", info.start, info.end, info.mirror, rgnoffset, bank_name); - if (!whandler.isnull()) mame_printf_debug(" with handler=%s", whandler.name()); - mame_printf_debug("\n"); + osd_printf_debug("Map %06X-%06X (%06X) as ROM+%06X(%s)", info.start, info.end, info.mirror, rgnoffset, bank_name); + if (!whandler.isnull()) osd_printf_debug(" with handler=%s", whandler.name()); + osd_printf_debug("\n"); } // don't map if the start is past the end of the ROM region @@ -411,9 +411,9 @@ void sega_315_5195_mapper_device::map_as_ram(UINT32 offset, UINT32 length, offs_ compute_region(info, m_curregion, length, mirror, offset); if (LOG_MEMORY_MAP) { - mame_printf_debug("Map %06X-%06X (%06X) as RAM(%s)", info.start, info.end, info.mirror, bank_share_name); - if (!whandler.isnull()) mame_printf_debug(" with handler=%s", whandler.name()); - mame_printf_debug("\n"); + osd_printf_debug("Map %06X-%06X (%06X) as RAM(%s)", info.start, info.end, info.mirror, bank_share_name); + if (!whandler.isnull()) osd_printf_debug(" with handler=%s", whandler.name()); + osd_printf_debug("\n"); } // map now @@ -446,10 +446,10 @@ void sega_315_5195_mapper_device::map_as_handler(UINT32 offset, UINT32 length, o compute_region(info, m_curregion, length, mirror, offset); if (LOG_MEMORY_MAP) { - mame_printf_debug("Map %06X-%06X (%06X) as handler", info.start, info.end, info.mirror); - if (!rhandler.isnull()) mame_printf_debug(" read=%s", rhandler.name()); - if (!whandler.isnull()) mame_printf_debug(" write=%s", whandler.name()); - mame_printf_debug("\n"); + osd_printf_debug("Map %06X-%06X (%06X) as handler", info.start, info.end, info.mirror); + if (!rhandler.isnull()) osd_printf_debug(" read=%s", rhandler.name()); + if (!whandler.isnull()) osd_printf_debug(" write=%s", whandler.name()); + osd_printf_debug("\n"); } // install read/write handlers @@ -571,7 +571,7 @@ void sega_315_5195_mapper_device::compute_region(region_info &info, UINT8 index, void sega_315_5195_mapper_device::update_mapping() { - if (LOG_MEMORY_MAP) mame_printf_debug("----\nRemapping:\n"); + if (LOG_MEMORY_MAP) osd_printf_debug("----\nRemapping:\n"); // first reset everything back to the beginning m_space->install_readwrite_handler(0x000000, 0xffffff, read8_delegate(FUNC(sega_315_5195_mapper_device::read), this), write8_delegate(FUNC(sega_315_5195_mapper_device::write), this), 0x00ff); diff --git a/src/mame/machine/slikshot.c b/src/mame/machine/slikshot.c index 1afafc48995..53e8d4390be 100644 --- a/src/mame/machine/slikshot.c +++ b/src/mame/machine/slikshot.c @@ -623,22 +623,22 @@ int main(int argc, char *argv[]) sscanf(argv[2], "%x", &sens1); sscanf(argv[3], "%x", &sens2); sscanf(argv[4], "%x", &sens3); - mame_printf_debug("sensors: %04x %04x %04x %04x\n", sens0, sens1, sens2, sens3); + osd_printf_debug("sensors: %04x %04x %04x %04x\n", sens0, sens1, sens2, sens3); if (sens0 && sens1) { - mame_printf_debug("error: sensor 0 or 1 must be 0\n"); + osd_printf_debug("error: sensor 0 or 1 must be 0\n"); return 1; } sensors_to_words(sens0, sens1, sens2, sens3, &word1, &word2, &word3, &beams); - mame_printf_debug("word1 = %04x word2 = %04x word3 = %04x beams = %d\n", + osd_printf_debug("word1 = %04x word2 = %04x word3 = %04x beams = %d\n", (UINT32)word1, (UINT32)word2, (UINT32)word3, (UINT32)beams); words_to_inters(word1, word2, word3, beams, &inter1, &inter2, &inter3); - mame_printf_debug("inter1 = %04x inter2 = %04x inter3 = %04x\n", (UINT32)inter1, (UINT32)inter2, (UINT32)inter3); + osd_printf_debug("inter1 = %04x inter2 = %04x inter3 = %04x\n", (UINT32)inter1, (UINT32)inter2, (UINT32)inter3); inters_to_vels(inter1, inter2, inter3, beams, &x, &vx, &vy); - mame_printf_debug("x = %02x vx = %02x vy = %02x\n", (UINT32)x, (UINT32)vx, (UINT32)vy); + osd_printf_debug("x = %02x vx = %02x vy = %02x\n", (UINT32)x, (UINT32)vx, (UINT32)vy); } else if (argc == 4) { @@ -651,17 +651,17 @@ int main(int argc, char *argv[]) x = xin; vx = vxin; vy = vyin; - mame_printf_debug("x = %02x vx = %02x vy = %02x\n", (UINT32)x, (UINT32)vx, (UINT32)vy); + osd_printf_debug("x = %02x vx = %02x vy = %02x\n", (UINT32)x, (UINT32)vx, (UINT32)vy); vels_to_inters(x, vx, vy, &inter1, &inter2, &inter3, &beams); - mame_printf_debug("inter1 = %04x inter2 = %04x inter3 = %04x beams = %d\n", (UINT32)inter1, (UINT32)inter2, (UINT32)inter3, (UINT32)beams); + osd_printf_debug("inter1 = %04x inter2 = %04x inter3 = %04x beams = %d\n", (UINT32)inter1, (UINT32)inter2, (UINT32)inter3, (UINT32)beams); inters_to_words(inter1, inter2, inter3, &beams, &word1, &word2, &word3); - mame_printf_debug("word1 = %04x word2 = %04x word3 = %04x beams = %d\n", + osd_printf_debug("word1 = %04x word2 = %04x word3 = %04x beams = %d\n", (UINT32)word1, (UINT32)word2, (UINT32)word3, (UINT32)beams); words_to_sensors(word1, word2, word3, beams, &sens0, &sens1, &sens2, &sens3); - mame_printf_debug("sensors: %04x %04x %04x %04x\n", sens0, sens1, sens2, sens3); + osd_printf_debug("sensors: %04x %04x %04x %04x\n", sens0, sens1, sens2, sens3); } return 0; diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c index 02fc958fd63..b80e97c0a27 100644 --- a/src/mame/machine/snes.c +++ b/src/mame/machine/snes.c @@ -458,7 +458,7 @@ READ8_MEMBER( snes_state::snes_r_io ) // case 0x4101: //PC: a104 - a10e - a12a //only nss_actr (DSW actually reads in word units ...) default: -// mame_printf_debug("snes_r: offset = %x pc = %x\n",offset,space.device().safe_pc()); +// osd_printf_debug("snes_r: offset = %x pc = %x\n",offset,space.device().safe_pc()); // Added break; after commenting above line. If uncommenting, drop the break; break; } @@ -1388,7 +1388,7 @@ void snes_state::hdma( address_space &space ) break; default: #ifdef MAME_DEBUG - mame_printf_debug( " HDMA of unsupported type: %d\n", m_dma_channel[i].dmap & 0x07); + osd_printf_debug( " HDMA of unsupported type: %d\n", m_dma_channel[i].dmap & 0x07); #endif break; } @@ -1456,7 +1456,7 @@ void snes_state::dma( address_space &space, UINT8 channels ) // printf( "DMA-Ch %d: len: %X, abus: %X, bbus: %X, incr: %d, dir: %s, type: %d\n", i, length, abus | abus_bank, bbus, increment, m_dma_channel[i].dmap & 0x80 ? "PPU->CPU" : "CPU->PPU", m_dma_channel[i].dmap & 0x07); #ifdef SNES_DBG_DMA - mame_printf_debug( "DMA-Ch %d: len: %X, abus: %X, bbus: %X, incr: %d, dir: %s, type: %d\n", i, length, abus | abus_bank, bbus, increment, m_dma_channel[i].dmap & 0x80 ? "PPU->CPU" : "CPU->PPU", m_dma_channel[i].dmap & 0x07); + osd_printf_debug( "DMA-Ch %d: len: %X, abus: %X, bbus: %X, incr: %d, dir: %s, type: %d\n", i, length, abus | abus_bank, bbus, increment, m_dma_channel[i].dmap & 0x80 ? "PPU->CPU" : "CPU->PPU", m_dma_channel[i].dmap & 0x07); #endif switch (m_dma_channel[i].dmap & 0x07) @@ -1523,7 +1523,7 @@ void snes_state::dma( address_space &space, UINT8 channels ) break; default: #ifdef MAME_DEBUG - mame_printf_debug(" DMA of unsupported type: %d\n", m_dma_channel[i].dmap & 0x07); + osd_printf_debug(" DMA of unsupported type: %d\n", m_dma_channel[i].dmap & 0x07); #endif break; } diff --git a/src/mame/machine/starwars.c b/src/mame/machine/starwars.c index 5d089ce146a..12b654dc55a 100644 --- a/src/mame/machine/starwars.c +++ b/src/mame/machine/starwars.c @@ -224,8 +224,8 @@ void starwars_state::run_mproc() IP6_0 = m_PROM_MAS[m_MPA]; #if (MATHDEBUG) - mame_printf_debug("\n(MPA:%x), Strobe: %x, IP7: %d, IP6_0:%x\n",m_MPA, IP15_8, IP7, IP6_0); - mame_printf_debug("(BIC: %x), A: %x, B: %x, C: %x, ACC: %x\n",m_BIC,m_A,m_B,m_C,m_ACC); + osd_printf_debug("\n(MPA:%x), Strobe: %x, IP7: %d, IP6_0:%x\n",m_MPA, IP15_8, IP7, IP6_0); + osd_printf_debug("(BIC: %x), A: %x, B: %x, C: %x, ACC: %x\n",m_BIC,m_A,m_B,m_C,m_ACC); #endif /* construct the current RAM address */ diff --git a/src/mame/machine/tx1.c b/src/mame/machine/tx1.c index f5b39503be9..b8551618a28 100644 --- a/src/mame/machine/tx1.c +++ b/src/mame/machine/tx1.c @@ -118,7 +118,7 @@ static void sn_multiply(running_machine &machine) } default: { - mame_printf_debug("sn74s516 ??? multiply: %x\n", SN74S516.code); + osd_printf_debug("sn74s516 ??? multiply: %x\n", SN74S516.code); } } @@ -135,7 +135,7 @@ static void sn_divide(running_machine &machine) if (SN74S516.X == 0) { - mame_printf_debug("%s:SN74S516 tried to divide by zero\n", machine.describe_context()); + osd_printf_debug("%s:SN74S516 tried to divide by zero\n", machine.describe_context()); SN74S516.ZW.Z = (INT16)0xffff; SN74S516.ZW.W = 0xffff; SN74S516.ZWfl = 0; @@ -164,7 +164,7 @@ static void sn_divide(running_machine &machine) } default: { - mame_printf_debug("SN74S516 unhandled divide type: %x\n", SN74S516.code); + osd_printf_debug("SN74S516 unhandled divide type: %x\n", SN74S516.code); } } @@ -282,7 +282,7 @@ static void kick_sn74s516(running_machine &machine, UINT16 *data, const int ins) if (SN74S516.code == 0x6666) { CLEAR_SEQUENCE; - mame_printf_debug("%s:Code 6666: PROMADDR:%x\n", machine.describe_context(), math.promaddr); + osd_printf_debug("%s:Code 6666: PROMADDR:%x\n", machine.describe_context(), math.promaddr); } UPDATE_SEQUENCE; @@ -364,7 +364,7 @@ static void kick_sn74s516(running_machine &machine, UINT16 *data, const int ins) } default: { - mame_printf_debug("Unknown SN74S516 state. %x\n", SN74S516.code); + osd_printf_debug("Unknown SN74S516 state. %x\n", SN74S516.code); } } @@ -677,7 +677,7 @@ READ16_MEMBER(tx1_state::tx1_math_r) else if (math.mux == TX1_SEL_PSSEN) { // WRONG!!!! - mame_printf_debug("Math Read with PSSEN!\n"); + osd_printf_debug("Math Read with PSSEN!\n"); math.ppshift = math.retval; } @@ -929,7 +929,7 @@ READ16_MEMBER(tx1_state::tx1_spcs_ram_r) /* Should never occur */ WRITE16_MEMBER(tx1_state::tx1_spcs_ram_w) { - mame_printf_debug("Write to /SPCS RAM?"); + osd_printf_debug("Write to /SPCS RAM?"); COMBINE_DATA(&m_math_ram[offset]); } @@ -1004,7 +1004,7 @@ static void buggyboy_update_state(running_machine &machine) else if (math.mux == BB_MUX_PPSEN) { // TODO: Needed? - //mame_printf_debug("/PPSEN with INS: %x\n", math.promaddr); + //osd_printf_debug("/PPSEN with INS: %x\n", math.promaddr); //math.ppshift = lastval;//math.cpulatch; } @@ -1238,13 +1238,13 @@ WRITE16_MEMBER(tx1_state::buggyboy_math_w) } else { - mame_printf_debug("BB_DSEL was not 3 for P->S load!\n"); + osd_printf_debug("BB_DSEL was not 3 for P->S load!\n"); debugger_break(machine()); } } else { - mame_printf_debug("Buggy Boy unknown math state!\n"); + osd_printf_debug("Buggy Boy unknown math state!\n"); debugger_break(machine()); } diff --git a/src/mame/mame.c b/src/mame/mame.c index 3874afb3847..bff5a89726f 100644 --- a/src/mame/mame.c +++ b/src/mame/mame.c @@ -51,4 +51,4 @@ 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); } diff --git a/src/mame/video/bishi.c b/src/mame/video/bishi.c index 0a41b82d781..0ebf68de722 100644 --- a/src/mame/video/bishi.c +++ b/src/mame/video/bishi.c @@ -18,7 +18,7 @@ void bishi_tile_callback( running_machine &machine, int layer, int *code, int *c // *code -= '0'; // *color = state->m_layer_colorbase[layer] | (*color>>2 & 0x0f); // K055555GX_decode_vmixcolor(layer, color); -// if (*color) mame_printf_debug("plane %x col %x [55 %x %x]\n", layer, *color, layer_colorbase[layer], K055555_get_palette_index(layer)); +// if (*color) osd_printf_debug("plane %x col %x [55 %x %x]\n", layer, *color, layer_colorbase[layer], K055555_get_palette_index(layer)); *color = state->m_layer_colorbase[layer] + ((*color & 0xf0)); } diff --git a/src/mame/video/grchamp.c b/src/mame/video/grchamp.c index 6a823a94ee5..ba7036bbba5 100644 --- a/src/mame/video/grchamp.c +++ b/src/mame/video/grchamp.c @@ -456,12 +456,12 @@ UINT32 grchamp_state::screen_update_grchamp(screen_device &screen, bitmap_rgb32 { if (objpix & 0x08) { - mame_printf_debug("Collide car/object @ (%d,%d)\n", x, y); + osd_printf_debug("Collide car/object @ (%d,%d)\n", x, y); m_collide = 0x1000 | 0x2000/* guess */ | ((~y & 0x80) << 3) | ((~y & 0xf8) << 2) | ((~x & 0xf8) >> 3); } else if ((mvid & 0x0f) != 0) { - mame_printf_debug("Collide car/bg @ (%d,%d)\n", x, y); + osd_printf_debug("Collide car/bg @ (%d,%d)\n", x, y); m_collide = 0x1000 | 0x4000/* guess */ | ((~y & 0x80) << 3) | ((~y & 0xf8) << 2) | ((~x & 0xf8) >> 3); } } @@ -489,7 +489,7 @@ UINT32 grchamp_state::screen_update_grchamp(screen_device &screen, bitmap_rgb32 /* handle collision detection between MVID and OBJECT */ if (!(m_collide & 0x1000) && (objpix & 0x08) && (mvid & 0x0f) != 0) { -mame_printf_debug("Collide bg/object @ (%d,%d)\n", x, y); +osd_printf_debug("Collide bg/object @ (%d,%d)\n", x, y); m_collide = 0x1000 | 0x8000 | ((~y & 0x80) << 3) | ((~y & 0xf8) << 2) | ((~x & 0xf8) >> 3); } diff --git a/src/mame/video/gstriker.c b/src/mame/video/gstriker.c index 6771e6f1f41..a46422f0e65 100644 --- a/src/mame/video/gstriker.c +++ b/src/mame/video/gstriker.c @@ -166,11 +166,11 @@ void gstriker_state::MB60553_reg_written(int numchip, int num_reg) break; case 2: - mame_printf_debug("MB60553_reg chip %d, reg 2 %04x\n",numchip, cur->regs[2]); + osd_printf_debug("MB60553_reg chip %d, reg 2 %04x\n",numchip, cur->regs[2]); break; case 3: - mame_printf_debug("MB60553_reg chip %d, reg 3 %04x\n",numchip, cur->regs[3]); + osd_printf_debug("MB60553_reg chip %d, reg 3 %04x\n",numchip, cur->regs[3]); break; case 4: diff --git a/src/mame/video/gticlub.c b/src/mame/video/gticlub.c index fa35b42be6c..4df37d5e1a6 100644 --- a/src/mame/video/gticlub.c +++ b/src/mame/video/gticlub.c @@ -142,13 +142,13 @@ static void K001006_w(int chip, int offset, UINT32 data, UINT32 mem_mask) } case 0xf: // Unknown RAM write { - // mame_printf_debug("Unknown RAM %08X = %04X\n", K001006_addr[chip], data & 0xffff); + // osd_printf_debug("Unknown RAM %08X = %04X\n", K001006_addr[chip], data & 0xffff); K001006_unknown_ram[chip][K001006_addr[chip]++] = data & 0xffff; break; } default: { - //mame_printf_debug("K001006_w: chip %d, device %02X, write %04X to %08X\n", chip, K001006_device_sel[chip], data & 0xffff, K001006_addr[0]++); + //osd_printf_debug("K001006_w: chip %d, device %02X, write %04X to %08X\n", chip, K001006_device_sel[chip], data & 0xffff, K001006_addr[0]++); } } } @@ -339,14 +339,14 @@ READ32_HANDLER( K001005_r ) case 0x000: // FIFO read, high 16 bits { UINT16 value = K001005_fifo[K001005_fifo_read_ptr] >> 16; - // mame_printf_debug("FIFO_r0: %08X\n", K001005_fifo_ptr); + // osd_printf_debug("FIFO_r0: %08X\n", K001005_fifo_ptr); return value; } case 0x001: // FIFO read, low 16 bits { UINT16 value = K001005_fifo[K001005_fifo_read_ptr] & 0xffff; - // mame_printf_debug("FIFO_r1: %08X\n", K001005_fifo_ptr); + // osd_printf_debug("FIFO_r1: %08X\n", K001005_fifo_ptr); if (K001005_status != 1 && K001005_status != 2) { @@ -389,7 +389,7 @@ READ32_HANDLER( K001005_r ) } default: - mame_printf_debug("K001005_r: %08X, %08X at %08X\n", offset, mem_mask, space.device().safe_pc()); + osd_printf_debug("K001005_r: %08X, %08X at %08X\n", offset, mem_mask, space.device().safe_pc()); break; } return 0; @@ -420,7 +420,7 @@ WRITE32_HANDLER( K001005_w ) space.machine().device("dsp")->set_flag_input(1, ASSERT_LINE); } - // mame_printf_debug("K001005 FIFO write: %08X at %08X\n", data, space.device().safe_pc()); + // osd_printf_debug("K001005 FIFO write: %08X at %08X\n", data, space.device().safe_pc()); K001005_fifo[K001005_fifo_write_ptr] = data; K001005_fifo_write_ptr++; K001005_fifo_write_ptr &= 0x7ff; @@ -548,7 +548,7 @@ WRITE32_HANDLER( K001005_w ) break; default: - //mame_printf_debug("K001005_w: %08X, %08X, %08X at %08X\n", data, offset, mem_mask, space.device().safe_pc()); + //osd_printf_debug("K001005_w: %08X, %08X, %08X at %08X\n", data, offset, mem_mask, space.device().safe_pc()); break; } @@ -1532,12 +1532,12 @@ static void render_polygons(running_machine &machine) else if ((cmd & 0xffff0000) == 0x80000000) { /* - mame_printf_debug("Unknown polygon type %08X:\n", fifo[index-1]); + osd_printf_debug("Unknown polygon type %08X:\n", fifo[index-1]); for (int i=0; i < 0x20; i++) { - mame_printf_debug(" %02X: %08X\n", i, fifo[index+i]); + osd_printf_debug(" %02X: %08X\n", i, fifo[index+i]); } - mame_printf_debug("\n"); + osd_printf_debug("\n"); */ printf("Unknown polygon type %08X:\n", fifo[index-1]); diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c index 5a419e39975..d402a1382c5 100644 --- a/src/mame/video/hng64.c +++ b/src/mame/video/hng64.c @@ -118,8 +118,8 @@ static void draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, const rect #if 0 for (int iii = 0; iii < 0x0f; iii++) - mame_printf_debug("%.8x ", state->m_videoregs[iii]); - mame_printf_debug("\n"); + osd_printf_debug("%.8x ", state->m_videoregs[iii]); + osd_printf_debug("\n"); #endif while( source=0x40000)) mame_printf_debug("offsw %08x %08x\n",realoff,data); +// if ((realoff>=0x40000)) osd_printf_debug("offsw %08x %08x\n",realoff,data); /* 400000 - 7fffff is scroll regs etc. */ } @@ -2852,8 +2852,8 @@ static void DrawWireframe(running_machine &machine, struct polygon *p) int j; for (j = 0; j < p->n; j++) { - // mame_printf_debug("now drawing : %f %f %f, %f %f %f\n", p->vert[j].clipCoords[0], p->vert[j].clipCoords[1], p->vert[j].clipCoords[2], p->vert[(j+1)%p->n].clipCoords[0], p->vert[(j+1)%p->n].clipCoords[1], p->vert[(j+1)%p->n].clipCoords[2]); - // mame_printf_debug("%f %f %f %f\n", p->vert[j].clipCoords[0], p->vert[j].clipCoords[1], p->vert[(j+1)%p->n].clipCoords[0], p->vert[(j+1)%p->n].clipCoords[1]); + // osd_printf_debug("now drawing : %f %f %f, %f %f %f\n", p->vert[j].clipCoords[0], p->vert[j].clipCoords[1], p->vert[j].clipCoords[2], p->vert[(j+1)%p->n].clipCoords[0], p->vert[(j+1)%p->n].clipCoords[1], p->vert[(j+1)%p->n].clipCoords[2]); + // osd_printf_debug("%f %f %f %f\n", p->vert[j].clipCoords[0], p->vert[j].clipCoords[1], p->vert[(j+1)%p->n].clipCoords[0], p->vert[(j+1)%p->n].clipCoords[1]); UINT32 color = rgb_t((UINT8)255, (UINT8)255, (UINT8)0, (UINT8)0); drawline2d(machine, p->vert[j].clipCoords[0], p->vert[j].clipCoords[1], p->vert[(j+1)%p->n].clipCoords[0], p->vert[(j+1)%p->n].clipCoords[1], color); } diff --git a/src/mame/video/jagobj.inc b/src/mame/video/jagobj.inc index b9da4927a61..d50702a3290 100644 --- a/src/mame/video/jagobj.inc +++ b/src/mame/video/jagobj.inc @@ -804,7 +804,7 @@ UINT32 *jaguar_state::process_scaled_bitmap(UINT16 *scanline, UINT32 *objdata, i logerror("Unhandled pitch = %d\n", pitch); if (flags & 2) { - mame_printf_debug("Unhandled blend mode in scaled bitmap case\n"); + osd_printf_debug("Unhandled blend mode in scaled bitmap case\n"); logerror("Unhandled blend mode in scaled bitmap case\n"); } diff --git a/src/mame/video/jaguar.c b/src/mame/video/jaguar.c index be5fd7f8023..216b3743d04 100644 --- a/src/mame/video/jaguar.c +++ b/src/mame/video/jaguar.c @@ -513,12 +513,12 @@ blitter_stats[i][3]++; blitter_pixels[i] += (m_blitter_regs[B_COUNT] & 0xffff) * (m_blitter_regs[B_COUNT] >> 16); if (++reps % 100 == 99) { - mame_printf_debug("---\nBlitter stats:\n"); + osd_printf_debug("---\nBlitter stats:\n"); for (i = 0; i < blitter_count; i++) - mame_printf_debug(" CMD=%08X A1=%08X A2=%08X %6d times, %08X%08X pixels\n", + osd_printf_debug(" CMD=%08X A1=%08X A2=%08X %6d times, %08X%08X pixels\n", blitter_stats[i][0], blitter_stats[i][1], blitter_stats[i][2], blitter_stats[i][3], (UINT32)(blitter_pixels[i] >> 32), (UINT32)(blitter_pixels[i])); - mame_printf_debug("---\n"); + osd_printf_debug("---\n"); } } diff --git a/src/mame/video/k001005.c b/src/mame/video/k001005.c index 95f3a20cea2..7aae294b32a 100644 --- a/src/mame/video/k001005.c +++ b/src/mame/video/k001005.c @@ -258,14 +258,14 @@ READ32_MEMBER( k001005_device::read ) case 0x000: // FIFO read, high 16 bits { UINT16 value = m_fifo[m_fifo_read_ptr] >> 16; - // mame_printf_debug("FIFO_r0: %08X\n", m_fifo_ptr); + // osd_printf_debug("FIFO_r0: %08X\n", m_fifo_ptr); return value; } case 0x001: // FIFO read, low 16 bits { UINT16 value = m_fifo[m_fifo_read_ptr] & 0xffff; - // mame_printf_debug("FIFO_r1: %08X\n", m_fifo_ptr); + // osd_printf_debug("FIFO_r1: %08X\n", m_fifo_ptr); if (m_status != 1 && m_status != 2) { @@ -308,7 +308,7 @@ READ32_MEMBER( k001005_device::read ) } default: - //mame_printf_debug("m_r: %08X, %08X at %08X\n", offset, mem_mask, space.device().safe_pc()); + //osd_printf_debug("m_r: %08X, %08X at %08X\n", offset, mem_mask, space.device().safe_pc()); break; } return 0; @@ -339,7 +339,7 @@ WRITE32_MEMBER( k001005_device::write ) m_dsp->set_flag_input(1, ASSERT_LINE); } - // mame_printf_debug("K001005 FIFO write: %08X at %08X\n", data, space.device().safe_pc()); + // osd_printf_debug("K001005 FIFO write: %08X at %08X\n", data, space.device().safe_pc()); m_fifo[m_fifo_write_ptr] = data; m_fifo_write_ptr++; m_fifo_write_ptr &= 0x7ff; @@ -403,7 +403,7 @@ WRITE32_MEMBER( k001005_device::write ) break; default: - //mame_printf_debug("m_w: %08X, %08X, %08X at %08X\n", data, offset, mem_mask, space.device().safe_pc()); + //osd_printf_debug("m_w: %08X, %08X, %08X at %08X\n", data, offset, mem_mask, space.device().safe_pc()); break; } @@ -511,7 +511,7 @@ void k001005_device::render_polygons( ) const rectangle &visarea = visible_area(); #endif -// mame_printf_debug("m_fifo_ptr = %08X\n", m_3d_fifo_ptr); +// osd_printf_debug("m_fifo_ptr = %08X\n", m_3d_fifo_ptr); for (i = 0; i < m_3d_fifo_ptr; i++) { @@ -900,12 +900,12 @@ void k001005_device::render_polygons( ) else if ((m_3d_fifo[i] & 0xffffff00) == 0x80000000) { /* - mame_printf_debug("Unknown polygon type %08X:\n", m_3d_fifo[i]); + osd_printf_debug("Unknown polygon type %08X:\n", m_3d_fifo[i]); for (j = 0; j < 0x20; j++) { - mame_printf_debug(" %02X: %08X\n", j, m_3d_fifo[i + 1 + j]); + osd_printf_debug(" %02X: %08X\n", j, m_3d_fifo[i + 1 + j]); } - mame_printf_debug("\n"); + osd_printf_debug("\n"); */ } } diff --git a/src/mame/video/k001006.c b/src/mame/video/k001006.c index 4c1b52218a0..a3eb07a8d46 100644 --- a/src/mame/video/k001006.c +++ b/src/mame/video/k001006.c @@ -139,13 +139,13 @@ WRITE32_MEMBER( k001006_device::write ) } case 0xf: // Unknown RAM write { - // mame_printf_debug("Unknown RAM %08X = %04X\n", m_addr, data & 0xffff); + // osd_printf_debug("Unknown RAM %08X = %04X\n", m_addr, data & 0xffff); m_unknown_ram[m_addr++] = data & 0xffff; break; } default: { - mame_printf_debug("k001006_w: device %02X, write %04X to %08X\n", m_device_sel, data & 0xffff, m_addr++); + osd_printf_debug("k001006_w: device %02X, write %04X to %08X\n", m_device_sel, data & 0xffff, m_addr++); } } } diff --git a/src/mame/video/lockon.c b/src/mame/video/lockon.c index 4feb180527c..270ba35cedd 100644 --- a/src/mame/video/lockon.c +++ b/src/mame/video/lockon.c @@ -35,29 +35,29 @@ WRITE16_MEMBER(lockon_state::lockon_crtc_w) { switch (data) { - case 0x00: mame_printf_debug("Horizontal Total "); break; - case 0x01: mame_printf_debug("Horizontal displayed "); break; - case 0x02: mame_printf_debug("Horizontal sync position "); break; - case 0x03: mame_printf_debug("Horizontal sync width "); break; - case 0x04: mame_printf_debug("Vertical total "); break; - case 0x05: mame_printf_debug("Vertical total adjust "); break; - case 0x06: mame_printf_debug("Vertical displayed "); break; - case 0x07: mame_printf_debug("Vertical sync position "); break; - case 0x08: mame_printf_debug("Interlace mode "); break; - case 0x09: mame_printf_debug("Max. scan line address "); break; - case 0x0a: mame_printf_debug("Cursror start "); break; - case 0x0b: mame_printf_debug("Cursor end "); break; - case 0x0c: mame_printf_debug("Start address (h) "); break; - case 0x0d: mame_printf_debug("Start address (l) "); break; - case 0x0e: mame_printf_debug("Cursor (h) "); break; - case 0x0f: mame_printf_debug("Cursor (l) "); break; - case 0x10: mame_printf_debug("Light pen (h)) "); break; - case 0x11: mame_printf_debug("Light pen (l) "); break; + case 0x00: osd_printf_debug("Horizontal Total "); break; + case 0x01: osd_printf_debug("Horizontal displayed "); break; + case 0x02: osd_printf_debug("Horizontal sync position "); break; + case 0x03: osd_printf_debug("Horizontal sync width "); break; + case 0x04: osd_printf_debug("Vertical total "); break; + case 0x05: osd_printf_debug("Vertical total adjust "); break; + case 0x06: osd_printf_debug("Vertical displayed "); break; + case 0x07: osd_printf_debug("Vertical sync position "); break; + case 0x08: osd_printf_debug("Interlace mode "); break; + case 0x09: osd_printf_debug("Max. scan line address "); break; + case 0x0a: osd_printf_debug("Cursror start "); break; + case 0x0b: osd_printf_debug("Cursor end "); break; + case 0x0c: osd_printf_debug("Start address (h) "); break; + case 0x0d: osd_printf_debug("Start address (l) "); break; + case 0x0e: osd_printf_debug("Cursor (h) "); break; + case 0x0f: osd_printf_debug("Cursor (l) "); break; + case 0x10: osd_printf_debug("Light pen (h)) "); break; + case 0x11: osd_printf_debug("Light pen (l) "); break; } } else if (offset == 1) { - mame_printf_debug("0x%.2x, (%d)\n",data, data); + osd_printf_debug("0x%.2x, (%d)\n",data, data); } #endif } diff --git a/src/mame/video/nmk16.c b/src/mame/video/nmk16.c index cbb69c5c849..4b79ad53cd6 100644 --- a/src/mame/video/nmk16.c +++ b/src/mame/video/nmk16.c @@ -244,7 +244,7 @@ WRITE16_MEMBER(nmk16_state::nmk_txvideoram_w) WRITE16_MEMBER(nmk16_state::mustang_scroll_w) { -// mame_printf_debug("mustang %04x %04x %04x\n",offset,data,mem_mask); +// osd_printf_debug("mustang %04x %04x %04x\n",offset,data,mem_mask); switch (data & 0xff00) { diff --git a/src/mame/video/powervr2.c b/src/mame/video/powervr2.c index 689c04acbbf..8423f7d640f 100644 --- a/src/mame/video/powervr2.c +++ b/src/mame/video/powervr2.c @@ -1778,7 +1778,7 @@ void powervr2_device::process_ta_fifo() if (paratype == 0) { // end of list #if DEBUG_PVRDLIST - mame_printf_verbose("Para Type 0 End of List\n"); + osd_printf_verbose("Para Type 0 End of List\n"); #endif /* Process transfer FIFO done irqs here */ /* FIXME: timing of these */ @@ -1797,32 +1797,32 @@ void powervr2_device::process_ta_fifo() else if (paratype == 1) { // user tile clip #if DEBUG_PVRDLIST - mame_printf_verbose("Para Type 1 User Tile Clip\n"); - mame_printf_verbose(" (%d , %d)-(%d , %d)\n", tafifo_buff[4], tafifo_buff[5], tafifo_buff[6], tafifo_buff[7]); + osd_printf_verbose("Para Type 1 User Tile Clip\n"); + osd_printf_verbose(" (%d , %d)-(%d , %d)\n", tafifo_buff[4], tafifo_buff[5], tafifo_buff[6], tafifo_buff[7]); #endif } else if (paratype == 2) { // object list set #if DEBUG_PVRDLIST - mame_printf_verbose("Para Type 2 Object List Set at %08x\n", tafifo_buff[1]); - mame_printf_verbose(" (%d , %d)-(%d , %d)\n", tafifo_buff[4], tafifo_buff[5], tafifo_buff[6], tafifo_buff[7]); + osd_printf_verbose("Para Type 2 Object List Set at %08x\n", tafifo_buff[1]); + osd_printf_verbose(" (%d , %d)-(%d , %d)\n", tafifo_buff[4], tafifo_buff[5], tafifo_buff[6], tafifo_buff[7]); #endif } else if (paratype == 3) { #if DEBUG_PVRDLIST - mame_printf_verbose("Para Type %x Unknown!\n", tafifo_buff[0]); + osd_printf_verbose("Para Type %x Unknown!\n", tafifo_buff[0]); #endif } else { // global parameter or vertex parameter #if DEBUG_PVRDLIST - mame_printf_verbose("Para Type %d", paratype); + osd_printf_verbose("Para Type %d", paratype); if (paratype == 7) - mame_printf_verbose(" End of Strip %d", endofstrip); + osd_printf_verbose(" End of Strip %d", endofstrip); if (listtype_used & 3) - mame_printf_verbose(" List Type %d", listtype); - mame_printf_verbose("\n"); + osd_printf_verbose(" List Type %d", listtype); + osd_printf_verbose("\n"); #endif // set type of list currently being received @@ -1870,7 +1870,7 @@ void powervr2_device::process_ta_fifo() strideselect=(tafifo_buff[3] >> 25) & 1; paletteselector=(tafifo_buff[3] >> 21) & 0x3F; #if DEBUG_PVRDLIST - mame_printf_verbose(" Texture at %08x format %d\n", (tafifo_buff[3] & 0x1FFFFF) << 3, pixelformat); + osd_printf_verbose(" Texture at %08x format %d\n", (tafifo_buff[3] & 0x1FFFFF) << 3, pixelformat); #endif } if (paratype == 4) @@ -1878,20 +1878,20 @@ void powervr2_device::process_ta_fifo() if ((tafifo_listtype == 1) || (tafifo_listtype == 3)) { #if DEBUG_PVRDLIST - mame_printf_verbose(" Modifier Volume\n"); + osd_printf_verbose(" Modifier Volume\n"); #endif } else { #if DEBUG_PVRDLIST - mame_printf_verbose(" Polygon\n"); + osd_printf_verbose(" Polygon\n"); #endif } } if (paratype == 5) { // quad #if DEBUG_PVRDLIST - mame_printf_verbose(" Sprite\n"); + osd_printf_verbose(" Sprite\n"); #endif } } @@ -1901,21 +1901,21 @@ void powervr2_device::process_ta_fifo() if ((tafifo_listtype == 1) || (tafifo_listtype == 3)) { #if DEBUG_PVRDLIST - mame_printf_verbose(" Vertex modifier volume"); - mame_printf_verbose(" A(%f,%f,%f) B(%f,%f,%f) C(%f,%f,%f)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]), + osd_printf_verbose(" Vertex modifier volume"); + osd_printf_verbose(" A(%f,%f,%f) B(%f,%f,%f) C(%f,%f,%f)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]), u2f(tafifo_buff[3]), u2f(tafifo_buff[4]), u2f(tafifo_buff[5]), u2f(tafifo_buff[6]), u2f(tafifo_buff[7]), u2f(tafifo_buff[8]), u2f(tafifo_buff[9])); - mame_printf_verbose("\n"); + osd_printf_verbose("\n"); #endif } else if (global_paratype == 5) { #if DEBUG_PVRDLIST - mame_printf_verbose(" Vertex sprite"); - mame_printf_verbose(" A(%f,%f,%f) B(%f,%f,%f) C(%f,%f,%f) D(%f,%f,)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]), + osd_printf_verbose(" Vertex sprite"); + osd_printf_verbose(" A(%f,%f,%f) B(%f,%f,%f) C(%f,%f,%f) D(%f,%f,)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]), u2f(tafifo_buff[3]), u2f(tafifo_buff[4]), u2f(tafifo_buff[5]), u2f(tafifo_buff[6]), u2f(tafifo_buff[7]), u2f(tafifo_buff[8]), u2f(tafifo_buff[9]), u2f(tafifo_buff[10]), u2f(tafifo_buff[11])); - mame_printf_verbose("\n"); + osd_printf_verbose("\n"); #endif if (texture == 1) { @@ -1956,9 +1956,9 @@ void powervr2_device::process_ta_fifo() else if (global_paratype == 4) { #if DEBUG_PVRDLIST - mame_printf_verbose(" Vertex polygon"); - mame_printf_verbose(" V(%f,%f,%f) T(%f,%f)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]), u2f(tafifo_buff[3]), u2f(tafifo_buff[4]), u2f(tafifo_buff[5])); - mame_printf_verbose("\n"); + osd_printf_verbose(" Vertex polygon"); + osd_printf_verbose(" V(%f,%f,%f) T(%f,%f)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]), u2f(tafifo_buff[3]), u2f(tafifo_buff[4]), u2f(tafifo_buff[5])); + osd_printf_verbose("\n"); #endif if (rd->verts_size <= 65530) { @@ -2009,7 +2009,7 @@ WRITE64_MEMBER( powervr2_device::ta_fifo_poly_w ) tafifo_buff[tafifo_pos]=(UINT32)data; tafifo_buff[tafifo_pos+1]=(UINT32)(data >> 32); #if DEBUG_FIFO_POLY - mame_printf_debug("ta_fifo_poly_w: Unmapped write64 %08x = %" I64FMT "x -> %08x %08x\n", 0x10000000+offset*8, data, tafifo_buff[tafifo_pos], tafifo_buff[tafifo_pos+1]); + osd_printf_debug("ta_fifo_poly_w: Unmapped write64 %08x = %" I64FMT "x -> %08x %08x\n", 0x10000000+offset*8, data, tafifo_buff[tafifo_pos], tafifo_buff[tafifo_pos+1]); #endif tafifo_pos += 2; } diff --git a/src/mame/video/segaic16.c b/src/mame/video/segaic16.c index e276bf084db..387c2ca8476 100644 --- a/src/mame/video/segaic16.c +++ b/src/mame/video/segaic16.c @@ -680,7 +680,7 @@ void segaic16_tilemap_16a_draw_layer(screen_device &screen, struct tilemap_info /* column AND row scroll */ if (info->colscroll && info->rowscroll) { - if (PRINT_UNUSUAL_MODES) mame_printf_debug("Column AND row scroll\n"); + if (PRINT_UNUSUAL_MODES) osd_printf_debug("Column AND row scroll\n"); /* loop over row chunks */ for (y = cliprect.min_y & ~7; y <= cliprect.max_y; y += 8) @@ -718,7 +718,7 @@ void segaic16_tilemap_16a_draw_layer(screen_device &screen, struct tilemap_info } else if (info->colscroll) { - if (PRINT_UNUSUAL_MODES) mame_printf_debug("Column scroll\n"); + if (PRINT_UNUSUAL_MODES) osd_printf_debug("Column scroll\n"); /* loop over column chunks */ for (x = cliprect.min_x & ~15; x <= cliprect.max_x; x += 16) @@ -746,7 +746,7 @@ void segaic16_tilemap_16a_draw_layer(screen_device &screen, struct tilemap_info } else if (info->rowscroll) { - if (PRINT_UNUSUAL_MODES) mame_printf_debug("Row scroll\n"); + if (PRINT_UNUSUAL_MODES) osd_printf_debug("Row scroll\n"); /* loop over row chunks */ for (y = cliprect.min_y & ~7; y <= cliprect.max_y; y += 8) @@ -917,7 +917,7 @@ void segaic16_tilemap_16b_draw_layer(screen_device &screen, struct tilemap_info /* column scroll? */ if (yscroll & 0x8000) { - if (PRINT_UNUSUAL_MODES) mame_printf_debug("Column AND row scroll\n"); + if (PRINT_UNUSUAL_MODES) osd_printf_debug("Column AND row scroll\n"); /* loop over row chunks */ for (y = cliprect.min_y & ~7; y <= cliprect.max_y; y += 8) @@ -961,7 +961,7 @@ void segaic16_tilemap_16b_draw_layer(screen_device &screen, struct tilemap_info } else { - if (PRINT_UNUSUAL_MODES) mame_printf_debug("Row scroll\n"); + if (PRINT_UNUSUAL_MODES) osd_printf_debug("Row scroll\n"); /* loop over row chunks */ for (y = cliprect.min_y & ~7; y <= cliprect.max_y; y += 8) diff --git a/src/mame/video/segas18.c b/src/mame/video/segas18.c index 07d459c567e..fe08ca27803 100644 --- a/src/mame/video/segas18.c +++ b/src/mame/video/segas18.c @@ -56,7 +56,7 @@ void segas18_state::set_grayscale(bool enable) { m_screen->update_partial(m_screen->vpos()); m_grayscale_enable = enable; -// mame_printf_debug("Grayscale = %02X\n", enable); +// osd_printf_debug("Grayscale = %02X\n", enable); } } @@ -68,7 +68,7 @@ void segas18_state::set_vdp_enable(bool enable) m_screen->update_partial(m_screen->vpos()); m_vdp_enable = enable; #if DEBUG_VDP - mame_printf_debug("VDP enable = %02X\n", enable); + osd_printf_debug("VDP enable = %02X\n", enable); #endif } } @@ -81,7 +81,7 @@ void segas18_state::set_vdp_mixing(UINT8 mixing) m_screen->update_partial(m_screen->vpos()); m_vdp_mixing = mixing; #if DEBUG_VDP - mame_printf_debug("VDP mixing = %02X\n", mixing); + osd_printf_debug("VDP mixing = %02X\n", mixing); #endif } } diff --git a/src/mame/video/segas32.c b/src/mame/video/segas32.c index 5d55db60794..30582759f38 100644 --- a/src/mame/video/segas32.c +++ b/src/mame/video/segas32.c @@ -2095,10 +2095,10 @@ void segas32_state::mix_all_layers(int which, int xoffs, bitmap_rgb32 &bitmap, c static const char *const layname[] = { "TEXT", "NBG0", "NBG1", "NBG2", "NBG3", "BITM", "SPRI", "LINE" }; for (groupnum = 0; groupnum <= sprgroup_mask; groupnum++) { - mame_printf_debug("%X: ", groupnum); + osd_printf_debug("%X: ", groupnum); for (i = 0; i <= numlayers; i++) - mame_printf_debug("%s(%02X) ", layname[layerorder[groupnum][i].index], layerorder[groupnum][i].effpri); - mame_printf_debug("\n"); + osd_printf_debug("%s(%02X) ", layname[layerorder[groupnum][i].index], layerorder[groupnum][i].effpri); + osd_printf_debug("\n"); } }*/ @@ -2298,9 +2298,9 @@ void segas32_state::print_mixer_data(int which) { if (++m_print_count > 60 * 5) { - mame_printf_debug("\n"); - mame_printf_debug("OP: %04X\n", m_system32_videoram[0x1ff8e/2]); - mame_printf_debug("SC: %04X %04X %04X %04X - %04X %04X %04X %04X\n", + osd_printf_debug("\n"); + osd_printf_debug("OP: %04X\n", m_system32_videoram[0x1ff8e/2]); + osd_printf_debug("SC: %04X %04X %04X %04X - %04X %04X %04X %04X\n", m_sprite_control_latched[0x00], m_sprite_control_latched[0x01], m_sprite_control_latched[0x02], @@ -2309,7 +2309,7 @@ void segas32_state::print_mixer_data(int which) m_sprite_control_latched[0x05], m_sprite_control_latched[0x06], m_sprite_control_latched[0x07]); - mame_printf_debug("00: %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X\n", + osd_printf_debug("00: %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X\n", m_mixer_control[which][0x00], m_mixer_control[which][0x01], m_mixer_control[which][0x02], @@ -2326,7 +2326,7 @@ void segas32_state::print_mixer_data(int which) m_mixer_control[which][0x0d], m_mixer_control[which][0x0e], m_mixer_control[which][0x0f]); - mame_printf_debug("20: %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X\n", + osd_printf_debug("20: %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X\n", m_mixer_control[which][0x10], m_mixer_control[which][0x11], m_mixer_control[which][0x12], @@ -2343,7 +2343,7 @@ void segas32_state::print_mixer_data(int which) m_mixer_control[which][0x1d], m_mixer_control[which][0x1e], m_mixer_control[which][0x1f]); - mame_printf_debug("40: %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X\n", + osd_printf_debug("40: %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X - %04X %04X %04X %04X\n", m_mixer_control[which][0x20], m_mixer_control[which][0x21], m_mixer_control[which][0x22], diff --git a/src/mame/video/taitojc.c b/src/mame/video/taitojc.c index 3120d21e7c4..074287ea1d5 100644 --- a/src/mame/video/taitojc.c +++ b/src/mame/video/taitojc.c @@ -176,7 +176,7 @@ void taitojc_state::draw_object(bitmap_ind16 &bitmap, const rectangle &cliprect, return; } -// mame_printf_debug("draw_object: %08X %08X, X: %d, Y: %d, W: %d, H: %d\n", w1, w2, x, y, width, height); +// osd_printf_debug("draw_object: %08X %08X, X: %d, Y: %d, W: %d, H: %d\n", w1, w2, x, y, width, height); ix = 0; iy = 0; diff --git a/src/mame/video/tmnt.c b/src/mame/video/tmnt.c index 52a2a86e043..2de82f2d007 100644 --- a/src/mame/video/tmnt.c +++ b/src/mame/video/tmnt.c @@ -81,7 +81,7 @@ void ssbl_tile_callback( running_machine &machine, int layer, int bank, int *cod else { *code |= ((*color & 0x03) << 8) | ((*color & 0x10) << 6) | ((*color & 0x0c) << 9) | (bank << 13); -// mame_printf_debug("L%d: bank %d code %x color %x\n", layer, bank, *code, *color); +// osd_printf_debug("L%d: bank %d code %x color %x\n", layer, bank, *code, *color); } *color = state->m_layer_colorbase[layer] + ((*color & 0xe0) >> 5); diff --git a/src/mame/video/tryout.c b/src/mame/video/tryout.c index 65f26e0a572..e222cac6c29 100644 --- a/src/mame/video/tryout.c +++ b/src/mame/video/tryout.c @@ -159,7 +159,7 @@ TILEMAP_MAPPER_MEMBER(tryout_state::get_bg_memory_offset) // else a= (7 - (row & 7)) + ((0x8 - (row & 0x8)) << 4) + ((col & 0xf) << 3) + (( ( (col & 0x10) ) ) << 4) + ((( (col & 0x20))) << 4); -// mame_printf_debug("%d %d -> %d\n",col,row, a); +// osd_printf_debug("%d %d -> %d\n",col,row, a); return a; } diff --git a/src/mame/video/tx1.c b/src/mame/video/tx1.c index c5966f05bf5..16addf6519e 100644 --- a/src/mame/video/tx1.c +++ b/src/mame/video/tx1.c @@ -54,29 +54,29 @@ if (PRINT_CRTC_DATA) { switch (data) { - case 0x00: mame_printf_debug("Horizontal Total "); break; - case 0x01: mame_printf_debug("Horizontal displayed "); break; - case 0x02: mame_printf_debug("Horizontal sync position "); break; - case 0x03: mame_printf_debug("Horizontal sync width "); break; - case 0x04: mame_printf_debug("Vertical total "); break; - case 0x05: mame_printf_debug("Vertical total adjust "); break; - case 0x06: mame_printf_debug("Vertical displayed "); break; - case 0x07: mame_printf_debug("Vertical sync position "); break; - case 0x08: mame_printf_debug("Interlace mode "); break; - case 0x09: mame_printf_debug("Max. scan line address "); break; - case 0x0a: mame_printf_debug("Cursror start "); break; - case 0x0b: mame_printf_debug("Cursor end "); break; - case 0x0c: mame_printf_debug("Start address (h) "); break; - case 0x0d: mame_printf_debug("Start address (l) "); break; - case 0x0e: mame_printf_debug("Cursor (h) "); break; - case 0x0f: mame_printf_debug("Cursor (l) "); break; - case 0x10: mame_printf_debug("Light pen (h)) "); break; - case 0x11: mame_printf_debug("Light pen (l) "); break; + case 0x00: osd_printf_debug("Horizontal Total "); break; + case 0x01: osd_printf_debug("Horizontal displayed "); break; + case 0x02: osd_printf_debug("Horizontal sync position "); break; + case 0x03: osd_printf_debug("Horizontal sync width "); break; + case 0x04: osd_printf_debug("Vertical total "); break; + case 0x05: osd_printf_debug("Vertical total adjust "); break; + case 0x06: osd_printf_debug("Vertical displayed "); break; + case 0x07: osd_printf_debug("Vertical sync position "); break; + case 0x08: osd_printf_debug("Interlace mode "); break; + case 0x09: osd_printf_debug("Max. scan line address "); break; + case 0x0a: osd_printf_debug("Cursror start "); break; + case 0x0b: osd_printf_debug("Cursor end "); break; + case 0x0c: osd_printf_debug("Start address (h) "); break; + case 0x0d: osd_printf_debug("Start address (l) "); break; + case 0x0e: osd_printf_debug("Cursor (h) "); break; + case 0x0f: osd_printf_debug("Cursor (l) "); break; + case 0x10: osd_printf_debug("Light pen (h)) "); break; + case 0x11: osd_printf_debug("Light pen (l) "); break; } } else if (offset == 1) { - mame_printf_debug("0x%.2x, (%d)\n",data, data); + osd_printf_debug("0x%.2x, (%d)\n",data, data); } } } diff --git a/src/mess/drivers/atari400.c b/src/mess/drivers/atari400.c index 9776ae91a00..40a05106326 100644 --- a/src/mess/drivers/atari400.c +++ b/src/mess/drivers/atari400.c @@ -2120,7 +2120,7 @@ int a400_state::a800_get_type(device_image_interface &image) fatalerror("Cart type \"%d\" means this is an Atari 5200 cart.\n", hdr_type); break; default: - mame_printf_info("Cart type \"%d\" is currently unsupported.\n", hdr_type); + osd_printf_info("Cart type \"%d\" is currently unsupported.\n", hdr_type); break; } return cart_type; @@ -2167,7 +2167,7 @@ int a400_state::a800_check_cart_type(device_image_interface &image) case A800_RIGHT_8K: break; default: - mame_printf_info("Cart type \"%s\" currently unsupported.\n", pcb_name); + osd_printf_info("Cart type \"%s\" currently unsupported.\n", pcb_name); break; } } diff --git a/src/mess/drivers/cxhumax.c b/src/mess/drivers/cxhumax.c index f9cc232f9b2..13b34ac4542 100644 --- a/src/mess/drivers/cxhumax.c +++ b/src/mess/drivers/cxhumax.c @@ -163,7 +163,7 @@ READ32_MEMBER( cxhumax_state::cx_scratch_r ) buf[i++]=temp; //m_terminal->write(space, 0, temp); } - mame_printf_debug("%s", buf); + osd_printf_debug("%s", buf); verboselog( machine(), 9, "(DEBUG) %s", buf); } return data; diff --git a/src/mess/drivers/dm7000.c b/src/mess/drivers/dm7000.c index 739a741ed78..8d041696f1b 100644 --- a/src/mess/drivers/dm7000.c +++ b/src/mess/drivers/dm7000.c @@ -272,7 +272,7 @@ UINT32 dm7000_state::screen_update_dm7000(screen_device &screen, bitmap_rgb32 &b READ32_MEMBER( dm7000_state::dcr_r ) { - mame_printf_debug("DCR %03X read\n", offset); + osd_printf_debug("DCR %03X read\n", offset); if(offset>=1024) {printf("get %04X\n", offset); return 0;} else switch(offset) { case DCRSTB045_CMD_STAT: @@ -285,7 +285,7 @@ READ32_MEMBER( dm7000_state::dcr_r ) WRITE32_MEMBER( dm7000_state::dcr_w ) { - mame_printf_debug("DCR %03X write = %08X\n", offset, data); + osd_printf_debug("DCR %03X write = %08X\n", offset, data); if(offset>=1024) {printf("get %04X\n", offset); } else dcr[offset] = data; } diff --git a/src/mess/drivers/ip20.c b/src/mess/drivers/ip20.c index 70391a4320a..d38ba109786 100644 --- a/src/mess/drivers/ip20.c +++ b/src/mess/drivers/ip20.c @@ -270,14 +270,14 @@ WRITE32_MEMBER(ip20_state::hpc_w) { UINT32 next; - mame_printf_info("DMA activated for SCSI0\n"); - mame_printf_info("Descriptor block:\n"); - mame_printf_info("CTL: %08x BUFPTR: %08x DESCPTR %08x\n", + osd_printf_info("DMA activated for SCSI0\n"); + osd_printf_info("Descriptor block:\n"); + osd_printf_info("CTL: %08x BUFPTR: %08x DESCPTR %08x\n", program_read_dword(m_HPC.nSCSI0Descriptor), program_read_dword(m_HPC.nSCSI0Descriptor+4), program_read_dword(m_HPC.nSCSI0Descriptor+8)); next = program_read_dword(m_HPC.nSCSI0Descriptor+8); - mame_printf_info("CTL: %08x BUFPTR: %08x DESCPTR %08x\n", + osd_printf_info("CTL: %08x BUFPTR: %08x DESCPTR %08x\n", program_read_dword(next), program_read_dword(next+4), program_read_dword(next+8)); } @@ -384,7 +384,7 @@ WRITE32_MEMBER(ip20_state::hpc_w) if( ( data & 0x000000ff ) >= 0x00000020 ) { // verboselog(2, "HPC DUART1 Channel B Control Write: %08x (%08x) %c\n", data, mem_mask, data & 0x000000ff ); - //mame_printf_info( "%c", data & 0x000000ff ); + //osd_printf_info( "%c", data & 0x000000ff ); } else { @@ -395,7 +395,7 @@ WRITE32_MEMBER(ip20_state::hpc_w) if( ( data & 0x000000ff ) >= 0x00000020 || ( data & 0x000000ff ) == 0x0d || ( data & 0x000000ff ) == 0x0a ) { verboselog(2, "HPC DUART1 Channel B Data Write: %08x (%08x) %c\n", data, mem_mask, data & 0x000000ff ); - mame_printf_info( "%c", data & 0x000000ff ); + osd_printf_info( "%c", data & 0x000000ff ); } else { @@ -403,37 +403,37 @@ WRITE32_MEMBER(ip20_state::hpc_w) } break; case 0x0d18: - mame_printf_info("HPC DUART1 Channel A Control Write: %08x (%08x)\n", data, mem_mask ); + osd_printf_info("HPC DUART1 Channel A Control Write: %08x (%08x)\n", data, mem_mask ); break; case 0x0d1c: verboselog(2, "HPC DUART1 Channel A Data Write: %08x (%08x)\n", data, mem_mask ); break; case 0x0d20: - mame_printf_info("HPC DUART2 Channel B Control Write: %08x (%08x)\n", data, mem_mask ); + osd_printf_info("HPC DUART2 Channel B Control Write: %08x (%08x)\n", data, mem_mask ); break; case 0x0d24: verboselog(2, "HPC DUART2 Channel B Data Write: %08x (%08x)\n", data, mem_mask ); break; case 0x0d28: - mame_printf_info("HPC DUART2 Channel A Control Write: %08x (%08x)\n", data, mem_mask ); + osd_printf_info("HPC DUART2 Channel A Control Write: %08x (%08x)\n", data, mem_mask ); break; case 0x0d2c: verboselog(2, "HPC DUART2 Channel A Data Write: %08x (%08x)\n", data, mem_mask ); break; case 0x0d30: - mame_printf_info("HPC DUART3 Channel B Control Write: %08x (%08x)\n", data, mem_mask ); + osd_printf_info("HPC DUART3 Channel B Control Write: %08x (%08x)\n", data, mem_mask ); break; case 0x0d34: verboselog(2, "HPC DUART3 Channel B Data Write: %08x (%08x)\n", data, mem_mask ); break; case 0x0d38: - mame_printf_info("HPC DUART3 Channel A Control Write: %08x (%08x)\n", data, mem_mask ); + osd_printf_info("HPC DUART3 Channel A Control Write: %08x (%08x)\n", data, mem_mask ); break; case 0x0d3c: verboselog(2, "HPC DUART3 Channel A Data Write: %08x (%08x)\n", data, mem_mask ); break; default: - mame_printf_info("Unmapped HPC write: 0x%08x (%08x): %08x\n", 0x1fb80000 + offset, mem_mask, data); + osd_printf_info("Unmapped HPC write: 0x%08x (%08x): %08x\n", 0x1fb80000 + offset, mem_mask, data); break; } } @@ -441,13 +441,13 @@ WRITE32_MEMBER(ip20_state::hpc_w) // INT/INT2/INT3 interrupt controllers READ32_MEMBER(ip20_state::int_r) { - mame_printf_info("INT: read @ ofs %x (mask %x) (PC=%x)\n", offset, mem_mask, space.device().safe_pc()); + osd_printf_info("INT: read @ ofs %x (mask %x) (PC=%x)\n", offset, mem_mask, space.device().safe_pc()); return 0; } WRITE32_MEMBER(ip20_state::int_w) { - mame_printf_info("INT: write %x to ofs %x (mask %x) (PC=%x)\n", data, offset, mem_mask, space.device().safe_pc()); + osd_printf_info("INT: write %x to ofs %x (mask %x) (PC=%x)\n", data, offset, mem_mask, space.device().safe_pc()); } static ADDRESS_MAP_START( ip204415_map, AS_PROGRAM, 32, ip20_state ) diff --git a/src/mess/drivers/ip22.c b/src/mess/drivers/ip22.c index dcac26c9199..870dd3fecf4 100644 --- a/src/mess/drivers/ip22.c +++ b/src/mess/drivers/ip22.c @@ -294,7 +294,7 @@ READ32_MEMBER(ip22_state::hpc3_pbus6_r) case 0xa4/4: case 0xa8/4: case 0xac/4: -// mame_printf_info("INT3: r @ %x mask %08x (PC=%x)\n", offset*4, mem_mask, activecpu_get_pc()); +// osd_printf_info("INT3: r @ %x mask %08x (PC=%x)\n", offset*4, mem_mask, activecpu_get_pc()); return m_int3_regs[offset-0x80/4]; case 0xb0/4: ret8 = m_pit->read(space, 0); @@ -342,7 +342,7 @@ WRITE32_MEMBER(ip22_state::hpc3_pbus6_w) cChar = data & 0x000000ff; if( cChar >= 0x20 || cChar == 0x0d || cChar == 0x0a ) { -// mame_printf_info( "%c", cChar ); +// osd_printf_info( "%c", cChar ); } break; case 0x034/4: @@ -357,7 +357,7 @@ WRITE32_MEMBER(ip22_state::hpc3_pbus6_w) cChar = data & 0x000000ff; if( cChar >= 0x20 || cChar == 0x0d || cChar == 0x0a ) { -// mame_printf_info( "%c", cChar ); +// osd_printf_info( "%c", cChar ); } break; case 0x40/4: @@ -376,7 +376,7 @@ WRITE32_MEMBER(ip22_state::hpc3_pbus6_w) case 0x9c/4: case 0xa0/4: case 0xa4/4: -// mame_printf_info("INT3: w %x to %x (reg %d) mask %08x (PC=%x)\n", data, offset*4, offset-0x80/4, mem_mask, activecpu_get_pc()); +// osd_printf_info("INT3: w %x to %x (reg %d) mask %08x (PC=%x)\n", data, offset*4, offset-0x80/4, mem_mask, activecpu_get_pc()); m_int3_regs[offset-0x80/4] = data; // if no local0 interrupts now, clear the input to the CPU @@ -729,7 +729,7 @@ WRITE32_MEMBER(ip22_state::rtc_w) { RTC_WRITECNT++; -// mame_printf_info("RTC_W: offset %x => %x (PC=%x)\n", data, offset, activecpu_get_pc()); +// osd_printf_info("RTC_W: offset %x => %x (PC=%x)\n", data, offset, activecpu_get_pc()); if( offset <= 0x0d ) { @@ -1410,7 +1410,7 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq) wptr = space.read_dword(m_HPC3.nSCSI0Descriptor); sptr = 0; -// mame_printf_info("DMA from device: %d words @ %x\n", words, wptr); +// osd_printf_info("DMA from device: %d words @ %x\n", words, wptr); dump_chain(space, m_HPC3.nSCSI0Descriptor); diff --git a/src/mess/drivers/megadriv.c b/src/mess/drivers/megadriv.c index c65963ce106..a8692fe1894 100644 --- a/src/mess/drivers/megadriv.c +++ b/src/mess/drivers/megadriv.c @@ -83,7 +83,7 @@ READ8_MEMBER(md_cons_state::mess_md_io_read_data_port) } } - // mame_printf_debug("read io data port stage %d port %d %02x\n",mess_io_stage[portnum],portnum,retdata); + // osd_printf_debug("read io data port stage %d port %d %02x\n",mess_io_stage[portnum],portnum,retdata); retdata |= (retdata << 8); } @@ -151,7 +151,7 @@ WRITE16_MEMBER(md_cons_state::mess_md_io_write_data_port) } } m_megadrive_io_data_regs[portnum] = data; - //mame_printf_debug("Writing IO Data Register #%d data %04x\n",portnum,data); + //osd_printf_debug("Writing IO Data Register #%d data %04x\n",portnum,data); } diff --git a/src/mess/drivers/tx0.c b/src/mess/drivers/tx0.c index 236525897c6..4a1eb56c3c6 100644 --- a/src/mess/drivers/tx0.c +++ b/src/mess/drivers/tx0.c @@ -275,10 +275,10 @@ PALETTE_INIT_MEMBER(tx0_state, tx0) else recommended_pen_crt_num_levels = ceil(log(cut_level)/log(decay_2))+1; if (recommended_pen_crt_num_levels != pen_crt_num_levels) - mame_printf_debug("File %s line %d: recommended value for pen_crt_num_levels is %d\n", __FILE__, __LINE__, recommended_pen_crt_num_levels); + osd_printf_debug("File %s line %d: recommended value for pen_crt_num_levels is %d\n", __FILE__, __LINE__, recommended_pen_crt_num_levels); } /*if ((cur_level_1 > 255.*cut_level) || (cur_level_2 > 255.*cut_level)) - mame_printf_debug("File %s line %d: Please take higher value for pen_crt_num_levels or smaller value for decay\n", __FILE__, __LINE__);*/ + osd_printf_debug("File %s line %d: Please take higher value for pen_crt_num_levels or smaller value for decay\n", __FILE__, __LINE__);*/ #endif #endif palette.set_indirect_color(0, rgb_t(0, 0, 0)); diff --git a/src/mess/machine/dccons.c b/src/mess/machine/dccons.c index c5ad881d3f8..1e12552a2d6 100644 --- a/src/mess/machine/dccons.c +++ b/src/mess/machine/dccons.c @@ -44,7 +44,7 @@ TIMER_CALLBACK_MEMBER(dc_cons_state::atapi_xfer_end ) printf("atapi_xfer_end atapi_xferlen = %d\n", atapi_xferlen ); - //mame_printf_debug("ATAPI: xfer_end. xferlen = %d\n", atapi_xferlen); + //osd_printf_debug("ATAPI: xfer_end. xferlen = %d\n", atapi_xferlen); m_ata->write_dmack(1); @@ -134,7 +134,7 @@ READ32_MEMBER(dc_cons_state::dc_mess_g1_ctrl_r ) WRITE32_MEMBER(dc_cons_state::dc_mess_g1_ctrl_w ) { g1bus_regs[offset] = data; // 5f7400+reg*4=dat -// mame_printf_verbose("G1CTRL: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x5f7400+reg*4, dat, data, offset, mem_mask); +// osd_printf_verbose("G1CTRL: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x5f7400+reg*4, dat, data, offset, mem_mask); switch (offset) { case SB_GDST: diff --git a/src/mess/machine/kc.c b/src/mess/machine/kc.c index 6c6815e792c..82e1f9d3c04 100644 --- a/src/mess/machine/kc.c +++ b/src/mess/machine/kc.c @@ -50,7 +50,7 @@ QUICKLOAD_LOAD_MEMBER( kc_state,kc) if (datasize > size - 128) { - mame_printf_info("Invalid snapshot size: expected 0x%04x, found 0x%04x\n", datasize, (UINT32)size - 128); + osd_printf_info("Invalid snapshot size: expected 0x%04x, found 0x%04x\n", datasize, (UINT32)size - 128); datasize = size - 128; } diff --git a/src/mess/machine/thomflop.c b/src/mess/machine/thomflop.c index c8a98d2d97b..e9b6af43a8a 100644 --- a/src/mess/machine/thomflop.c +++ b/src/mess/machine/thomflop.c @@ -12,7 +12,7 @@ #define VERBOSE 0 /* 0, 1 or 2 */ -#define PRINT(x) mame_printf_info x +#define PRINT(x) osd_printf_info x #define LOG(x) do { if (VERBOSE > 0) logerror x; } while (0) #define VLOG(x) do { if (VERBOSE > 1) logerror x; } while (0) diff --git a/src/mess/machine/thomson.c b/src/mess/machine/thomson.c index e2896a81e03..de5e6a9c8ac 100644 --- a/src/mess/machine/thomson.c +++ b/src/mess/machine/thomson.c @@ -21,7 +21,7 @@ #define VERBOSE_IO 0 /* serial & parallel I/O */ #define VERBOSE_MIDI 0 -#define PRINT(x) mame_printf_info x +#define PRINT(x) osd_printf_info x #define LOG(x) do { if (VERBOSE) logerror x; } while (0) #define VLOG(x) do { if (VERBOSE > 1) logerror x; } while (0) diff --git a/src/mess/mess.c b/src/mess/mess.c index 4c2868af152..a59e7a5201b 100644 --- a/src/mess/mess.c +++ b/src/mess/mess.c @@ -53,4 +53,4 @@ 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); } diff --git a/src/mess/mess.mak b/src/mess/mess.mak index 6337f5219f5..e9dc120df18 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -2003,7 +2003,8 @@ $(MESSOBJ)/yamaha.a: \ $(MESS_DRIVERS)/ymmu100.o: $(MESS_DRIVERS)/ymmu100.inc $(MESS_DRIVERS)/ymmu100.inc: $(MESSSRC)/drivers/ymmu100.ppm $(FILE2STR_TARGET) - $(FILE2STR) $(MESSSRC)/drivers/ymmu100.ppm $@ ymmu100_bkg UINT8 + @echo Converting $<... + @$(FILE2STR) $(MESSSRC)/drivers/ymmu100.ppm $@ ymmu100_bkg UINT8 $(MESSOBJ)/zenith.a: \ $(MESS_DRIVERS)/z100.o \ diff --git a/src/mess/video/nick.c b/src/mess/video/nick.c index 994246388e1..f5ed72db4df 100644 --- a/src/mess/video/nick.c +++ b/src/mess/video/nick.c @@ -514,7 +514,7 @@ void nick_device::write_pixels(UINT8 data_byte, UINT8 char_idx) case NICK_4_COLOUR_MODE: { - //mame_printf_info("4 colour\r\n"); + //osd_printf_info("4 colour\r\n"); /* left margin attributes */ if (m_LPT.LM & NICK_LM_MSBALT) @@ -543,7 +543,7 @@ void nick_device::write_pixels(UINT8 data_byte, UINT8 char_idx) case NICK_16_COLOUR_MODE: { - //mame_printf_info("16 colour\r\n"); + //osd_printf_info("16 colour\r\n"); /* left margin attributes */ if (m_LPT.LM & NICK_LM_MSBALT) @@ -667,7 +667,7 @@ void nick_device::write_pixels_lpixel(UINT8 data_byte, UINT8 char_idx) case NICK_4_COLOUR_MODE: { - //mame_printf_info("4 colour\r\n"); + //osd_printf_info("4 colour\r\n"); /* left margin attributes */ if (m_LPT.LM & NICK_LM_MSBALT) @@ -698,7 +698,7 @@ void nick_device::write_pixels_lpixel(UINT8 data_byte, UINT8 char_idx) case NICK_16_COLOUR_MODE: { - //mame_printf_info("16 colour\r\n"); + //osd_printf_info("16 colour\r\n"); /* left margin attributes */ if (m_LPT.LM & NICK_LM_MSBALT) @@ -931,14 +931,14 @@ void nick_device::do_display() case NICK_ATTR_MODE: { - //mame_printf_info("attr mode\r\n"); + //osd_printf_info("attr mode\r\n"); do_attr(clocks_visible); } break; case NICK_CH256_MODE: { - //mame_printf_info("ch256 mode\r\n"); + //osd_printf_info("ch256 mode\r\n"); do_ch256(clocks_visible); } break; @@ -951,7 +951,7 @@ void nick_device::do_display() case NICK_CH64_MODE: { - //mame_printf_info("ch64 mode\r\n"); + //osd_printf_info("ch64 mode\r\n"); do_ch64(clocks_visible); } break; diff --git a/src/emu/eigccppc.h b/src/osd/eigccppc.h similarity index 100% rename from src/emu/eigccppc.h rename to src/osd/eigccppc.h diff --git a/src/emu/eigccx86.h b/src/osd/eigccx86.h similarity index 100% rename from src/emu/eigccx86.h rename to src/osd/eigccx86.h diff --git a/src/emu/eminline.h b/src/osd/eminline.h similarity index 100% rename from src/emu/eminline.h rename to src/osd/eminline.h diff --git a/src/osd/osdcore.c b/src/osd/osdcore.c new file mode 100644 index 00000000000..4d299a48e4a --- /dev/null +++ b/src/osd/osdcore.c @@ -0,0 +1,167 @@ +#include "emucore.h" +#include "osdcore.h" + +bool g_print_verbose = false; + + +/*------------------------------------------------- + osd_file_output_callback - default callback + for file output +-------------------------------------------------*/ + +void osd_file_output_callback(FILE *param, const char *format, va_list argptr) +{ + vfprintf(param, format, argptr); +} + + +/*------------------------------------------------- + osd_null_output_callback - default callback + for no output +-------------------------------------------------*/ + +void osd_null_output_callback(FILE *param, const char *format, va_list argptr) +{ +} + + + +/* output channels */ +static output_delegate output_cb[OSD_OUTPUT_CHANNEL_COUNT] = +{ + output_delegate(FUNC(osd_file_output_callback), stderr), // OSD_OUTPUT_CHANNEL_ERROR + output_delegate(FUNC(osd_file_output_callback), stderr), // OSD_OUTPUT_CHANNEL_WARNING + output_delegate(FUNC(osd_file_output_callback), stdout), // OSD_OUTPUT_CHANNEL_INFO +#ifdef osd_DEBUG + output_delegate(FUNC(osd_file_output_callback), stdout), // OSD_OUTPUT_CHANNEL_DEBUG +#else + output_delegate(FUNC(osd_null_output_callback), stdout), // OSD_OUTPUT_CHANNEL_DEBUG +#endif + output_delegate(FUNC(osd_file_output_callback), stdout), // OSD_OUTPUT_CHANNEL_VERBOSE + output_delegate(FUNC(osd_file_output_callback), stdout) // OSD_OUTPUT_CHANNEL_LOG +}; + + +/*************************************************************************** + OUTPUT MANAGEMENT +***************************************************************************/ + +/*------------------------------------------------- + osd_set_output_channel - configure an output + channel +-------------------------------------------------*/ + +output_delegate osd_set_output_channel(output_channel channel, output_delegate callback) +{ + assert(channel < OSD_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; +} + +/*------------------------------------------------- + osd_printf_error - output an error to the + appropriate callback +-------------------------------------------------*/ + +void CLIB_DECL osd_printf_error(const char *format, ...) +{ + va_list argptr; + + /* do the output */ + va_start(argptr, format); + output_cb[OSD_OUTPUT_CHANNEL_ERROR](format, argptr); + va_end(argptr); +} + + +/*------------------------------------------------- + osd_printf_warning - output a warning to the + appropriate callback +-------------------------------------------------*/ + +void CLIB_DECL osd_printf_warning(const char *format, ...) +{ + va_list argptr; + + /* do the output */ + va_start(argptr, format); + output_cb[OSD_OUTPUT_CHANNEL_WARNING](format, argptr); + va_end(argptr); +} + + +/*------------------------------------------------- + osd_printf_info - output info text to the + appropriate callback +-------------------------------------------------*/ + +void CLIB_DECL osd_printf_info(const char *format, ...) +{ + va_list argptr; + + /* do the output */ + va_start(argptr, format); + output_cb[OSD_OUTPUT_CHANNEL_INFO](format, argptr); + va_end(argptr); +} + + +/*------------------------------------------------- + osd_printf_verbose - output verbose text to + the appropriate callback +-------------------------------------------------*/ + +void CLIB_DECL osd_printf_verbose(const char *format, ...) +{ + va_list argptr; + + /* if we're not verbose, skip it */ + if (!g_print_verbose) + return; + + /* do the output */ + va_start(argptr, format); + output_cb[OSD_OUTPUT_CHANNEL_VERBOSE](format, argptr); + va_end(argptr); +} + + +/*------------------------------------------------- + osd_printf_debug - output debug text to the + appropriate callback +-------------------------------------------------*/ + +void CLIB_DECL osd_printf_debug(const char *format, ...) +{ + va_list argptr; + + /* do the output */ + va_start(argptr, format); + output_cb[OSD_OUTPUT_CHANNEL_DEBUG](format, argptr); + va_end(argptr); +} + + +/*------------------------------------------------- + osd_printf_log - output log text to the + appropriate callback +-------------------------------------------------*/ + +#ifdef UNUSED_FUNCTION +void CLIB_DECL osd_printf_log(const char *format, ...) +{ + va_list argptr; + + /* do the output */ + va_start(argptr, format); + output_cb[OSD_OUTPUT_CHANNEL_LOG])(format, argptr); + va_end(argptr); +} +#endif + diff --git a/src/osd/osdcore.h b/src/osd/osdcore.h index f5b9756120a..3ebe10d8483 100644 --- a/src/osd/osdcore.h +++ b/src/osd/osdcore.h @@ -20,11 +20,7 @@ #define __OSDCORE_H__ #include "osdcomm.h" - -#ifdef __cplusplus -extern "C" { -#endif - +#include "delegate.h" /*************************************************************************** FILE I/O INTERFACES @@ -908,8 +904,38 @@ void osd_write_midi_channel(osd_midi_device *dev, UINT8 data); -----------------------------------------------------------------------------*/ const char *osd_get_volume_name(int idx); -#ifdef __cplusplus -} -#endif +/* ----- output management ----- */ + +// output channels +enum output_channel +{ + OSD_OUTPUT_CHANNEL_ERROR, + OSD_OUTPUT_CHANNEL_WARNING, + OSD_OUTPUT_CHANNEL_INFO, + OSD_OUTPUT_CHANNEL_DEBUG, + OSD_OUTPUT_CHANNEL_VERBOSE, + OSD_OUTPUT_CHANNEL_LOG, + OSD_OUTPUT_CHANNEL_COUNT +}; + +// output channel callback +typedef delegate output_delegate; + +/* set the output handler for a channel, returns the current one */ +output_delegate osd_set_output_channel(output_channel channel, output_delegate callback); + +/* calls to be used by the code */ +void CLIB_DECL osd_printf_error(const char *format, ...) ATTR_PRINTF(1,2); +void CLIB_DECL osd_printf_warning(const char *format, ...) ATTR_PRINTF(1,2); +void CLIB_DECL osd_printf_info(const char *format, ...) ATTR_PRINTF(1,2); +void CLIB_DECL osd_printf_verbose(const char *format, ...) ATTR_PRINTF(1,2); +void CLIB_DECL osd_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_osd_printf_*_CALLS_WITHIN_THE_CORE! +*/ #endif /* __OSDEPEND_H__ */ diff --git a/src/osd/osdepend.c b/src/osd/osdepend.c index 458d4912a05..6ddc93dd5e6 100644 --- a/src/osd/osdepend.c +++ b/src/osd/osdepend.c @@ -8,8 +8,12 @@ *******************************************************************c********/ + +#include "emu.h" +#include "emuopts.h" #include "osdepend.h" +extern bool g_print_verbose; //------------------------------------------------- // osd_interface - constructor @@ -67,6 +71,12 @@ void osd_interface::init(running_machine &machine) // m_machine = &machine; + + emu_options &options = downcast(machine.options()); + // extract the verbose printing option + if (options.verbose()) + g_print_verbose = true; + } diff --git a/src/osd/osdmini/osdmini.h b/src/osd/osdmini/osdmini.h index d010b5b9af9..a76c070323c 100644 --- a/src/osd/osdmini/osdmini.h +++ b/src/osd/osdmini/osdmini.h @@ -57,9 +57,6 @@ extern int osd_num_processors; // FUNCTION PROTOTYPES //============================================================ -// use if you want to print something with the verbose flag -void CLIB_DECL mame_printf_verbose(const char *text, ...) ATTR_PRINTF(1,2); - // use this to ping the watchdog void winmain_watchdog_ping(void); void winmain_dump_stack(); diff --git a/src/osd/sdl/draw13.c b/src/osd/sdl/draw13.c index 6beb353c0cc..3d38c7904ad 100644 --- a/src/osd/sdl/draw13.c +++ b/src/osd/sdl/draw13.c @@ -321,7 +321,7 @@ INLINE SDL_BlendMode map_blendmode(int blendmode) case BLENDMODE_ADD: return SDL_BLENDMODE_ADD; default: - mame_printf_warning("Unknown Blendmode %d", blendmode); + osd_printf_warning("Unknown Blendmode %d", blendmode); } return SDL_BLENDMODE_NONE; } @@ -422,7 +422,7 @@ static int RendererSupportsFormat(Uint32 format, Uint32 access, const char *sfor if (format == render_info.texture_formats[i]) return 1; } - mame_printf_verbose("Pixelformat <%s> not supported\n", sformat); + osd_printf_verbose("Pixelformat <%s> not supported\n", sformat); return 0; } #else @@ -447,8 +447,8 @@ static int RendererSupportsFormat(SDL_Renderer *renderer, Uint32 format, Uint32 SDL_DestroyTexture(texid); return 1; } - mame_printf_verbose("Pixelformat <%s> error %s \n", sformat, SDL_GetError()); - mame_printf_verbose("Pixelformat <%s> not supported\n", sformat); + osd_printf_verbose("Pixelformat <%s> error %s \n", sformat, SDL_GetError()); + osd_printf_verbose("Pixelformat <%s> not supported\n", sformat); fmt_support[i].status = 0; return 0; } @@ -494,7 +494,7 @@ int draw13_init(running_machine &machine, sdl_draw_info *callbacks) callbacks->exit = draw13_exit; callbacks->attach = draw13_attach; - mame_printf_verbose("Using SDL native texturing driver (SDL 2.0+)\n"); + osd_printf_verbose("Using SDL native texturing driver (SDL 2.0+)\n"); expand_copy_info(blit_info_default); //FIXME: -opengl16 should be -opengl -prefer16bpp @@ -509,9 +509,9 @@ int draw13_init(running_machine &machine, sdl_draw_info *callbacks) // No fatalerror here since not all video drivers support GL ! if (SDL_GL_LoadLibrary(stemp) != 0) // Load library (default for e==NULL - mame_printf_verbose("Warning: Unable to load opengl library: %s\n", stemp ? stemp : ""); + osd_printf_verbose("Warning: Unable to load opengl library: %s\n", stemp ? stemp : ""); else - mame_printf_verbose("Loaded opengl shared library: %s\n", stemp ? stemp : ""); + osd_printf_verbose("Loaded opengl shared library: %s\n", stemp ? stemp : ""); return 0; } @@ -529,7 +529,7 @@ static void draw13_exit(void) for (bi = blit_info[i]; bi != NULL; ) { if (bi->pixel_count) - mame_printf_verbose("%s -> %s %s blendmode 0x%02x, %d samples: %d KPixel/sec\n", bi->srcname, bi->dstname, + osd_printf_verbose("%s -> %s %s blendmode 0x%02x, %d samples: %d KPixel/sec\n", bi->srcname, bi->dstname, bi->rotate ? "rot" : "norot", bi->bm_mask, bi->samples, (int) bi->perf); freeme = bi; @@ -564,7 +564,7 @@ static int draw13_window_create(sdl_window_info *window, int width, int height) // allocate memory for our structures sdl_info *sdl = (sdl_info *) osd_malloc(sizeof(*sdl)); - mame_printf_verbose("Enter draw13_window_create\n"); + osd_printf_verbose("Enter draw13_window_create\n"); memset(sdl, 0, sizeof(*sdl)); @@ -602,7 +602,7 @@ static int draw13_window_create(sdl_window_info *window, int width, int height) mode.format = SDL_PIXELFORMAT_RGB888; break; default: - mame_printf_warning("Ignoring depth %d\n", window->depth); + osd_printf_warning("Ignoring depth %d\n", window->depth); } } SDL_SetWindowDisplayMode(window->sdl_window, &mode); // Try to set mode @@ -638,7 +638,7 @@ static int draw13_window_create(sdl_window_info *window, int width, int height) sdl->texture_max_height = 64; SDL_RenderPresent(sdl->sdl_renderer); - mame_printf_verbose("Leave draw13_window_create\n"); + osd_printf_verbose("Leave draw13_window_create\n"); return 0; } @@ -929,7 +929,7 @@ static texture_info *texture_create(sdl_window_info *window, const render_texinf break; default: - mame_printf_error("Unknown textureformat %d\n", PRIMFLAG_GET_TEXFORMAT(flags)); + osd_printf_error("Unknown textureformat %d\n", PRIMFLAG_GET_TEXFORMAT(flags)); } texture->rawwidth = texsource->width; @@ -945,7 +945,7 @@ static texture_info *texture_create(sdl_window_info *window, const render_texinf // Watch out for 0x0 textures ... if (!texture->setup.rotwidth || !texture->setup.rotheight) - mame_printf_warning("Trying to create texture with zero dim\n"); + osd_printf_warning("Trying to create texture with zero dim\n"); // compute the size texture->copyinfo = texture_compute_size_type(sdl->sdl_renderer, texsource, texture, flags); @@ -954,7 +954,7 @@ static texture_info *texture_create(sdl_window_info *window, const render_texinf texture->setup.rotwidth, texture->setup.rotheight); if (!texture->texture_id) - mame_printf_error("Error creating texture: %d x %d, pixelformat %s error: %s\n", texture->setup.rotwidth, texture->setup.rotheight, + osd_printf_error("Error creating texture: %d x %d, pixelformat %s error: %s\n", texture->setup.rotwidth, texture->setup.rotheight, texture->copyinfo->dstname, SDL_GetError()); if ( (texture->copyinfo->func != NULL) && (texture->sdl_access == SDL_TEXTUREACCESS_STATIC)) diff --git a/src/osd/sdl/drawogl.c b/src/osd/sdl/drawogl.c index 22a92b56cfb..22c4d2f28af 100644 --- a/src/osd/sdl/drawogl.c +++ b/src/osd/sdl/drawogl.c @@ -390,11 +390,11 @@ int drawogl_init(running_machine &machine, sdl_draw_info *callbacks) if (SDLMAME_SDL2) { - mame_printf_verbose("Using SDL multi-window OpenGL driver (SDL 2.0+)\n"); + osd_printf_verbose("Using SDL multi-window OpenGL driver (SDL 2.0+)\n"); load_gl_lib(machine); } else - mame_printf_verbose("Using SDL single-window OpenGL driver (SDL 1.2)\n"); + osd_printf_verbose("Using SDL single-window OpenGL driver (SDL 1.2)\n"); return 0; } @@ -434,7 +434,7 @@ static void loadgl_functions(void) #define OSD_GL(ret,func,params) \ if (!( func = (ret (APIENTRY *)params) SDL_GL_GetProcAddress( #func ) )) \ - { err_count++; mame_printf_error("GL function %s not found!\n", #func ); } + { err_count++; osd_printf_error("GL function %s not found!\n", #func ); } #define OSD_GL_UNUSED(ret,func,params) @@ -471,7 +471,7 @@ static void load_gl_lib(running_machine &machine) { fatalerror("Unable to load opengl library: %s\n", stemp ? stemp : ""); } - mame_printf_verbose("Loaded opengl shared library: %s\n", stemp ? stemp : ""); + osd_printf_verbose("Loaded opengl shared library: %s\n", stemp ? stemp : ""); /* FIXME: must be freed as well */ gl_dispatch = (osd_gl_dispatch *) osd_malloc(sizeof(osd_gl_dispatch)); dll_loaded=1; @@ -511,7 +511,7 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) if (!window->sdl_window ) { - mame_printf_error("OpenGL not supported on this driver: %s\n", SDL_GetError()); + osd_printf_error("OpenGL not supported on this driver: %s\n", SDL_GetError()); return 1; } @@ -536,7 +536,7 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) sdl->gl_context_id = SDL_GL_CreateContext(window->sdl_window); if (!sdl->gl_context_id) { - mame_printf_error("OpenGL not supported on this driver: %s\n", SDL_GetError()); + osd_printf_error("OpenGL not supported on this driver: %s\n", SDL_GetError()); return 1; } @@ -565,7 +565,7 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) if ( (video_config.mode == VIDEO_MODE_OPENGL) && !(sdl->sdlsurf->flags & SDL_OPENGL) ) { - mame_printf_error("OpenGL not supported on this driver!\n"); + osd_printf_error("OpenGL not supported on this driver!\n"); return 1; } @@ -595,7 +595,7 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) // print out the driver info for debugging if (!shown_video_info) { - mame_printf_verbose("OpenGL: %s\nOpenGL: %s\nOpenGL: %s\n", vendor, (char *)glGetString(GL_RENDERER), (char *)glGetString(GL_VERSION)); + osd_printf_verbose("OpenGL: %s\nOpenGL: %s\nOpenGL: %s\n", vendor, (char *)glGetString(GL_RENDERER), (char *)glGetString(GL_VERSION)); } sdl->usetexturerect = 0; @@ -612,7 +612,7 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) has_and_allow_texturerect = 1; if (!shown_video_info) { - mame_printf_verbose("OpenGL: texture rectangle supported\n"); + osd_printf_verbose("OpenGL: texture rectangle supported\n"); } } @@ -621,7 +621,7 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) { if (!shown_video_info) { - mame_printf_verbose("OpenGL: non-power-of-2 textures supported (new method)\n"); + osd_printf_verbose("OpenGL: non-power-of-2 textures supported (new method)\n"); } sdl->texpoweroftwo = 0; } @@ -632,7 +632,7 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) { if (!shown_video_info) { - mame_printf_verbose("OpenGL: non-power-of-2 textures supported (old method)\n"); + osd_printf_verbose("OpenGL: non-power-of-2 textures supported (old method)\n"); } sdl->usetexturerect = 1; } @@ -640,7 +640,7 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) { if (!shown_video_info) { - mame_printf_verbose("OpenGL: forcing power-of-2 textures (creation, not copy)\n"); + osd_printf_verbose("OpenGL: forcing power-of-2 textures (creation, not copy)\n"); } } } @@ -651,9 +651,9 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) if (!shown_video_info) { if(sdl->usevbo) - mame_printf_verbose("OpenGL: vertex buffer supported\n"); + osd_printf_verbose("OpenGL: vertex buffer supported\n"); else - mame_printf_verbose("OpenGL: vertex buffer supported, but disabled\n"); + osd_printf_verbose("OpenGL: vertex buffer supported, but disabled\n"); } } @@ -665,14 +665,14 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) if (!shown_video_info) { if(sdl->usepbo) - mame_printf_verbose("OpenGL: pixel buffers supported\n"); + osd_printf_verbose("OpenGL: pixel buffers supported\n"); else - mame_printf_verbose("OpenGL: pixel buffers supported, but disabled\n"); + osd_printf_verbose("OpenGL: pixel buffers supported, but disabled\n"); } } else { if (!shown_video_info) { - mame_printf_verbose("OpenGL: pixel buffers supported, but disabled due to disabled vbo\n"); + osd_printf_verbose("OpenGL: pixel buffers supported, but disabled due to disabled vbo\n"); } } } @@ -680,7 +680,7 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) { if (!shown_video_info) { - mame_printf_verbose("OpenGL: pixel buffers not supported\n"); + osd_printf_verbose("OpenGL: pixel buffers not supported\n"); } } @@ -690,9 +690,9 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) if (!shown_video_info) { if(sdl->usefbo) - mame_printf_verbose("OpenGL: framebuffer object supported\n"); + osd_printf_verbose("OpenGL: framebuffer object supported\n"); else - mame_printf_verbose("OpenGL: framebuffer object not supported\n"); + osd_printf_verbose("OpenGL: framebuffer object not supported\n"); } } @@ -706,14 +706,14 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) if (!shown_video_info) { if(sdl->useglsl) - mame_printf_verbose("OpenGL: GLSL supported\n"); + osd_printf_verbose("OpenGL: GLSL supported\n"); else - mame_printf_verbose("OpenGL: GLSL supported, but disabled\n"); + osd_printf_verbose("OpenGL: GLSL supported, but disabled\n"); } } else { if (!shown_video_info) { - mame_printf_verbose("OpenGL: GLSL not supported\n"); + osd_printf_verbose("OpenGL: GLSL not supported\n"); } } @@ -726,7 +726,7 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height) glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint *)&sdl->texture_max_height); if (!shown_video_info) { - mame_printf_verbose("OpenGL: max texture size %d x %d\n", sdl->texture_max_width, sdl->texture_max_height); + osd_printf_verbose("OpenGL: max texture size %d x %d\n", sdl->texture_max_width, sdl->texture_max_height); } shown_video_info = 1; @@ -815,7 +815,7 @@ static void loadGLExtensions(sdl_window_info *window) { if (_once) { - mame_printf_warning("OpenGL: PBO not supported, no VBO support. (sdlmame error)\n"); + osd_printf_warning("OpenGL: PBO not supported, no VBO support. (sdlmame error)\n"); } sdl->usepbo=FALSE; } @@ -823,7 +823,7 @@ static void loadGLExtensions(sdl_window_info *window) { if (_once) { - mame_printf_warning("OpenGL: GLSL not supported, no VBO support. (sdlmame error)\n"); + osd_printf_warning("OpenGL: GLSL not supported, no VBO support. (sdlmame error)\n"); } sdl->useglsl=FALSE; } @@ -864,34 +864,34 @@ static void loadGLExtensions(sdl_window_info *window) sdl->usepbo=FALSE; if (_once) { - mame_printf_warning("OpenGL: VBO not supported, missing: "); + osd_printf_warning("OpenGL: VBO not supported, missing: "); if (!pfn_glGenBuffers) { - mame_printf_warning("glGenBuffers, "); + osd_printf_warning("glGenBuffers, "); } if (!pfn_glDeleteBuffers) { - mame_printf_warning("glDeleteBuffers"); + osd_printf_warning("glDeleteBuffers"); } if (!pfn_glBindBuffer) { - mame_printf_warning("glBindBuffer, "); + osd_printf_warning("glBindBuffer, "); } if (!pfn_glBufferData) { - mame_printf_warning("glBufferData, "); + osd_printf_warning("glBufferData, "); } if (!pfn_glBufferSubData) { - mame_printf_warning("glBufferSubData, "); + osd_printf_warning("glBufferSubData, "); } - mame_printf_warning("\n"); + osd_printf_warning("\n"); } if ( sdl->usevbo ) { if (_once) { - mame_printf_warning("OpenGL: PBO not supported, no VBO support.\n"); + osd_printf_warning("OpenGL: PBO not supported, no VBO support.\n"); } sdl->usepbo=FALSE; } @@ -902,16 +902,16 @@ static void loadGLExtensions(sdl_window_info *window) sdl->usepbo=FALSE; if (_once) { - mame_printf_warning("OpenGL: PBO not supported, missing: "); + osd_printf_warning("OpenGL: PBO not supported, missing: "); if (!pfn_glMapBuffer) { - mame_printf_warning("glMapBuffer, "); + osd_printf_warning("glMapBuffer, "); } if (!pfn_glUnmapBuffer) { - mame_printf_warning("glUnmapBuffer, "); + osd_printf_warning("glUnmapBuffer, "); } - mame_printf_warning("\n"); + osd_printf_warning("\n"); } } @@ -923,32 +923,32 @@ static void loadGLExtensions(sdl_window_info *window) sdl->usefbo=FALSE; if (_once) { - mame_printf_warning("OpenGL: FBO not supported, missing: "); + osd_printf_warning("OpenGL: FBO not supported, missing: "); if (!pfn_glIsFramebuffer) { - mame_printf_warning("pfn_glIsFramebuffer, "); + osd_printf_warning("pfn_glIsFramebuffer, "); } if (!pfn_glBindFramebuffer) { - mame_printf_warning("pfn_glBindFramebuffer, "); + osd_printf_warning("pfn_glBindFramebuffer, "); } if (!pfn_glDeleteFramebuffers) { - mame_printf_warning("pfn_glDeleteFramebuffers, "); + osd_printf_warning("pfn_glDeleteFramebuffers, "); } if (!pfn_glGenFramebuffers) { - mame_printf_warning("pfn_glGenFramebuffers, "); + osd_printf_warning("pfn_glGenFramebuffers, "); } if (!pfn_glCheckFramebufferStatus) { - mame_printf_warning("pfn_glCheckFramebufferStatus, "); + osd_printf_warning("pfn_glCheckFramebufferStatus, "); } if (!pfn_glFramebufferTexture2D) { - mame_printf_warning("pfn_glFramebufferTexture2D, "); + osd_printf_warning("pfn_glFramebufferTexture2D, "); } - mame_printf_warning("\n"); + osd_printf_warning("\n"); } } @@ -956,29 +956,29 @@ static void loadGLExtensions(sdl_window_info *window) { if ( sdl->usevbo ) { - mame_printf_verbose("OpenGL: VBO supported\n"); + osd_printf_verbose("OpenGL: VBO supported\n"); } else { - mame_printf_warning("OpenGL: VBO not supported\n"); + osd_printf_warning("OpenGL: VBO not supported\n"); } if ( sdl->usepbo ) { - mame_printf_verbose("OpenGL: PBO supported\n"); + osd_printf_verbose("OpenGL: PBO supported\n"); } else { - mame_printf_warning("OpenGL: PBO not supported\n"); + osd_printf_warning("OpenGL: PBO not supported\n"); } if ( sdl->usefbo ) { - mame_printf_verbose("OpenGL: FBO supported\n"); + osd_printf_verbose("OpenGL: FBO supported\n"); } else { - mame_printf_warning("OpenGL: FBO not supported\n"); + osd_printf_warning("OpenGL: FBO not supported\n"); } } @@ -993,7 +993,7 @@ static void loadGLExtensions(sdl_window_info *window) { if (_once) { - mame_printf_warning("OpenGL: GLSL disabled, glActiveTexture(ARB) not supported\n"); + osd_printf_warning("OpenGL: GLSL disabled, glActiveTexture(ARB) not supported\n"); } sdl->useglsl = 0; } @@ -1008,7 +1008,7 @@ static void loadGLExtensions(sdl_window_info *window) { if (_once) { - mame_printf_warning("OpenGL: GLSL supported, but shader instantiation failed - disabled\n"); + osd_printf_warning("OpenGL: GLSL supported, but shader instantiation failed - disabled\n"); } } } @@ -1020,7 +1020,7 @@ static void loadGLExtensions(sdl_window_info *window) sdl->useglsl = 0; if (_once) { - mame_printf_warning("OpenGL: GLSL supported, but disabled due to: prescale !=1 \n"); + osd_printf_warning("OpenGL: GLSL supported, but disabled due to: prescale !=1 \n"); } } } @@ -1039,20 +1039,20 @@ static void loadGLExtensions(sdl_window_info *window) { if (_once) { - mame_printf_verbose("OpenGL: GLSL multipass not supported, due to unsupported FBO. Skipping followup shader\n"); + osd_printf_verbose("OpenGL: GLSL multipass not supported, due to unsupported FBO. Skipping followup shader\n"); } break; } if ( glsl_shader_add_mamebm(sdl->glsl, video_config.glsl_shader_mamebm[i], sdl->glsl_program_num) ) { - mame_printf_error("OpenGL: GLSL loading mame bitmap shader %d failed (%s)\n", + osd_printf_error("OpenGL: GLSL loading mame bitmap shader %d failed (%s)\n", i, video_config.glsl_shader_mamebm[i]); } else { glsl_shader_feature = GLSL_SHADER_FEAT_CUSTOM; if (_once) { - mame_printf_verbose("OpenGL: GLSL using mame bitmap shader filter %d: '%s'\n", + osd_printf_verbose("OpenGL: GLSL using mame bitmap shader filter %d: '%s'\n", sdl->glsl_program_num, video_config.glsl_shader_mamebm[i]); } sdl->glsl_program_mb2sc = sdl->glsl_program_num; // the last mame_bitmap (mb) shader does it. @@ -1062,7 +1062,7 @@ static void loadGLExtensions(sdl_window_info *window) if ( video_config.glsl_shader_scrn_num > 0 && sdl->glsl_program_num==0 ) { - mame_printf_verbose("OpenGL: GLSL cannot use screen bitmap shader without bitmap shader\n"); + osd_printf_verbose("OpenGL: GLSL cannot use screen bitmap shader without bitmap shader\n"); } for(i=0; sdl->usefbo && sdl->glsl_program_num>0 && iglsl, video_config.glsl_shader_scrn[i], sdl->glsl_program_num-1-sdl->glsl_program_mb2sc) ) { - mame_printf_error("OpenGL: GLSL loading screen bitmap shader %d failed (%s)\n", + osd_printf_error("OpenGL: GLSL loading screen bitmap shader %d failed (%s)\n", i, video_config.glsl_shader_scrn[i]); } else { if (_once) { - mame_printf_verbose("OpenGL: GLSL using screen bitmap shader filter %d: '%s'\n", + osd_printf_verbose("OpenGL: GLSL using screen bitmap shader filter %d: '%s'\n", sdl->glsl_program_num, video_config.glsl_shader_scrn[i]); } sdl->glsl_program_num++; @@ -1091,7 +1091,7 @@ static void loadGLExtensions(sdl_window_info *window) if (_once) { - mame_printf_verbose("OpenGL: GLSL using shader filter '%s', idx: %d, num %d (vid filter: %d)\n", + osd_printf_verbose("OpenGL: GLSL using shader filter '%s', idx: %d, num %d (vid filter: %d)\n", glsl_shader_get_filter_name_mamebm(glsl_shader_feature), glsl_shader_feature, sdl->glsl_program_num, video_config.filter); } @@ -1100,7 +1100,7 @@ static void loadGLExtensions(sdl_window_info *window) } else { if (_once) { - mame_printf_verbose("OpenGL: using vid filter: %d\n", video_config.filter); + osd_printf_verbose("OpenGL: using vid filter: %d\n", video_config.filter); } } @@ -1666,7 +1666,7 @@ static void texture_compute_size_subroutine(sdl_window_info *window, texture_inf while (texture->yprescale > 1 && height_create * texture->yprescale > sdl->texture_max_height) texture->yprescale--; if (PRIMFLAG_GET_SCREENTEX(flags) && (texture->xprescale != window->prescale || texture->yprescale != window->prescale)) - mame_printf_warning("SDL: adjusting prescale from %dx%d to %dx%d\n", window->prescale, window->prescale, texture->xprescale, texture->yprescale); + osd_printf_warning("SDL: adjusting prescale from %dx%d to %dx%d\n", window->prescale, window->prescale, texture->xprescale, texture->yprescale); width *= texture->xprescale; height *= texture->yprescale; @@ -1724,7 +1724,7 @@ static void texture_compute_size_type(sdl_window_info *window, const render_texi { static int printed = FALSE; if (!printed) - mame_printf_warning("Texture too big! (wanted: %dx%d, max is %dx%d)\n", finalwidth_create, finalheight_create, sdl->texture_max_width, sdl->texture_max_height); + osd_printf_warning("Texture too big! (wanted: %dx%d, max is %dx%d)\n", finalwidth_create, finalheight_create, sdl->texture_max_width, sdl->texture_max_height); printed = TRUE; } @@ -1738,7 +1738,7 @@ static void texture_compute_size_type(sdl_window_info *window, const render_texi texture->format==SDL_TEXFORMAT_PALETTE16A ) { - mame_printf_verbose("GL texture: copy %d, shader %d, dynamic %d, %dx%d %dx%d [%s, Equal: %d, Palette: %d,\n" + osd_printf_verbose("GL texture: copy %d, shader %d, dynamic %d, %dx%d %dx%d [%s, Equal: %d, Palette: %d,\n" " scale %dx%d, border %d, pitch %d,%d/%d], bytes/pix %d\n", !texture->nocopy, texture->type==TEXTURE_TYPE_SHADER, texture->type==TEXTURE_TYPE_DYNAMIC, finalwidth, finalheight, finalwidth_create, finalheight_create, @@ -1770,36 +1770,36 @@ static int gl_checkFramebufferStatus(void) case GL_FRAMEBUFFER_COMPLETE_EXT: return 0; case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT: - mame_printf_error("GL FBO: incomplete,incomplete attachment\n"); + osd_printf_error("GL FBO: incomplete,incomplete attachment\n"); return -1; case GL_FRAMEBUFFER_UNSUPPORTED_EXT: - mame_printf_error("GL FBO: Unsupported framebuffer format\n"); + osd_printf_error("GL FBO: Unsupported framebuffer format\n"); return -1; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT: - mame_printf_error("GL FBO: incomplete,missing attachment\n"); + osd_printf_error("GL FBO: incomplete,missing attachment\n"); return -1; case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT: - mame_printf_error("GL FBO: incomplete,attached images must have same dimensions\n"); + osd_printf_error("GL FBO: incomplete,attached images must have same dimensions\n"); return -1; case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT: - mame_printf_error("GL FBO: incomplete,attached images must have same format\n"); + osd_printf_error("GL FBO: incomplete,attached images must have same format\n"); return -1; case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT: - mame_printf_error("GL FBO: incomplete,missing draw buffer\n"); + osd_printf_error("GL FBO: incomplete,missing draw buffer\n"); return -1; case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT: - mame_printf_error("GL FBO: incomplete,missing read buffer\n"); + osd_printf_error("GL FBO: incomplete,missing read buffer\n"); return -1; #ifdef GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT case GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT: - mame_printf_error("GL FBO: incomplete, duplicate attachment\n"); + osd_printf_error("GL FBO: incomplete, duplicate attachment\n"); return -1; #endif case 0: - mame_printf_error("GL FBO: incomplete, implementation fault\n"); + osd_printf_error("GL FBO: incomplete, implementation fault\n"); return -1; default: - mame_printf_error("GL FBO: incomplete, implementation ERROR\n"); + osd_printf_error("GL FBO: incomplete, implementation ERROR\n"); /* fall through */ } return -1; @@ -1815,7 +1815,7 @@ static int texture_fbo_create(UINT32 text_unit, UINT32 text_name, UINT32 fbo_nam if ( gl_texture_check_size(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, &_width, &_height, 1) ) { - mame_printf_error("cannot create fbo texture, req: %dx%d, avail: %dx%d - bail out\n", + osd_printf_error("cannot create fbo texture, req: %dx%d, avail: %dx%d - bail out\n", width, height, (int)_width, (int)_height); return -1; } @@ -1835,7 +1835,7 @@ static int texture_fbo_create(UINT32 text_unit, UINT32 text_name, UINT32 fbo_nam if ( gl_checkFramebufferStatus() ) { - mame_printf_error("FBO error fbo texture - bail out\n"); + osd_printf_error("FBO error fbo texture - bail out\n"); return -1; } @@ -1892,7 +1892,7 @@ static int texture_shader_create(sdl_window_info *window, if ( lut_table_width_pow2 > sdl->texture_max_width || lut_table_height_pow2 > sdl->texture_max_height ) { - mame_printf_error("Need lut size %dx%d, but max text size is %dx%d, bail out\n", + osd_printf_error("Need lut size %dx%d, but max text size is %dx%d, bail out\n", lut_table_width_pow2, lut_table_height_pow2, sdl->texture_max_width, sdl->texture_max_height); return -1; @@ -1982,7 +1982,7 @@ static int texture_shader_create(sdl_window_info *window, pfn_glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); - mame_printf_verbose("GL texture: mpass mame-bmp 2x %dx%d (pow2 %dx%d)\n", + osd_printf_verbose("GL texture: mpass mame-bmp 2x %dx%d (pow2 %dx%d)\n", texture->rawwidth, texture->rawheight, texture->rawwidth_create, texture->rawheight_create); } @@ -2004,7 +2004,7 @@ static int texture_shader_create(sdl_window_info *window, } } - mame_printf_verbose("GL texture: mpass screen-bmp 2x %dx%d (pow2 %dx%d)\n", + osd_printf_verbose("GL texture: mpass screen-bmp 2x %dx%d (pow2 %dx%d)\n", window->width, window->height, surf_w_pow2, surf_h_pow2); } @@ -2024,7 +2024,7 @@ static int texture_shader_create(sdl_window_info *window, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, &_width, &_height, 1) ) { - mame_printf_error("cannot create bitmap texture, req: %dx%d, avail: %dx%d - bail out\n", + osd_printf_error("cannot create bitmap texture, req: %dx%d, avail: %dx%d - bail out\n", texture->rawwidth_create, texture->rawheight_create, (int)_width, (int)_height); return -1; } @@ -2134,7 +2134,7 @@ static texture_info *texture_create(sdl_window_info *window, const render_texinf break; default: - mame_printf_error("Unknown textureformat %d\n", PRIMFLAG_GET_TEXFORMAT(flags)); + osd_printf_error("Unknown textureformat %d\n", PRIMFLAG_GET_TEXFORMAT(flags)); } // compute the size @@ -2558,7 +2558,7 @@ static void texture_set_data(texture_info *texture, const render_texinfo *texsou break; default: - mame_printf_error("Unknown texture blendmode=%d format=%d\n", PRIMFLAG_GET_BLENDMODE(flags), PRIMFLAG_GET_TEXFORMAT(flags)); + osd_printf_error("Unknown texture blendmode=%d format=%d\n", PRIMFLAG_GET_BLENDMODE(flags), PRIMFLAG_GET_TEXFORMAT(flags)); break; } } @@ -2855,12 +2855,12 @@ static void texture_shader_update(sdl_window_info *window, texture_info *texture uniform_location = pfn_glGetUniformLocationARB(sdl->glsl_program[shaderIdx], "vid_attributes"); pfn_glUniform4fvARB(uniform_location, 1, &(vid_attributes[shaderIdx])); if ( GL_CHECK_ERROR_QUIET() ) { - mame_printf_verbose("GLSL: could not set 'vid_attributes' for shader prog idx %d\n", shaderIdx); + osd_printf_verbose("GLSL: could not set 'vid_attributes' for shader prog idx %d\n", shaderIdx); } } else { - mame_printf_verbose("GLSL: could not get render container for screen %d\n", window->start_viewscreen); + osd_printf_verbose("GLSL: could not get render container for screen %d\n", window->start_viewscreen); } } } diff --git a/src/osd/sdl/drawsdl.c b/src/osd/sdl/drawsdl.c index 73cb566e11e..5c6a6d7f269 100644 --- a/src/osd/sdl/drawsdl.c +++ b/src/osd/sdl/drawsdl.c @@ -197,9 +197,9 @@ int drawsdl_init(sdl_draw_info *callbacks) callbacks->attach = drawsdl_attach; if (SDLMAME_SDL2) - mame_printf_verbose("Using SDL multi-window soft driver (SDL 2.0+)\n"); + osd_printf_verbose("Using SDL multi-window soft driver (SDL 2.0+)\n"); else - mame_printf_verbose("Using SDL single-window soft driver (SDL 1.2)\n"); + osd_printf_verbose("Using SDL single-window soft driver (SDL 1.2)\n"); return 0; } @@ -323,7 +323,7 @@ static void yuv_overlay_init(sdl_window_info *window) global_free_array(sdl->yuv_bitmap); } - mame_printf_verbose("SDL: Creating %d x %d YUV-Overlay ...\n", minimum_width, minimum_height); + osd_printf_verbose("SDL: Creating %d x %d YUV-Overlay ...\n", minimum_width, minimum_height); sdl->yuv_bitmap = global_alloc_array(UINT16, minimum_width*minimum_height); @@ -331,7 +331,7 @@ static void yuv_overlay_init(sdl_window_info *window) sdl_sm->pixel_format, sdl->sdlsurf); if ( sdl->yuvsurf == NULL ) { - mame_printf_error("SDL: Couldn't create SDL_yuv_overlay: %s\n", SDL_GetError()); + osd_printf_error("SDL: Couldn't create SDL_yuv_overlay: %s\n", SDL_GetError()); //return 1; } @@ -340,9 +340,9 @@ static void yuv_overlay_init(sdl_window_info *window) if (!shown_video_info) { - mame_printf_verbose("YUV Mode : %s\n", sdl_sm->name); - mame_printf_verbose("YUV Overlay Size : %d x %d\n", minimum_width, minimum_height); - mame_printf_verbose("YUV Acceleration : %s\n", sdl->yuvsurf->hw_overlay ? "Hardware" : "Software"); + osd_printf_verbose("YUV Mode : %s\n", sdl_sm->name); + osd_printf_verbose("YUV Overlay Size : %d x %d\n", minimum_width, minimum_height); + osd_printf_verbose("YUV Acceleration : %s\n", sdl->yuvsurf->hw_overlay ? "Hardware" : "Software"); shown_video_info = 1; } } @@ -374,10 +374,10 @@ static void drawsdl_show_info(sdl_window_info *window, struct SDL_RendererInfo * }; int i; - mame_printf_verbose("window: using renderer %s\n", render_info->name ? render_info->name : ""); + osd_printf_verbose("window: using renderer %s\n", render_info->name ? render_info->name : ""); for (i = 0; rflist[i].name != NULL; i++) if (render_info->flags & rflist[i].flag) - mame_printf_verbose("renderer: flag %s\n", rflist[i].name); + osd_printf_verbose("renderer: flag %s\n", rflist[i].name); } #endif @@ -460,7 +460,7 @@ static int drawsdl_window_create(sdl_window_info *window, int width, int height) if (!found) { - mame_printf_verbose("window: Scale mode %s not supported!\n", sm->name); + osd_printf_verbose("window: Scale mode %s not supported!\n", sm->name); window->machine().ui().popup_time(3, "Scale mode %s not supported!", sm->name); } } @@ -823,7 +823,7 @@ static int drawsdl_window_draw(sdl_window_info *window, UINT32 dc, int update) break; default: - mame_printf_error("SDL: ERROR! Unknown video mode: R=%08X G=%08X B=%08X\n", rmask, gmask, bmask); + osd_printf_error("SDL: ERROR! Unknown video mode: R=%08X G=%08X B=%08X\n", rmask, gmask, bmask); break; } } diff --git a/src/osd/sdl/gl_shader_tool.c b/src/osd/sdl/gl_shader_tool.c index 11f2c325f69..58af8f80590 100644 --- a/src/osd/sdl/gl_shader_tool.c +++ b/src/osd/sdl/gl_shader_tool.c @@ -90,30 +90,30 @@ int gl_shader_loadExtention(PFNGLGETPROCADDRESSOS GetProcAddress) return 0; } - mame_printf_error("OpenGL: missing ARB shader function: "); - if (!pfn_glGetObjectParameterivARB) mame_printf_error("glGetObjectParameterivARB, "); - if (!pfn_glGetInfoLogARB) mame_printf_error("glGetInfoLogARB, "); - if (!pfn_glDeleteObjectARB) mame_printf_error("glDeleteObjectARB, "); - if (!pfn_glCreateShaderObjectARB) mame_printf_error("glCreateShaderObjectARB, "); - if (!pfn_glShaderSourceARB) mame_printf_error("glShaderSourceARB, "); - if (!pfn_glCompileShaderARB) mame_printf_error("glCompileShaderARB, "); - if (!pfn_glCreateProgramObjectARB) mame_printf_error("glCreateProgramObjectARB, "); - if (!pfn_glAttachObjectARB) mame_printf_error("glAttachObjectARB, "); - if (!pfn_glLinkProgramARB) mame_printf_error("glLinkProgramARB, "); - if (!pfn_glValidateProgramARB) mame_printf_error("glValidateProgramARB, "); - if (!pfn_glUseProgramObjectARB) mame_printf_error("glUseProgramObjectARB, "); - if (!pfn_glGetUniformLocationARB) mame_printf_error("glGetUniformLocationARB, "); - if (!pfn_glUniform1fARB) mame_printf_error("glUniform1fARB, "); - if (!pfn_glUniform1iARB) mame_printf_error("glUniform1iARB"); - if (!pfn_glUniform1fvARB) mame_printf_error("glUniform1fvARB, "); - if (!pfn_glUniform2fvARB) mame_printf_error("glUniform2fvARB, "); - if (!pfn_glUniform3fvARB) mame_printf_error("glUniform3fvARB, "); - if (!pfn_glUniform4fvARB) mame_printf_error("glUniform4fvARB, "); - if (!pfn_glUniform1ivARB) mame_printf_error("glUniform1ivARB"); - if (!pfn_glUniform2ivARB) mame_printf_error("glUniform2ivARB"); - if (!pfn_glUniform3ivARB) mame_printf_error("glUniform3ivARB"); - if (!pfn_glUniform4ivARB) mame_printf_error("glUniform4ivARB"); - mame_printf_error("\n"); + osd_printf_error("OpenGL: missing ARB shader function: "); + if (!pfn_glGetObjectParameterivARB) osd_printf_error("glGetObjectParameterivARB, "); + if (!pfn_glGetInfoLogARB) osd_printf_error("glGetInfoLogARB, "); + if (!pfn_glDeleteObjectARB) osd_printf_error("glDeleteObjectARB, "); + if (!pfn_glCreateShaderObjectARB) osd_printf_error("glCreateShaderObjectARB, "); + if (!pfn_glShaderSourceARB) osd_printf_error("glShaderSourceARB, "); + if (!pfn_glCompileShaderARB) osd_printf_error("glCompileShaderARB, "); + if (!pfn_glCreateProgramObjectARB) osd_printf_error("glCreateProgramObjectARB, "); + if (!pfn_glAttachObjectARB) osd_printf_error("glAttachObjectARB, "); + if (!pfn_glLinkProgramARB) osd_printf_error("glLinkProgramARB, "); + if (!pfn_glValidateProgramARB) osd_printf_error("glValidateProgramARB, "); + if (!pfn_glUseProgramObjectARB) osd_printf_error("glUseProgramObjectARB, "); + if (!pfn_glGetUniformLocationARB) osd_printf_error("glGetUniformLocationARB, "); + if (!pfn_glUniform1fARB) osd_printf_error("glUniform1fARB, "); + if (!pfn_glUniform1iARB) osd_printf_error("glUniform1iARB"); + if (!pfn_glUniform1fvARB) osd_printf_error("glUniform1fvARB, "); + if (!pfn_glUniform2fvARB) osd_printf_error("glUniform2fvARB, "); + if (!pfn_glUniform3fvARB) osd_printf_error("glUniform3fvARB, "); + if (!pfn_glUniform4fvARB) osd_printf_error("glUniform4fvARB, "); + if (!pfn_glUniform1ivARB) osd_printf_error("glUniform1ivARB"); + if (!pfn_glUniform2ivARB) osd_printf_error("glUniform2ivARB"); + if (!pfn_glUniform3ivARB) osd_printf_error("glUniform3ivARB"); + if (!pfn_glUniform4ivARB) osd_printf_error("glUniform4ivARB"); + osd_printf_error("\n"); return -1; } @@ -126,7 +126,7 @@ int gl_check_error(GLSLCheckMode m, const char *file, const int line) { if ( CHECK_VERBOSE <= m ) { - mame_printf_warning( "%s:%d: GL Error: %d 0x%X\n", file, line, (int)glerr, (unsigned int)glerr); + osd_printf_warning( "%s:%d: GL Error: %d 0x%X\n", file, line, (int)glerr, (unsigned int)glerr); } } return (GL_NO_ERROR != glerr)? glerr : 0; @@ -152,7 +152,7 @@ int gl_shader_check_error(GLhandleARB obj, GLenum obj_query, GLSLCheckMode m, co obj_query != GL_OBJECT_VALIDATE_STATUS_ARB ) { - mame_printf_warning("%s:%d: GL Error: gl_shader_check_error unsupported object query 0x%X\n", file, line, (unsigned int)obj_query); + osd_printf_warning("%s:%d: GL Error: gl_shader_check_error unsupported object query 0x%X\n", file, line, (unsigned int)obj_query); return -1; } @@ -164,57 +164,57 @@ int gl_shader_check_error(GLhandleARB obj, GLenum obj_query, GLSLCheckMode m, co if( param!=GL_PROGRAM_OBJECT_ARB && param!=GL_SHADER_OBJECT_ARB ) { if ( CHECK_VERBOSE <= m ) - mame_printf_warning("%s:%d: GL Error: object type 0x%X generation failed\n", file, line, (unsigned int)(FPTR)obj); + osd_printf_warning("%s:%d: GL Error: object type 0x%X generation failed\n", file, line, (unsigned int)(FPTR)obj); res=-1; } else if ( CHECK_ALWAYS_VERBOSE <= m ) { if(param==GL_PROGRAM_OBJECT_ARB) - mame_printf_warning("%s:%d: GL Error: object type 0x%X is PROGRAM, successful\n", file, line, (unsigned int)(FPTR)obj); + osd_printf_warning("%s:%d: GL Error: object type 0x%X is PROGRAM, successful\n", file, line, (unsigned int)(FPTR)obj); else - mame_printf_warning("%s:%d: GL Info: object type 0x%X is SHADER, successful\n", file, line, (unsigned int)(FPTR)obj); + osd_printf_warning("%s:%d: GL Info: object type 0x%X is SHADER, successful\n", file, line, (unsigned int)(FPTR)obj); } break; case GL_OBJECT_DELETE_STATUS_ARB: if(param!=1) { if ( CHECK_ALWAYS_VERBOSE <= m ) - mame_printf_warning("%s:%d: GL Info: object 0x%X not yet marked for deletion\n", file, line, (unsigned int)(FPTR)obj); + osd_printf_warning("%s:%d: GL Info: object 0x%X not yet marked for deletion\n", file, line, (unsigned int)(FPTR)obj); } else if ( CHECK_ALWAYS_VERBOSE <= m ) { - mame_printf_warning("%s:%d: GL Info: object 0x%X deletion successful\n", file, line, (unsigned int)(FPTR)obj); + osd_printf_warning("%s:%d: GL Info: object 0x%X deletion successful\n", file, line, (unsigned int)(FPTR)obj); } break; case GL_OBJECT_COMPILE_STATUS_ARB: if(param!=1) { if ( CHECK_VERBOSE <= m ) - mame_printf_warning("%s:%d: GL Error: object 0x%X compilation failed\n", file, line, (unsigned int)(FPTR)obj); + osd_printf_warning("%s:%d: GL Error: object 0x%X compilation failed\n", file, line, (unsigned int)(FPTR)obj); res=-1; } else if ( CHECK_ALWAYS_VERBOSE <= m ) { - mame_printf_warning("%s:%d: GL Info: object 0x%X compiled successful\n", file, line, (unsigned int)(FPTR)obj); + osd_printf_warning("%s:%d: GL Info: object 0x%X compiled successful\n", file, line, (unsigned int)(FPTR)obj); } break; case GL_OBJECT_LINK_STATUS_ARB: if(param!=1) { if ( CHECK_VERBOSE <= m ) - mame_printf_warning("%s:%d: GL Error: object 0x%X linking failed\n", file, line, (unsigned int)(FPTR)obj); + osd_printf_warning("%s:%d: GL Error: object 0x%X linking failed\n", file, line, (unsigned int)(FPTR)obj); res=-1; } else if ( CHECK_ALWAYS_VERBOSE <= m ) { - mame_printf_warning("%s:%d: GL Info: object 0x%X linked successful\n", file, line, (unsigned int)(FPTR)obj); + osd_printf_warning("%s:%d: GL Info: object 0x%X linked successful\n", file, line, (unsigned int)(FPTR)obj); } break; case GL_OBJECT_VALIDATE_STATUS_ARB: if(param!=1) { if ( CHECK_VERBOSE <= m ) - mame_printf_warning("%s:%d: GL Error: object 0x%X validation failed\n", file, line, (unsigned int)(FPTR)obj); + osd_printf_warning("%s:%d: GL Error: object 0x%X validation failed\n", file, line, (unsigned int)(FPTR)obj); res=-1; } else if ( CHECK_ALWAYS_VERBOSE <= m ) { - mame_printf_warning("%s:%d: GL Info: object 0x%X validation successful\n", file, line, (unsigned int)(FPTR)obj); + osd_printf_warning("%s:%d: GL Info: object 0x%X validation successful\n", file, line, (unsigned int)(FPTR)obj); } break; } @@ -224,7 +224,7 @@ int gl_shader_check_error(GLhandleARB obj, GLenum obj_query, GLSLCheckMode m, co length=0; pfn_glGetInfoLogARB(obj, sizeof(buffer), &length, buffer); if(length>0) - mame_printf_warning("%s:%d glInfoLog: %s\n", file, line, buffer); + osd_printf_warning("%s:%d glInfoLog: %s\n", file, line, buffer); } (void) glGetError(); // ;-) @@ -281,7 +281,7 @@ int gl_texture_check_size(GLenum target, GLint level, GLint internalFormat, GLsi if(verbose) { - mame_printf_warning("gl_texture_size_check: " + osd_printf_warning("gl_texture_size_check: " "TexImage2D(0x%X, %d, 0x%X, %d, %d, %d, 0x%X, 0x%X): returned size does not match: %dx%d\n", (unsigned int)target, (int)level, (int)internalFormat, (int)width, (int)height, (int)border, (unsigned int)format, (unsigned int)type, @@ -355,9 +355,9 @@ int gl_compile_shader_source( GLhandleARB *shader, GLenum type, const char * sha if(shader==NULL || shader_source==NULL) { if(shader==NULL) - mame_printf_warning("error: gl_compile_shader_source: NULL shader passed\n"); + osd_printf_warning("error: gl_compile_shader_source: NULL shader passed\n"); if(shader_source==NULL) - mame_printf_warning("error: gl_compile_shader_source: NULL shader source passed\n"); + osd_printf_warning("error: gl_compile_shader_source: NULL shader source passed\n"); return -1; } *shader = pfn_glCreateShaderObjectARB(type); @@ -371,7 +371,7 @@ int gl_compile_shader_source( GLhandleARB *shader, GLenum type, const char * sha if(err) goto errout; if(verbose) - mame_printf_warning( "<%s>\n", shader_source); + osd_printf_warning( "<%s>\n", shader_source); return 0; @@ -380,7 +380,7 @@ errout: { pfn_glDeleteObjectARB(*shader); } - mame_printf_warning("failed to process shader: <%s>\n", shader_source); + osd_printf_warning("failed to process shader: <%s>\n", shader_source); return err; } @@ -394,16 +394,16 @@ int gl_compile_shader_file( GLhandleARB *shader, GLenum type, const char * shade if(shader==NULL || shader_file==NULL) { if(shader==NULL) - mame_printf_warning("error: gl_compile_shader_source: NULL shader passed\n"); + osd_printf_warning("error: gl_compile_shader_source: NULL shader passed\n"); if(shader_file==NULL) - mame_printf_warning("error: gl_compile_shader_source: NULL shader file passed\n"); + osd_printf_warning("error: gl_compile_shader_source: NULL shader file passed\n"); return -1; } file = fopen(shader_file, "r"); if(!file) { - mame_printf_warning("cannot open shader_file: %s\n", shader_file); + osd_printf_warning("cannot open shader_file: %s\n", shader_file); return -1; } @@ -423,13 +423,13 @@ int gl_compile_shader_file( GLhandleARB *shader, GLenum type, const char * shade free(buffer); if(verbose) - mame_printf_warning("shader file: %s\n", shader_file); + osd_printf_warning("shader file: %s\n", shader_file); return 0; errout: free(buffer); - mame_printf_warning("failed to process shader_file: %s\n", shader_file); + osd_printf_warning("failed to process shader_file: %s\n", shader_file); return err; } @@ -445,19 +445,19 @@ int gl_compile_shader_files( GLhandleARB *program, GLhandleARB *vertex_shader, G if (!program) { err=-1; - mame_printf_warning("no program ptr passed\n"); + osd_printf_warning("no program ptr passed\n"); goto errout; } if (!vertex_shader) { err=-1; - mame_printf_warning("no vertex_shader ptr passed\n"); + osd_printf_warning("no vertex_shader ptr passed\n"); goto errout; } if (!fragment_shader) { err=-1; - mame_printf_warning("no fragment_shader ptr passed\n"); + osd_printf_warning("no fragment_shader ptr passed\n"); goto errout; } @@ -470,7 +470,7 @@ int gl_compile_shader_files( GLhandleARB *program, GLhandleARB *vertex_shader, G if (!(*vertex_shader)) { err=-1; - mame_printf_warning("no vertex_shader_file, nor vertex_shader id passed\n"); + osd_printf_warning("no vertex_shader_file, nor vertex_shader id passed\n"); goto errout; } err=GL_SHADER_CHECK(*vertex_shader, GL_OBJECT_TYPE_ARB); @@ -486,7 +486,7 @@ int gl_compile_shader_files( GLhandleARB *program, GLhandleARB *vertex_shader, G if (!(*fragment_shader)) { err=-1; - mame_printf_warning("no fragment_shader_file, nor fragment_shader id passed\n"); + osd_printf_warning("no fragment_shader_file, nor fragment_shader id passed\n"); goto errout; } err=GL_SHADER_CHECK(*fragment_shader, GL_OBJECT_TYPE_ARB); @@ -523,19 +523,19 @@ int gl_compile_shader_sources( GLhandleARB *program, GLhandleARB *vertex_shader, if (!program) { err=-1; - mame_printf_warning("no program ptr passed\n"); + osd_printf_warning("no program ptr passed\n"); goto errout; } if (!vertex_shader) { err=-1; - mame_printf_warning("no vertex_shader ptr passed\n"); + osd_printf_warning("no vertex_shader ptr passed\n"); goto errout; } if (!fragment_shader) { err=-1; - mame_printf_warning("no fragment_shader ptr passed\n"); + osd_printf_warning("no fragment_shader ptr passed\n"); goto errout; } @@ -548,7 +548,7 @@ int gl_compile_shader_sources( GLhandleARB *program, GLhandleARB *vertex_shader, if (!(*vertex_shader)) { err=-1; - mame_printf_warning("no vertex_shader_source nor a vertex_shader id passed\n"); + osd_printf_warning("no vertex_shader_source nor a vertex_shader id passed\n"); goto errout; } err=GL_SHADER_CHECK(*vertex_shader, GL_OBJECT_TYPE_ARB); @@ -559,7 +559,7 @@ int gl_compile_shader_sources( GLhandleARB *program, GLhandleARB *vertex_shader, if (!(*fragment_shader)) { err=-1; - mame_printf_warning("no fragment_shader_source nor a fragment_shader id passed\n"); + osd_printf_warning("no fragment_shader_source nor a fragment_shader id passed\n"); goto errout; } err=GL_SHADER_CHECK(*fragment_shader, GL_OBJECT_TYPE_ARB); @@ -583,18 +583,18 @@ int gl_compile_shader_sources( GLhandleARB *program, GLhandleARB *vertex_shader, pfn_glLinkProgramARB(*program); err=GL_SHADER_CHECK(*program, GL_OBJECT_LINK_STATUS_ARB); if(err) { - mame_printf_warning("failed to link program\n"); - mame_printf_warning("vertex shader: <%s>\n", vertex_shader_source); - mame_printf_warning("fragment shader: <%s>\n", fragment_shader_source); + osd_printf_warning("failed to link program\n"); + osd_printf_warning("vertex shader: <%s>\n", vertex_shader_source); + osd_printf_warning("fragment shader: <%s>\n", fragment_shader_source); goto errout; } pfn_glValidateProgramARB(*program); err=GL_SHADER_CHECK(*program, GL_OBJECT_VALIDATE_STATUS_ARB); if(err) { - mame_printf_warning("failed to validate program\n"); - mame_printf_warning("vertex shader: <%s>\n", vertex_shader_source); - mame_printf_warning("fragment shader: <%s>\n", fragment_shader_source); + osd_printf_warning("failed to validate program\n"); + osd_printf_warning("vertex shader: <%s>\n", vertex_shader_source); + osd_printf_warning("fragment shader: <%s>\n", fragment_shader_source); goto errout; } diff --git a/src/osd/sdl/input.c b/src/osd/sdl/input.c index 618615448cc..d6a93f1e0aa 100644 --- a/src/osd/sdl/input.c +++ b/src/osd/sdl/input.c @@ -685,7 +685,7 @@ static void devmap_init(running_machine &machine, device_map_t *devmap, const ch if (dev_name && *dev_name && strcmp(dev_name,SDLOPTVAL_AUTO)) { devmap->map[dev].name = remove_spaces(machine, dev_name); - mame_printf_verbose("%s: Logical id %d: %s\n", label, dev + 1, devmap->map[dev].name); + osd_printf_verbose("%s: Logical id %d: %s\n", label, dev + 1, devmap->map[dev].name); devmap->initialized = 1; } } @@ -730,7 +730,7 @@ static void sdlinput_register_joysticks(running_machine &machine) devmap_init(machine, &joy_map, SDLOPTION_JOYINDEX, 8, "Joystick mapping"); - mame_printf_verbose("Joystick: Start initialization\n"); + osd_printf_verbose("Joystick: Start initialization\n"); for (physical_stick = 0; physical_stick < SDL_NumJoysticks(); physical_stick++) { char *joy_name; @@ -759,9 +759,9 @@ static void sdlinput_register_joysticks(running_machine &machine) devinfo->joystick.device = joy; - mame_printf_verbose("Joystick: %s\n", devinfo->name.cstr()); - mame_printf_verbose("Joystick: ... %d axes, %d buttons %d hats %d balls\n", SDL_JoystickNumAxes(joy), SDL_JoystickNumButtons(joy), SDL_JoystickNumHats(joy), SDL_JoystickNumBalls(joy)); - mame_printf_verbose("Joystick: ... Physical id %d mapped to logical id %d\n", physical_stick, stick); + osd_printf_verbose("Joystick: %s\n", devinfo->name.cstr()); + osd_printf_verbose("Joystick: ... %d axes, %d buttons %d hats %d balls\n", SDL_JoystickNumAxes(joy), SDL_JoystickNumButtons(joy), SDL_JoystickNumHats(joy), SDL_JoystickNumBalls(joy)); + osd_printf_verbose("Joystick: ... Physical id %d mapped to logical id %d\n", physical_stick, stick); // loop over all axes for (axis = 0; axis < SDL_JoystickNumAxes(joy); axis++) @@ -832,7 +832,7 @@ static void sdlinput_register_joysticks(running_machine &machine) devinfo->device->add_item(tempname, (input_item_id) (itemid + 1), generic_axis_get_state, &devinfo->joystick.balls[ball * 2 + 1]); } } - mame_printf_verbose("Joystick: End initialization\n"); + osd_printf_verbose("Joystick: End initialization\n"); } //============================================================ @@ -843,14 +843,14 @@ static void sdlinput_deregister_joysticks(running_machine &machine) { device_info *curdev; - mame_printf_verbose("Joystick: Start deinitialization\n"); + osd_printf_verbose("Joystick: Start deinitialization\n"); for (curdev = joystick_list; curdev != NULL; curdev = curdev->next) { SDL_JoystickClose(curdev->joystick.device); } - mame_printf_verbose("Joystick: End deinitialization\n"); + osd_printf_verbose("Joystick: End deinitialization\n"); } //============================================================ @@ -873,7 +873,7 @@ static void sdlinput_register_mice(running_machine &machine) devmap_register(&mouse_map, physical_mouse, mouse_name); } - mame_printf_verbose("Mouse: Start initialization\n"); + osd_printf_verbose("Mouse: Start initialization\n"); for (index = 0; index < MAX_DEVMAP_ENTRIES; index++) { device_info *devinfo; @@ -903,9 +903,9 @@ static void sdlinput_register_mice(running_machine &machine) if (0 && mouse_enabled) SDL_SetRelativeMouseMode(index, SDL_TRUE); - mame_printf_verbose("Mouse: Registered %s\n", devinfo->name.cstr()); + osd_printf_verbose("Mouse: Registered %s\n", devinfo->name.cstr()); } - mame_printf_verbose("Mouse: End initialization\n"); + osd_printf_verbose("Mouse: End initialization\n"); } #else static void sdlinput_register_mice(running_machine &machine) @@ -914,7 +914,7 @@ static void sdlinput_register_mice(running_machine &machine) char defname[20]; int button; - mame_printf_verbose("Mouse: Start initialization\n"); + osd_printf_verbose("Mouse: Start initialization\n"); mouse_map.logical[0] = 0; @@ -936,8 +936,8 @@ static void sdlinput_register_mice(running_machine &machine) devinfo->device->add_item(defname, itemid, generic_button_get_state, &devinfo->mouse.buttons[button]); } - mame_printf_verbose("Mouse: Registered %s\n", devinfo->name.cstr()); - mame_printf_verbose("Mouse: End initialization\n"); + osd_printf_verbose("Mouse: Registered %s\n", devinfo->name.cstr()); + osd_printf_verbose("Mouse: End initialization\n"); } #endif @@ -1157,7 +1157,7 @@ static void sdlinput_register_lightguns(running_machine &machine) } } } - mame_printf_verbose("Lightgun: End initialization\n"); + osd_printf_verbose("Lightgun: End initialization\n"); } #endif @@ -1233,12 +1233,12 @@ static kt_table * sdlinput_read_keymap(running_machine &machine) return sdl_key_trans_table; keymap_filename = (char *)downcast(machine.options()).keymap_file(); - mame_printf_verbose("Keymap: Start reading keymap_file %s\n", keymap_filename); + osd_printf_verbose("Keymap: Start reading keymap_file %s\n", keymap_filename); keymap_file = fopen(keymap_filename, "r"); if (keymap_file == NULL) { - mame_printf_warning( "Keymap: Unable to open keymap %s, using default\n", keymap_filename); + osd_printf_warning( "Keymap: Unable to open keymap %s, using default\n", keymap_filename); return sdl_key_trans_table; } @@ -1277,16 +1277,16 @@ static kt_table * sdlinput_read_keymap(running_machine &machine) //key_trans_table[index][ASCII_KEY] = ak; key_trans_table[index].ui_name = auto_alloc_array(machine, char, strlen(kns)+1); strcpy(key_trans_table[index].ui_name, kns); - mame_printf_verbose("Keymap: Mapped <%s> to <%s> with ui-text <%s>\n", sks, mks, kns); + osd_printf_verbose("Keymap: Mapped <%s> to <%s> with ui-text <%s>\n", sks, mks, kns); } else - mame_printf_warning("Keymap: Error on line %d - %s key not found: %s\n", line, (sk<0) ? "sdl" : "mame", buf); + osd_printf_warning("Keymap: Error on line %d - %s key not found: %s\n", line, (sk<0) ? "sdl" : "mame", buf); } } line++; } fclose(keymap_file); - mame_printf_verbose("Keymap: Processed %d lines\n", line); + osd_printf_verbose("Keymap: Processed %d lines\n", line); return key_trans_table; } @@ -1316,7 +1316,7 @@ static void sdlinput_register_keyboards(running_machine &machine) devmap_register(&keyboard_map, physical_keyboard, defname); } - mame_printf_verbose("Keyboard: Start initialization\n"); + osd_printf_verbose("Keyboard: Start initialization\n"); for (index = 0; index < MAX_DEVMAP_ENTRIES; index++) { device_info *devinfo; @@ -1342,9 +1342,9 @@ static void sdlinput_register_keyboards(running_machine &machine) devinfo->device->add_item(defname, itemid, generic_button_get_state, &devinfo->keyboard.state[OSD_SDL_INDEX(key_trans_table[keynum].sdl_key)]); } - mame_printf_verbose("Keyboard: Registered %s\n", devinfo->name.cstr()); + osd_printf_verbose("Keyboard: Registered %s\n", devinfo->name.cstr()); } - mame_printf_verbose("Keyboard: End initialization\n"); + osd_printf_verbose("Keyboard: End initialization\n"); } #else static void sdlinput_register_keyboards(running_machine &machine) @@ -1358,7 +1358,7 @@ static void sdlinput_register_keyboards(running_machine &machine) keyboard_map.logical[0] = 0; - mame_printf_verbose("Keyboard: Start initialization\n"); + osd_printf_verbose("Keyboard: Start initialization\n"); // SDL 1.2 only has 1 keyboard (1.3+ will have multiple, this must be revisited then) // add it now @@ -1380,8 +1380,8 @@ static void sdlinput_register_keyboards(running_machine &machine) devinfo->device->add_item(defname, itemid, generic_button_get_state, &devinfo->keyboard.state[OSD_SDL_INDEX(key_trans_table[keynum].sdl_key)]); } - mame_printf_verbose("Keyboard: Registered %s\n", devinfo->name.cstr()); - mame_printf_verbose("Keyboard: End initialization\n"); + osd_printf_verbose("Keyboard: Registered %s\n", devinfo->name.cstr()); + osd_printf_verbose("Keyboard: End initialization\n"); } #endif @@ -1420,7 +1420,7 @@ void sdlinput_init(running_machine &machine) if (machine.debug_flags & DEBUG_FLAG_OSD_ENABLED) { - mame_printf_warning("Debug Build: Disabling input grab for -debug\n"); + osd_printf_warning("Debug Build: Disabling input grab for -debug\n"); mouse_enabled = 0; } @@ -1600,7 +1600,7 @@ void sdlinput_process_events_buf(running_machine &machine) if (event_buf_count < MAX_BUF_EVENTS) event_buf[event_buf_count++] = event; else - mame_printf_warning("Event Buffer Overflow!\n"); + osd_printf_warning("Event Buffer Overflow!\n"); } osd_lock_release(input_lock); } diff --git a/src/osd/sdl/netdev_pcap.c b/src/osd/sdl/netdev_pcap.c index 6f0c3ce6892..857d8f55e8d 100644 --- a/src/osd/sdl/netdev_pcap.c +++ b/src/osd/sdl/netdev_pcap.c @@ -27,12 +27,12 @@ netdev_pcap::netdev_pcap(const char *name, class device_network_interface *ifdev m_p = pcap_open_live(name, 65535, 1, 1, errbuf); if(!m_p) { - mame_printf_verbose("Unable to open %s: %s\n", name, errbuf); + osd_printf_verbose("Unable to open %s: %s\n", name, errbuf); return; } if(pcap_set_datalink(m_p, DLT_EN10MB) == -1) { - mame_printf_verbose("Unable to set %s to ethernet", name); + osd_printf_verbose("Unable to set %s to ethernet", name); pcap_close(m_p); m_p = NULL; return; @@ -80,7 +80,7 @@ void init_pcap() char errbuf[PCAP_ERRBUF_SIZE]; if(pcap_findalldevs(&devs, errbuf) == -1) { - mame_printf_verbose("Unable to get network devices: %s\n", errbuf); + osd_printf_verbose("Unable to get network devices: %s\n", errbuf); return; } diff --git a/src/osd/sdl/netdev_pcap_osx.c b/src/osd/sdl/netdev_pcap_osx.c index 4f005efd1a8..f2c083940d8 100644 --- a/src/osd/sdl/netdev_pcap_osx.c +++ b/src/osd/sdl/netdev_pcap_osx.c @@ -64,12 +64,12 @@ netdev_pcap::netdev_pcap(const char *name, class device_network_interface *ifdev m_p = pcap_open_live(name, 65535, 1, 1, errbuf); if(!m_p) { - mame_printf_verbose("Unable to open %s: %s\n", name, errbuf); + osd_printf_verbose("Unable to open %s: %s\n", name, errbuf); return; } if(pcap_set_datalink(m_p, DLT_EN10MB) == -1) { - mame_printf_verbose("Unable to set %s to ethernet\n", name); + osd_printf_verbose("Unable to set %s to ethernet\n", name); pcap_close(m_p); m_p = NULL; return; @@ -89,10 +89,10 @@ void netdev_pcap::set_mac(const char *mac) if(!m_p) return; sprintf(filter, "not ether src %.2X:%.2X:%.2X:%.2X:%.2X:%.2X and (ether dst %.2X:%.2X:%.2X:%.2X:%.2X:%.2X or ether multicast or ether broadcast or ether dst 09:00:07:ff:ff:ff)", (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5], (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5]); if(pcap_compile(m_p, &fp, filter, 1, 0) == -1) { - mame_printf_verbose("Error with pcap_compile\n"); + osd_printf_verbose("Error with pcap_compile\n"); } if(pcap_setfilter(m_p, &fp) == -1) { - mame_printf_verbose("Error with pcap_setfilter\n"); + osd_printf_verbose("Error with pcap_setfilter\n"); } } @@ -136,7 +136,7 @@ void init_pcap() char errbuf[PCAP_ERRBUF_SIZE]; if(pcap_findalldevs(&devs, errbuf) == -1) { - mame_printf_verbose("Unable to get network devices: %s\n", errbuf); + osd_printf_verbose("Unable to get network devices: %s\n", errbuf); return; } diff --git a/src/osd/sdl/netdev_tap.c b/src/osd/sdl/netdev_tap.c index 06e79f9fa57..3d51251383a 100644 --- a/src/osd/sdl/netdev_tap.c +++ b/src/osd/sdl/netdev_tap.c @@ -38,7 +38,7 @@ netdev_tap::netdev_tap(const char *name, class device_network_interface *ifdev, m_fd = -1; if((m_fd = open("/dev/net/tun", O_RDWR)) == -1) { - mame_printf_verbose("tap: open failed %d\n", errno); + osd_printf_verbose("tap: open failed %d\n", errno); return; } @@ -46,12 +46,12 @@ netdev_tap::netdev_tap(const char *name, class device_network_interface *ifdev, ifr.ifr_flags = IFF_TAP | IFF_NO_PI; sprintf(ifr.ifr_name, "tap-mess-%d-0", getuid()); if(ioctl(m_fd, TUNSETIFF, (void *)&ifr) == -1) { - mame_printf_verbose("tap: ioctl failed %d\n", errno); + osd_printf_verbose("tap: ioctl failed %d\n", errno); close(m_fd); m_fd = -1; return; } - mame_printf_verbose("netdev_tap: network up!\n"); + osd_printf_verbose("netdev_tap: network up!\n"); strncpy(m_ifname, ifr.ifr_name, 10); fcntl(m_fd, F_SETFL, O_NONBLOCK); diff --git a/src/osd/sdl/output.c b/src/osd/sdl/output.c index 8ce46cbabfb..3f6b75372d9 100644 --- a/src/osd/sdl/output.c +++ b/src/osd/sdl/output.c @@ -82,13 +82,13 @@ void sdloutput_init(running_machine &machine) if (fildes < 0) { output = NULL; - mame_printf_verbose("output: unable to open output notifier file %s\n", SDLMAME_OUTPUT); + osd_printf_verbose("output: unable to open output notifier file %s\n", SDLMAME_OUTPUT); } else { output = fdopen(fildes, "w"); - mame_printf_verbose("output: opened output notifier file %s\n", SDLMAME_OUTPUT); + osd_printf_verbose("output: opened output notifier file %s\n", SDLMAME_OUTPUT); fprintf(output, "MAME " PID_FMT " START %s\n", osd_getpid(), machine.system().name); fflush(output); } @@ -109,7 +109,7 @@ static void sdloutput_exit(running_machine &machine) fflush(output); fclose(output); output = NULL; - mame_printf_verbose("output: closed output notifier file\n"); + osd_printf_verbose("output: closed output notifier file\n"); } } diff --git a/src/osd/sdl/sdlmain.c b/src/osd/sdl/sdlmain.c index 8af04773765..4c91d17abd4 100644 --- a/src/osd/sdl/sdlmain.c +++ b/src/osd/sdl/sdlmain.c @@ -469,18 +469,18 @@ void sdl_osd_interface::osd_exit(running_machine &machine) #define MACRO_VERBOSE(_mac) \ do { \ if (strcmp(MAC_EXPAND_STR(_mac), #_mac) != 0) \ - mame_printf_verbose("%s=%s ", #_mac, MAC_EXPAND_STR(_mac)); \ + osd_printf_verbose("%s=%s ", #_mac, MAC_EXPAND_STR(_mac)); \ } while (0) #define _SDL_VER #SDL_MAJOR_VERSION "." #SDL_MINOR_VERSION "." #SDL_PATCHLEVEL static void defines_verbose(void) { - mame_printf_verbose("Build version: %s\n", build_version); - mame_printf_verbose("Build architecure: "); + osd_printf_verbose("Build version: %s\n", build_version); + osd_printf_verbose("Build architecure: "); MACRO_VERBOSE(SDLMAME_ARCH); - mame_printf_verbose("\n"); - mame_printf_verbose("Build defines 1: "); + osd_printf_verbose("\n"); + osd_printf_verbose("Build defines 1: "); MACRO_VERBOSE(SDLMAME_UNIX); MACRO_VERBOSE(SDLMAME_X11); MACRO_VERBOSE(SDLMAME_WIN32); @@ -492,8 +492,8 @@ static void defines_verbose(void) MACRO_VERBOSE(SDLMAME_NOASM); MACRO_VERBOSE(SDLMAME_IRIX); MACRO_VERBOSE(SDLMAME_BSD); - mame_printf_verbose("\n"); - mame_printf_verbose("Build defines 1: "); + osd_printf_verbose("\n"); + osd_printf_verbose("Build defines 1: "); MACRO_VERBOSE(LSB_FIRST); MACRO_VERBOSE(PTR64); MACRO_VERBOSE(MAME_DEBUG); @@ -502,30 +502,30 @@ static void defines_verbose(void) MACRO_VERBOSE(CPP_COMPILE); MACRO_VERBOSE(DISTRO); MACRO_VERBOSE(SYNC_IMPLEMENTATION); - mame_printf_verbose("\n"); - mame_printf_verbose("SDL/OpenGL defines: "); - mame_printf_verbose("SDL_COMPILEDVERSION=%d ", SDL_COMPILEDVERSION); + osd_printf_verbose("\n"); + osd_printf_verbose("SDL/OpenGL defines: "); + osd_printf_verbose("SDL_COMPILEDVERSION=%d ", SDL_COMPILEDVERSION); MACRO_VERBOSE(USE_OPENGL); MACRO_VERBOSE(USE_DISPATCH_GL); - mame_printf_verbose("\n"); - mame_printf_verbose("Compiler defines A: "); + osd_printf_verbose("\n"); + osd_printf_verbose("Compiler defines A: "); MACRO_VERBOSE(__GNUC__); MACRO_VERBOSE(__GNUC_MINOR__); MACRO_VERBOSE(__GNUC_PATCHLEVEL__); MACRO_VERBOSE(__VERSION__); - mame_printf_verbose("\n"); - mame_printf_verbose("Compiler defines B: "); + osd_printf_verbose("\n"); + osd_printf_verbose("Compiler defines B: "); MACRO_VERBOSE(__amd64__); MACRO_VERBOSE(__x86_64__); MACRO_VERBOSE(__unix__); MACRO_VERBOSE(__i386__); MACRO_VERBOSE(__ppc__); MACRO_VERBOSE(__ppc64__); - mame_printf_verbose("\n"); - mame_printf_verbose("Compiler defines C: "); + osd_printf_verbose("\n"); + osd_printf_verbose("Compiler defines C: "); MACRO_VERBOSE(_FORTIFY_SOURCE); MACRO_VERBOSE(__USE_FORTIFY_LEVEL); - mame_printf_verbose("\n"); + osd_printf_verbose("\n"); } //============================================================ @@ -537,39 +537,39 @@ static void osd_sdl_info(void) #if SDLMAME_SDL2 int i, num = SDL_GetNumVideoDrivers(); - mame_printf_verbose("Available videodrivers: "); + osd_printf_verbose("Available videodrivers: "); for (i=0;iid); if (r==0) return; - //mame_printf_error("Error on lock: %d: %s\n", r, strerror(r)); + //osd_printf_error("Error on lock: %d: %s\n", r, strerror(r)); } //============================================================ @@ -144,7 +144,7 @@ int osd_lock_try(osd_lock *lock) if (r==0) return 1; //if (r!=EBUSY) - // mame_printf_error("Error on trylock: %d: %s\n", r, strerror(r)); + // osd_printf_error("Error on trylock: %d: %s\n", r, strerror(r)); return 0; } diff --git a/src/osd/sdl/sound.c b/src/osd/sdl/sound.c index bd4b3a8889d..e8138536217 100644 --- a/src/osd/sdl/sound.c +++ b/src/osd/sdl/sound.c @@ -118,7 +118,7 @@ static void sdl_cleanup_audio(running_machine &machine) // print out over/underflow stats if (buffer_overflows || buffer_underflows) - mame_printf_verbose("Sound buffer: overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows); + osd_printf_verbose("Sound buffer: overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows); if (LOG_SOUND) { @@ -431,13 +431,13 @@ static int sdl_init(running_machine &machine) sdl_cleanup_audio(machine); } - mame_printf_verbose("Audio: Start initialization\n"); + osd_printf_verbose("Audio: Start initialization\n"); #if (SDLMAME_SDL2) strncpy(audio_driver, SDL_GetCurrentAudioDriver(), sizeof(audio_driver)); #else SDL_AudioDriverName(audio_driver, sizeof(audio_driver)); #endif - mame_printf_verbose("Audio: Driver is %s\n", audio_driver); + osd_printf_verbose("Audio: Driver is %s\n", audio_driver); initialized_audio = 0; @@ -459,7 +459,7 @@ static int sdl_init(running_machine &machine) initialized_audio = 1; snd_enabled = 1; - mame_printf_verbose("Audio: frequency: %d, channels: %d, samples: %d\n", + osd_printf_verbose("Audio: frequency: %d, channels: %d, samples: %d\n", obtained.freq, obtained.channels, obtained.samples); sdl_xfer_samples = obtained.samples; @@ -486,13 +486,13 @@ static int sdl_init(running_machine &machine) if (sdl_create_buffers()) goto cant_create_buffers; - mame_printf_verbose("Audio: End initialization\n"); + osd_printf_verbose("Audio: End initialization\n"); return 0; // error handling cant_create_buffers: cant_start_audio: - mame_printf_verbose("Audio: Initialization failed. SDL error: %s\n", SDL_GetError()); + osd_printf_verbose("Audio: Initialization failed. SDL error: %s\n", SDL_GetError()); return 0; } @@ -507,7 +507,7 @@ static void sdl_kill(running_machine &machine) { if (initialized_audio) { - mame_printf_verbose("sdl_kill: closing audio\n"); + osd_printf_verbose("sdl_kill: closing audio\n"); SDL_CloseAudio(); } @@ -521,7 +521,7 @@ static void sdl_kill(running_machine &machine) static int sdl_create_buffers(void) { - mame_printf_verbose("sdl_create_buffers: creating stream buffer of %u bytes\n", stream_buffer_size); + osd_printf_verbose("sdl_create_buffers: creating stream buffer of %u bytes\n", stream_buffer_size); stream_buffer = global_alloc_array_clear(INT8, stream_buffer_size); stream_playpos = 0; diff --git a/src/osd/sdl/video.c b/src/osd/sdl/video.c index 84d39987454..b4e020631b8 100644 --- a/src/osd/sdl/video.c +++ b/src/osd/sdl/video.c @@ -247,10 +247,10 @@ void sdlvideo_monitor_refresh(sdl_monitor_info *monitor) } if ((cw==0) || (ch==0)) { - mame_printf_warning("WARNING: SDL_GetVideoInfo() for driver <%s> is broken.\n", monitor->monitor_device); - mame_printf_warning(" You should set SDLMAME_DESKTOPDIM to your desktop size.\n"); - mame_printf_warning(" e.g. export SDLMAME_DESKTOPDIM=800x600\n"); - mame_printf_warning(" Assuming 1024x768 now!\n"); + osd_printf_warning("WARNING: SDL_GetVideoInfo() for driver <%s> is broken.\n", monitor->monitor_device); + osd_printf_warning(" You should set SDLMAME_DESKTOPDIM to your desktop size.\n"); + osd_printf_warning(" e.g. export SDLMAME_DESKTOPDIM=800x600\n"); + osd_printf_warning(" Assuming 1024x768 now!\n"); cw=1024; ch=768; } @@ -274,8 +274,8 @@ void sdlvideo_monitor_refresh(sdl_monitor_info *monitor) static int info_shown=0; if (!info_shown) { - mame_printf_verbose("SDL Device Driver : %s\n", monitor->monitor_device); - mame_printf_verbose("SDL Monitor Dimensions: %d x %d\n", monitor->monitor_width, monitor->monitor_height); + osd_printf_verbose("SDL Device Driver : %s\n", monitor->monitor_device); + osd_printf_verbose("SDL Monitor Dimensions: %d x %d\n", monitor->monitor_width, monitor->monitor_height); info_shown = 1; } } @@ -448,7 +448,7 @@ static void init_monitors(void) { int i; - mame_printf_verbose("Enter init_monitors\n"); + osd_printf_verbose("Enter init_monitors\n"); for (i = 0; i < SDL_GetNumVideoDisplays(); i++) { @@ -468,7 +468,7 @@ static void init_monitors(void) monitor->handle = i; // guess the aspect ratio assuming square pixels monitor->aspect = (float)(dmode.w) / (float)(dmode.h); - mame_printf_verbose("Adding monitor %s (%d x %d)\n", monitor->monitor_device, dmode.w, dmode.h); + osd_printf_verbose("Adding monitor %s (%d x %d)\n", monitor->monitor_device, dmode.w, dmode.h); // save the primary monitor handle if (i == 0) @@ -479,7 +479,7 @@ static void init_monitors(void) tailptr = &monitor->next; } } - mame_printf_verbose("Leave init_monitors\n"); + osd_printf_verbose("Leave init_monitors\n"); #elif defined(SDLMAME_WIN32) EnumDisplayMonitors(NULL, NULL, monitor_enum_callback, (LPARAM)&tailptr); #else @@ -642,7 +642,7 @@ static void extract_video_config(running_machine &machine) video_config.novideo = 1; if (options.seconds_to_run() == 0) - mame_printf_warning("Warning: -video none doesn't make much sense without -seconds_to_run\n"); + osd_printf_warning("Warning: -video none doesn't make much sense without -seconds_to_run\n"); } else if (USE_OPENGL && (strcmp(stemp, SDLOPTVAL_OPENGL) == 0)) video_config.mode = VIDEO_MODE_OPENGL; @@ -658,7 +658,7 @@ static void extract_video_config(running_machine &machine) } else { - mame_printf_warning("Invalid video value %s; reverting to software\n", stemp); + osd_printf_warning("Invalid video value %s; reverting to software\n", stemp); video_config.mode = VIDEO_MODE_SOFT; } @@ -669,7 +669,7 @@ static void extract_video_config(running_machine &machine) video_config.syncrefresh = options.sync_refresh(); if (!video_config.waitvsync && video_config.syncrefresh) { - mame_printf_warning("-syncrefresh specified without -waitsync. Reverting to -nosyncrefresh\n"); + osd_printf_warning("-syncrefresh specified without -waitsync. Reverting to -nosyncrefresh\n"); video_config.syncrefresh = 0; } @@ -681,7 +681,7 @@ static void extract_video_config(running_machine &machine) video_config.prescale = options.prescale(); if (video_config.prescale < 1 || video_config.prescale > 3) { - mame_printf_warning("Invalid prescale option, reverting to '1'\n"); + osd_printf_warning("Invalid prescale option, reverting to '1'\n"); video_config.prescale = 1; } // default to working video please @@ -748,13 +748,13 @@ static void extract_video_config(running_machine &machine) #if (!SDLMAME_SDL2) if (video_config.numscreens < 1 || video_config.numscreens > 1) //MAX_VIDEO_WINDOWS) { - mame_printf_warning("Invalid numscreens value %d; reverting to 1\n", video_config.numscreens); + osd_printf_warning("Invalid numscreens value %d; reverting to 1\n", video_config.numscreens); video_config.numscreens = 1; } #else if (video_config.numscreens < 1 || video_config.numscreens > MAX_VIDEO_WINDOWS) { - mame_printf_warning("Invalid numscreens value %d; reverting to 1\n", video_config.numscreens); + osd_printf_warning("Invalid numscreens value %d; reverting to 1\n", video_config.numscreens); video_config.numscreens = 1; } #endif @@ -763,12 +763,12 @@ static void extract_video_config(running_machine &machine) video_config.scale_mode = drawsdl_scale_mode(stemp); if (video_config.scale_mode < 0) { - mame_printf_warning("Invalid yuvmode value %s; reverting to none\n", stemp); + osd_printf_warning("Invalid yuvmode value %s; reverting to none\n", stemp); video_config.scale_mode = VIDEO_SCALE_MODE_NONE; } if ( (video_config.mode != VIDEO_MODE_SOFT) && (video_config.scale_mode != VIDEO_SCALE_MODE_NONE) ) { - mame_printf_warning("scalemode is only for -video soft, overriding\n"); + osd_printf_warning("scalemode is only for -video soft, overriding\n"); video_config.scale_mode = VIDEO_SCALE_MODE_NONE; } } @@ -789,7 +789,7 @@ static float get_aspect(const char *defdata, const char *data, int report_error) data = defdata; } if (sscanf(data, "%d:%d", &num, &den) != 2 && report_error) - mame_printf_error("Illegal aspect ratio value = %s\n", data); + osd_printf_error("Illegal aspect ratio value = %s\n", data); return (float)num / (float)den; } @@ -812,5 +812,5 @@ static void get_resolution(const char *defdata, const char *data, sdl_window_con } if (sscanf(data, "%dx%dx%d@%d", &config->width, &config->height, &config->depth, &config->refresh) < 2 && report_error) - mame_printf_error("Illegal resolution value = %s\n", data); + osd_printf_error("Illegal resolution value = %s\n", data); } diff --git a/src/osd/sdl/window.c b/src/osd/sdl/window.c index e4c2054ba3d..3b8e13d86f6 100644 --- a/src/osd/sdl/window.c +++ b/src/osd/sdl/window.c @@ -193,7 +193,7 @@ static OSDWORK_CALLBACK(sdlwindow_thread_id) if (SDL_Init(SDL_INIT_TIMER|SDL_INIT_AUDIO| SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) #endif { - mame_printf_error("Could not initialize SDL: %s.\n", SDL_GetError()); + osd_printf_error("Could not initialize SDL: %s.\n", SDL_GetError()); exit(-1); } } @@ -208,7 +208,7 @@ static OSDWORK_CALLBACK(sdlwindow_thread_id) int sdlwindow_init(running_machine &machine) { - mame_printf_verbose("Enter sdlwindow_init\n"); + osd_printf_verbose("Enter sdlwindow_init\n"); // determine if we are using multithreading or not multithreading_enabled = downcast(machine.options()).multithreading(); @@ -257,7 +257,7 @@ int sdlwindow_init(running_machine &machine) // set up the window list last_window_ptr = &sdl_window_list; - mame_printf_verbose("Leave sdlwindow_init\n"); + osd_printf_verbose("Leave sdlwindow_init\n"); return 0; } @@ -273,7 +273,7 @@ static void sdlwindow_sync(void) // Fallback while (!osd_work_queue_wait(work_queue, osd_ticks_per_second()*10)) { - mame_printf_warning("sdlwindow_sync: Sleeping...\n"); + osd_printf_warning("sdlwindow_sync: Sleeping...\n"); osd_sleep(100000); } } @@ -300,7 +300,7 @@ static void sdlwindow_exit(running_machine &machine) { ASSERT_MAIN_THREAD(); - mame_printf_verbose("Enter sdlwindow_exit\n"); + osd_printf_verbose("Enter sdlwindow_exit\n"); // free all the windows while (sdl_window_list != NULL) @@ -326,7 +326,7 @@ static void sdlwindow_exit(running_machine &machine) osd_work_queue_wait(work_queue, 1000000); osd_work_queue_free(work_queue); } - mame_printf_verbose("Leave sdlwindow_exit\n"); + osd_printf_verbose("Leave sdlwindow_exit\n"); } @@ -836,7 +836,7 @@ static void pick_best_mode(sdl_window_info *window, int *fswidth, int *fsheight) if (num == 0) { - mame_printf_error("SDL: No modes available?!\n"); + osd_printf_error("SDL: No modes available?!\n"); exit(-1); } else @@ -865,7 +865,7 @@ static void pick_best_mode(sdl_window_info *window, int *fswidth, int *fsheight) if (window->refresh) size_score *= 1.0f / (1.0f + fabsf(window->refresh - mode.refresh_rate) / 10.0f); - mame_printf_verbose("%4dx%4d@%2d -> %f\n", (int)mode.w, (int)mode.h, (int) mode.refresh_rate, size_score); + osd_printf_verbose("%4dx%4d@%2d -> %f\n", (int)mode.w, (int)mode.h, (int) mode.refresh_rate, size_score); // best so far? if (size_score > best_score) @@ -912,7 +912,7 @@ static void pick_best_mode(sdl_window_info *window, int *fswidth, int *fsheight) if (modes == (SDL_Rect **)0) { - mame_printf_error("SDL: No modes available?!\n"); + osd_printf_error("SDL: No modes available?!\n"); exit(-1); } else if (modes == (SDL_Rect **)-1) // all modes are possible @@ -939,7 +939,7 @@ static void pick_best_mode(sdl_window_info *window, int *fswidth, int *fsheight) if (modes[i]->w == window->maxwidth && modes[i]->h == window->maxheight) size_score = 2.0f; - mame_printf_verbose("%4dx%4d -> %f\n", (int)modes[i]->w, (int)modes[i]->h, size_score); + osd_printf_verbose("%4dx%4d -> %f\n", (int)modes[i]->w, (int)modes[i]->h, size_score); // best so far? if (size_score > best_score) @@ -1136,7 +1136,7 @@ static void measure_fps(sdl_window_info *window, UINT32 dc, int update) if( (currentTime-lastTime)>1L*osd_ticks_per_second() && frames>frames_skip4fps ) { dt = (double) (currentTime-startTime) / tps; // in decimale sec. - mame_printf_info("%6.2lfs, %4lu F, " + osd_printf_info("%6.2lfs, %4lu F, " "avrg game: %5.2lf FPS %.2lf ms/f, " "avrg video: %5.2lf FPS %.2lf ms/f, " "last video: %5.2lf FPS %.2lf ms/f\n", diff --git a/src/osd/windows/d3d9intf.c b/src/osd/windows/d3d9intf.c index ee3ce92fc6a..951015004df 100644 --- a/src/osd/windows/d3d9intf.c +++ b/src/osd/windows/d3d9intf.c @@ -73,7 +73,7 @@ base *drawd3d9_init(void) HINSTANCE dllhandle = LoadLibrary(TEXT("d3d9.dll")); if (dllhandle == NULL) { - mame_printf_verbose("Direct3D: Unable to access d3d9.dll\n"); + osd_printf_verbose("Direct3D: Unable to access d3d9.dll\n"); return NULL; } @@ -81,7 +81,7 @@ base *drawd3d9_init(void) direct3dcreate9_ptr direct3dcreate9 = (direct3dcreate9_ptr)GetProcAddress(dllhandle, "Direct3DCreate9"); if (direct3dcreate9 == NULL) { - mame_printf_verbose("Direct3D: Unable to find Direct3DCreate9\n"); + osd_printf_verbose("Direct3D: Unable to find Direct3DCreate9\n"); FreeLibrary(dllhandle); dllhandle = NULL; return NULL; @@ -91,7 +91,7 @@ base *drawd3d9_init(void) IDirect3D9 *d3d9 = (*direct3dcreate9)(D3D_SDK_VERSION); if (d3d9 == NULL) { - mame_printf_verbose("Direct3D: Error attempting to initialize Direct3D9\n"); + osd_printf_verbose("Direct3D: Error attempting to initialize Direct3D9\n"); FreeLibrary(dllhandle); dllhandle = NULL; return NULL; @@ -111,7 +111,7 @@ base *drawd3d9_init(void) } if (fxhandle == NULL) { - mame_printf_verbose("Direct3D: Warning - Unable find any D3D9 DLLs; disabling post-effect rendering\n"); + osd_printf_verbose("Direct3D: Warning - Unable find any D3D9 DLLs; disabling post-effect rendering\n"); post_available = false; } @@ -124,7 +124,7 @@ base *drawd3d9_init(void) d3dptr->libhandle = fxhandle; set_interfaces(d3dptr); - mame_printf_verbose("Direct3D: Using Direct3D 9\n"); + osd_printf_verbose("Direct3D: Using Direct3D 9\n"); return d3dptr; } diff --git a/src/osd/windows/d3dhlsl.c b/src/osd/windows/d3dhlsl.c index d2401c8c4ba..613b32255d9 100644 --- a/src/osd/windows/d3dhlsl.c +++ b/src/osd/windows/d3dhlsl.c @@ -229,7 +229,7 @@ void shaders::window_save() HRESULT result = (*d3dintf->device.create_texture)(d3d->get_device(), snap_width, snap_height, 1, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &snap_copy_texture); if (result != D3D_OK) { - mame_printf_verbose("Direct3D: Unable to init system-memory target for HLSL snapshot (%08x), bailing\n", (UINT32)result); + osd_printf_verbose("Direct3D: Unable to init system-memory target for HLSL snapshot (%08x), bailing\n", (UINT32)result); return; } (*d3dintf->texture.get_surface_level)(snap_copy_texture, 0, &snap_copy_target); @@ -237,7 +237,7 @@ void shaders::window_save() result = (*d3dintf->device.create_texture)(d3d->get_device(), snap_width, snap_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &snap_texture); if (result != D3D_OK) { - mame_printf_verbose("Direct3D: Unable to init video-memory target for HLSL snapshot (%08x), bailing\n", (UINT32)result); + osd_printf_verbose("Direct3D: Unable to init video-memory target for HLSL snapshot (%08x), bailing\n", (UINT32)result); return; } (*d3dintf->texture.get_surface_level)(snap_texture, 0, &snap_target); @@ -312,7 +312,7 @@ void shaders::avi_update_snap(surface *surface) // unlock result = (*d3dintf->surface.unlock_rect)(avi_copy_surface); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during texture unlock_rect call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during texture unlock_rect call\n", (int)result); } @@ -385,7 +385,7 @@ void shaders::render_snapshot(surface *surface) // now do the actual work png_error error = png_write_bitmap(file, &pnginfo, avi_snap, 1 << 24, NULL); if (error != PNGERR_NONE) - mame_printf_error("Error generating PNG for HLSL snapshot: png_error = %d\n", error); + osd_printf_error("Error generating PNG for HLSL snapshot: png_error = %d\n", error); // free any data allocated png_free(&pnginfo); @@ -394,7 +394,7 @@ void shaders::render_snapshot(surface *surface) // unlock result = (*d3dintf->surface.unlock_rect)(snap_copy_target); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during texture unlock_rect call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during texture unlock_rect call\n", (int)result); if(snap_texture != NULL) { @@ -578,7 +578,7 @@ void shaders::begin_avi_recording(const char *name) avi_error avierr = avi_create(fullpath, &info, &avi_output_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)); } } } @@ -895,26 +895,26 @@ int shaders::create_resources(bool reset) renderer *d3d = (renderer *)window->drawdata; HRESULT result = (*d3dintf->device.get_render_target)(d3d->get_device(), 0, &backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device get_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device get_render_target call\n", (int)result); result = (*d3dintf->device.create_texture)(d3d->get_device(), 4, 4, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &black_texture); if (result != D3D_OK) { - mame_printf_verbose("Direct3D: Unable to init video-memory target for black texture (%08x)\n", (UINT32)result); + osd_printf_verbose("Direct3D: Unable to init video-memory target for black texture (%08x)\n", (UINT32)result); return 1; } (*d3dintf->texture.get_surface_level)(black_texture, 0, &black_surface); result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, black_surface); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); result = (*d3dintf->device.create_texture)(d3d->get_device(), (int)snap_width, (int)snap_height, 1, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &avi_copy_texture); if (result != D3D_OK) { - mame_printf_verbose("Direct3D: Unable to init system-memory target for HLSL AVI dumping (%08x)\n", (UINT32)result); + osd_printf_verbose("Direct3D: Unable to init system-memory target for HLSL AVI dumping (%08x)\n", (UINT32)result); return 1; } (*d3dintf->texture.get_surface_level)(avi_copy_texture, 0, &avi_copy_surface); @@ -922,7 +922,7 @@ int shaders::create_resources(bool reset) result = (*d3dintf->device.create_texture)(d3d->get_device(), (int)snap_width, (int)snap_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &avi_final_texture); if (result != D3D_OK) { - mame_printf_verbose("Direct3D: Unable to init video-memory target for HLSL AVI dumping (%08x)\n", (UINT32)result); + osd_printf_verbose("Direct3D: Unable to init video-memory target for HLSL AVI dumping (%08x)\n", (UINT32)result); return 1; } (*d3dintf->texture.get_surface_level)(avi_final_texture, 0, &avi_final_target); @@ -1080,7 +1080,7 @@ void shaders::begin_draw() yiq_decode_effect->set_technique("DecodeTechnique"); HRESULT result = (*d3dintf->device.get_render_target)(d3d->get_device(), 0, &backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device get_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device get_render_target call\n", (int)result); } @@ -1104,7 +1104,7 @@ void shaders::blit(surface *dst, texture *src, surface *new_dst, D3DPRIMITIVETYP renderer *d3d = (renderer *)window->drawdata; HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, dst); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); curr_effect = default_effect; @@ -1124,7 +1124,7 @@ void shaders::blit(surface *dst, texture *src, surface *new_dst, D3DPRIMITIVETYP curr_effect->begin_pass(pass); // add the primitives HRESULT result = (*d3dintf->device.draw_primitive)(d3d->get_device(), prim_type, prim_index, prim_count); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1133,7 +1133,7 @@ void shaders::blit(surface *dst, texture *src, surface *new_dst, D3DPRIMITIVETYP if (new_dst) { HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, new_dst); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); } } @@ -1149,9 +1149,9 @@ void shaders::blit(surface *dst, texture *src, surface *new_dst, D3DPRIMITIVETYP renderer *d3d = (renderer *)window->drawdata; HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, dst); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(1,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); curr_effect = default_effect; @@ -1171,7 +1171,7 @@ void shaders::blit(surface *dst, texture *src, surface *new_dst, D3DPRIMITIVETYP curr_effect->begin_pass(pass); // add the primitives HRESULT result = (*d3dintf->device.draw_primitive)(d3d->get_device(), prim_type, prim_index, prim_count); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1182,7 +1182,7 @@ void shaders::blit(surface *dst, texture *src, surface *new_dst, D3DPRIMITIVETYP if (new_dst) { HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, new_dst); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); } } @@ -1214,11 +1214,11 @@ void shaders::end_frame() blit(backbuffer, rt->render_texture[1], NULL, vecbuf_type, vecbuf_index, vecbuf_count); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[1]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result);*/ + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result);*/ } @@ -1319,9 +1319,9 @@ void shaders::ntsc_pass(render_target *rt, vec2f &sourcedims, vec2f &delta) HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[4]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); curr_effect->begin(&num_passes, 0); @@ -1330,7 +1330,7 @@ void shaders::ntsc_pass(render_target *rt, vec2f &sourcedims, vec2f &delta) curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1345,9 +1345,9 @@ void shaders::ntsc_pass(render_target *rt, vec2f &sourcedims, vec2f &delta) result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[3]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); curr_effect->begin(&num_passes, 0); @@ -1356,7 +1356,7 @@ void shaders::ntsc_pass(render_target *rt, vec2f &sourcedims, vec2f &delta) curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1378,9 +1378,9 @@ void shaders::color_convolution_pass(render_target *rt, vec2f &texsize, vec2f &s HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->smalltarget); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); curr_effect->begin(&num_passes, 0); @@ -1389,7 +1389,7 @@ void shaders::color_convolution_pass(render_target *rt, vec2f &texsize, vec2f &s curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1408,16 +1408,16 @@ void shaders::prescale_pass(render_target *rt, vec2f &texsize, vec2f &sourcedims curr_effect->begin(&num_passes, 0); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->prescaletarget); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); for (UINT pass = 0; pass < num_passes; pass++) { curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1436,16 +1436,16 @@ void shaders::deconverge_pass(render_target *rt, vec2f &texsize, vec2f &delta, v curr_effect->begin(&num_passes, 0); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[2]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); for (UINT pass = 0; pass < num_passes; pass++) { curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1465,16 +1465,16 @@ void shaders::defocus_pass(render_target *rt, vec2f &texsize) curr_effect->begin(&num_passes, 0); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[0]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); for (UINT pass = 0; pass < num_passes; pass++) { curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1487,14 +1487,14 @@ void shaders::defocus_pass(render_target *rt, vec2f &texsize) curr_effect->begin(&num_passes, 0); result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[1]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 7\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 7\n", (int)result); for (UINT pass = 0; pass < num_passes; pass++) { curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1517,9 +1517,9 @@ void shaders::phosphor_pass(render_target *rt, cache_target *ct, vec2f &texsize, curr_effect->set_texture("LastPass", ct->last_texture); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[0]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 4\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 4\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); curr_effect->begin(&num_passes, 0); @@ -1528,7 +1528,7 @@ void shaders::phosphor_pass(render_target *rt, cache_target *ct, vec2f &texsize, curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1541,9 +1541,9 @@ void shaders::phosphor_pass(render_target *rt, cache_target *ct, vec2f &texsize, curr_effect->set_texture("LastPass", rt->render_texture[0]); result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, ct->last_target); // Avoid changing targets due to page flipping - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 5\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 5\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); curr_effect->begin(&num_passes, 0); @@ -1552,7 +1552,7 @@ void shaders::phosphor_pass(render_target *rt, cache_target *ct, vec2f &texsize, curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1574,7 +1574,7 @@ void shaders::avi_post_pass(render_target *rt, vec2f &texsize, vec2f &delta, vec curr_effect->set_texture("DiffuseTexture", rt->render_texture[0]); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, avi_final_target); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); curr_effect->begin(&num_passes, 0); @@ -1583,7 +1583,7 @@ void shaders::avi_post_pass(render_target *rt, vec2f &texsize, vec2f &delta, vec curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), poly->get_type(), vertnum, poly->get_count()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1595,7 +1595,7 @@ void shaders::avi_post_pass(render_target *rt, vec2f &texsize, vec2f &delta, vec curr_effect->set_texture("DiffuseTexture", rt->render_texture[0]); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, snap_target); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); curr_effect->begin(&num_passes, 0); @@ -1604,7 +1604,7 @@ void shaders::avi_post_pass(render_target *rt, vec2f &texsize, vec2f &delta, vec curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), poly->get_type(), vertnum, poly->get_count()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1630,7 +1630,7 @@ void shaders::screen_post_pass(render_target *rt, vec2f &texsize, vec2f &delta, HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[2]); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(1,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); curr_effect->begin(&num_passes, 0); @@ -1639,7 +1639,7 @@ void shaders::screen_post_pass(render_target *rt, vec2f &texsize, vec2f &delta, curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), poly->get_type(), vertnum, poly->get_count()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1676,9 +1676,9 @@ void shaders::raster_bloom_pass(render_target *rt, vec2f &texsize, vec2f &delta, curr_effect->set_texture("DiffuseTexture", (bloom_index == 0) ? rt->render_texture[2] : rt->bloom_texture[bloom_index - 1]); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->bloom_target[bloom_index]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); for (UINT pass = 0; pass < num_passes; pass++) { @@ -1686,7 +1686,7 @@ void shaders::raster_bloom_pass(render_target *rt, vec2f &texsize, vec2f &delta, // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), D3DPT_TRIANGLELIST, 0, 2); //result = (*d3dintf->device.draw_primitive)(d3d->get_device(), poly->get_type(), vertnum, poly->get_count()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1731,14 +1731,14 @@ void shaders::raster_bloom_pass(render_target *rt, vec2f &texsize, vec2f &delta, curr_effect->begin(&num_passes, 0); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); for (UINT pass = 0; pass < num_passes; pass++) { curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), poly->get_type(), vertnum, poly->get_count()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1819,20 +1819,20 @@ void shaders::render_quad(poly_info *poly, int vertnum) curr_effect->begin(&num_passes, 0); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[0]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); for (UINT pass = 0; pass < num_passes; pass++) { curr_effect->begin_pass(pass); // add the primitives HRESULT result = (*d3dintf->device.draw_primitive)(d3d->get_device(), poly->get_type(), vertnum, poly->get_count()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } curr_effect->end(); result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); curr_effect = default_effect; @@ -1866,16 +1866,16 @@ void shaders::render_quad(poly_info *poly, int vertnum) curr_effect->set_texture("DiffuseTexture", (bloom_index == 0) ? rt->render_texture[0] : rt->bloom_texture[bloom_index - 1]); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->bloom_target[bloom_index]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); for (UINT pass = 0; pass < num_passes; pass++) { curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), poly->get_type(), vertnum, poly->get_count()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1924,16 +1924,16 @@ void shaders::render_quad(poly_info *poly, int vertnum) curr_effect->begin(&num_passes, 0); HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[1]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); for (UINT pass = 0; pass < num_passes; pass++) { curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), poly->get_type(), vertnum, poly->get_count()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1956,9 +1956,9 @@ void shaders::render_quad(poly_info *poly, int vertnum) curr_effect->set_texture("LastPass", rt->render_texture[2]); result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[3]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 4\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 4\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); curr_effect->begin(&num_passes, 0); @@ -1967,7 +1967,7 @@ void shaders::render_quad(poly_info *poly, int vertnum) curr_effect->begin_pass(pass); // add the primitives result = (*d3dintf->device.draw_primitive)(d3d->get_device(), D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -1977,11 +1977,11 @@ void shaders::render_quad(poly_info *poly, int vertnum) blit(backbuffer, rt->render_texture[3], backbuffer, poly->get_type(), vertnum, poly->get_count()); result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, rt->target[0]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); lines_pending = false; } @@ -2000,7 +2000,7 @@ void shaders::render_quad(poly_info *poly, int vertnum) curr_effect->begin_pass(pass); // add the primitives HRESULT result = (*d3dintf->device.draw_primitive)(d3d->get_device(), poly->get_type(), vertnum, poly->get_count()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); curr_effect->end_pass(); } @@ -2143,11 +2143,11 @@ bool shaders::add_render_target(renderer* d3d, texture_info* info, int width, in } HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, target->target[0]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); target->screen_index = screen_index; target->page_index = page_index; @@ -2381,22 +2381,22 @@ static void get_vector(const char *data, int count, float *out, int report_error if (count > 3) { if (sscanf(data, "%f,%f,%f,%f", &out[0], &out[1], &out[2], &out[3]) < 4 && report_error) - mame_printf_error("Illegal quad vector value = %s\n", data); + osd_printf_error("Illegal quad vector value = %s\n", data); } else if(count > 2) { if (sscanf(data, "%f,%f,%f", &out[0], &out[1], &out[2]) < 3 && report_error) - mame_printf_error("Illegal triple vector value = %s\n", data); + osd_printf_error("Illegal triple vector value = %s\n", data); } else if(count > 1) { if (sscanf(data, "%f,%f", &out[0], &out[1]) < 2 && report_error) - mame_printf_error("Illegal double vector value = %s\n", data); + osd_printf_error("Illegal double vector value = %s\n", data); } else if(count > 0) { if (sscanf(data, "%f", &out[0]) < 1 && report_error) - mame_printf_error("Illegal single vector value = %s\n", data); + osd_printf_error("Illegal single vector value = %s\n", data); } } diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c index 4a561f96938..468fe3ef2bd 100644 --- a/src/osd/windows/drawd3d.c +++ b/src/osd/windows/drawd3d.c @@ -202,7 +202,7 @@ static int drawd3d_window_init(win_window_info *window) if (!d3d->initialize()) { drawd3d_window_destroy(window); - mame_printf_error("Unable to initialize Direct3D.\n"); + osd_printf_error("Unable to initialize Direct3D.\n"); return 1; } @@ -295,7 +295,7 @@ int drawd3d_init(running_machine &machine, win_draw_callbacks *callbacks) // if we failed, note the error if (d3dintf == NULL) { - mame_printf_error("Unable to initialize Direct3D.\n"); + osd_printf_error("Unable to initialize Direct3D.\n"); return 1; } @@ -346,7 +346,7 @@ void renderer::set_texture(texture_info *texture) m_last_texture_flags = (texture == NULL ? 0 : texture->get_flags()); HRESULT result = (*d3dintf->device.set_texture)(m_device, 0, (texture == NULL) ? get_default_texture()->get_finaltex() : texture->get_finaltex()); m_shaders->set_texture(texture); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture call\n", (int)result); } } @@ -357,13 +357,13 @@ void renderer::set_filter(int filter) { m_last_filter = filter; HRESULT result = (*d3dintf->device.set_texture_stage_state)(m_device, 0, (D3DTEXTURESTAGESTATETYPE)D3DTSS_MINFILTER, filter ? D3DTEXF_LINEAR : D3DTEXF_POINT); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); result = (*d3dintf->device.set_texture_stage_state)(m_device, 0, (D3DTEXTURESTAGESTATETYPE)D3DTSS_MAGFILTER, filter ? D3DTEXF_LINEAR : D3DTEXF_POINT); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); result = (*d3dintf->device.set_texture_stage_state)(m_device, 1, (D3DTEXTURESTAGESTATETYPE)D3DTSS_MINFILTER, filter ? D3DTEXF_LINEAR : D3DTEXF_POINT); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); result = (*d3dintf->device.set_texture_stage_state)(m_device, 1, (D3DTEXTURESTAGESTATETYPE)D3DTSS_MAGFILTER, filter ? D3DTEXF_LINEAR : D3DTEXF_POINT); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); } } @@ -374,13 +374,13 @@ void renderer::set_wrap(D3DTEXTUREADDRESS wrap) { m_last_wrap = wrap; HRESULT result = (*d3dintf->device.set_texture_stage_state)(m_device, 0, (D3DTEXTURESTAGESTATETYPE)D3DTSS_ADDRESSU, wrap); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); result = (*d3dintf->device.set_texture_stage_state)(m_device, 0, (D3DTEXTURESTAGESTATETYPE)D3DTSS_ADDRESSV, wrap); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); result = (*d3dintf->device.set_texture_stage_state)(m_device, 1, (D3DTEXTURESTAGESTATETYPE)D3DTSS_ADDRESSU, wrap); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); result = (*d3dintf->device.set_texture_stage_state)(m_device, 1, (D3DTEXTURESTAGESTATETYPE)D3DTSS_ADDRESSV, wrap); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); } } @@ -391,9 +391,9 @@ void renderer::set_modmode(DWORD modmode) { m_last_modmode = modmode; HRESULT result = (*d3dintf->device.set_texture_stage_state)(m_device, 0, D3DTSS_COLOROP, modmode); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); result = (*d3dintf->device.set_texture_stage_state)(m_device, 1, D3DTSS_COLOROP, modmode); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture_stage_state call\n", (int)result); } } @@ -420,28 +420,28 @@ void renderer::set_blendmode(int blendmode) { m_last_blendenable = blendenable; HRESULT result = (*d3dintf->device.set_render_state)(m_device, D3DRS_ALPHABLENDENABLE, blendenable); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_state call\n", (int)result); } if (blendop != m_last_blendop) { m_last_blendop = blendop; HRESULT result = (*d3dintf->device.set_render_state)(m_device, D3DRS_BLENDOP, blendop); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_state call\n", (int)result); } if (blendsrc != m_last_blendsrc) { m_last_blendsrc = blendsrc; HRESULT result = (*d3dintf->device.set_render_state)(m_device, D3DRS_SRCBLEND, blendsrc); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_state call\n", (int)result); } if (blenddst != m_last_blenddst) { m_last_blenddst = blenddst; HRESULT result = (*d3dintf->device.set_render_state)(m_device, D3DRS_DESTBLEND, blenddst); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_state call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_state call\n", (int)result); } } @@ -471,25 +471,25 @@ texture_manager::texture_manager(renderer *d3d) // check for dynamic texture support DWORD tempcaps; HRESULT result = (*d3dintf->d3d.get_caps_dword)(d3dintf, d3d->get_adapter(), D3DDEVTYPE_HAL, CAPS_CAPS2, &tempcaps); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); m_dynamic_supported = ((tempcaps & D3DCAPS2_DYNAMICTEXTURES) != 0); - if (m_dynamic_supported) mame_printf_verbose("Direct3D: Using dynamic textures\n"); + if (m_dynamic_supported) osd_printf_verbose("Direct3D: Using dynamic textures\n"); // check for stretchrect support result = (*d3dintf->d3d.get_caps_dword)(d3dintf, d3d->get_adapter(), D3DDEVTYPE_HAL, CAPS_STRETCH_RECT_FILTER, &tempcaps); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); m_stretch_supported = ((tempcaps & D3DPTFILTERCAPS_MAGFPOINT) != 0); - if (m_stretch_supported && video_config.prescale > 1) mame_printf_verbose("Direct3D: Using StretchRect for prescaling\n"); + if (m_stretch_supported && video_config.prescale > 1) osd_printf_verbose("Direct3D: Using StretchRect for prescaling\n"); // get texture caps result = (*d3dintf->d3d.get_caps_dword)(d3dintf, d3d->get_adapter(), D3DDEVTYPE_HAL, CAPS_TEXTURE_CAPS, &m_texture_caps); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); result = (*d3dintf->d3d.get_caps_dword)(d3dintf, d3d->get_adapter(), D3DDEVTYPE_HAL, CAPS_MAX_TEXTURE_ASPECT, &m_texture_max_aspect); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); result = (*d3dintf->d3d.get_caps_dword)(d3dintf, d3d->get_adapter(), D3DDEVTYPE_HAL, CAPS_MAX_TEXTURE_WIDTH, &m_texture_max_width); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); result = (*d3dintf->d3d.get_caps_dword)(d3dintf, d3d->get_adapter(), D3DDEVTYPE_HAL, CAPS_MAX_TEXTURE_HEIGHT, &m_texture_max_height); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); // pick a YUV texture format m_yuv_format = D3DFMT_UYVY; @@ -501,11 +501,11 @@ texture_manager::texture_manager(renderer *d3d) if (result != D3D_OK) m_yuv_format = D3DFMT_A8R8G8B8; } - mame_printf_verbose("Direct3D: YUV format = %s\n", (m_yuv_format == D3DFMT_YUY2) ? "YUY2" : (m_yuv_format == D3DFMT_UYVY) ? "UYVY" : "RGB"); + osd_printf_verbose("Direct3D: YUV format = %s\n", (m_yuv_format == D3DFMT_YUY2) ? "YUY2" : (m_yuv_format == D3DFMT_UYVY) ? "UYVY" : "RGB"); // set the max texture size d3d->get_window()->target->set_max_texture_size(m_texture_max_width, m_texture_max_height); - mame_printf_verbose("Direct3D: Max texture size = %dx%d\n", (int)m_texture_max_width, (int)m_texture_max_height); + osd_printf_verbose("Direct3D: Max texture size = %dx%d\n", (int)m_texture_max_width, (int)m_texture_max_height); } texture_manager::~texture_manager() @@ -763,7 +763,7 @@ void texture_manager::update_textures() void renderer::begin_frame() { HRESULT result = (*d3dintf->device.clear)(m_device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); m_shaders->begin_frame(); @@ -775,7 +775,7 @@ void renderer::begin_frame() // begin the scene mtlog_add("drawd3d_window_draw: begin_scene"); result = (*d3dintf->device.begin_scene)(m_device); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device begin_scene call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device begin_scene call\n", (int)result); m_lockedbuf = NULL; @@ -835,11 +835,11 @@ void renderer::end_frame() // finish the scene HRESULT result = (*d3dintf->device.end_scene)(m_device); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device end_scene call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device end_scene call\n", (int)result); // present the current buffers result = (*d3dintf->device.present)(m_device, NULL, NULL, NULL, NULL, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device present call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device present call\n", (int)result); } //============================================================ @@ -856,17 +856,17 @@ int renderer::device_create() int verify = device_verify_caps(); if (verify == 2) { - mame_printf_error("Error: Device does not meet minimum requirements for Direct3D rendering\n"); + osd_printf_error("Error: Device does not meet minimum requirements for Direct3D rendering\n"); return 1; } if (verify == 1) - mame_printf_warning("Warning: Device may not perform well for Direct3D rendering\n"); + osd_printf_warning("Warning: Device may not perform well for Direct3D rendering\n"); // verify texture formats HRESULT result = (*d3dintf->d3d.check_device_format)(d3dintf, m_adapter, D3DDEVTYPE_HAL, m_pixformat, 0, D3DRTYPE_TEXTURE, D3DFMT_A8R8G8B8); if (result != D3D_OK) { - mame_printf_error("Error: A8R8G8B8 format textures not supported\n"); + osd_printf_error("Error: A8R8G8B8 format textures not supported\n"); return 1; } @@ -888,7 +888,7 @@ try_again: } if (result != D3D_OK) { - mame_printf_error("Error: unable to configure a screen texture format\n"); + osd_printf_error("Error: unable to configure a screen texture format\n"); return 1; } } @@ -928,11 +928,11 @@ try_again: } // fatal error if we just can't do it - mame_printf_error("Unable to create the Direct3D device (%08X)\n", (UINT32)result); + osd_printf_error("Unable to create the Direct3D device (%08X)\n", (UINT32)result); return 1; } m_create_error_count = 0; - mame_printf_verbose("Direct3D: Device created at %dx%d\n", m_width, m_height); + osd_printf_verbose("Direct3D: Device created at %dx%d\n", m_width, m_height); // set the gamma if we need to if (m_window->fullscreen) @@ -947,7 +947,7 @@ try_again: // warn if we can't do it if (!m_gamma_supported) { - mame_printf_warning("Direct3D: Warning - device does not support full screen gamma correction.\n"); + osd_printf_warning("Direct3D: Warning - device does not support full screen gamma correction.\n"); } else { @@ -985,7 +985,7 @@ int renderer::device_create_resources() D3DPOOL_DEFAULT, &m_vertexbuf); if (result != D3D_OK) { - mame_printf_error("Error creating vertex buffer (%08X)\n", (UINT32)result); + osd_printf_error("Error creating vertex buffer (%08X)\n", (UINT32)result); return 1; } @@ -994,7 +994,7 @@ int renderer::device_create_resources() d3dintf->post_fx_available) ? D3DFVF_XYZW : D3DFVF_XYZRHW))); if (result != D3D_OK) { - mame_printf_error("Error setting vertex format (%08X)\n", (UINT32)result); + osd_printf_error("Error setting vertex format (%08X)\n", (UINT32)result); return 1; } @@ -1100,47 +1100,47 @@ int renderer::device_verify_caps() DWORD tempcaps; HRESULT result = (*d3dintf->d3d.get_caps_dword)(d3dintf, m_adapter, D3DDEVTYPE_HAL, CAPS_MAX_PS30_INSN_SLOTS, &tempcaps); - if (result != D3D_OK) mame_printf_verbose("Direct3D Error %08X during get_caps_dword call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D Error %08X during get_caps_dword call\n", (int)result); if(tempcaps < 512) { - mame_printf_verbose("Direct3D: Warning - Device does not support Pixel Shader 3.0, falling back to non-PS rendering\n"); + osd_printf_verbose("Direct3D: Warning - Device does not support Pixel Shader 3.0, falling back to non-PS rendering\n"); d3dintf->post_fx_available = false; } // verify presentation capabilities result = (*d3dintf->d3d.get_caps_dword)(d3dintf, m_adapter, D3DDEVTYPE_HAL, CAPS_PRESENTATION_INTERVALS, &tempcaps); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); if (!(tempcaps & D3DPRESENT_INTERVAL_IMMEDIATE)) { - mame_printf_verbose("Direct3D: Error - Device does not support immediate presentations\n"); + osd_printf_verbose("Direct3D: Error - Device does not support immediate presentations\n"); retval = 2; } if (!(tempcaps & D3DPRESENT_INTERVAL_ONE)) { - mame_printf_verbose("Direct3D: Error - Device does not support per-refresh presentations\n"); + osd_printf_verbose("Direct3D: Error - Device does not support per-refresh presentations\n"); retval = 2; } // verify device capabilities result = (*d3dintf->d3d.get_caps_dword)(d3dintf, m_adapter, D3DDEVTYPE_HAL, CAPS_DEV_CAPS, &tempcaps); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); if (!(tempcaps & D3DDEVCAPS_CANRENDERAFTERFLIP)) { - mame_printf_verbose("Direct3D: Warning - Device does not support queued rendering after a page flip\n"); + osd_printf_verbose("Direct3D: Warning - Device does not support queued rendering after a page flip\n"); retval = 1; } if (!(tempcaps & D3DDEVCAPS_HWRASTERIZATION)) { - mame_printf_verbose("Direct3D: Warning - Device does not support hardware rasterization\n"); + osd_printf_verbose("Direct3D: Warning - Device does not support hardware rasterization\n"); retval = 1; } // verify texture operation capabilities result = (*d3dintf->d3d.get_caps_dword)(d3dintf, m_adapter, D3DDEVTYPE_HAL, CAPS_TEXTURE_OP_CAPS, &tempcaps); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); if (!(tempcaps & D3DTEXOPCAPS_MODULATE)) { - mame_printf_verbose("Direct3D: Warning - Device does not support texture modulation\n"); + osd_printf_verbose("Direct3D: Warning - Device does not support texture modulation\n"); retval = 1; } @@ -1149,7 +1149,7 @@ int renderer::device_verify_caps() m_mod4x_supported = ((tempcaps & D3DTEXOPCAPS_MODULATE4X) != 0); result = (*d3dintf->d3d.get_caps_dword)(d3dintf, m_adapter, D3DDEVTYPE_HAL, CAPS_CAPS2, &tempcaps); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during get_caps_dword call\n", (int)result); m_gamma_supported = ((tempcaps & D3DCAPS2_FULLSCREENGAMMA) != 0); return retval; @@ -1171,7 +1171,7 @@ int renderer::device_test_cooperative() // if we're able to reset ourselves, try it if (result == D3DERR_DEVICENOTRESET) { - mame_printf_verbose("Direct3D: resetting device\n"); + osd_printf_verbose("Direct3D: resetting device\n"); // free all existing resources and call reset on the device //device_delete(); @@ -1182,21 +1182,21 @@ int renderer::device_test_cooperative() // if it didn't work, punt to GDI if (result != D3D_OK) { - mame_printf_error("Unable to reset, result %08x\n", (UINT32)result); + osd_printf_error("Unable to reset, result %08x\n", (UINT32)result); return 1; } // try to create the resources again; if that didn't work, delete the whole thing if (device_create_resources()) { - mame_printf_verbose("Direct3D: failed to recreate resources for device; failing permanently\n"); + osd_printf_verbose("Direct3D: failed to recreate resources for device; failing permanently\n"); device_delete(); return 1; } if (m_shaders->create_resources(true)) { - mame_printf_verbose("Direct3D: failed to recreate HLSL resources for device; failing permanently\n"); + osd_printf_verbose("Direct3D: failed to recreate HLSL resources for device; failing permanently\n"); device_delete(); return 1; } @@ -1221,16 +1221,16 @@ int renderer::config_adapter_mode() HRESULT result = (*d3dintf->d3d.get_adapter_identifier)(d3dintf, m_adapter, 0, &identifier); if (result != D3D_OK) { - mame_printf_error("Error getting identifier for adapter #%d\n", m_adapter); + osd_printf_error("Error getting identifier for adapter #%d\n", m_adapter); return 1; } - mame_printf_verbose("Direct3D: Configuring adapter #%d = %s\n", m_adapter, identifier.Description); + osd_printf_verbose("Direct3D: Configuring adapter #%d = %s\n", m_adapter, identifier.Description); // get the current display mode result = (*d3dintf->d3d.get_adapter_display_mode)(d3dintf, m_adapter, &m_origmode); if (result != D3D_OK) { - mame_printf_error("Error getting mode for adapter #%d\n", m_adapter); + osd_printf_error("Error getting mode for adapter #%d\n", m_adapter); return 1; } @@ -1254,7 +1254,7 @@ int renderer::config_adapter_mode() char *utf8_device = utf8_from_tstring(m_window->monitor->info.szDevice); if (utf8_device != NULL) { - mame_printf_error("Device %s currently in an unsupported mode\n", utf8_device); + osd_printf_error("Device %s currently in an unsupported mode\n", utf8_device); osd_free(utf8_device); } return 1; @@ -1282,7 +1282,7 @@ int renderer::config_adapter_mode() char *utf8_device = utf8_from_tstring(m_window->monitor->info.szDevice); if (utf8_device != NULL) { - mame_printf_error("Proposed video mode not supported on device %s\n", utf8_device); + osd_printf_error("Proposed video mode not supported on device %s\n", utf8_device); osd_free(utf8_device); } return 1; @@ -1350,7 +1350,7 @@ void renderer::pick_best_mode() int maxmodes = (*d3dintf->d3d.get_adapter_mode_count)(d3dintf, m_adapter, D3DFMT_X8R8G8B8); // enumerate all the video modes and find the best match - mame_printf_verbose("Direct3D: Selecting video mode...\n"); + osd_printf_verbose("Direct3D: Selecting video mode...\n"); for (int modenum = 0; modenum < maxmodes; modenum++) { // check this mode @@ -1393,7 +1393,7 @@ void renderer::pick_best_mode() float final_score = size_score + refresh_score; // best so far? - mame_printf_verbose(" %4dx%4d@%3dHz -> %f\n", mode.Width, mode.Height, mode.RefreshRate, final_score * 1000.0f); + osd_printf_verbose(" %4dx%4d@%3dHz -> %f\n", mode.Width, mode.Height, mode.RefreshRate, final_score * 1000.0f); if (final_score > best_score) { best_score = final_score; @@ -1403,7 +1403,7 @@ void renderer::pick_best_mode() m_refresh = mode.RefreshRate; } } - mame_printf_verbose("Direct3D: Mode selected = %4dx%4d@%3dHz\n", m_width, m_height, m_refresh); + osd_printf_verbose("Direct3D: Mode selected = %4dx%4d@%3dHz\n", m_width, m_height, m_refresh); } @@ -1845,12 +1845,12 @@ void renderer::primitive_flush_pending() // unlock the buffer HRESULT result = (*d3dintf->vertexbuf.unlock)(m_vertexbuf); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during vertex buffer unlock call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during vertex buffer unlock call\n", (int)result); m_lockedbuf = NULL; // set the stream result = (*d3dintf->device.set_stream_source)(m_device, 0, m_vertexbuf, sizeof(vertex)); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_stream_source call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_stream_source call\n", (int)result); m_shaders->begin_draw(); @@ -1888,7 +1888,7 @@ void renderer::primitive_flush_pending() if (vertnum + m_poly[polynum].get_vertcount() > m_numverts) { - mame_printf_error("Error: vertnum (%d) plus poly vertex count (%d) > %d\n", vertnum, m_poly[polynum].get_vertcount(), m_numverts); + osd_printf_error("Error: vertnum (%d) plus poly vertex count (%d) > %d\n", vertnum, m_poly[polynum].get_vertcount(), m_numverts); fflush(stdout); } @@ -1903,7 +1903,7 @@ void renderer::primitive_flush_pending() // add the primitives result = (*d3dintf->device.draw_primitive)(m_device, m_poly[polynum].get_type(), vertnum, m_poly[polynum].get_count()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); } vertnum += m_poly[polynum].get_vertcount(); @@ -2019,7 +2019,7 @@ texture_info::texture_info(texture_manager *manager, const render_texinfo* texso } if (m_xprescale != video_config.prescale || m_yprescale != video_config.prescale) { - mame_printf_verbose("Direct3D: adjusting prescale from %dx%d to %dx%d\n", video_config.prescale, video_config.prescale, m_xprescale, m_yprescale); + osd_printf_verbose("Direct3D: adjusting prescale from %dx%d to %dx%d\n", video_config.prescale, video_config.prescale, m_xprescale, m_yprescale); } // loop until we allocate something or error @@ -2110,7 +2110,7 @@ texture_info::texture_info(texture_manager *manager, const render_texinfo* texso error: d3dintf->post_fx_available = false; - mame_printf_error("Direct3D: Critical warning: A texture failed to allocate. Expect things to get bad quickly.\n"); + osd_printf_error("Direct3D: Critical warning: A texture failed to allocate. Expect things to get bad quickly.\n"); if (m_d3dsurface != NULL) (*d3dintf->surface.release)(m_d3dsurface); if (m_d3dtex != NULL) @@ -2199,7 +2199,7 @@ void texture_info::compute_size(int texwidth, int texheight) if (finalwidth > m_texture_manager->get_max_texture_width() || finalheight > m_texture_manager->get_max_texture_height()) { static int printed = FALSE; - if (!printed) mame_printf_warning("Texture too big! (wanted: %dx%d, max is %dx%d)\n", finalwidth, finalheight, (int)m_texture_manager->get_max_texture_width(), (int)m_texture_manager->get_max_texture_height()); + if (!printed) osd_printf_warning("Texture too big! (wanted: %dx%d, max is %dx%d)\n", finalwidth, finalheight, (int)m_texture_manager->get_max_texture_width(), (int)m_texture_manager->get_max_texture_height()); printed = TRUE; } @@ -2609,7 +2609,7 @@ void texture_info::set_data(const render_texinfo *texsource, UINT32 flags) break; default: - mame_printf_error("Unknown texture blendmode=%d format=%d\n", PRIMFLAG_GET_BLENDMODE(flags), PRIMFLAG_GET_TEXFORMAT(flags)); + osd_printf_error("Unknown texture blendmode=%d format=%d\n", PRIMFLAG_GET_BLENDMODE(flags), PRIMFLAG_GET_TEXFORMAT(flags)); break; } } @@ -2624,7 +2624,7 @@ void texture_info::set_data(const render_texinfo *texsource, UINT32 flags) } if (result != D3D_OK) { - mame_printf_verbose("Direct3D: Error %08X during texture unlock_rect call\n", (int)result); + osd_printf_verbose("Direct3D: Error %08X during texture unlock_rect call\n", (int)result); } // prescale @@ -2649,7 +2649,7 @@ void texture_info::prescale() // for all cases, we need to get the surface of the render target result = (*d3dintf->texture.get_surface_level)(m_d3dfinaltex, 0, &scale_surface); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during texture get_surface_level call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during texture get_surface_level call\n", (int)result); // if we have an offscreen plain surface, we can just StretchRect to it if (m_type == TEXTURE_TYPE_SURFACE) @@ -2670,7 +2670,7 @@ void texture_info::prescale() // do the stretchrect result = (*d3dintf->device.stretch_rect)(m_renderer->get_device(), m_d3dsurface, &source, scale_surface, &dest, D3DTEXF_POINT); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device stretct_rect call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device stretct_rect call\n", (int)result); } // if we are using a texture render target, we need to do more preparations @@ -2682,24 +2682,24 @@ void texture_info::prescale() // first remember the original render target and set the new one result = (*d3dintf->device.get_render_target)(m_renderer->get_device(), 0, &backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device get_render_target call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device get_render_target call\n", (int)result); result = (*d3dintf->device.set_render_target)(m_renderer->get_device(), 0, scale_surface); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 1\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 1\n", (int)result); m_renderer->reset_render_states(); // start the scene result = (*d3dintf->device.begin_scene)(m_renderer->get_device()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device begin_scene call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device begin_scene call\n", (int)result); // configure the rendering pipeline m_renderer->set_filter(FALSE); m_renderer->set_blendmode(BLENDMODE_NONE); result = (*d3dintf->device.set_texture)(m_renderer->get_device(), 0, m_d3dtex); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_texture call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_texture call\n", (int)result); // lock the vertex buffer result = (*d3dintf->vertexbuf.lock)(m_renderer->get_vertex_buffer(), 0, 0, m_renderer->get_locked_buffer_ptr(), D3DLOCK_DISCARD); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during vertex buffer lock call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during vertex buffer lock call\n", (int)result); // configure the X/Y coordinates on the target surface vertex *lockedbuf = m_renderer->get_locked_buffer(); @@ -2732,22 +2732,22 @@ void texture_info::prescale() // unlock the vertex buffer result = (*d3dintf->vertexbuf.unlock)(m_renderer->get_vertex_buffer()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during vertex buffer unlock call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during vertex buffer unlock call\n", (int)result); m_renderer->set_locked_buffer(NULL); // set the stream and draw the triangle strip result = (*d3dintf->device.set_stream_source)(m_renderer->get_device(), 0, m_renderer->get_vertex_buffer(), sizeof(vertex)); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_stream_source call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_stream_source call\n", (int)result); result = (*d3dintf->device.draw_primitive)(m_renderer->get_device(), D3DPT_TRIANGLESTRIP, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); // end the scene result = (*d3dintf->device.end_scene)(m_renderer->get_device()); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device end_scene call\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device end_scene call\n", (int)result); // reset the render target and release our reference to the backbuffer result = (*d3dintf->device.set_render_target)(m_renderer->get_device(), 0, backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 2\n", (int)result); + if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call 2\n", (int)result); (*d3dintf->surface.release)(backbuffer); m_renderer->reset_render_states(); } diff --git a/src/osd/windows/drawdd.c b/src/osd/windows/drawdd.c index d1374962bef..7ac4437d36b 100644 --- a/src/osd/windows/drawdd.c +++ b/src/osd/windows/drawdd.c @@ -159,7 +159,7 @@ int drawdd_init(running_machine &machine, win_draw_callbacks *callbacks) dllhandle = LoadLibrary(TEXT("ddraw.dll")); if (dllhandle == NULL) { - mame_printf_verbose("DirectDraw: Unable to access ddraw.dll\n"); + osd_printf_verbose("DirectDraw: Unable to access ddraw.dll\n"); return 1; } @@ -167,7 +167,7 @@ int drawdd_init(running_machine &machine, win_draw_callbacks *callbacks) directdrawcreateex = (directdrawcreateex_ptr)GetProcAddress(dllhandle, "DirectDrawCreateEx"); if (directdrawcreateex == NULL) { - mame_printf_verbose("DirectDraw: Unable to find DirectDrawCreateEx\n"); + osd_printf_verbose("DirectDraw: Unable to find DirectDrawCreateEx\n"); FreeLibrary(dllhandle); dllhandle = NULL; return 1; @@ -177,7 +177,7 @@ int drawdd_init(running_machine &machine, win_draw_callbacks *callbacks) directdrawenumerateex = (directdrawenumerateex_ptr)GetProcAddress(dllhandle, "DirectDrawEnumerateExA"); if (directdrawenumerateex == NULL) { - mame_printf_verbose("DirectDraw: Unable to find DirectDrawEnumerateExA\n"); + osd_printf_verbose("DirectDraw: Unable to find DirectDrawEnumerateExA\n"); FreeLibrary(dllhandle); dllhandle = NULL; return 1; @@ -191,7 +191,7 @@ int drawdd_init(running_machine &machine, win_draw_callbacks *callbacks) callbacks->window_draw = drawdd_window_draw; callbacks->window_destroy = drawdd_window_destroy; - mame_printf_verbose("DirectDraw: Using DirectDraw 7\n"); + osd_printf_verbose("DirectDraw: Using DirectDraw 7\n"); return 0; } @@ -233,7 +233,7 @@ static int drawdd_window_init(win_window_info *window) error: drawdd_window_destroy(window); - mame_printf_error("Unable to initialize DirectDraw.\n"); + osd_printf_error("Unable to initialize DirectDraw.\n"); return 1; } @@ -313,13 +313,13 @@ static int drawdd_window_draw(win_window_info *window, HDC dc, int update) result = IDirectDrawSurface7_Lock(dd->blit, NULL, &dd->blitdesc, DDLOCK_WAIT, NULL); if (result == DDERR_SURFACELOST) { - mame_printf_verbose("DirectDraw: Lost surfaces; deleting and retrying next frame\n"); + osd_printf_verbose("DirectDraw: Lost surfaces; deleting and retrying next frame\n"); ddraw_delete_surfaces(window); return 1; } if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X locking blit surface\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X locking blit surface\n", (int)result); return 1; } @@ -348,7 +348,7 @@ static int drawdd_window_draw(win_window_info *window, HDC dc, int update) case 0xf800: software_renderer::draw_primitives(*window->primlist, dd->membuffer, dd->blitwidth, dd->blitheight, dd->blitwidth); break; case 0x7c00: software_renderer::draw_primitives(*window->primlist, dd->membuffer, dd->blitwidth, dd->blitheight, dd->blitwidth); break; default: - mame_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)dd->blitdesc.ddpfPixelFormat.dwRBitMask, (int)dd->blitdesc.ddpfPixelFormat.dwGBitMask, (int)dd->blitdesc.ddpfPixelFormat.dwBBitMask); + osd_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)dd->blitdesc.ddpfPixelFormat.dwRBitMask, (int)dd->blitdesc.ddpfPixelFormat.dwGBitMask, (int)dd->blitdesc.ddpfPixelFormat.dwBBitMask); break; } @@ -384,7 +384,7 @@ static int drawdd_window_draw(win_window_info *window, HDC dc, int update) case 0xf800: software_renderer::draw_primitives(*window->primlist, dd->blitdesc.lpSurface, dd->blitwidth, dd->blitheight, dd->blitdesc.lPitch / 2); break; case 0x7c00: software_renderer::draw_primitives(*window->primlist, dd->blitdesc.lpSurface, dd->blitwidth, dd->blitheight, dd->blitdesc.lPitch / 2); break; default: - mame_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)dd->blitdesc.ddpfPixelFormat.dwRBitMask, (int)dd->blitdesc.ddpfPixelFormat.dwGBitMask, (int)dd->blitdesc.ddpfPixelFormat.dwBBitMask); + osd_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)dd->blitdesc.ddpfPixelFormat.dwRBitMask, (int)dd->blitdesc.ddpfPixelFormat.dwGBitMask, (int)dd->blitdesc.ddpfPixelFormat.dwBBitMask); break; } } @@ -392,13 +392,13 @@ static int drawdd_window_draw(win_window_info *window, HDC dc, int update) // unlock and blit result = IDirectDrawSurface7_Unlock(dd->blit, NULL); - if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X unlocking blit surface\n", (int)result); + if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X unlocking blit surface\n", (int)result); // sync to VBLANK if ((video_config.waitvsync || video_config.syncrefresh) && window->machine().video().throttled() && (!window->fullscreen || dd->back == NULL)) { result = IDirectDraw7_WaitForVerticalBlank(dd->ddraw, DDWAITVB_BLOCKBEGIN, NULL); - if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result); + if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result); } // complete the blitting @@ -426,7 +426,7 @@ static int ddraw_create(win_window_info *window) result = (*directdrawcreateex)(dd->adapter_ptr, (LPVOID *)&dd->ddraw, WRAP_REFIID(IID_IDirectDraw7), NULL); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X during DirectDrawCreateEx call\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X during DirectDrawCreateEx call\n", (int)result); goto error; } @@ -434,24 +434,24 @@ static int ddraw_create(win_window_info *window) verify = ddraw_verify_caps(dd); if (verify == 2) { - mame_printf_error("DirectDraw: Error - Device does not meet minimum requirements for DirectDraw rendering\n"); + osd_printf_error("DirectDraw: Error - Device does not meet minimum requirements for DirectDraw rendering\n"); goto error; } if (verify == 1) - mame_printf_verbose("DirectDraw: Warning - Device may not perform well for DirectDraw rendering\n"); + osd_printf_verbose("DirectDraw: Warning - Device may not perform well for DirectDraw rendering\n"); // set the cooperative level // for non-window modes, we will use full screen here result = IDirectDraw7_SetCooperativeLevel(dd->ddraw, win_window_list->hwnd, DDSCL_SETFOCUSWINDOW); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_SetCooperativeLevel(FOCUSWINDOW) call\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_SetCooperativeLevel(FOCUSWINDOW) call\n", (int)result); goto error; } result = IDirectDraw7_SetCooperativeLevel(dd->ddraw, window->hwnd, DDSCL_SETDEVICEWINDOW | (window->fullscreen ? DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE : DDSCL_NORMAL)); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_SetCooperativeLevel(DEVICEWINDOW) call\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_SetCooperativeLevel(DEVICEWINDOW) call\n", (int)result); goto error; } @@ -461,7 +461,7 @@ static int ddraw_create(win_window_info *window) result = IDirectDraw7_SetDisplayMode(dd->ddraw, dd->width, dd->height, 32, dd->refresh, 0); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X attempting to set video mode %dx%d@%d call\n", (int)result, dd->width, dd->height, dd->refresh); + osd_printf_verbose("DirectDraw: Error %08X attempting to set video mode %dx%d@%d call\n", (int)result, dd->width, dd->height, dd->refresh); goto error; } } @@ -510,7 +510,7 @@ static int ddraw_create_surfaces(win_window_info *window) result = IDirectDrawSurface7_GetAttachedSurface(dd->primary, &caps, &dd->back); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X getting attached back surface\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X getting attached back surface\n", (int)result); goto error; } } @@ -561,7 +561,7 @@ static int ddraw_create_surfaces(win_window_info *window) result = IDirectDrawSurface_QueryInterface(dd->primary, WRAP_REFIID(IID_IDirectDrawGammaControl), (void **)&dd->gamma); if (result != DD_OK) { - mame_printf_warning("DirectDraw: Warning - device does not support full screen gamma correction.\n"); + osd_printf_warning("DirectDraw: Warning - device does not support full screen gamma correction.\n"); dd->gamma = NULL; } @@ -578,7 +578,7 @@ static int ddraw_create_surfaces(win_window_info *window) // attempt to set it result = IDirectDrawGammaControl_SetGammaRamp(dd->gamma, 0, &ramp); if (result != DD_OK) - mame_printf_verbose("DirectDraw: Error %08X attempting to set gamma correction.\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X attempting to set gamma correction.\n", (int)result); } } } @@ -677,14 +677,14 @@ static int ddraw_verify_caps(dd_info *dd) result = IDirectDraw7_GetCaps(dd->ddraw, &dd->ddcaps, &dd->helcaps); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_GetCaps call\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_GetCaps call\n", (int)result); return 1; } // determine if hardware stretching is available if ((dd->ddcaps.dwCaps & DDCAPS_BLTSTRETCH) == 0) { - mame_printf_verbose("DirectDraw: Warning - Device does not support hardware stretching\n"); + osd_printf_verbose("DirectDraw: Warning - Device does not support hardware stretching\n"); retval = 1; } @@ -735,7 +735,7 @@ static HRESULT create_surface(dd_info *dd, DDSURFACEDESC2 *desc, IDirectDrawSurf result = IDirectDraw7_CreateSurface(dd->ddraw, desc, surface, NULL); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X creating %s surface\n", (int)result, type); + osd_printf_verbose("DirectDraw: Error %08X creating %s surface\n", (int)result, type); return result; } @@ -743,14 +743,14 @@ static HRESULT create_surface(dd_info *dd, DDSURFACEDESC2 *desc, IDirectDrawSurf result = IDirectDrawSurface7_GetSurfaceDesc(*surface, desc); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X getting %s surface desciption\n", (int)result, type); + osd_printf_verbose("DirectDraw: Error %08X getting %s surface desciption\n", (int)result, type); IDirectDrawSurface7_Release(*surface); *surface = NULL; return result; } // print out the good stuff - mame_printf_verbose("DirectDraw: %s surface created: %dx%dx%d (R=%08X G=%08X B=%08X)\n", + osd_printf_verbose("DirectDraw: %s surface created: %dx%dx%d (R=%08X G=%08X B=%08X)\n", type, (int)desc->dwWidth, (int)desc->dwHeight, @@ -776,7 +776,7 @@ static int create_clipper(win_window_info *window) result = IDirectDraw7_CreateClipper(dd->ddraw, 0, &dd->clipper, NULL); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X creating clipper\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X creating clipper\n", (int)result); return 1; } @@ -784,7 +784,7 @@ static int create_clipper(win_window_info *window) result = IDirectDrawClipper_SetHWnd(dd->clipper, 0, window->hwnd); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X setting clipper hwnd\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X setting clipper hwnd\n", (int)result); return 1; } @@ -792,7 +792,7 @@ static int create_clipper(win_window_info *window) result = IDirectDrawSurface7_SetClipper(dd->primary, dd->clipper); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X setting clipper on primary surface\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X setting clipper on primary surface\n", (int)result); return 1; } return 0; @@ -888,7 +888,7 @@ static void compute_blit_surface_size(win_window_info *window) { // force some updates update_outer_rects(dd); - mame_printf_verbose("DirectDraw: New blit size = %dx%d\n", newwidth, newheight); + osd_printf_verbose("DirectDraw: New blit size = %dx%d\n", newwidth, newheight); } dd->blitwidth = newwidth; dd->blitheight = newheight; @@ -1014,7 +1014,7 @@ static void blit_to_primary(win_window_info *window, int srcwidth, int srcheight clear = outer; clear.right = dest.left; result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx); - if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); + if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); } // clear the right edge @@ -1023,7 +1023,7 @@ static void blit_to_primary(win_window_info *window, int srcwidth, int srcheight clear = outer; clear.left = dest.right; result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx); - if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); + if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); } // clear the top edge @@ -1032,7 +1032,7 @@ static void blit_to_primary(win_window_info *window, int srcwidth, int srcheight clear = outer; clear.bottom = dest.top; result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx); - if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); + if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); } // clear the bottom edge @@ -1041,19 +1041,19 @@ static void blit_to_primary(win_window_info *window, int srcwidth, int srcheight clear = outer; clear.top = dest.bottom; result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx); - if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); + if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); } } // do the blit result = IDirectDrawSurface7_Blt(target, &dest, dd->blit, &source, DDBLT_WAIT, NULL); - if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X blitting to the screen\n", (int)result); + if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X blitting to the screen\n", (int)result); // page flip if triple buffered if (window->fullscreen && dd->back != NULL) { result = IDirectDrawSurface7_Flip(dd->primary, NULL, DDFLIP_WAIT); - if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result); + if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result); } } @@ -1076,7 +1076,7 @@ static int config_adapter_mode(win_window_info *window) result = (*directdrawcreateex)(dd->adapter_ptr, (LPVOID *)&dd->ddraw, WRAP_REFIID(IID_IDirectDraw7), NULL); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X during DirectDrawCreateEx call\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X during DirectDrawCreateEx call\n", (int)result); return 1; } @@ -1084,10 +1084,10 @@ static int config_adapter_mode(win_window_info *window) result = IDirectDraw7_GetDeviceIdentifier(dd->ddraw, &identifier, 0); if (result != DD_OK) { - mame_printf_error("Error getting identifier for device\n"); + osd_printf_error("Error getting identifier for device\n"); return 1; } - mame_printf_verbose("DirectDraw: Configuring device %s\n", identifier.szDescription); + osd_printf_verbose("DirectDraw: Configuring device %s\n", identifier.szDescription); // get the current display mode memset(&dd->origmode, 0, sizeof(dd->origmode)); @@ -1095,7 +1095,7 @@ static int config_adapter_mode(win_window_info *window) result = IDirectDraw7_GetDisplayMode(dd->ddraw, &dd->origmode); if (result != DD_OK) { - mame_printf_verbose("DirectDraw: Error %08X getting current display mode\n", (int)result); + osd_printf_verbose("DirectDraw: Error %08X getting current display mode\n", (int)result); IDirectDraw7_Release(dd->ddraw); return 1; } @@ -1129,7 +1129,7 @@ static int config_adapter_mode(win_window_info *window) break; default: - mame_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)dd->origmode.ddpfPixelFormat.dwRBitMask, (int)dd->origmode.ddpfPixelFormat.dwGBitMask, (int)dd->origmode.ddpfPixelFormat.dwBBitMask); + osd_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)dd->origmode.ddpfPixelFormat.dwRBitMask, (int)dd->origmode.ddpfPixelFormat.dwGBitMask, (int)dd->origmode.ddpfPixelFormat.dwBBitMask); return 1; } } @@ -1173,7 +1173,7 @@ static void get_adapter_for_monitor(dd_info *dd, win_monitor_info *monitor) memset(&einfo, 0, sizeof(einfo)); einfo.monitor = monitor; result = (*directdrawenumerateex)(monitor_enum_callback, &einfo, DDENUM_ATTACHEDSECONDARYDEVICES); - if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X during DirectDrawEnumerateEx call\n", (int)result); + if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X during DirectDrawEnumerateEx call\n", (int)result); // set up the adapter if (einfo.foundit && einfo.guid_ptr != NULL) @@ -1231,7 +1231,7 @@ static HRESULT WINAPI enum_modes_callback(LPDDSURFACEDESC2 desc, LPVOID context) final_score = size_score + refresh_score; // best so far? - mame_printf_verbose(" %4dx%4d@%3dHz -> %f\n", (int)desc->dwWidth, (int)desc->dwHeight, (int)desc->dwRefreshRate, final_score * 1000.0f); + osd_printf_verbose(" %4dx%4d@%3dHz -> %f\n", (int)desc->dwWidth, (int)desc->dwHeight, (int)desc->dwRefreshRate, final_score * 1000.0f); if (final_score > einfo->best_score) { einfo->best_score = final_score; @@ -1290,8 +1290,8 @@ static void pick_best_mode(win_window_info *window) einfo.best_score = 0.0f; // enumerate the modes - mame_printf_verbose("DirectDraw: Selecting video mode...\n"); + osd_printf_verbose("DirectDraw: Selecting video mode...\n"); result = IDirectDraw7_EnumDisplayModes(dd->ddraw, DDEDM_REFRESHRATES, NULL, &einfo, enum_modes_callback); - if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X during EnumDisplayModes call\n", (int)result); - mame_printf_verbose("DirectDraw: Mode selected = %4dx%4d@%3dHz\n", dd->width, dd->height, dd->refresh); + if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X during EnumDisplayModes call\n", (int)result); + osd_printf_verbose("DirectDraw: Mode selected = %4dx%4d@%3dHz\n", dd->width, dd->height, dd->refresh); } diff --git a/src/osd/windows/input.c b/src/osd/windows/input.c index 2c12bf93363..f30f5164067 100644 --- a/src/osd/windows/input.c +++ b/src/osd/windows/input.c @@ -1148,7 +1148,7 @@ static void dinput_init(running_machine &machine) } #endif - mame_printf_verbose("DirectInput: Using DirectInput %d\n", dinput_version >> 8); + osd_printf_verbose("DirectInput: Using DirectInput %d\n", dinput_version >> 8); // we need an exit callback machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(dinput_exit), &machine)); @@ -1445,7 +1445,7 @@ static BOOL CALLBACK dinput_mouse_enum(LPCDIDEVICEINSTANCE instance, LPVOID ref) result = dinput_set_dword_property(devinfo->dinput.device, DIPROP_AXISMODE, 0, DIPH_DEVICE, DIPROPAXISMODE_REL); if (result != DI_OK && result != DI_PROPNOEFFECT) { - mame_printf_error("DirectInput: Unable to set relative mode for mouse %d (%s)\n", generic_device_index(mouse_list, devinfo), devinfo->name); + osd_printf_error("DirectInput: Unable to set relative mode for mouse %d (%s)\n", generic_device_index(mouse_list, devinfo), devinfo->name); goto error; } @@ -1541,17 +1541,17 @@ static BOOL CALLBACK dinput_joystick_enum(LPCDIDEVICEINSTANCE instance, LPVOID r // set absolute mode result = dinput_set_dword_property(devinfo->dinput.device, DIPROP_AXISMODE, 0, DIPH_DEVICE, DIPROPAXISMODE_ABS); if (result != DI_OK && result != DI_PROPNOEFFECT) - mame_printf_warning("DirectInput: Unable to set absolute mode for joystick %d (%s)\n", generic_device_index(joystick_list, devinfo), devinfo->name); + osd_printf_warning("DirectInput: Unable to set absolute mode for joystick %d (%s)\n", generic_device_index(joystick_list, devinfo), devinfo->name); // turn off deadzone; we do our own calculations result = dinput_set_dword_property(devinfo->dinput.device, DIPROP_DEADZONE, 0, DIPH_DEVICE, 0); if (result != DI_OK && result != DI_PROPNOEFFECT) - mame_printf_warning("DirectInput: Unable to reset deadzone for joystick %d (%s)\n", generic_device_index(joystick_list, devinfo), devinfo->name); + osd_printf_warning("DirectInput: Unable to reset deadzone for joystick %d (%s)\n", generic_device_index(joystick_list, devinfo), devinfo->name); // turn off saturation; we do our own calculations result = dinput_set_dword_property(devinfo->dinput.device, DIPROP_SATURATION, 0, DIPH_DEVICE, 10000); if (result != DI_OK && result != DI_PROPNOEFFECT) - mame_printf_warning("DirectInput: Unable to reset saturation for joystick %d (%s)\n", generic_device_index(joystick_list, devinfo), devinfo->name); + osd_printf_warning("DirectInput: Unable to reset saturation for joystick %d (%s)\n", generic_device_index(joystick_list, devinfo), devinfo->name); // cap the number of axes, POVs, and buttons based on the format devinfo->dinput.caps.dwAxes = MIN(devinfo->dinput.caps.dwAxes, 8); @@ -1715,7 +1715,7 @@ static void rawinput_init(running_machine &machine) get_rawinput_data = (get_rawinput_data_ptr)GetProcAddress(user32, "GetRawInputData"); if (register_rawinput_devices == NULL || get_rawinput_device_list == NULL || get_rawinput_device_info == NULL || get_rawinput_data == NULL) goto error; - mame_printf_verbose("RawInput: APIs detected\n"); + osd_printf_verbose("RawInput: APIs detected\n"); // get the number of devices, allocate a device list, and fetch it if ((*get_rawinput_device_list)(NULL, &device_count, sizeof(*devlist)) != 0) diff --git a/src/osd/windows/netdev_pcap.c b/src/osd/windows/netdev_pcap.c index f11494e6fcc..ea9d9902574 100644 --- a/src/osd/windows/netdev_pcap.c +++ b/src/osd/windows/netdev_pcap.c @@ -112,13 +112,13 @@ void init_pcap() catch (DWORD e) { FreeLibrary(handle); - mame_printf_verbose("Unable to load winpcap: %lx\n", e); + osd_printf_verbose("Unable to load winpcap: %lx\n", e); return; } if(pcap_findalldevs_dl(&devs, errbuf) == -1) { FreeLibrary(handle); - mame_printf_verbose("Unable to get network devices: %s\n", errbuf); + osd_printf_verbose("Unable to get network devices: %s\n", errbuf); return; } diff --git a/src/osd/windows/sound.c b/src/osd/windows/sound.c index 4c04acf3d91..b1aaf26a4fb 100644 --- a/src/osd/windows/sound.c +++ b/src/osd/windows/sound.c @@ -106,7 +106,7 @@ static void sound_exit(running_machine &machine) // print out over/underflow stats if (buffer_overflows || buffer_underflows) - mame_printf_verbose("Sound: buffer overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows); + osd_printf_verbose("Sound: buffer overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows); LOG(("Sound buffer: overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows)); } @@ -242,7 +242,7 @@ static HRESULT dsound_init(running_machine &machine) result = DirectSoundCreate(NULL, &dsound, NULL); if (result != DS_OK) { - mame_printf_error("Error creating DirectSound: %08x\n", (UINT32)result); + osd_printf_error("Error creating DirectSound: %08x\n", (UINT32)result); goto error; } @@ -251,7 +251,7 @@ static HRESULT dsound_init(running_machine &machine) result = IDirectSound_GetCaps(dsound, &dsound_caps); if (result != DS_OK) { - mame_printf_error("Error getting DirectSound capabilities: %08x\n", (UINT32)result); + osd_printf_error("Error getting DirectSound capabilities: %08x\n", (UINT32)result); goto error; } @@ -259,7 +259,7 @@ static HRESULT dsound_init(running_machine &machine) result = IDirectSound_SetCooperativeLevel(dsound, win_window_list->hwnd, DSSCL_PRIORITY); if (result != DS_OK) { - mame_printf_error("Error setting DirectSound cooperative level: %08x\n", (UINT32)result); + osd_printf_error("Error setting DirectSound cooperative level: %08x\n", (UINT32)result); goto error; } @@ -288,7 +288,7 @@ static HRESULT dsound_init(running_machine &machine) result = IDirectSoundBuffer_Play(stream_buffer, 0, 0, DSBPLAY_LOOPING); if (result != DS_OK) { - mame_printf_error("Error playing: %08x\n", (UINT32)result); + osd_printf_error("Error playing: %08x\n", (UINT32)result); goto error; } return DS_OK; @@ -334,7 +334,7 @@ static HRESULT dsound_create_buffers(void) result = IDirectSound_CreateSoundBuffer(dsound, &primary_desc, &primary_buffer, NULL); if (result != DS_OK) { - mame_printf_error("Error creating primary DirectSound buffer: %08x\n", (UINT32)result); + osd_printf_error("Error creating primary DirectSound buffer: %08x\n", (UINT32)result); goto error; } @@ -342,7 +342,7 @@ static HRESULT dsound_create_buffers(void) result = IDirectSoundBuffer_SetFormat(primary_buffer, &stream_format); if (result != DS_OK) { - mame_printf_error("Error setting primary DirectSound buffer format: %08x\n", (UINT32)result); + osd_printf_error("Error setting primary DirectSound buffer format: %08x\n", (UINT32)result); goto error; } @@ -350,10 +350,10 @@ static HRESULT dsound_create_buffers(void) result = IDirectSoundBuffer_GetFormat(primary_buffer, &primary_format, sizeof(primary_format), NULL); if (result != DS_OK) { - mame_printf_error("Error getting primary DirectSound buffer format: %08x\n", (UINT32)result); + osd_printf_error("Error getting primary DirectSound buffer format: %08x\n", (UINT32)result); goto error; } - mame_printf_verbose("DirectSound: Primary buffer: %d Hz, %d bits, %d channels\n", + osd_printf_verbose("DirectSound: Primary buffer: %d Hz, %d bits, %d channels\n", (int)primary_format.nSamplesPerSec, (int)primary_format.wBitsPerSample, (int)primary_format.nChannels); // create a buffer desc for the stream buffer @@ -367,7 +367,7 @@ static HRESULT dsound_create_buffers(void) result = IDirectSound_CreateSoundBuffer(dsound, &stream_desc, &stream_buffer, NULL); if (result != DS_OK) { - mame_printf_error("Error creating DirectSound stream buffer: %08x\n", (UINT32)result); + osd_printf_error("Error creating DirectSound stream buffer: %08x\n", (UINT32)result); goto error; } @@ -375,7 +375,7 @@ static HRESULT dsound_create_buffers(void) result = IDirectSoundBuffer_Lock(stream_buffer, 0, stream_buffer_size, &buffer, &locked, NULL, NULL, 0); if (result != DS_OK) { - mame_printf_error("Error locking DirectSound stream buffer: %08x\n", (UINT32)result); + osd_printf_error("Error locking DirectSound stream buffer: %08x\n", (UINT32)result); goto error; } diff --git a/src/osd/windows/video.c b/src/osd/windows/video.c index 812ed0ef908..5b2251d6d47 100644 --- a/src/osd/windows/video.c +++ b/src/osd/windows/video.c @@ -213,7 +213,7 @@ static void init_monitors(void) char *utf8_device = utf8_from_tstring(monitor->info.szDevice); if (utf8_device != NULL) { - mame_printf_verbose("Video: Monitor %p = \"%s\" %s\n", monitor->handle, utf8_device, (monitor == primary_monitor) ? "(primary)" : ""); + osd_printf_verbose("Video: Monitor %p = \"%s\" %s\n", monitor->handle, utf8_device, (monitor == primary_monitor) ? "(primary)" : ""); osd_free(utf8_device); } } @@ -359,11 +359,11 @@ static void extract_video_config(running_machine &machine) { video_config.mode = VIDEO_MODE_NONE; if (options.seconds_to_run() == 0) - mame_printf_warning("Warning: -video none doesn't make much sense without -seconds_to_run\n"); + osd_printf_warning("Warning: -video none doesn't make much sense without -seconds_to_run\n"); } else { - mame_printf_warning("Invalid video value %s; reverting to gdi\n", stemp); + osd_printf_warning("Invalid video value %s; reverting to gdi\n", stemp); video_config.mode = VIDEO_MODE_GDI; } video_config.waitvsync = options.wait_vsync(); @@ -397,7 +397,7 @@ static float get_aspect(const char *defdata, const char *data, int report_error) data = defdata; } if (sscanf(data, "%d:%d", &num, &den) != 2 && report_error) - mame_printf_error("Illegal aspect ratio value = %s\n", data); + osd_printf_error("Illegal aspect ratio value = %s\n", data); return (float)num / (float)den; } @@ -417,5 +417,5 @@ static void get_resolution(const char *defdata, const char *data, win_window_con data = defdata; } if (sscanf(data, "%dx%d@%d", &config->width, &config->height, &config->refresh) < 2 && report_error) - mame_printf_error("Illegal resolution value = %s\n", data); + osd_printf_error("Illegal resolution value = %s\n", data); } diff --git a/src/osd/windows/winmain.c b/src/osd/windows/winmain.c index 905ef795977..601d3a02c7e 100644 --- a/src/osd/windows/winmain.c +++ b/src/osd/windows/winmain.c @@ -460,7 +460,7 @@ int main(int argc, char *argv[]) if (win_is_gui_application() || is_double_click_start(argc)) { // if we are a GUI app, output errors to message boxes - mame_set_output_channel(OUTPUT_CHANNEL_ERROR, output_delegate(FUNC(winui_output_error), (delegate_late_bind *)0)); + osd_set_output_channel(OSD_OUTPUT_CHANNEL_ERROR, output_delegate(FUNC(winui_output_error), (delegate_late_bind *)0)); // make sure any console window that opened on our behalf is nuked FreeConsole(); @@ -630,7 +630,7 @@ void windows_osd_interface::init(running_machine &machine) osd_num_processors = atoi(stemp); if (osd_num_processors < 1) { - mame_printf_warning("Warning: numprocessors < 1 doesn't make much sense. Assuming auto ...\n"); + osd_printf_warning("Warning: numprocessors < 1 doesn't make much sense. Assuming auto ...\n"); osd_num_processors = 0; } } diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h index 4688e91f0b9..e7ea875c610 100644 --- a/src/osd/windows/winmain.h +++ b/src/osd/windows/winmain.h @@ -344,9 +344,6 @@ extern int osd_num_processors; // FUNCTION PROTOTYPES //============================================================ -// use if you want to print something with the verbose flag -void CLIB_DECL mame_printf_verbose(const char *text, ...) ATTR_PRINTF(1,2); - // use this to ping the watchdog void winmain_watchdog_ping(void); void winmain_dump_stack(); diff --git a/src/osd/windows/winsync.c b/src/osd/windows/winsync.c index 1c16419cfcf..3a3b449b341 100644 --- a/src/osd/windows/winsync.c +++ b/src/osd/windows/winsync.c @@ -76,7 +76,7 @@ void osd_lock_acquire(osd_lock *lock) #if DEBUG_SLOW_LOCKS // log any locks that take more than 1ms ticks = osd_ticks() - ticks; - if (ticks > osd_ticks_per_second() / 1000) mame_printf_debug("Blocked %d ticks on lock acquire\n", (int)ticks); + if (ticks > osd_ticks_per_second() / 1000) osd_printf_debug("Blocked %d ticks on lock acquire\n", (int)ticks); #endif } diff --git a/src/tools/nltool.c b/src/tools/nltool.c index 2a3e68339da..e1198160964 100644 --- a/src/tools/nltool.c +++ b/src/tools/nltool.c @@ -25,7 +25,7 @@ ***************************************************************************/ #if 0 -void ATTR_PRINTF(1,2) mame_printf_warning(const char *format, ...) +void ATTR_PRINTF(1,2) osd_printf_warning(const char *format, ...) { va_list argptr; diff --git a/src/tools/unidasm.c b/src/tools/unidasm.c index ffb6ceaa84f..6b03c2d7cad 100644 --- a/src/tools/unidasm.c +++ b/src/tools/unidasm.c @@ -349,9 +349,9 @@ void CLIB_DECL ATTR_PRINTF(1,2) logerror(const char *format, ...) } -void CLIB_DECL ATTR_PRINTF(1,2) mame_printf_debug(const char *format, ...) +void CLIB_DECL ATTR_PRINTF(1,2) osd_printf_debug(const char *format, ...) { - /* silent mame_printf_debugs are allowed in disassemblers */ + /* silent osd_printf_debugs are allowed in disassemblers */ } diff --git a/src/ume/ume.c b/src/ume/ume.c index 8e29b1a6cfb..fa61657f7a6 100644 --- a/src/ume/ume.c +++ b/src/ume/ume.c @@ -46,4 +46,4 @@ 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); }