Commit Graph

79 Commits

Author SHA1 Message Date
Vas Crabb
138b60e6c6 (nw) misc follow-up
Fix MT06964

Fix µPD7759 class hierarchy, and reset callback before resolving it
(fixed assert in Sega C2)

Remove some more low-value device add indirection macros, default some
more clocks

Make cards inherit clock from slot by default
2018-05-06 19:19:48 +10:00
arbee
dd58d907b6 GCC 8 again (nw) 2018-05-01 22:12:25 -04:00
Vas Crabb
af31f4b3de better handling for arbitrary numbers of screens (nw) 2018-03-12 17:31:40 +11:00
phulshof
1aaed4a64e Override and fallback options for artwork (#2908)
* Added fallback_artwork and override_artwork as MAME options to allow default artwork to be loaded.

* Removed debug testing code.

* - Allow loading of built-in layouts even if override_artwork is specified.
- Allow loading of fallback_artwork if only default view have been found.
- Fixed order of built-in layouts with regards to fallback_artwork as agreed upon the forums.

* Changed |= true to = true, and changed override artwork so it only checks for default.lay if the <machine name>.lay is not found.
2018-01-07 15:51:02 +11:00
smf-
7dfb01a2d2 fix unused variable error compiling with MSVC (nw) 2017-10-01 18:57:07 +01:00
Vas Crabb
de0bd3f3f7 work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81721 (nw) 2017-09-30 14:19:45 +10:00
Vas Crabb
b75264927b Generate layouts for systems with three or more screens 2017-09-29 19:57:47 +10:00
Vas Crabb
3a5c5d15c7 Add support for layout item groups, replace simple_list with more
appropriate containers, remove misleading const qualifiers, reduce
repeated XML walking.

(nw) Groups aren't parameterised, so they aren't as useful as they could
be (yes, it's on my TODO list).  However, it's already useful for
putting a common set of elements in multiple views, potentially at
different locations/scales.  See intlc44.lay and intlc440.lay for
examples of the level of copypasta this can eliminate.  Be aware that
groups with explicit bounds don't clip thair content, it's only used for
calucating the transform matrix.
2017-07-29 15:17:14 +10:00
Vas Crabb
22d80b3529 Move unemulated/imperfect flags from machines into devices.
Right now, flags for unemulated/imperfect features apply at system
level.  This falls over quickly with systems that have slot devices.
For example you can plug in a broken sound card or keyboard on a PC or
Amiga driver and get no warnings.  There's also no way to propagate
these flags from a device to all systems using it.

This changeset addresses these issues.  It's now possible to report
unemulated/imperfect features on a device level with static
unemulated_feeatures() and imperfect_features() member functions.  So
far the only thing using this is the votrax device.

To support front-ends, this is exposed in -listxml output as a new
"feature" element that can appear in system/device descriptions.  It has
a "type" attribute indicating which feature it is, potentially a
"status" attribute if the device itself declares that the feature is
unemulated/imperfect, and potentially an "overall" attribute if the
device inherits a more severe indication from a subdevice.  The embedded
DTD describes possible values.

Example: device/machine declares imperfect sound:
<feature type="sound" status="imperfect"/>

Example: device/machine declares unemulated keyboard:
<feature type="keyboard" status="unemulated"/>

Example: device declares imperfect controls but inherits unemulated
controls from a subdevice:
<feature type="controls" status="imperfect" overall="unemulated"/>

Example: device doesn't declare imperfect LAN but inherits it from a
subdevice:
<feature type="lan" overall="imperfect"/>

It's still possible to add these flags to machines in the GAME/COMP/CONS
macro.  If the state class declares them with static member functions,
the two sources will be combined.

If you subclass a device, you inherit its flags if you don't redefine
the relevant static member functions (no override qualifier is necessary
since they're static).

The UI has been updated to display appropriate warnings for the overall
machine configuration, including selected slot devices, at launch time.
The menus don't display overall status, only status for the machine
itself.  We can make it scan subdevices if we decide that's desirable,
it just needs caching to enure we don't take a huge performance hit.
2017-07-27 09:56:53 +10:00
Vas Crabb
05e84dccc0 * Make XML file a class of its own managed with smart poitners
* Save/restore a little more of Cocoa debugger state
2017-07-21 11:47:41 +10:00
Vas Crabb
96c9112785 general cleanup:
* move rarely-used output and pty interfaces out of emu.h
* consolidate and de-duplicate forward declarations, also remove some obsolete ones
* clean up more #include guard macros
* scope down a few more things

(nw) Everyone, please keep forward declarations for src/emu in src/emu/emufwd.h -
this will make it far easier to keep them in sync with declarations than having
them scattered through all the other files.
2017-05-23 15:01:11 +10:00
Vas Crabb
c8f1954467 XML refactoring:
* move stuff to namespace util::xml
* scope down some enums
* split config load/save delegate types
* make config load take const so it can't mangle data
2016-12-11 18:15:41 +11:00
Vas Crabb
8179a84458 Introduce u8/u16/u32/u64/s8/s16/s32/s64
* New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h"
* Get rid of import of cstdint types to global namespace (C99 does this anyway)
* Remove the cstdint types from everything in emu
* Get rid of U64/S64 macros
* Fix a bug in dps16 caused by incorrect use of macro
* Fix debugcon not checking for "do " prefix case-insensitively
* Fix a lot of messed up tabulation
* More constexpr
* Fix up many __names
2016-11-19 05:38:48 +11:00
Vas Crabb
2354a42010 Turn xmlfile API into something that looks like C++
It's still a bit quirky but it's far better encapsulated before, and it plays nice with const (nw)
2016-11-17 01:44:03 +11:00
Miodrag Milanovic
2027d59e7f Do not use FUNC in delegate where applicable (nw) 2016-11-06 14:11:55 +01:00
Miodrag Milanovic
aa2e6f9df3 Reverting part of changes from previous commits as described in mail on list (nw) 2016-10-23 09:11:47 +02:00
Miodrag Milanovic
e42ed88254 there you go (nw) 2016-10-22 21:37:06 +02:00
Miodrag Milanovic
a6bdefec8c more TRUE/FALSE cleanup (nw) 2016-10-22 16:37:12 +02:00
Miodrag Milanovic
ddb290d5f6 NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
2016-10-22 13:13:17 +02:00
Miodrag Milanovic
23ad94073f use standard types uintptr_t, char16_t and char32_t instead of FPTR, utf16_char, unicode_char (nw) 2016-10-22 11:31:49 +02:00
Miodrag Milanovic
a291e77b2c some bool <-> int not needed conversions, also cleaned drivenum.* was using memset for clearing vector (nw) 2016-10-21 11:54:18 +02:00
Jezze
ecf1e166fc Fixed several small issues in HLSL/BGFX
* fixed target texture dimension when -intoverscan is used (this fixes the appereance of scanline and shadow mask)
* added target_scale and screen_count uniforms
* rounded corners now remain aligned with screen bounds when -intoverscan is used (single screen only)
2016-09-28 15:30:43 +02:00
Antonio Giner
dcc361c354 Consistently apply -intscalex to the long dimension of the target
monitor, and -intscaley to the short dimension.
2016-08-27 22:12:29 +02:00
Antonio Giner
aa326bd8e6 Implement new option -autostretchxy, to automatically apply
-unevenstretchx or -unevenstretchy based on source native orientation.
2016-08-27 22:12:29 +02:00
Antonio Giner
a976bc2a2a Implement new option -unevenstretchy (complementary to -unevenstretchx) 2016-08-27 22:12:29 +02:00
AJR
717e1eb9d2 Change warning flags for Clang build (nw)
-Wno-missing-braces is unfortunately now necessary to avoid errors on almost every single use of the std::array initializer in devfind.h. (Apparently C++14 does make double braces optional for std::array initializers, but clang and GCC's -Wmissing-braces never took that into proper account, which is why GCC may still have it disabled by default.)

Several other Clang-specific warnings have been undisabled; some might perhaps need to be locally reenabled if legacy 3rdparty code or sundry OSD includes happen to disagree with them. The only warning to require any code changes was -Wabsolute-value, which seems to have caught a minor render bug (and nothing more).
2016-08-25 00:22:14 -04:00
Jezze
662950fc74 reverted semantic changes of 161a08d 2016-08-14 13:07:07 +02:00
Jezze
161a08dd4a - intscalex, intscaley and unevenstretchx now consider the system orientation and screen rotation 2016-08-13 20:30:54 +02:00
Vas Crabb
a0ce6c3b37 fix after pass through the diff 2016-08-01 01:20:03 +10:00
Miodrag Milanovic
184f7e5605 win compile fix due to previous changes (nw) 2016-07-31 15:31:22 +02:00
Miodrag Milanovic
aeadbfe2b1 fix linux compile (nw) 2016-07-31 14:59:01 +02:00
Miodrag Milanovic
9667c6a8cc std::min and std:max instead of MIN and MAX, also some more macros converted to inline functions (nw) 2016-07-31 14:41:02 +02:00
Miodrag Milanovic
52f5d4d0c1 This part was not meant to be commited (nw) 2016-07-23 11:30:30 +02:00
Miodrag Milanovic
b2ebca6189 prevent crashing (nw) 2016-07-23 11:10:17 +02:00
AJR
f87a5de446 Prevent NaN errors by initializing variable in ui::text_layout (nw)
Use osd_printf_verbose instead of popmessage in ay8910 (too annoying even for debug build)
2016-06-18 21:00:08 -04:00
ImJezze
6af3202119 Fixed MT06222
- fixed offset of vector lines and clipping rectangle when vector primitives are prepared to be rendered into a texture (HLSL) instead of directly on the screen (GDI, D3D)
2016-05-28 16:33:59 +02:00
cracyc
29d7699569 plugins/layout: layout embedded script helper plugin [Carl]
luaengine: callbacks for plugins (nw)
rendlay: layout tag external handler support (nw)
fidel_csc and mdndclab: example layout scripts (nw)
--
Neither layout script is complete.  The chess doesn't handle castling or en passant and the Dungeons and Dragons only does the walls.
2016-04-27 09:37:23 -05:00
Miodrag Milanovic
89c5e1f681 Various cleanups suggested by static analyzer (nw) 2016-04-24 12:58:31 +02:00
Miodrag Milanovic
1c726824f2 Split UI and frontend part from core [Miodrag Milanovic] 2016-04-23 11:26:47 +02:00
ImJezze
b1c06acb61 Implemented handling for u_screen_scale and u_screen_offset (nw) 2016-04-21 07:52:29 +02:00
Miodrag Milanovic
dc08f48c36 Cleanup (nw) 2016-04-20 13:42:52 +02:00
AJR
084d3654ca Iterate over devices C++11 style
Replace the old device_iterator and its specialized versions with functionally equivalent classes that use standard operators to yield references to devices/interfaces rather than pointers. With range-based for loops, they no longer have to be stored in named variables, though they can also be reused concurrently since the iteration state is now maintained by a subclass.

Add a few more typical getters to device_t::subdevice_list.
2016-04-18 18:53:28 -04:00
ImJezze
60eb6d0494 Added reasonable texcoord handling without known examples (nw) 2016-04-17 14:12:31 +02:00
ImJezze
454db9d5d3 Fixed texture coordinates for vector screen quad (nw) 2016-04-16 15:46:04 +02:00
ImJezze
32f0e6efac Removed hacks for vector screens from shaders (nw)
- added handling of texture coordinates for vector screens to core render
- added handling of orientation/rotation for vector screens to D3D renderer
2016-04-13 19:21:57 +02:00
Antonio Giner
cf830e71da Make overscan on integer scaled targets optional (add option -intoverscan). 2016-04-05 23:30:06 +02:00
AJR
54f7422c2a Conflict resolution (nw) 2016-03-31 10:29:46 -04:00
AJR
a7e393b36b Iterate over core classes C++11 style
C++11 range-based for loops can now iterate over simple_list, tagged_list, core_options, device_t::subdevice_list, device_t::interface_list, render_primitive_list and all subclasses of the above, and much code has been refactored to use them. Most core classes that have these lists as members now have methods that return the lists themselves, replacing most of the methods that returned the object at an owned list's head. (A few have been retained due to their use in drivers or OSD.)

device_t now manages subdevice and interface lists through subclasses, but has given up the work of adding and removing subdevices to machine_config.

memory_manager has its tagged lists exposed, though the old rooted tag lookup methods have been removed (they were privatized already).
2016-03-31 09:43:53 -04:00
Miodrag Milanovic
9353a1ccb3 Compressed internal layouts [David Haywood] 2016-03-30 20:40:05 +02:00
Miodrag Milanovic
913ab1e140 Cleanups and version bump 2016-03-30 08:35:21 +02:00