Skip to content

Commit

Permalink
Files for 273
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbbert committed Dec 25, 2024
1 parent e8b9bb7 commit 9f12f40
Show file tree
Hide file tree
Showing 22 changed files with 106 additions and 101 deletions.
2 changes: 1 addition & 1 deletion docs/release/build/uprel.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\goto end
git fetch upstream
git merge upstream/release0272
git merge upstream/release0273
git checkout master
:end
pause
5 changes: 4 additions & 1 deletion docs/release/scripts/genie.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1040,12 +1040,12 @@ end
end
buildoptions {
"-fdiagnostics-show-note-include-stack",
"-Wno-error=tautological-compare",
"-Wno-cast-align",
"-Wno-constant-logical-operand",
"-Wno-extern-c-compat",
"-Wno-ignored-qualifiers",
"-Wno-pragma-pack", -- clang 6.0 complains when the packing change lifetime is not contained within a header file.
"-Wno-tautological-compare",
"-Wno-unknown-attributes",
"-Wno-unknown-warning-option",
"-Wno-unused-value",
Expand Down Expand Up @@ -1292,6 +1292,9 @@ configuration { "vs20*" }
}

buildoptions {
"/Zc:preprocessor",
"/utf-8",
"/permissive-",
"/w45038", -- warning C5038: data member 'member1' will be initialized after data member 'member2'
}

Expand Down
4 changes: 2 additions & 2 deletions docs/release/scripts/src/3rdparty.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ project "expat"
"PACKAGE=\"expat\"",
"PACKAGE_BUGREPORT=\"[email protected]\"",
"PACKAGE_NAME=\"expat\"",
"PACKAGE_STRING=\"expat 2.2.10\"",
"PACKAGE_STRING=\"expat-2.2.10\"",
"PACKAGE_TARNAME=\"expat\"",
"PACKAGE_URL=\"\"",
"PACKAGE_VERSION=\"2.2.10\"",
Expand Down Expand Up @@ -1499,7 +1499,7 @@ end
MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
}

configuration { "linux*" }
configuration { "linux*", "not mingw*" }
includedirs {
MAME_DIR .. "3rdparty/bgfx/3rdparty/directx-headers/include/wsl/stubs",
MAME_DIR .. "3rdparty/bx/include/compat/linux",
Expand Down
4 changes: 0 additions & 4 deletions docs/release/src/emu/gamedrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ constexpr u64 MACHINE_NODEVICE_PRINTER = 0x00000100'00000000;
constexpr u64 MACHINE_NODEVICE_LAN = 0x00000200'00000000; ///< The system has unemulated local area networking
constexpr u64 MACHINE_IMPERFECT_TIMING = 0x00000400'00000000; ///< Timing is known to be imperfectly emulated for the system

// useful combinations of flags
constexpr u64 MACHINE_IS_SKELETON = MACHINE_NO_SOUND | MACHINE_NOT_WORKING; ///< Useful combination of flags for preliminary systems
constexpr u64 MACHINE_IS_SKELETON_MECHANICAL = MACHINE_IS_SKELETON | MACHINE_MECHANICAL | MACHINE_REQUIRES_ARTWORK; // flag combination for skeleton mechanical machines

/// \}
/// \}

Expand Down
34 changes: 17 additions & 17 deletions docs/release/src/emu/ioport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,8 @@ ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value def
for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
m_seq[seqtype].set_default();

for (int i = 0; i < std::size(m_chars); i++)
std::fill(std::begin(m_chars[i]), std::end(m_chars[i]), char32_t(0));
for (auto &chars : m_chars)
std::fill(std::begin(chars), std::end(chars), UCHAR_INVALID);

// for DIP switches and configs, look for a default value from the owner
if (type == IPT_DIPSWITCH || type == IPT_CONFIG)
Expand Down Expand Up @@ -812,11 +812,8 @@ std::vector<char32_t> ioport_field::keyboard_codes(int which) const
if (which >= std::size(m_chars))
throw emu_fatalerror("Tried to access keyboard_code with out-of-range index %d\n", which);

std::vector<char32_t> result;
for (int i = 0; i < std::size(m_chars[which]) && m_chars[which][i] != 0; i++)
result.push_back(m_chars[which][i]);

return result;
auto &chars = m_chars[which];
return std::vector<char32_t>(std::begin(chars), std::find(std::begin(chars), std::end(chars), UCHAR_INVALID));
}


