summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/video.cpp
Commit message (Collapse)AuthorAgeFilesLines
* srcclean and manual cleanup (nw) Vas Crabb2020-04-261-1/+1
|
* Refactoring of AVI/MNG recording code (#6537) npwoods2020-04-221-363/+66
| | | | | | | | | | | | | | * Initial refactor of AVI/MNG movie recording, consolidation of copy and paste code, hiding of AVI/MNG behind interfaces * Extracted recording specific code out of src/emu/video.cpp and put into src/emu/recording.cpp * Took the opportunity to move slightly more logic out of video.cpp into recording.cpp * Bug fix * Consolidated frame counting logic
* (nw) Cleanup on the way: Vas Crabb2020-03-101-1/+1
| | | | | | | | | | * Add doxygen comments for bit manipulation functions * Add an overload of BIT that works like the AArch64 UBFX instruction * Kill off some of the silly concatenating overloads for emu_file::open * Make searchpath acually useful for devices This is a checkpoint - I'm planning to improve ROM loading behaviour at least a little.
* fixed some clang-tidy warnings (nw) (#6229) Oliver Stöneberg2020-01-291-2/+2
| | | | | | | | | | | | | | | | * fixed some readability-static-accessed-through-instance clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw) * fixed some readability-redundant-control-flow clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some performance-unnecessary-value-param clang-tidy warnings (nw)
* fixed some clang-tidy warnings (nw) (#6197) Oliver Stöneberg2020-01-221-7/+7
| | | | | | | | | | | | | | * fixed some bugprone-throw-keyword-missing clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some readability-delete-null-pointer clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw)
* fixed -aviwrite/-mngwrite crash with screenless systems [Oliver Stöne… ↵ Oliver Stöneberg2020-01-071-3/+10
| | | | | | | | | | | | (#6139) * fixed -aviwrite/-mngwrite crash with screenless systems [Oliver Stöneberg, hap] * can record video with noscreens (nw) * need to use default frame rate for screen-less MNG recording as well (nw) Co-authored-by: hap <happppp@users.noreply.github.com>
* Remove up to one frame of input latency. (#5901) antonioginer2019-11-161-1/+9
| | | | | | | | | | * Remove up to one frame of input latency. Makes MAME virtually lagless on VRR monitors. * Use empty parentheses and clean interface member calls * Add new option -instant_blit to make this feature optional * Rename new option to -lowlatency, -ll
* srcclean (nw) Vas Crabb2019-10-261-1/+1
|
* Fix AVI framerate feos2019-10-031-10/+1
| | | | | | MAME was setting up AVI before devices have properly launched, so default 60fps was used, which resulted in skipped frames in the video if machine's framerate is above 60 (btoads), and presumably duplicate frames for machines below 60fps (haven't tested). Now every frame that is generated is also present in the video.
* don't force throttling while paused feos2019-09-141-1/+1
|
* video: additional fix to 33383cdaa727deb627bf65f865515327947a0720 (MAME ↵ hap2019-07-231-3/+4
| | | | slowdown on screenless view) (nw)
* Making video_manager::effective_frameskip() public and exposing via LUA npwoods2019-07-181-1/+1
|
* luaengine: video:size(), video:pixels(), screen:refresh_attoseconds() ↵ cracyc2019-07-141-4/+36
|\ | | | | | | | | | | | | | | | | [vadosnaprimer] (#5334) * luaengine: video:size(), video:pixels(), screen:refresh_attoseconds() pixels() and size() correspond to internal game resolution covering all screens and internal pixel colors. the same values are used for bitmap dumping. similar things available for screen_device lua library take into account final UI resolution and colors, so they can't be used when accurate framebuffer is needed. refresh_attoseconds() allows to calculate precise numerator and denominator for framerate
| * luaengine: video:size(), video:pixels(), screen:refresh_attoseconds() feos2019-07-121-4/+36
| | | | | | | | | | | | pixels() and size() correspond to internal game resolution covering all screens and internal pixel colors. the same values are used for bitmap dumping. similar things available for screen_device lua library take into account final UI resolution and colors, so they can't be used when accurate framebuffer is needed. refresh_attoseconds() allows to calculate precise numerator and denominator for framerate
* | Make layout format more flexible: Vas Crabb2019-07-061-5/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * There is no longer a concept of "layers" - there are only screens and elements. * Elements are now instantiated with <element ref="..."> * Screens and elements can have explicit blending mode specified with blend="..." * Default blending mode for screens is "add" and default for other elements is "alpha" * Other supported modes are "none" and "multiply" * This removes the options to enable/disable layers individually - use views instead * Legacy layouts can still be loaded, and support won't be removed for at least a year The current artwork model is over-stretched. It's based on a Space Invaders cabinet model, and isn't applicable to a lot of the systems MAME emulates now. The fact that MAME has to switch to an "alternate" mode to deal with games like Golly! Ghost! without requiring pre-matted bitmaps shows that the Space Invaders model wasn't even adequate for general arcade use. It shows in that for a lot of the systems that heavily depend on artwork, people just seem to randomly choose layers for elements until they get something that works. Also, the fact that MAME will switch to an alternate (Golly! Ghost!) mode depending on the combination of elements is a trap for people learning to make artwork. There are cases that the current approach of implying the blending mode from the layer doesn't work with. Examples include LEDs behind diffusers (requires additive blending for layout elements), and mutliple stacked LCD panels (requires RGB multiplication for screens). For configurability, it's now a lot easier to make multiple views using groups. For example, if you want to make it possible to hide the control panel section of your layout, you can put the control panel elements in a group and create views with and without it. I will gradually migrate the internal artwork to use the new approach. I have an XSLT stylesheet that helps with this, but I'm not comfortable adding it because it isn't a complete solution and it still requires manul steps. I wanted to get the re-worked pointer handling done sooner so I could push them both at the same time, but unfortunately various things have prevented me from progressing as quickly as I wanted to. Sorry guys, that stuff's going to have to wait.
* (nw) Clean up the mess on master Vas Crabb2019-03-261-5/+14
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-14/+5
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* video: don't use iter count (nw) hap2019-02-151-1/+5
|
* video: stop frameskipping constantly on screenless systems with frameskip=0 (nw) hap2019-02-151-2/+3
|
* Video throttling: Additive oversleeping Celelibi2019-02-151-3/+7
| | | | Signed-off-by: Celelibi <celelibi@gmail.com>
* Replace ATTOSECONDS_TO_HZ with as_hz where appropriate (nw) AJR2018-11-051-2/+2
|
* better handling for arbitrary numbers of screens (nw) Vas Crabb2018-03-121-97/+111
|
* Remove all uses of first_screen() from core files, nw Ryan Holtz2018-03-111-178/+373
|
* png: make it not leak memory by default, and look a but more like C++ Vas Crabb2017-08-131-11/+7
|
* more const, get rid of forced sleep (nw) Vas Crabb2017-08-021-16/+7
|
* general cleanup: Vas Crabb2017-05-231-3/+3
| | | | | | | | | | | * 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.
* Remove the minimum constraint for sleep, thus avoid choosing a seemingly 057a3dd61f99517a3afea0051a49cb27994f94d2017-05-201-8/+4
| | | | arbitrary constant.
* Relax the threshold to consider an oversleep as a system time change, 057a3dd61f99517a3afea0051a49cb27994f94d2017-05-181-1/+1
| | | | in case of running on a heavily loaded system, as suggested by cuavas.
* Fix video_manager::throttle_until_ticks (#2309) 057a3dd61f99517a3afea0051a49cb27994f94d2017-05-171-1/+6
| | | | Do not update m_average_oversleep if we overslept too much. This is still a partial fix, more investigation is needed when the system time jumps backward.
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | significant change, so please pay attention. The core changes are: * Short name, full name and source file are no longer members of device_t, they are part of the device type * MACHINE_COFIG_START no longer needs a driver class * MACHINE_CONFIG_DERIVED_CLASS is no longer necessary * Specify the state class you want in the GAME/COMP/CONS line * The compiler will work out the base class where the driver init member is declared * There is one static device type object per driver rather than one per machine configuration Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type. * DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders. * DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type. Use DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types. * These macros declare storage for the static data, and instantiate the device type and device finder templates. The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate. Things I've actually messed with substantially: * More descriptive names for a lot of devices * Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes * Changed DECO BSMT2000 ready callback into a device delegate * Untangled Microprose 3D noise from driver state * Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices * Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly * Started to break out common parts of Samsung ARM SoC devices * Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++ * Tried to make Z180 table allocation/setup a bit safer * Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant * Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size * Imporved encapsulation of Z80DART channels * Refactored the SPC7110 bit table generator loop to make it more readable * Added wrappers for SNES PPU operations so members can be made protected * Factored out some boilerplate for YM chips with PSG * toaplan2 gfx * stic/intv resolution * Video System video * Out Run/Y-board sprite alignment * GIC video hookup * Amstrad CPC ROM box members * IQ151 ROM cart region * MSX cart IRQ callback resolution time * SMS passthrough control devices starting subslots I've smoke-tested several drivers, but I've probably missed something. Things I've missed will likely blow up spectacularly with failure to bind errors and the like. Let me know if there's more subtle breakage (could have happened in FM or Voodoo). And can everyone please, please try to keep stuff clean. In particular, please stop polluting the global namespace. Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros. It feels like an uphill battle trying to get this stuff under control while more of it's added.
* Fix debug build by removing vestiges of -dummywrite (nw) AJR2017-03-021-6/+1
|
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-22/+22
| | | | | | | | | | | | * 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
* Revert "Added IS_ENABLED, so we have compiler check for non used part, it is ↵ Miodrag Milanovic2016-11-121-1/+1
| | | | | | checked but not compiled in (nw)" This reverts commit c0407f073bf7afe26407c4add5cfeaf7104913c9.
* Added IS_ENABLED, so we have compiler check for non used part, it is checked ↵ Miodrag Milanovic2016-11-111-1/+1
| | | | | | but not compiled in (nw) false and true now used instead of integer where used as bool
* Do not use FUNC in delegate where applicable (nw) Miodrag Milanovic2016-11-061-1/+1
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-10/+10
| | | | | 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
* some bool <-> int not needed conversions, also cleaned drivenum.* was using ↵ Miodrag Milanovic2016-10-211-13/+13
| | | | memset for clearing vector (nw)
* std::min and std:max instead of MIN and MAX, also some more macros converted ↵ Miodrag Milanovic2016-07-311-3/+3
| | | | to inline functions (nw)
* Fix -nodebug crash (nw) therealmogminer@gmail.com2016-06-081-8/+10
|
* Major refactoring of debugger core [Ryan Holtz] therealmogminer@gmail.com2016-06-081-1/+1
| | | | | | | | * Eliminate globals/file statics * Remove lots of stuff from global scope * Use std::function for custom command registration * Eliminate some trampolines * Build fixes from Vas Crabb and balr0g
* Revert "Allow for output to verify that a machine's emulation has ended ↵ Scott Stone2016-05-161-9/+3
| | | | | | properly specifically in instances where less than 2 seconds has elapsed. (nw)" This reverts commit fc4ab036fc4822ed9927c3f379f002e16aa3ffeb.
* Allow for output to verify that a machine's emulation has ended properly ↵ Scott Stone2016-05-161-3/+9
| | | | specifically in instances where less than 2 seconds has elapsed. (nw)
* Added ability to create standalone emulators, added zexall as example (nw) Miodrag Milanovic2016-05-081-1/+1
|
* INC -> HXX makes editors and code analyzers see it as C++ (nw) Miodrag Milanovic2016-05-011-1/+1
|
* Split UI and frontend part from core [Miodrag Milanovic] Miodrag Milanovic2016-04-231-7/+6
|
* video.cpp: create final snapshot on -str runs even for screenless systems. ↵ Ivan Vangelista2016-04-221-9/+6
| | | | Fixes MT04965 (nw)
* Iterate over devices C++11 style AJR2016-04-181-23/+19
| | | | | | 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.
* Compressed internal layouts [David Haywood] Miodrag Milanovic2016-03-301-1/+1
|
* Make osd_file a polymorphic class that's held with smart pointers Vas Crabb2016-03-141-28/+27
| | | | | | | | | | | | | | | Make avi_file a class that's held with smart pointers, encapsulate various AVI I/O structures Make zip_file and _7z_file classes rather than having free functions everywhere Hide zip/7z class implementation behind an interface, no longer need to call close() to send back to the cache Don't dump as much crap in global namespace Add solaris PTY implementation Improve variable expansion for SDL OSD - supports ~/$FOO/${BAR} syntax Rearrange stuff so the same things are in file module for all OSDs Move file stuff into its own module 7z/zip open and destruct are still not thread-safe due to lack of interlocks around cache access Directory functions still need to be moved to file module SDL OSD may not initialise WinSock on Windows
* * Support *n conversion in stream_format/string_format Vas Crabb2016-03-011-4/+4
| | | | | | | | | * Make stream_format return characters printed * Add iostreams with std::vector storage * Move to type-safe templates for logerror and popmessage * Remove now-unnecessary I64FMT from calls to logerror/popmessage * Put some lib/util stuff in util:: namespace * Some fixes to Japanese translation