summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/render.c
Commit message (Collapse)AuthorAgeFilesLines
* reduce tagmap lookups (nw) Wilbert Pol2015-07-311-7/+36
|
* Another round of -Wextra -Wdouble-promotion fixes. (nw) couriersud2015-05-201-1/+1
|
* moved all to std::string (nw) Miodrag Milanovic2015-04-221-2/+2
|
* Replace dynamic_array with std::vector [O. Galibert] Olivier Galibert2015-04-141-1/+1
|
* updated astring constructors to have just one string param, to be more like ↵ Miodrag Milanovic2015-04-131-1/+1
| | | | std::string (nw)
* There is no implicit conversion to char* in std::string (nw) Miodrag Milanovic2015-04-121-1/+1
|
* Cleanups and version bumpmame0160 Miodrag Milanovic2015-03-251-3/+3
|
* ui: use per-container pixel aspect (LUA draw_text bugfix) Luca Bruno2015-03-161-12/+27
| | | | | | | | Do not assume ui-container aspect when drawing on other containers. This fixes LUA draw_text() in multi-screens games, where the font aspect for each screen is wrongly computed on the aggregated target. Signed-off-by: Luca Bruno <lucab@debian.org>
* render.c: render_containers now always make their own copy of the emulation ↵ Alex W. Jackson2015-02-231-128/+37
| | | | palette for paletted textures, whether or not there are custom brightness/contrast/gamma settings. Fixes -mt color issues in driftout, raphero, etc. without the additional complexity introduced in fde220f4a7e955343c3b25a562d6884f94c63bdc (which has been reverted) (nw)
* Add a pointer to the render_container to quad_primitives. This can be couriersud2015-02-121-0/+4
| | | | used to pick up user_settings for gamma, brightness and contrast in case they will ever be supported by the OSD layer. (nw)
* Cleanups and version bumpmame0158 Miodrag Milanovic2015-01-281-155/+155
|
* Added zeroing of texcoords to reset() of render_primitve. The omission couriersud2015-01-031-4/+10
| | | | of doing so may have cause strange drawing issues in case the code assumes these to be 0.0f (nw)
* Fix compile on clang couriersud2015-01-021-0/+15
|
* Palettes are now copied during get_primlist. This should fix couriersud2015-01-011-108/+178
| | | | | | | | multithreading related palette issues. Along the way also - added constructors to SDL osd structs - changed related malloc to global_alloc - added a copyfrom routine to dynamic_array - minor code simplifications.
* render_screen_list::contains - instead of false/true, return number of same ↵ Michaël Banaan Ananas2014-07-301-2/+2
| | | | indices found in view
* Moved eminline and related files into /src/osd since it's system related (nw) Miodrag Milanovic2014-04-161-4/+4
| | | | | | | | Moved delegates into /src/lib/util to enable usage of delegates in other project parts Moved mame_printf_* calls into /src/osd/osdcore.c and renamed them to osd_printf_* Changed mess.mak to display compilation of ymmu100.ppm nicely
* reverting r28187, if menus are unusable at that size user should make window ↵ Miodrag Milanovic2014-04-151-15/+3
| | | | bigger (nw)
* Fix brightness sliders in drivers that use black_pen() and/or white_pen() ↵ Alex W. Jackson2014-04-141-2/+2
| | | | [Alex Jackson]
* Cleanups and version bumpmame0153 Miodrag Milanovic2014-04-071-1/+1
|
* removed mame_* aliases and just use core_* functions (nw) Oliver Stöneberg2014-03-241-1/+1
|
* render.c: clean out dead, broken code accidentally revived by palette ↵ Alex W. Jackson2014-03-211-33/+15
| | | | rewrite. Allocate brightness/contrast/gamma-adjusted palettes on first use, since we can't allocate them at startup anymore due to init order issues [Alex Jackson]
* fix crash with -gamma (nw) David Haywood2014-03-201-1/+4
| | | | I think this is correct.. or at least more correct than it was, there's no way the existing code could work.
* Moved core template container classes up from emutempl.h to coretmpl.h: Aaron Giles2014-03-111-27/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Aaron Giles] * these classes now no longer take a resource_pool; everything is managed globally -- this means that objects added to lists must be allocated with global_alloc * added new auto_pointer<> template which wraps a pointer and auto-frees it upon destruction; it also defaults to NULL so it doesn't need to be explicitly initialized * moved tagged_list template to tagmap.h Redo of the low-level memory tracking system: [Aaron Giles] * moved low-level tracking out of emu\emualloc into lib\util\corealloc so it can be shared among all components and used by core libraries * global_alloc and friends no longer use a resource pool to track allocations; turns out this was a wholly redundant system that wasted a lot of memory * removed global_resource_pool entirely * added global_free_array to delete arrays allocated with global_alloc_array * added tracking of object versus array allocation; we will now error if you use global_free on an array, or global_free_array on an object Added new utility helper const_string_pool which can be used to efficiently accumulate strings that are not intended to be modified. Used by updated makelist and software list code. [Aaron Giles] Updated png2bdc and makelist tools to not leak memory and use more modern techniques (no more MAX_DRIVERS in makelist, for example). [Aaron Giles] Deprecated auto_strdup and removed all uses by way of caller-managed astrings and the software list rewrite. [Aaron Giles] Rewrote software list management: [Aaron Giles] * removed the notion of a software_list that is separate from a software_list_device; they are one and the same now * moved several functions into device_image_interface since they really didn't belong in the core software list class * lots of simplification as a result of the above changes Additional notes (no whatsnew): Moved definition of FPTR to osdcomm.h. Some changes happened in the OSD code to fix issues, especially regarding freeing arrays. SDL folks may need to fix up some of these. The following devices still are using tokens and should be modernized (I found them because they kept their token as void * and tried to delete it, which you can't): namco_52xx_device (mame/audio/namco52.c) namco_54xx_device (mame/audio/namco54.c) namco_06xx_device (mame/machine/namco06.c) namco_50xx_device (mame/machine/namco50.c) namco_51xx_device (mame/machine/namco51.c) namco_53xx_device (mame/machine/namco53.c) voodoo_device (emu/video/voodoo.c) mos6581_device (emu/sound/mos6581.c) aica_device (emu/sound/aica.c) scsp_device (emu/sound/scsp.c) dmadac_sound_device (emu/sound/dmadac.c) s3c2440_device (emu/machine/s3c2440.c) wd1770_device (emu/machine/wd17xx.c) latch8_device (emu/machine/latch8.c) duart68681_device (emu/machine/68681.c) s3c2400_device (emu/machine/s3c2400.c) s3c2410_device (emu/machine/s3c2410.c) strataflash_device (mess/machine/strata.c) hd63450_device (mess/machine/hd63450.c) tap_990_device (mess/machine/ti99/990_tap.c) omti8621_device (mess/machine/omti8621.c) vdt911_device (mess/video/911_vdt.c) apollo_graphics_15i (mess/video/apollo.c) asr733_device (mess/video/733_asr.c)
* added a few more missing \n in logging / cleanups (nw) Oliver Stöneberg2014-03-101-1/+1
|
* Adding minimum width/height options; defaulting to '0' so there is no change ↵ Nathan Woods2014-03-021-3/+15
| | | | in behavior (the menubar branch will have different defualts)
* Huge update, palette is now device (nw) Miodrag Milanovic2014-02-271-4/+4
| | | note: Aaron please give more descriptive text for release log I have no more strength :)
* Revert changes committed by accident. Couriersud2014-02-261-4/+2
|
* Minor cosmetic changes for netlist Couriersud2014-02-261-2/+4
|
* Another round of auto_alloc_array conversions. Aaron Giles2014-02-201-15/+1
| | | | | Some minor enhancements to dynamic_array, including clearing to specific values and expanding and clearing newly allocated values.
* Switched rgb_t to a class, replacing macros with methods. Mappings are Aaron Giles2014-02-191-18/+18
| | | | | | | | | | | | | | | | | | | as follows: MAKE_RGB(r,g,b) == rgb_t(r,g,b) MAKE_ARGB(a,r,g,b) == rgb_t(a,r,g,b) RGB_ALPHA(data) == data.a() RGB_RED(data) == data.r() RGB_GREEN(data) == data.g() RGB_BLUE(data) == data.b() RGB_BLACK == rgb_t::black RGB_WHITE == rgb_t::white Implicit conversions to/from UINT32 are built in as well as simple addition, subtraction, and scaling (with clamping). As a result of being a class, some stricter typing was needed in a few places but overall not too much.
* Converted palette_t and palette_client to classes. General palette.c Aaron Giles2014-02-181-13/+12
| | | | cleanup.
* Moved src/emu/ui.? ==> src/emu/ui/ui.?, changed to follow MAME OOP ↵ Nathan Woods2014-01-291-2/+2
| | | | conventions; we now have a ui_manager class
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* - "And he did give them CRT bloom, and it scorched their eyes so; and they wept Ryan Holtz2013-05-191-1/+4
| | | | | | | | | | | | openly, for there was nothing left to see with" [MooglyGuy] * Enabled vector bloom and associated .ini controls * Added raster bloom and associated .ini controls, each bloom "level" is the linear weight of successively half-sized render targets * Removed D3D8 mode * Mass renaming in D3D renderer to use namespaces, initial planning step to HAL-based renderer implementation on Windows (i.e., GL on Windows) * Converted d3d_info, d3d_poly_info, and d3d_texture_info into classes * Added batching of vectors for possible speed increase * Minor cleanup of shader state setting
* d3dhlsl.c: Add preliminary vector post-processing. [MooglyGuy] Ryan Holtz2013-01-211-2/+2
|
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-70/+70
|
* - render.c: Added new PRIMFLAG macros pertaining to vectors, to be used by the Ryan Holtz2012-12-311-0/+2
| | | | | | OSD. [MooglyGuy] - d3dhlsl.c: Began laying the groundwork for vector post-processing, disabled by default. [MooglyGuy]
* 01234567890123456789012345678901234567890123456789012345678901234567890123456789 Ryan Holtz2012-12-291-0/+1
| | | | | | | hlsl: Added bounds-checking on presets. [MooglyGuy] hlsl: Cleaned up render target management. May provide better behavior in games that use multiple resolutions, e.g. tekken3 and stv. [MooglyGuy]
* When menus are active, enable mouse on full screen (no whatsnew) Miodrag Milanovic2012-08-161-1/+6
|
* Properly detect click on artwork buttons when in fullscreen mode (no whatsnew) Miodrag Milanovic2012-08-151-4/+13
|
* Revert some changes committed by accident. No WN. Couriersud2012-05-261-4/+2
|
* Fix compile again - omitted a file, no WN Couriersud2012-05-261-2/+4
|
* Fix some analog control issues due to incorrect assumption Aaron Giles2012-05-051-3/+3
| | | | | | | that scale factors were INT32's not INT64's. Also explicitly use ioport_value for lookup tables instead of UINT32.
* Move driver list/enumerator to new file drivenum.c/.h. Aaron Giles2012-04-061-0/+1
| | | | Move game_driver definition and constants to new header gamedrv.h.
* Move devices into a proper hierarchy and handle naming Aaron Giles2012-01-241-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and paths consistently for devices, I/O ports, memory regions, memory banks, and memory shares. [Aaron Giles] NOTE: there are likely regressions lurking here, mostly due to devices not being properly found. I have temporarily added more logging to -verbose to help understand what's going on. Please let me know ASAP if anything that is being actively worked on got broken. As before, the driver device is the root device and all other devices are owned by it. Previously all devices were kept in a single master list, and the hierarchy was purely logical. With this change, each device owns its own list of subdevices, and the hierarchy is explicitly manifest. This means when a device is removed, all of its subdevices are automatically removed as well. A side effect of this is that walking the device list is no longer simple. To address this, a new set of iterator classes is provided, which walks the device tree in a depth first manner. There is a general device_iterator class for walking all devices, plus templates for a device_type_iterator and a device_interface_iterator which are used to build iterators for identifying only devices of a given type or with a given interface. Typedefs for commonly-used cases (e.g., screen_device_iterator, memory_interface_iterator) are provided. Iterators can also provide counts, and can perform indexed lookups. All device name lookups are now done relative to another device. The maching_config and running_machine classes now have a root_device() method to get the root of the hierarchy. The existing machine->device("name") is now equivalent to machine->root_device().subdevice("name"). A proper and normalized device path structure is now supported. Device names that start with a colon are treated as absolute paths from the root device. Device names can also use a caret (^) to refer to the owning device. Querying the device's tag() returns the device's full path from the root. A new method basetag() returns just the final tag. The new pathing system is built on top of the device_t::subtag() method, so anyone using that will automatically support the new pathing rules. Each device has its own internal map to cache successful lookups so that subsequent lookups should be very fast. Updated every place I could find that referenced devices, memory regions, I/O ports, memory banks and memory shares to leverage subtag/subdevice (or siblingtag/siblingdevice which are built on top). Removed the device_list class, as it doesn't apply any more. Moved some of its methods into running_machine instead. Simplified the device callback system since the new pathing can describe all of the special-case devices that were previously handled manually. Changed the core output function callbacks to be delegates. Completely rewrote the validity checking mechanism. The validity checker is now a proper C++ class, and temporarily takes over the error and warning outputs. All errors and warnings are collected during a session, and then output in a consistent manner, with an explicit driver and source file listed for each one, as well as additional device and/or I/O port contexts where appropriate. Validity checkers should no longer explicitly output this information, just the error, assuming that the context is provided. Rewrote the software_list_device as a modern device, getting rid of the software_list_config abstraction and simplifying things. Changed the way FLAC compiles so that it works like other external libraries, and also compiles successfully for MSVC builds.
* Fix several rendering issues with artwork, introduced in the Aaron Giles2012-01-161-7/+8
| | | | | | | recent changes. Also, did a pass through the code to take advantage of new methods available on rectangles.
* Clean-ups and version bumpmame0144u6 Angelo Salese2012-01-151-1/+1
|
* Major bitmap-related changes throughout the system. There are Aaron Giles2012-01-121-120/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | almost certainly some regressions lurking. Let me know if something seems busted. Bitmaps are now strongly typed based on format. bitmap_t still exists as an abstract base class, but it is almost never used. Instead, format-specific bitmap classes are provided: bitmap_ind8 == 8bpp indexed bitmap_ind16 == 16bpp indexed bitmap_ind32 == 32bpp indexed bitmap_ind64 == 64bpp indexed bitmap_rgb32 == 32bpp RGB bitmap_argb32 == 32bpp ARGB bitmap_yuy16 == 16bpp YUY For each format, a generic pix() method is provided which references pixels of the correct type. The old pix8/pix16/pix32/ pix64 methods still exist in the short term, but the only one available is the one that matches the bitmap's pixel size. Note also that the old RGB15 format bitmaps are no longer supported at all. Converted model1, megadriv, and stv drivers away from the RGB15 format bitmaps. New auto_bitmap_<type>_alloc() macros are provided for allocating the appropriate type of bitmap. Screen update functions now must specify the correct bitmap type as their input parameters. For static update functions the SCREEN_UPDATE macro is now replaced with SCREEN_UPDATE_RGB32 and SCREEN_UPDATE_IND16 macros. All existing drivers have been updated to use the correct macros. Screen update functions are now required for all screens; there is no longer any default behavior of copying a "default" bitmap to the screen (in fact the default bitmap has been deprecated). Use one of the following to specify your screen_update callback: MCFG_SCREEN_UPDATE_STATIC(name) - static functions MCFG_SCREEN_UPDATE_DRIVER(class, func) - driver members MCFG_SCREEN_UPDATE_DEVICE(tag, class, func) - device members Because the target bitmap format can now be deduced from the screen update function itself, the MCFG_SCREEN_FORMAT macro is no longer necessary, and has been removed. If you specify a screen update callback that takes a bitmap_ind16, then the screen will be configured to use a 16bpp indexed bitmap, and if you specify a callback that takes a bitmap_rgb32, then a 32bpp RGB bitmap will be provided. Extended the bitmap classes to support wrapping a subregion of another bitmap, and cleaner allocation/resetting. The preferred use of bitmaps now is to define them directly in drivers/devices and use allocate() or wrap() to set them up, rather than allocating them via auto_bitmap_*_alloc(). Several common devices needed overhauls or changes as a result of the above changes: * Reorganized the laserdisc base driver and all the laserdisc drivers as modern C++ devices, cleaning the code up considerably. Merged ldsound device into the laserdsc device since modern devices are flexible enough to handle it. * Reorganized the v9938 device as a modern C++ device. Removed v9938mod.c in favor of template functions in v9938.c directly. * Added independent ind16 and rgb32 callbacks for TMS340x0 devices. * All video devices are now hard-coded to either ind16 or rgb32 bitmaps. The most notable is the mc6845 which is rgb32, and required changes to a number of consumers. * Added screen_update methods to most video devices so they can be directly called via MCFG_SCREEN_UPDATE_DEVICE instead of creating tons of stub functions.
* Converted bitmap_t and rectangle into proper classes. Replaced BITMAP_ADDR* Aaron Giles2011-12-311-14/+14
| | | | | | | | macros with bitmap->pix* functions, and moved bitmap_fill() to bitmap->fill() among other similar changes. Bitmap fields now only available via accessors. Replaced sect_rect with &= and union_rect with |= operators for rectangle classes. Some general cleanup as a result of these changes. [Aaron Giles]
* Fixing bug that caused render_manager::is_live() to always return true for Nathan Woods2011-11-051-1/+1
| | | | | screen 0