Expand Down Expand Up @@ -3192,7 +3189,8 @@ ioport_configurer::ioport_configurer(device_t &owner, ioport_list &portlist, std
m_errorbuf(errorbuf),
m_curport(nullptr),
m_curfield(nullptr),
m_cursetting(nullptr)
m_cursetting(nullptr),
m_curshift(0)
{
}

Expand Down Expand Up @@ -3297,6 +3295,7 @@ ioport_configurer& ioport_configurer::field_alloc(ioport_type type, ioport_value

// reset the current setting
m_cursetting = nullptr;
m_curshift = 0;
return *this;
}

Expand All @@ -3307,16 +3306,17 @@ ioport_configurer& ioport_configurer::field_alloc(ioport_type type, ioport_value

ioport_configurer& ioport_configurer::field_add_char(std::initializer_list<char32_t> charlist)
{
for (int index = 0; index < std::size(m_curfield->m_chars); index++)
if (m_curfield->m_chars[index][0] == 0)
{
const size_t char_count = std::size(m_curfield->m_chars[index]);
assert(charlist.size() > 0 && charlist.size() <= char_count);
if (m_curshift < std::size(m_curfield->m_chars))
{
auto &chars = m_curfield->m_chars[m_curshift++];
assert(chars[0] == UCHAR_INVALID);
assert(charlist.size() <= std::size(chars));

for (size_t i = 0; i < char_count; i++)
m_curfield->m_chars[index][i] = i < charlist.size() ? *(charlist.begin() + i) : 0;
return *this;
}
std::copy(charlist.begin(), charlist.end(), std::begin(chars));
std::fill(std::begin(chars) + charlist.size(), std::end(chars), UCHAR_INVALID);

return *this;
}

std::ostringstream s;
bool is_first = true;
Expand Down
14 changes: 5 additions & 9 deletions docs/release/src/emu/ioport.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ constexpr ioport_value IP_ACTIVE_LOW = 0xffffffff;
constexpr int MAX_PLAYERS = 10;

// unicode constants
constexpr char32_t UCHAR_INVALID = 0xffff;
constexpr char32_t UCHAR_PRIVATE = 0x100000;
constexpr char32_t UCHAR_SHIFT_1 = UCHAR_PRIVATE + 0;
constexpr char32_t UCHAR_SHIFT_2 = UCHAR_PRIVATE + 1;
constexpr char32_t UCHAR_SHIFT_BEGIN = UCHAR_SHIFT_1;
constexpr char32_t UCHAR_SHIFT_END = UCHAR_SHIFT_2;
constexpr char32_t UCHAR_MAMEKEY_BEGIN = UCHAR_PRIVATE + 2;
constexpr char32_t UCHAR_MAMEKEY_BEGIN = UCHAR_SHIFT_END + 1;


// crosshair types
Expand Down Expand Up @@ -584,7 +585,7 @@ class ioport_condition
bool none() const { return (m_condition == ALWAYS); }

// configuration
void reset() { set(ALWAYS, nullptr, 0, 0); }
void reset() { set(ALWAYS, "", 0, 0); }
void set(condition_t condition, const char *tag, ioport_value mask, ioport_value value)
{
m_condition = condition;
Expand All @@ -599,7 +600,7 @@ class ioport_condition
private:
// internal state
condition_t m_condition; // condition to use
const char * m_tag; // tag of port whose condition is to be tested
const char * m_tag; // tag of port whose condition is to be tested (must never be nullptr)
ioport_port * m_port; // reference to the port to be tested
ioport_value m_mask; // mask to apply to the port
ioport_value m_value; // value to compare against
Expand Down Expand Up @@ -1202,6 +1203,7 @@ class ioport_configurer
ioport_port * m_curport;
ioport_field * m_curfield;
ioport_setting * m_cursetting;
int m_curshift;
};


Expand Down Expand Up @@ -1565,12 +1567,6 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s
#define PORT_SERVICE_NO_TOGGLE(_mask, _default) \
PORT_BIT( _mask, _mask & _default, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode ))

#define PORT_VBLANK(_screen) \
PORT_READ_LINE_DEVICE_MEMBER(_screen, FUNC(screen_device::vblank))

#define PORT_HBLANK(_screen) \
PORT_READ_LINE_DEVICE_MEMBER(_screen, FUNC(screen_device::hblank))

//**************************************************************************
// INLINE FUNCTIONS
//**************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion docs/release/src/emu/mconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,6 @@ void machine_config::set_perfect_quantum(device_t &device, std::string tag)
m_current_device->tag());
}

