diff options
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/digfx.h | 3 | ||||
-rw-r--r-- | src/emu/emuopts.cpp | 4 | ||||
-rw-r--r-- | src/emu/ioport.cpp | 111 | ||||
-rw-r--r-- | src/emu/ioport.h | 111 | ||||
-rw-r--r-- | src/emu/romload.cpp | 8 | ||||
-rw-r--r-- | src/emu/romload.h | 2 | ||||
-rw-r--r-- | src/emu/screen.cpp | 4 | ||||
-rw-r--r-- | src/emu/validity.cpp | 2 |
8 files changed, 124 insertions, 121 deletions
diff --git a/src/emu/digfx.h b/src/emu/digfx.h index 6ba323baafc..57dc81ba212 100644 --- a/src/emu/digfx.h +++ b/src/emu/digfx.h @@ -25,7 +25,8 @@ constexpr u8 MAX_GFX_ELEMENTS = 32; constexpr u16 MAX_GFX_PLANES = 8; -constexpr u16 MAX_GFX_SIZE = 32; +// MESSUI - needed by monaco +constexpr u16 MAX_GFX_SIZE = 64; diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index 0da23495dc8..fc00b6bb9e4 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -42,7 +42,7 @@ const options_entry emu_options::s_option_entries[] = { OPTION_SAMPLEPATH ";sp", "samples", core_options::option_type::STRING, "path to audio sample sets" }, { OPTION_ARTPATH, "artwork", core_options::option_type::STRING, "path to artwork files" }, { OPTION_CTRLRPATH, "ctrlr", core_options::option_type::STRING, "path to controller definitions" }, - { OPTION_INIPATH, ".;ini;ini/presets", core_options::option_type::STRING, "path to ini files" }, + { OPTION_INIPATH, "ini", core_options::option_type::STRING, "path to ini files" }, // MESSUI { OPTION_FONTPATH, ".", core_options::option_type::STRING, "path to font files" }, { OPTION_CHEATPATH, "cheat", core_options::option_type::STRING, "path to cheat files" }, { OPTION_CROSSHAIRPATH, "crosshair", core_options::option_type::STRING, "path to crosshair files" }, @@ -77,7 +77,7 @@ const options_entry emu_options::s_option_entries[] = { OPTION_SNAPNAME, "%g/%i", core_options::option_type::STRING, "override of the default snapshot/movie naming; %g == gamename, %i == index" }, { OPTION_SNAPSIZE, "auto", core_options::option_type::STRING, "specify snapshot/movie resolution (<width>x<height>) or 'auto' to use minimal size " }, { OPTION_SNAPVIEW, "auto", core_options::option_type::STRING, "snapshot/movie view - 'auto' for default, or 'native' for per-screen pixel-aspect views" }, - { OPTION_SNAPBILINEAR, "1", core_options::option_type::BOOLEAN, "specify if the snapshot/movie should have bilinear filtering applied" }, + { OPTION_SNAPBILINEAR, "0", core_options::option_type::BOOLEAN, "specify if the snapshot/movie should have bilinear filtering applied" }, // MESSUI { OPTION_STATENAME, "%g", core_options::option_type::STRING, "override of the default state subfolder naming; %g == gamename" }, { OPTION_BURNIN, "0", core_options::option_type::BOOLEAN, "create burn-in snapshots for each screen" }, diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp index 5999a75abe5..76c48c05765 100644 --- a/src/emu/ioport.cpp +++ b/src/emu/ioport.cpp @@ -340,117 +340,6 @@ std::string substitute_player(std::string_view name, u8 player) return result; } - - -// ======================> inp_header - -// header at the front of INP files -class inp_header -{ -public: - // parameters - static constexpr unsigned MAJVERSION = 3; - static constexpr unsigned MINVERSION = 0; - - bool read(emu_file &f) - { - return f.read(m_data, sizeof(m_data)) == sizeof(m_data); - } - bool write(emu_file &f) const - { - return f.write(m_data, sizeof(m_data)) == sizeof(m_data); - } - - bool check_magic() const - { - return 0 == std::memcmp(MAGIC, m_data + OFFS_MAGIC, OFFS_BASETIME - OFFS_MAGIC); - } - u64 get_basetime() const - { - return - (u64(m_data[OFFS_BASETIME + 0]) << (0 * 8)) | - (u64(m_data[OFFS_BASETIME + 1]) << (1 * 8)) | - (u64(m_data[OFFS_BASETIME + 2]) << (2 * 8)) | - (u64(m_data[OFFS_BASETIME + 3]) << (3 * 8)) | - (u64(m_data[OFFS_BASETIME + 4]) << (4 * 8)) | - (u64(m_data[OFFS_BASETIME + 5]) << (5 * 8)) | - (u64(m_data[OFFS_BASETIME + 6]) << (6 * 8)) | - (u64(m_data[OFFS_BASETIME + 7]) << (7 * 8)); - } - unsigned get_majversion() const - { - return m_data[OFFS_MAJVERSION]; - } - unsigned get_minversion() const - { - return m_data[OFFS_MINVERSION]; - } - std::string get_sysname() const - { - return get_string<OFFS_SYSNAME, OFFS_APPDESC>(); - } - std::string get_appdesc() const - { - return get_string<OFFS_APPDESC, OFFS_END>(); - } - - void set_magic() - { - std::memcpy(m_data + OFFS_MAGIC, MAGIC, OFFS_BASETIME - OFFS_MAGIC); - } - void set_basetime(u64 time) - { - m_data[OFFS_BASETIME + 0] = u8((time >> (0 * 8)) & 0x00ff); - m_data[OFFS_BASETIME + 1] = u8((time >> (1 * 8)) & 0x00ff); - m_data[OFFS_BASETIME + 2] = u8((time >> (2 * 8)) & 0x00ff); - m_data[OFFS_BASETIME + 3] = u8((time >> (3 * 8)) & 0x00ff); - m_data[OFFS_BASETIME + 4] = u8((time >> (4 * 8)) & 0x00ff); - m_data[OFFS_BASETIME + 5] = u8((time >> (5 * 8)) & 0x00ff); - m_data[OFFS_BASETIME + 6] = u8((time >> (6 * 8)) & 0x00ff); - m_data[OFFS_BASETIME + 7] = u8((time >> (7 * 8)) & 0x00ff); - } - void set_version() - { - m_data[OFFS_MAJVERSION] = MAJVERSION; - m_data[OFFS_MINVERSION] = MINVERSION; - } - void set_sysname(std::string const &name) - { - set_string<OFFS_SYSNAME, OFFS_APPDESC>(name); - } - void set_appdesc(std::string const &desc) - { - set_string<OFFS_APPDESC, OFFS_END>(desc); - } - -private: - template <std::size_t BEGIN, std::size_t END> void set_string(std::string const &str) - { - std::size_t const used = (std::min<std::size_t>)(str.size() + 1, END - BEGIN); - std::memcpy(m_data + BEGIN, str.c_str(), used); - if ((END - BEGIN) > used) - std::memset(m_data + BEGIN + used, 0, (END - BEGIN) - used); - } - template <std::size_t BEGIN, std::size_t END> std::string get_string() const - { - char const *const begin = reinterpret_cast<char const *>(m_data + BEGIN); - return std::string(begin, std::find(begin, reinterpret_cast<char const *>(m_data + END), '\0')); - } - - static constexpr std::size_t OFFS_MAGIC = 0x00; // 0x08 bytes - static constexpr std::size_t OFFS_BASETIME = 0x08; // 0x08 bytes (little-endian binary integer) - static constexpr std::size_t OFFS_MAJVERSION = 0x10; // 0x01 bytes (binary integer) - static constexpr std::size_t OFFS_MINVERSION = 0x11; // 0x01 bytes (binary integer) - // 0x02 bytes reserved - static constexpr std::size_t OFFS_SYSNAME = 0x14; // 0x0c bytes (ASCII) - static constexpr std::size_t OFFS_APPDESC = 0x20; // 0x20 bytes (ASCII) - static constexpr std::size_t OFFS_END = 0x40; - - static u8 const MAGIC[OFFS_BASETIME - OFFS_MAGIC]; - - u8 m_data[OFFS_END]; -}; - } // anonymous namespace diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 76f61debcac..26049898336 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -18,6 +18,7 @@ #define MAME_EMU_IOPORT_H #include "ioprocs.h" +#include "fileio.h" #include <array> #include <cstdint> @@ -662,6 +663,116 @@ typedef device_delegate<void (ioport_field &, u32, ioport_value, ioport_value)> typedef device_delegate<float (float)> ioport_field_crossmap_delegate; +// ======================> inp_header + +// header at the front of INP files +class inp_header +{ +public: + // parameters + static constexpr unsigned MAJVERSION = 3; + static constexpr unsigned MINVERSION = 0; + + bool read(emu_file &f) + { + return f.read(m_data, sizeof(m_data)) == sizeof(m_data); + } + bool write(emu_file &f) const + { + return f.write(m_data, sizeof(m_data)) == sizeof(m_data); + } + + bool check_magic() const + { + return 0 == std::memcmp(MAGIC, m_data + OFFS_MAGIC, OFFS_BASETIME - OFFS_MAGIC); + } + u64 get_basetime() const + { + return + (u64(m_data[OFFS_BASETIME + 0]) << (0 * 8)) | + (u64(m_data[OFFS_BASETIME + 1]) << (1 * 8)) | + (u64(m_data[OFFS_BASETIME + 2]) << (2 * 8)) | + (u64(m_data[OFFS_BASETIME + 3]) << (3 * 8)) | + (u64(m_data[OFFS_BASETIME + 4]) << (4 * 8)) | + (u64(m_data[OFFS_BASETIME + 5]) << (5 * 8)) | + (u64(m_data[OFFS_BASETIME + 6]) << (6 * 8)) | + (u64(m_data[OFFS_BASETIME + 7]) << (7 * 8)); + } + unsigned get_majversion() const + { + return m_data[OFFS_MAJVERSION]; + } + unsigned get_minversion() const + { + return m_data[OFFS_MINVERSION]; + } + std::string get_sysname() const + { + return get_string<OFFS_SYSNAME, OFFS_APPDESC>(); + } + std::string get_appdesc() const + { + return get_string<OFFS_APPDESC, OFFS_END>(); + } + + void set_magic() + { + std::memcpy(m_data + OFFS_MAGIC, MAGIC, OFFS_BASETIME - OFFS_MAGIC); + } + void set_basetime(u64 time) + { + m_data[OFFS_BASETIME + 0] = u8((time >> (0 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 1] = u8((time >> (1 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 2] = u8((time >> (2 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 3] = u8((time >> (3 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 4] = u8((time >> (4 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 5] = u8((time >> (5 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 6] = u8((time >> (6 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 7] = u8((time >> (7 * 8)) & 0x00ff); + } + void set_version() + { + m_data[OFFS_MAJVERSION] = MAJVERSION; + m_data[OFFS_MINVERSION] = MINVERSION; + } + void set_sysname(std::string const &name) + { + set_string<OFFS_SYSNAME, OFFS_APPDESC>(name); + } + void set_appdesc(std::string const &desc) + { + set_string<OFFS_APPDESC, OFFS_END>(desc); + } + +private: + template <std::size_t BEGIN, std::size_t END> void set_string(std::string const &str) + { + std::size_t const used = (std::min<std::size_t>)(str.size() + 1, END - BEGIN); + std::memcpy(m_data + BEGIN, str.c_str(), used); + if ((END - BEGIN) > used) + std::memset(m_data + BEGIN + used, 0, (END - BEGIN) - used); + } + template <std::size_t BEGIN, std::size_t END> std::string get_string() const + { + char const *const begin = reinterpret_cast<char const *>(m_data + BEGIN); + return std::string(begin, std::find(begin, reinterpret_cast<char const *>(m_data + END), '\0')); + } + + static constexpr std::size_t OFFS_MAGIC = 0x00; // 0x08 bytes + static constexpr std::size_t OFFS_BASETIME = 0x08; // 0x08 bytes (little-endian binary integer) + static constexpr std::size_t OFFS_MAJVERSION = 0x10; // 0x01 bytes (binary integer) + static constexpr std::size_t OFFS_MINVERSION = 0x11; // 0x01 bytes (binary integer) + // 0x02 bytes reserved + static constexpr std::size_t OFFS_SYSNAME = 0x14; // 0x0c bytes (ASCII) + static constexpr std::size_t OFFS_APPDESC = 0x20; // 0x20 bytes (ASCII) + static constexpr std::size_t OFFS_END = 0x40; + + static u8 const MAGIC[OFFS_BASETIME - OFFS_MAGIC]; + + u8 m_data[OFFS_END]; +}; + + // ======================> input_device_default // device defined default input settings diff --git a/src/emu/romload.cpp b/src/emu/romload.cpp index 4ce34832c78..d71ea6fc1ed 100644 --- a/src/emu/romload.cpp +++ b/src/emu/romload.cpp @@ -367,10 +367,12 @@ void rom_load_manager::determine_bios_rom(device_t &device, const char *specbios if (specbios && *specbios && core_stricmp(specbios, "default")) { bool found(false); + int count = 0; // MESSUI for (const rom_entry &rom : device.rom_region_vector()) { if (ROMENTRY_ISSYSTEM_BIOS(&rom)) { + count++; // MESSUI char const *const biosname = ROM_GETNAME(&rom); int const bios_flags = ROM_GETBIOSFLAGS(&rom); char bios_number[20]; @@ -387,7 +389,7 @@ void rom_load_manager::determine_bios_rom(device_t &device, const char *specbios } // if we got neither an empty string nor 'default' then warn the user - if (!found) + if (!found && count) // MESSUI (only applies to command-line, i.e. MESS) { m_errorstring.append(util::string_format("%s: invalid BIOS \"%s\", reverting to default\n", device.tag(), specbios)); m_warnings++; @@ -732,8 +734,8 @@ int rom_load_manager::read_rom_data(emu_file *file, const rom_entry *parent_regi LOG("Loading ROM data: offs=%X len=%X mask=%02X group=%d skip=%d reverse=%d\n", ROM_GETOFFSET(romp), numbytes, datamask, groupsize, skip, reversed); /* make sure the length was an even multiple of the group size */ - if (numbytes % groupsize != 0) - osd_printf_warning("Warning in RomModule definition: %s length not an even multiple of group size\n", romp->name()); +// if (numbytes % groupsize != 0) +// osd_printf_warning("Warning in RomModule definition: %s length not an even multiple of group size\n", romp->name()); // HBMAME /* make sure we only fill within the region space */ if (ROM_GETOFFSET(romp) + numgroups * groupsize + (numgroups - 1) * skip > m_region->bytes()) diff --git a/src/emu/romload.h b/src/emu/romload.h index 76fdb111cc6..8dea7751cd9 100644 --- a/src/emu/romload.h +++ b/src/emu/romload.h @@ -412,7 +412,7 @@ public: std::string& software_load_warnings_message() { return m_softwarningstring; } /* return the number of BAD_DUMP/NO_DUMP warnings we generated */ - int knownbad() const { return m_knownbad; } + int knownbad() const { return 0; } //m_knownbad; } MESSUI /* ----- disk handling ----- */ diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp index f69a03ac13e..88c12af3882 100644 --- a/src/emu/screen.cpp +++ b/src/emu/screen.cpp @@ -887,8 +887,8 @@ void screen_device::device_start() save_item(NAME(m_vblank_start_time)); save_item(NAME(m_vblank_end_time)); save_item(NAME(m_frame_number)); - if (m_oldstyle_vblank_supplied) - logerror("%s: Deprecated legacy Old Style screen configured (MCFG_SCREEN_VBLANK_TIME), please use MCFG_SCREEN_RAW_PARAMS instead.\n",this->tag()); +// if (m_oldstyle_vblank_supplied) +// logerror("%s: Deprecated legacy Old Style screen configured (MCFG_SCREEN_VBLANK_TIME), please use MCFG_SCREEN_RAW_PARAMS instead.\n",this->tag()); m_is_primary_screen = (this == screen_device_enumerator(machine().root_device()).first()); } diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp index e4cf0860064..668cc8a248c 100644 --- a/src/emu/validity.cpp +++ b/src/emu/validity.cpp @@ -2172,7 +2172,7 @@ void validity_checker::validate_roms(device_t &root) } // for any non-region ending entries, make sure they don't extend past the end - if (!ROMENTRY_ISREGIONEND(romp) && current_length > 0) + if (!ROMENTRY_ISREGIONEND(romp) && current_length > 0 && !ROMENTRY_ISIGNORE(romp)) // MESSUI { items_since_region++; if (!ROMENTRY_ISIGNORE(romp) && (ROM_GETOFFSET(romp) + ROM_GETLENGTH(romp) > current_length)) |