Commit Graph

361 Commits

Author SHA1 Message Date
Miodrag Milanovic
24c63a3f3d Revert "enable BGFX_CONFIG_DEBUG to get proper asserts"
This reverts commit 4abb9da0ec.
2021-08-20 09:43:41 +02:00
Miodrag Milanovic
4abb9da0ec enable BGFX_CONFIG_DEBUG to get proper asserts 2021-08-13 14:00:53 +02:00
Aaron Giles
03d1877680 Disable another MSVC warning that is known to be noisy (and which showed up with the recent setjmp workaround). 2021-07-09 09:14:42 -07:00
Olivier Galibert
293a5c9129 Stupid warning is stupid 2021-05-26 22:35:19 +02:00
Vas Crabb
5fe20586ee srcclean for release 2021-05-23 17:33:52 +10:00
arbee
52e917793b Preliminary support for GCC 11.1 (Fedora 34) [R. Belmont] 2021-05-20 13:04:46 -04:00
Aaron Giles
3cfc522458
ymfm: Refactor new FM engine into a 3rdparty library (#8046)
ymfm: refactor the code into a separate 3rdparty library
* Moved ymfm core implementation to 3rdparty/ymfm
* Split out each family (OPM/OPN/OPL/etc) into its own source file
* Added preliminary OPQ and OPZ support, still WIP
* Put all 3rdparty code into its own namespace ymfm
* Fixed various bugs reported in #8042
* Created interface class for communication between the 3rdparty engine and the emulator
* Standardized MAME implementation of all Yamaha devices based on a template class
* Created standard base class ym_generic that can be used when multiple YM chips are swapped in
* Changed YM2203/2608/2610 to embed a YM2149 as a subdevice instead of deriving from ay8910_device
* Also provided compile-time option to use a simplified built-in SSG rather than using MAME's at all (currently off)
* Consolidated MAME header files from one-per-chip (ym2151.h, ym2203.h, etc) to one-per-family (ymopm.h, ymopn.h, etc)
2021-05-14 18:33:49 -07:00
feos
4e337734f7 Fix vs2019_clang build 2021-04-05 13:00:48 +10:00
Vas Crabb
71b8df0417 MAME 0.230
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE0DYtsBhE4EM627+6wXSxAYxAcQ4FAmBjCXUACgkQwXSxAYxA
 cQ6PAhAAuSgrMmBQiTdMrBvCDcB080E9yFNOkFpMgcH/RD9Md9hC5lN3sHVlGvex
 1hfA2hz1P2E3Icl2hI6oqhvXh192oo+AOj3EJ6bQdtn8c4UHhpFxNZ2tqbO0gcz5
 uuoThQx4Y29tAcYsurFcL7n782tcDym+QvTRl+UDiRWEMLXOTcd0IgKwYTm8scRL
 8c02Ks07cXJgawjDkyZYYQIvUjodppwTwdIW0hL3vvVNjFptG9ailtfTibLdfZRC
 QBTKLLewQxLDGROzfkY3lQwN+9TPdkSiITm63tBr9d+mCBT4Ib64MafplNGuxOVC
 vXBdjEsJyz2WDn490FXw3ZevOJI/BZCKuYZaW54owNbqgvLDXvc7AJMeEpqBGH8h
 soyJOx8NWY6FSB3yIgU6EROa+4IT3ZLdth3Q742ZNIBPlG1zIOvatredHnAQNis/
 VQM6y0jdbyIiMTRRfn3WLDp/CI0U2XO65d8+S9f86+5I8kbxTrJGSxx8YfM9c3up
 xuUbCBIU/egYBpYOaQzxxg9vFf+kWs50qdH2hMIxQjFM1IpUzWokiukUjCjRiVPp
 a4tRW3bdDmL76vkcQ/S4gQrSeDCLMBcPIZ5ffkBuaEar+C01/GOOKzn3UJWEkkmB
 dnw8HRLvJviPyTN2IiFWSZT+wYdgM0d3G3YofLsH6JTsaSF3xq8=
 =WmoT
 -----END PGP SIGNATURE-----

Merge tag 'mame0230' into mainline-master

MAME 0.230
2021-03-31 12:05:54 +11:00
hap
2247ffefa2 makefile: added param to override ar 2021-03-30 13:58:16 +02:00
Vas Crabb
438edcd151 Fix building with clang 6
Annoyingly, clang 6 produces warnings for unused private static data
members, but does not recognise the [[maybe_unused]] attribute for them.
2021-03-29 04:30:37 +11:00
Olivier Galibert
d436cbd3a6 formats: Create mame_formats_full_list which gives access to all the supported formats, make floptool use it. Castool should use it too probably, but I don't want to touch it. 2021-03-04 10:14:24 +01:00
Vas Crabb
6ba369b3fc -docs update:
* Added note explaining that view options saved in machine CFG take
  precedence over INI/command line.
* Added prerequisites for building HTML documentation under MSYS2 and
  Fedora Linux.
* Explicitly mentioned that Ubuntu modifies GCC to enable "fortify
  source" by default in the relevant section.
* Removed obsolete reference to glibstdc++6.
* Re-formated compiling guide source (hard wrap at 80 columns,
  typographical quotes, code blocks for sample command lines).

-genie.lua: Show GCC ignored attribute warnings, but don't fail for
them.
2021-01-23 16:34:25 +11:00
AJR
1eb22dd22c genie.lua: Attempted fix for GCC build 2021-01-22 15:16:02 -05:00
arbee
2c63fde1d0 Add macosx_arm64_clang target support [R. Belmont, Miodrag Milanovic] 2020-12-12 20:00:04 -05:00
Vas Crabb
5f750e0376 Fixed clang warning in Lua engine properly, converted a few fallthrough comments to attributes, sorted some warning options alphabetically 2020-11-17 03:51:20 +11:00
Vas Crabb
d1666d2ec9 Add C++17 flag for visual studio (hopefully in the right place) 2020-11-15 07:15:23 +11:00
Vas Crabb
4298ce18fb Enable GCC implicit fallthrough warning.
I've guessed whether break or [[fallthrough]] is appropriate.  In cases
where it looked particularly suspicious, I added a FIXME comment.  All
of these changes should be reviewed by someone familiar with the code.
2020-11-15 03:58:54 +11:00
Vas Crabb
55b8ca317a -Switch to building MAME as C++17.
* Updated sol2 to 3.2.2
* Updated pugixml to 1.10
* Increased minimum clang version to 6
* Cleaned up some stuff that can use new features
2020-11-15 03:53:47 +11:00
Vas Crabb
3a3e83d6b2 Apple calls llvm/clang 10 Xcode 12, update warning flags. 2020-10-29 12:40:25 +11:00
Justin Kerk
c88f0006c9 Fix link errors with new versions of Emscripten 2020-10-18 23:11:35 +00:00
couriersud
ed6900b990
emscripten: netlist and OpenGL improvements. (#7254)
* Most OpenGL link issues fixed. Two remain from drawogl.cpp.
    This isn't working anyhow.
* "-video accel" now uses WebGL. This allows GL based scaling and
    provides a performance improvement.
* Fixed pong and other games by adding another function to the
    exception whitelist
* Target now is mame.html. This allows emrun to be used for testing.
    mame.js is created as well and thus the current behaviour
    unchanged.
2020-09-18 23:06:48 +10:00
Vas Crabb
c8218dabdb Clean up clang options now that clang 5 is a hard requirement, and suppress xor-used-as-pow warning introduced in clang 10 2020-08-18 01:10:47 +10:00
hap
34a3ae1343 genie: mingw sdl build fails with end-group auto added by that LinkSupportCircularDependencies flag option (nw) 2020-06-21 16:28:47 +02:00
AJR
45850cd0be Fix OS X build on older Xcode versions (nw) 2020-06-18 11:17:37 -04:00
Frank Palazzolo
ba62cea8b4 Enable option to generate symbols in Release as well as Debug under Visual Studio. (This is important because debugging Debug builds is too slow) 2020-05-27 20:40:47 +10:00
hap
5dca949285 mingw: get rid of missing end-group warning (nw) 2020-05-10 15:22:41 +02:00
arbee
47a8f8c2bb GCC 10 fix for sqlite3 (nw) 2020-05-02 15:41:02 -04:00
Justin Kerk
f5deabdcde Fix hang with Emscripten's "upstream" backend (nw) 2020-04-16 14:37:55 +00:00
firewave
bb3b73e58b removed the remaining bits of the FASTDEBUG/MAME_DEBUG_FAST silliness I introduced ages ago (nw) 2020-01-21 20:20:20 +01:00
yz70s
00ac4f46f5 Lower number of warnings disabled with visual studio from 71 to 27 (nw)
And most of the remaining ones could be removed with simple code
modifications.
2020-01-02 12:36:09 +01:00
Vas Crabb
f9767bcb59 Revert "Revert "enable clang missing braces warning - it's useful to be able to see when you're initialising a structure or nested array inside an array""
This reverts commit 4264fcd136.
2019-12-21 01:34:40 +11:00
AJR
4264fcd136 Revert "enable clang missing braces warning - it's useful to be able to see when you're initialising a structure or nested array inside an array"
This (mostly) reverts commit 6959de0719.
2019-12-20 09:29:27 -05:00
Vas Crabb
6959de0719 enable clang missing braces warning - it's useful to be able to see when you're initialising a structure or nested array inside an array 2019-12-20 18:51:41 +11:00
Vas Crabb
877db65af6 damn inconsistent macros, maybe I really _will_ kill them off next year (nw) 2019-12-20 15:07:43 +11:00
yz70s
9aadb44632 Enable visual studio warning C5038 about member initialization order (nw)
Also put vs warning options all in one place.
2019-12-20 00:53:14 +01:00
couriersud
23c3ee5607 Revert "Fix gcc version 5 compile. (nw)"
This reverts commit b1246642eb.
2019-11-01 17:27:05 +01:00
couriersud
b1246642eb Fix gcc version 5 compile. (nw)
Cross compiling for windows on certain ubuntu versions fails without
this.
2019-11-01 15:38:38 +01:00
Vas Crabb
f81fbdb8d4 Make devdelegate more like devcb for configuration. This is a
fundamental change to show device delegates are configured.

Device delegates are now aware of the current device during
configuration and will resolve string tags relative to it.  This means
that device delegates need a device to be supplied on construction so
they can find the machine configuration object.  There's a
one-dimensional array helper to make it easier to construct arrays of
device delegates with the same owner.  (I didn't make an n-dimensional
one because I didn't hit a use case, but it would be a simple addition.)

There's no more bind_relative_to member - just call resolve() like you
would for a devcb.  There's also no need to cast nullptr when creating a
late bind device delegate.  The flip side is that for an overloaded or
non-capturing lambda you'll need to cast to the desired type.

There is one less conditional branch in the hot path for calls for
delegates bound to a function pointer of member function pointer.  This
comes at the cost of one additional unconditional branch in the hot
path for calls to delegates bound to functoids (lambdas, functions that
don't take an object reference, other callable objects).  This applies
to all delegates, not just device delegates.

Address spaces will now print an error message if a late bind error is
encountered while installing a handler.  This will give the range and
address range, hopefully making it easier to guess which memory map is
faulty.

For the simple case of allowing a device_delegate member to be
configured, use a member like this:

    template <typename... T> void set_foo(T &&...args) { m_foo_cb.set(std::forward<T>(args)...); }

For a case where different delegates need to be used depending on the
function signature, see src/emu/screen.h (the screen update function
setters).

Device delegates now take a target specification and function pointer.
The target may be:
* Target omitted, implying the current device being configured.  This
  can only be used during configuration.  It will work as long as the
  current device is not removed/replaced.
* A tag string relative to the current device being configured.  This
  can only be used during configuration.  It will not be callable until
  .resolve() is called.  It will work as long as the current device is
  not removed/replaced.
* A device finder (required_device/optional_device).  The delegate will
  late bind to the current target of the device finder.  It will not
  be callable until .resolve() is called.  It will work properly if the
  target device is replaced, as long as the device finder's base object
  isn't removed/replaced.
* A reference to an object.  It will be callable immediately.  It will
  work as long as the target object is not removed/replaced.

The target types and restrictions are pretty similar to what you already
have on object finders and devcb, so it shouldn't cause any surprises.
Note that dereferencing a device finder will changes the effect.  To
illustrate this:

    ...
    required_device<some_device> m_dev;
    ...
    m_dev(*this, "dev")
    ...
    // will late bind to "dev" relative to *this
    // will work if "dev" hasn't been created yet or is replaced later
    // won't work if *this is removed/replaced
    // won't be callable until resolve() is called
    cb1.set(m_dev, FUNC(some_device::w));
    ...
    // will bind to current target of m_dev
    // will not work if m_dev is not resolved
    // will not work if "dev" is replaced later
    // will be callable immediately
    cb2.set(*m_dev, FUNC(some_device::w));
    ...

The order of the target and name has been reversed for functoids
(lambdas and other callable objects).  This allows the NAME macro to
be used on lambdas and functoids.  For example:

    foo.set_something(NAME([this] (u8 data) { m_something = data; }));

I realise the diagnostic messages get ugly if you use NAME on a large
lambda.  You can still give a literal name, you just have to place it
after the lambda rather than before.  This is uglier, but it's
intentional.  I'm trying to drive developers away from a certain style.
While it's nice that you can put half the driver code in the memory map,
it detracts from readability.  It's hard to visualise the memory range
mappings if the memory map functions are punctuated by large lambdas.
There's also slightly higher overhead for calling a delegate bound to a
functoid.

If the code is prettier for trivial lambdas but uglier for non-trivial
lambdas in address maps, it will hopefully steer people away from
putting non-trivial lambdas in memory maps.

There were some devices that were converted from using plain delegates
without adding bind_relative_to calls.  I fixed some of them (e.g.
LaserDisc) but I probably missed some.  These will likely crash on
unresolved delegate calls.

There are some devices that reset delegates at configuration complete or
start time, preventing them from being set up during configuration (e.g.
src/devices/video/ppu2c0x.cpp and src/devices/machine/68307.cpp).  This
goes against the design principles of how device delegates should be
used, but I didn't change them because I don't trust myself to find all
the places they're used.

I've definitely broken some stuff with this (I know about asterix), so
report issues and bear with me until I get it all fixed.
2019-10-26 12:47:04 +11:00
Melissa Goad
5abd8b8230 Fix build for nonstandard compiler versions like '8.3-win32' 2019-10-17 21:40:16 -05:00
smf-
cd6b9ac9be fix for clang 9.0.0 on windows (nw) 2019-10-13 19:56:41 +01:00
Julian Sikorski
0837e7451a WIP: sync bgfx, bx and bimg with latest upstream (#5723)
* Sync with bgfx upstream revision b91d0b6

* Sync with bx upstream revision d60912b

* Sync with bimg upstream revision bd81f60

* Add astc-codec decoder

* Rename VertexDecl to VertexLayout

* Rename UniformType enum Int1 to Sampler.

* Add NVN stub

* Fix unused-const-variable error on macOS

* Drop redundant explicit language parameters
buildoptions_cpp are only applied to c++ files and buildoptions_objcpp are only
applied to objective c++ files. As such, hardcoding -x offers no benefit while
preventing overrides (such as one needed by 3rdparty/bgfx/src/renderer_vk.cpp on
macOS) from working.

* Re-introduce -x c++ in places where C code is compiled as C++ to prevent clang from throwing a warning

* Build bgfx as Objective-C++ on macOS
It is needed due to included headers

* Enable Direct3D12 and Vulkan bgfx rendering backends

* Enable building of spirv shaders

* Properly escape /c in cmd call

* Comment out dx12 bgfx renderer

* Honor VERBOSE setting during shaders build

* Only invert hlsl shader XYZ_TO_sRGB matrix for opengl

* Add spirv shaders

* OpenGL ES needs transposed matrix too

* Metal needs transposed matrix as well
2019-10-13 07:50:38 -04:00
Vas Crabb
d8998f5d9b (nw) fix std::array initialisation with GCC5 in nlwav.cpp, stop suppressing -Wterminate now that asserts are really asserts 2019-10-05 00:37:55 +10:00
Vas Crabb
bcfa6047c3 Build system maintenance:
* Re-write makedep.py for better performance and better parsing front-end
* Make srcclean deal with kinds of preprocessor abuse I never want to see in real life

(nw) The new parser front-end is better at recognising C++ syntax and
also substantially faster - bootstrapping a single-driver build should
be noticeably quicker.  Having a single parser for C++, .lst and .flt
files also gets us a bit closer to making it simpler to create custom
subtargets.
2019-10-04 22:55:01 +10:00
Julian Sikorski
fc31772d53 vs2019 fixes, initial clang-cl support (#5698)
* Add initial clangcl support

* Fix uwp builds' vs version typos

* Add missing vs2019 toolchain.lua bits
2019-10-02 14:30:05 +10:00
68bit
6d76d3f8f8 asmjs: can not ignore errors on missing libraries
The current Emscripten release is not happy with the use of
"-s ERROR_ON_MISSING_LIBRARIES=0" as a link option, it gives an error
stating that all libraries must now be present, so remove that use.

This leaves a missing 'util' library. This did not appear to be
needed on the few builds I have tried, and this patch avoids adding
this library for asmjs.
2019-08-28 14:25:27 +00:00
S.Z
a3588c18bf Enable precompiled header usage in the Visual Studio compiler (#5473)
* Enable precompiled header usage in the Visual Studio compiler
But only for libraries emu frontend precompile dasm optional
Also add emu.h include to hpcdasm.cpp

* Include emu.h in some disassembler sources to use precompiled headers

* Remove debug message
2019-08-13 13:20:53 -04:00
Justin Kerk
490709a6c1 Fix build in newer Emscripten versions (nw) 2019-08-08 14:23:12 +00:00
feos
aa1875694d fix vsllvm configuration
- dxsdk was missing from includes
- winmm was missing from libs
- narrowing warning was silenced for VS, but not from vsllvm, where it leads to an error in menu_video_options::handle()
2019-06-03 14:29:01 +03:00
Vas Crabb
626b566fee srcclean (nw) 2019-05-26 13:10:03 +10:00