m_perfect_quantum_device.first = &device;
m_perfect_quantum_device.first = tag.empty() ? nullptr : &device;
m_perfect_quantum_device.second = std::move(tag);
}
29 changes: 20 additions & 9 deletions docs/release/src/frontend/mame/ui/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,15 +629,15 @@ static void output_joined_collection(const TColl &collection, TEmitMemberFunc em
void mame_ui_manager::display_startup_screens(bool first_time)
{
const int maxstate = 3;
int str = machine().options().seconds_to_run();
int const str = machine().options().seconds_to_run();
bool show_gameinfo = !machine().options().skip_gameinfo();
bool show_warnings = true, show_mandatory_fileman = true;
bool show_warnings = true;
bool video_none = strcmp(downcast<osd_options &>(machine().options()).video(), OSDOPTVAL_NONE) == 0;

// disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver,
// or if we are debugging, or if there's no mame window to send inputs to
if (!first_time || (str > 0 && str < 60*5) || &machine().system() == &GAME_NAME(___empty) || (machine().debug_flags & DEBUG_FLAG_ENABLED) != 0 || video_none)
show_gameinfo = show_warnings = show_mandatory_fileman = false;
if (!first_time || (str > 0 && str < 60*5) || &machine().system() == &GAME_NAME(___empty) || (machine().debug_flags & DEBUG_FLAG_ENABLED) || video_none)
show_gameinfo = show_warnings = false;

#if defined(__EMSCRIPTEN__)
// also disable for the JavaScript port since the startup screens do not run asynchronously
Expand Down Expand Up @@ -772,18 +772,29 @@ void mame_ui_manager::display_startup_screens(bool first_time)
break;

case 2:
#if 0 // MESSUI - prevent mandatory
std::vector<std::reference_wrapper<const std::string>> mandatory_images = mame_machine_manager::instance()->missing_mandatory_images();
if (!mandatory_images.empty() && show_mandatory_fileman)
if (!mandatory_images.empty())
{
std::ostringstream warning;
warning << _("This system requires media images to be mounted for the following device(s): ");
if ((str > 0) || (machine().debug_flags & DEBUG_FLAG_ENABLED) || video_none)
{
warning << "Images must be mounted for the following devices: ";
output_joined_collection(mandatory_images,
[&warning] (const std::reference_wrapper<const std::string> &img) { warning << img.get(); },
[&warning] () { warning << ", "; });

throw emu_fatalerror(std::move(warning).str());
}

warning << _("This system requires media images to be mounted for the following device(s): ");
output_joined_collection(mandatory_images,
[&warning](const std::reference_wrapper<const std::string> &img) { warning << "\"" << img.get() << "\""; },
[&warning]() { warning << ","; });
[&warning] (const std::reference_wrapper<const std::string> &img) { warning << '"' << img.get() << '"'; },
[&warning] () { warning << ", "; });

//ui::menu_file_manager::force_file_manager(*this, machine().render().ui_container(), warning.str().c_str()); // MESSUI
ui::menu_file_manager::force_file_manager(*this, machine().render().ui_container(), std::move(warning).str());
}
#endif
break;
}

