From a328b1c1665222a76dc8080ca3c4ef672e909608 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 26 Mar 2017 09:57:31 +0200 Subject: Fixed SDL build on win32 and zexall build (nw) --- src/osd/sdl/sdlmain.cpp | 10 ++++++++-- src/zexall/main.cpp | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp index f8bcb231796..80985c4b0c9 100644 --- a/src/osd/sdl/sdlmain.cpp +++ b/src/osd/sdl/sdlmain.cpp @@ -181,8 +181,14 @@ extern "C" DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst); #endif // translated to utf8_main -int main(int argc, char *argv[]) +#if defined(SDLMAME_WIN32) +int main(std::vector &args) +{ +#else +int main(int argc, char** argv) { + std::vector args(argv, argv+argc); +#endif int res = 0; // disable I/O buffering @@ -210,7 +216,7 @@ int main(int argc, char *argv[]) sdl_options options; sdl_osd_interface osd(options); osd.register_options(); - res = emulator_info::start_frontend(options, osd, argc, argv); + res = emulator_info::start_frontend(options, osd, args); } #ifdef SDLMAME_UNIX diff --git a/src/zexall/main.cpp b/src/zexall/main.cpp index b4e87ddf299..6c418b77454 100644 --- a/src/zexall/main.cpp +++ b/src/zexall/main.cpp @@ -76,7 +76,7 @@ private: zexall_machine_manager* zexall_machine_manager::m_manager = nullptr; -int emulator_info::start_frontend(emu_options &options, osd_interface &osd, int argc, char *argv[]) +int emulator_info::start_frontend(emu_options &options, osd_interface &osd, std::vector &args) { std::string error_string; options.set_value(OSDOPTION_VIDEO, "none", OPTION_PRIORITY_MAXIMUM, error_string); @@ -87,6 +87,12 @@ int emulator_info::start_frontend(emu_options &options, osd_interface &osd, int return 0; } +int emulator_info::start_frontend(emu_options &options, osd_interface &osd, int argc, char *argv[]) +{ + std::vector args(argv, argv + argc); + return start_frontend(options, osd, args); +} + const char * emulator_info::get_bare_build_version() { return nullptr; } const char * emulator_info::get_build_version() { return nullptr; } -- cgit v1.2.3 From 3047b6266522f3f4dcbc4da5043923519bc42dd8 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 26 Mar 2017 19:13:42 +1100 Subject: srcclean (nw) --- src/osd/sdl/sdlmain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp index 80985c4b0c9..31f65e2ba66 100644 --- a/src/osd/sdl/sdlmain.cpp +++ b/src/osd/sdl/sdlmain.cpp @@ -188,7 +188,7 @@ int main(std::vector &args) int main(int argc, char** argv) { std::vector args(argv, argv+argc); -#endif +#endif int res = 0; // disable I/O buffering -- cgit v1.2.3 From fa2c6e5829e4cc588ca61fa2f7d58224468243a2 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Sun, 26 Mar 2017 14:06:51 +0200 Subject: express: More robust memory access operator parsing (nw) --- src/emu/debug/express.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emu/debug/express.cpp b/src/emu/debug/express.cpp index 41d75825a6a..951a1899869 100644 --- a/src/emu/debug/express.cpp +++ b/src/emu/debug/express.cpp @@ -874,7 +874,7 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *& } // check for memory @ operators - if (string[0] == '@' || string[0] == '!') + if ((string[0] == '@' || string[0] == '!') && (buffer.back() == 'b' || buffer.back() == 'w' || buffer.back() == 'd' || buffer.back() == 'q')) { bool with_se = string[0] == '!'; string += 1; -- cgit v1.2.3 From 0dd55128b9288d6056a3623eac210a3d206bb2d3 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 26 Mar 2017 14:05:03 +0200 Subject: Fix compile error noticed on VS (nw) --- src/devices/imagedev/floppy.cpp | 2 +- src/zexall/main.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index 38997394ac2..09c9d89429e 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -9,7 +9,7 @@ #include "emu.h" #include "floppy.h" -#include "speaker.cpp" +#include "speaker.h" #include "formats/imageutl.h" #include "zippath.h" diff --git a/src/zexall/main.cpp b/src/zexall/main.cpp index 6c418b77454..1d82da77d96 100644 --- a/src/zexall/main.cpp +++ b/src/zexall/main.cpp @@ -83,6 +83,8 @@ int emulator_info::start_frontend(emu_options &options, osd_interface &osd, std: options.set_value(OSDOPTION_SOUND, "none", OPTION_PRIORITY_MAXIMUM, error_string); //options.set_value(OPTION_DEBUG, true, OPTION_PRIORITY_MAXIMUM, error_string); options.set_value(OPTION_THROTTLE, false, OPTION_PRIORITY_MAXIMUM, error_string); + + zexall_machine_manager::instance(options,osd)->start_http_server(); zexall_machine_manager::instance(options,osd)->execute(); return 0; } -- cgit v1.2.3 From a43db4ab229df5934b7275c4560037a6c017064a Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Mon, 27 Mar 2017 20:32:07 +0200 Subject: express: More robust parsing fix (nw) --- src/emu/debug/express.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/emu/debug/express.cpp b/src/emu/debug/express.cpp index 951a1899869..198b9428837 100644 --- a/src/emu/debug/express.cpp +++ b/src/emu/debug/express.cpp @@ -873,12 +873,17 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *& string++; } - // check for memory @ operators - if ((string[0] == '@' || string[0] == '!') && (buffer.back() == 'b' || buffer.back() == 'w' || buffer.back() == 'd' || buffer.back() == 'q')) + // check for memory @ and ! operators + if (string[0] == '@' || string[0] == '!') { - bool with_se = string[0] == '!'; - string += 1; - return parse_memory_operator(token, buffer.c_str(), with_se); + try { + bool with_se = string[0] == '!'; + parse_memory_operator(token, buffer.c_str(), with_se); + string += 1; + return; + } catch(const expression_error &e) { + // Try some other operator instead + } } // empty string is automatically invalid -- cgit v1.2.3 From fac6cafdcc0379eab636f4b70a7a0036c6001f6c Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Tue, 28 Mar 2017 20:40:50 +0200 Subject: addrmap: Temporary fix (nw) --- src/emu/addrmap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp index d6e0290e4f0..edaf8e32008 100644 --- a/src/emu/addrmap.cpp +++ b/src/emu/addrmap.cpp @@ -289,7 +289,8 @@ bool address_map_entry::unitmask_is_appropriate(u8 width, u64 unitmask, const ch throw emu_fatalerror("Handler %s is a %d-bit handler and is too wide to be used in a %d-bit address map", string, width, m_map.m_databits); // if map is narrower than 64 bits, check the mask width as well - if (m_map.m_databits < 64 && (unitmask >> m_map.m_databits) != 0) + // disabled because it breaks f.i. isa8_device::install_device, and the fix is nonobvious + if (false && m_map.m_databits < 64 && (unitmask >> m_map.m_databits) != 0) throw emu_fatalerror("Handler %s specified a mask of %08X%08X, too wide to be used in a %d-bit address map", string, (u32)(unitmask >> 32), (u32)unitmask, m_map.m_databits); // the mask must represent whole units of width -- cgit v1.2.3 From 831668a7b4174f6977a6c923443a3199dadc958e Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 29 Mar 2017 14:18:25 +1100 Subject: Revert "addrmap: Temporary fix (nw)" This reverts commit fac6cafdcc0379eab636f4b70a7a0036c6001f6c. --- src/emu/addrmap.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp index edaf8e32008..d6e0290e4f0 100644 --- a/src/emu/addrmap.cpp +++ b/src/emu/addrmap.cpp @@ -289,8 +289,7 @@ bool address_map_entry::unitmask_is_appropriate(u8 width, u64 unitmask, const ch throw emu_fatalerror("Handler %s is a %d-bit handler and is too wide to be used in a %d-bit address map", string, width, m_map.m_databits); // if map is narrower than 64 bits, check the mask width as well - // disabled because it breaks f.i. isa8_device::install_device, and the fix is nonobvious - if (false && m_map.m_databits < 64 && (unitmask >> m_map.m_databits) != 0) + if (m_map.m_databits < 64 && (unitmask >> m_map.m_databits) != 0) throw emu_fatalerror("Handler %s specified a mask of %08X%08X, too wide to be used in a %d-bit address map", string, (u32)(unitmask >> 32), (u32)unitmask, m_map.m_databits); // the mask must represent whole units of width -- cgit v1.2.3