Commit Graph

126 Commits

Author SHA1 Message Date
Vas Crabb
af31f4b3de better handling for arbitrary numbers of screens (nw) 2018-03-12 17:31:40 +11:00
Vas Crabb
b75264927b Generate layouts for systems with three or more screens 2017-09-29 19:57:47 +10:00
Vas Crabb
e9c9e0e06d get rid of string hashes when fetching output values in layout rendering, too 2017-07-30 01:23:34 +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
2dc60cf04b reduce weight of render.h by moving component specialisation declarations into rendlay.cpp 2017-07-28 17:29:42 +10:00
Vas Crabb
a11d1fe266 convenience macro for enum bitwise operators (nw) 2017-07-22 14:32:29 +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
Miodrag Milanovic
21f7c8423f Fix obvious bugs found by GCC 7.1 (nw) 2017-05-15 17:38:50 +02:00
Vas Crabb
6c23897483 Self-registering devices prep:
* Make device_creator a variable template and get rid of the ampersands
* Remove screen.h and speaker.h from emu.h and add where necessary
* Centralise instantiations of screen and speaker finder templates
* Add/standardise #include guards in many hearers
* Remove many redundant #includes
* Order #includesr to help catch headers that can't be #included alone

(nw) This changes #include order to be prefix, unit header if applicable
then other stuff roughly in order from most dependent to least dependent
library.  This helps catch headers that don't #include things that they
use.
2017-02-27 22:57:14 +11:00
Olivier Galibert
a2557f1b02 Remove emu.h from headers (nw)
Per Vas' request.  If the compile fails for you (i'm thinking osx and
windows native debuggers here in particular), add '#include "emu.h"'
as first include of the cpp files that fail.

Due to our use of precompilation and forced inclusion, emu.h must be
included as the very first non-comment thing we do if we want to be
sure msvc compiles are identical to gcc/clang ones.  Doing it directly
instead of through an include increases the correctness probability by
a magnitude.
2017-02-11 18:31:20 +01: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
Miodrag Milanovic
79714c47d2 Fix Visual Studio build (nw) 2016-11-16 16:25:17 +01: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
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
Jezze
778d54daf6 Fixed OSX build as suggested by ajrhacker
* use fabsf rather than abs for float->float
2016-09-28 22:53:49 +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
Vas Crabb
46bf1ce04b More cleanup on the back of Osso's fix for a7e393b36b (nw)
* Make iterators actually meet requirements of ForwardIterator (and by consequence, ForwardIterator, Iterator and EqualityComparable)
* Don't use function statics if they can be avoided - it isn't thread-safe
* Remove leftover crud from when dynamic_buffer and friends were templates in lib/util

It's still dangerous that the const behaviour of iterators doesn't match STL.
Also, simple_list members with similar functionality to STL container members should be renamed.
2016-08-30 01:31:23 +10: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
Vas Crabb
4142ecd794 Use std::map for mapping XML tag name to layout component creation function - makes the code simpler and easier to read as well as being more scalable
Fix problem using layout_element::texture in vector - destructor frees resources but generated copy/assignment operators don't release them, leading to a problem any time vector expands or element is added/removed anywhere but end
2016-07-02 14:18:44 +10:00
Miodrag Milanovic
bc01a8bfeb simple_list to vector in rendlay (nw) 2016-07-01 14:46:18 +02:00
AJR
dd96ec0f2f Polymorphize layout_element::component (nw) 2016-06-30 13:05:21 -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
ImJezze
b1c06acb61 Implemented handling for u_screen_scale and u_screen_offset (nw) 2016-04-21 07:52:29 +02:00
therealmogminer@gmail.com
dd9c9a0fb3 Make OSDs return ui_menu_item lists, not slider_state lists 2016-04-10 19:22:31 +02:00
couriersud
7b3d46dea7 Add includes for dependency documentation. (nw) 2016-04-09 12:17:51 +02:00
couriersud
632b10cd0e Fix SDL compile on linux. Took the opportunity to remove a number of
"emu.h" includes from src/osd/modules/render/bgfx code. 
There is still a conflict between mame memory.h and bgfx memory.h to be
resolved.
2016-04-08 03:30:12 +02:00
Antonio Giner
c402c87dc0 Fix keepaspect & unevenstretch toggles in SDL OSD 2016-04-07 18:36:00 +02:00
Antonio Giner
cf830e71da Make overscan on integer scaled targets optional (add option -intoverscan). 2016-04-05 23:30:06 +02:00
AJR
b0e033146a Avoid auto return types; silence some unused variable warnings (nw) 2016-03-31 13:50:31 -04: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
Antonio Giner
bb51885229 Move integer scaling implementation to render_target::compute_visible_area
- Add core option -unevenstretch
- Add core option -unevenstretchx
2016-03-20 21:57:38 +01:00
Antonio Giner
57199a7dff Revert changes in layout view prior to rework of integer scaling 2016-03-19 00:02:41 +01:00
Antonio Giner
e39daaf5bd Merge remote-tracking branch 'refs/remotes/mamedev/master' 2016-03-18 22:41:17 +01:00
Antonio Giner
da18057256 Implement integer scaling in core renderer [Calamity] 2016-03-15 01:04:37 +01:00
ImJezze
7add547602 Refactoring of render targes and vector texture coordinates
- implemented proper texture coordinates for vector quad primitive
- vector screen is now processed in texture coordinates
- revered workaround for raster screen, which is again processed in
texture coordinates
- known issue: cocktail mode for vector screen looks wrong
2016-03-12 16:03:28 +01:00
ImJezze
cc24a339d8 Merge remote-tracking branch 'refs/remotes/mamedev/master'
Second attempt
2016-02-21 11:48:45 +01:00
therealmogminer@gmail.com
fbe6e54400 Fix remaining issues with bgfx renderer 2016-02-17 01:35:38 +01:00
therealmogminer@gmail.com
622df200de Fix errors with -rol and -ror, nw 2016-02-15 20:22:20 +01:00
therealmogminer@gmail.com
51eb416088 Hopefully fix text being weirdly rotated 2016-02-15 18:26:40 +01:00
therealmogminer@gmail.com
b0a7bcd346 Significant speed improvements to the BGFX renderer. [MooglyGuy] 2016-02-15 17:57:28 +01:00
Miodrag Milanovic
f5be481030 Fix regression with some drivers like fidelz80, for render we just need to keep mutex per thread (nw) 2016-01-31 08:23:30 +01:00
Miodrag Milanovic
42622cfe8e replace osd_lock with std::mutex [Miodrag Milanovic] 2016-01-30 20:43:50 +01:00
Miodrag Milanovic
3e5ad46410 modernized configuration_manager (nw) 2016-01-10 15:17:18 +01:00
mahlemiut
043eed6171 Make new internal debugger windows appear in a cascade-like position, and give some windows better default sizes. Change render_target::debug_top() to put targets at the end of the target list, fixing the order in which windows are rendered (nothing else uses this function). 2015-12-17 19:10:31 +13:00
Miodrag Milanovic
91605d3f4d clang-modernize part 1 (nw) 2015-12-03 18:17:25 +01:00