Expand Down
2 changes: 0 additions & 2 deletions docs/release/src/osd/windows/winmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ static int is_double_click_start(int argc);
//MESSUI start
int main_(int argc, char *argv[])
{
printf("main_ Begin\n");fflush(stdout);
std::vector<std::string> args = osd_get_command_line(argc, argv);

// use small output buffers on non-TTYs (i.e. pipes)
Expand Down Expand Up @@ -160,7 +159,6 @@ int main_(int argc, char *argv[])
osd_output::pop(&winerror);
}

printf("main_ End\n");fflush(stdout);
return result;
}
//MESSUI end
Expand Down
10 changes: 5 additions & 5 deletions docs/release/src/osd/winui/history.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ HSOURCEINFO;
// The order of these is the order they are displayed
const HGAMEINFO m_gameInfo[MAX_HFILES] =
{
{ "gameinit.dat", "\n**** :GAMEINIT: ****\n\n", "$mame", 1 },
{ "history.xml", "\n**** :HISTORY: ****\n\n", "<text>", 1 },
// { "sysinfo.dat", "\n**** :SYSINFO: ****\n\n", "$bio", 1 },
{ "messinfo.dat", "\n**** :MESSINFO: ****\n\n", "$mame", 1 },
{ "mameinfo.dat", "\n**** :MAMEINFO: ****\n\n", "$mame", 1 },
{ "gameinit.dat", "\n**** :GAMEINIT: ****\n\n", "$mame", 1 },
{ "command.dat", "\n**** :COMMANDS: ****\n\n", "$cmd", 1 },
// { "story.dat", "\n**** :HIGH SCORES: ****\n\n", "$story", 0 },
// { "marp.dat", "\n**** :MARP HIGH SCORES: ****\n\n", "$marp", 0 },
Expand All @@ -81,30 +81,30 @@ const HGAMEINFO m_gameInfo[MAX_HFILES] =
const HSOURCEINFO m_sourceInfo[MAX_HFILES] =
{
{ NULL },
{ NULL },
// { NULL },
{ "messinfo.dat", "\n***:MESSINFO DRIVER: ", "$drv" },
{ "mameinfo.dat", "\n***:MAMEINFO DRIVER: ", "$drv" },
{ NULL },
{ NULL },
// { NULL },
// { NULL },
};

const HSOURCEINFO m_swInfo[MAX_HFILES] =
{
{ NULL },
{ "history.xml", "\n**** :HISTORY item: ", "<text>" },
// { NULL },
{ NULL },
{ NULL },
{ NULL },
{ NULL },
// { NULL },
// { NULL },
};

/*************************** END CONFIGURABLE AREA *******************************/

int file_sizes[MAX_HFILES] = { 0, };
int file_sizes[MAX_HFILES] = { };
std::map<std::string, std::streampos> mymap[MAX_HFILES];
const size_t npos = std::string::npos;

Expand Down Expand Up @@ -269,7 +269,7 @@ static bool create_index(const char* datsdir, std::ifstream &fp, int filenum)
fp.seekg(0);
std::string file_line;
std::getline(fp, file_line);
if (filenum == 0)
if (filenum == 1)
create_index_history(datsdir, fp, file_line, filenum);
else
{
Expand Down
2 changes: 1 addition & 1 deletion docs/release/src/osd/winui/mameui.rc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ BEGIN
POPUP "&Options"
BEGIN
MENUITEM "System List &Font...", ID_OPTIONS_FONT
MENUITEM "System List &Clone Color...", ID_OPTIONS_CLONE_COLOR
// MENUITEM "System List &Clone Color...", ID_OPTIONS_CLONE_COLOR
MENUITEM "&Directories...", ID_OPTIONS_DIR
MENUITEM "Default System &Options...", ID_OPTIONS_DEFAULTS
MENUITEM "&Reset to Default...", ID_OPTIONS_RESET_DEFAULTS
Expand Down
Loading

0 comments on commit 9f12f40

Please sign in to comment.