summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/zeus2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* poly.h: Remove unused flags, expose object data array directly, add ability ↵ Aaron Giles2021-09-031-1/+1
| | | | to register other poly_arrays.
* video/voodoo.cpp: Major rewrite: (#8267) Aaron Giles2021-07-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changed to use modern poly.h instead of polylgcy.h. * Moved helper classes into separate voodoo namespace. * Derived device classes from video_device_interface. * Split classes so that later versions derive from earlier versions. * Created device maps to be directly included. * Redesigned register mapping to use helper classes and delegates. * Rewrote rasterizers to use C++ templates instead of macros. * Added logic to compute equations for color/texture combine units. * Added special generic identity-texel rasterizer cases. * Removed pipeline stalls on texture and palette changes. * Removed pipeline stalls on most all parameter changes. * Generally re-thought and cleaned up logic throughout. * Parameterized cycle stealing on status reads; updated all existing voodoo consumers to configure it as it was before. -vidoe/poly.h: Various improvements: * Exposed poly_array class for broader use. * Changed poly_array to intelligently determine maximum size. * Added logic to track multiple "last" instances in poly_array. * Extended logic to support up to 16m work items. * Removed MaxPolys parameter from poly_manager template. * Added Flags parameter to poly_manager template. * Added POLY_FLAG_NO_CLIPPING flag to remove clipping code when not needed. * poly_manager now supports a MaxParams value of 0. * Made paramcount a template parameter for render_* functions. * Added reset_after_wait() method to be overridden by derived classes. * Switched to using std:: helpers instead of internal methods. * Removed useless dependency on screen_device. * TRACK_POLY_WAITS now produces more complete statistics. -video/polylgcy.cpp: Removed legacy implementation of polygon renderer. -machine/gt64xxx.cpp: Prevent lockups by disallowing 0-duration timers. -machine/pci.cpp: Added support for adding subdevice maps directly. -emu/video/rgbsse.h: Improved min/max for SSE4.1+ and scale+clamp operations for all. -emu/vidoe/rgbutil.h: Made palette expansion constexpr and added argbexpand function. -osd/osdcore.cpp: Changed osd_ticks to use QueryPerformanceCounter on Windows since the mingw std::chrono::high_resolution_clock is anything but.
* Enable GCC implicit fallthrough warning. Vas Crabb2020-11-151-1/+3
| | | | | | 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.
* -Switch to building MAME as C++17. Vas Crabb2020-11-151-3/+2
| | | | | | | * 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
* Cleaned up bitmap API. Vas Crabb2020-09-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made const-qualified pixel accessors (pix, pixt, raw_pixptr) return const-qualified references/pointers to pixesl, and added non-const versions. This makes bitmap more like standard library containers where const protects the content as well as the dimensions. Made the templated pixt accessor protected - having it public makes it too easy to inadvertently get a pointer to the wrong location. Removed the pix(8|16|32|64) accessors from the specific bitmaps. You could only use the "correct" one anyway, and having the "incorrect" ones available prevented explicit instantiations of the class template because the static assertions would fail. You can still see the pixel type in the bitmap class names, and you can't assign the result of &pix(y, x) to the wrong kind of pointer without a cast. Added fill member functions to the specific bitmap template, and added a explicit instantiations. This allows the bitmap size check to be skipped on most bitmap fills, although the clipping check is still there. Also fixed a couple of places that were trying to fill an indexed 16-bit bitmap with rgb_t::black() exposed by this (replaced with zero to get the same net effect). The explicit template instantiations in the .cpp file mean the compiler can inline the function if necessary, but don't need to generate a local out-of-line body if it chooses not to. Extended the size of the fill value parameter in the base bitmap class to 64 bits so it works correctly for 64-bit bitmaps. Fixed places where IE15 and VGM visualiser weren't accounting for row bytes potentially being larger than width. Fixed an off-by-one in an HP-DIO card where it was treating the Topcat cursor right edge as exclusive. Updated everything to work with the API changes, reduced the scope of many variables, added more const, and replaced a few fill/copy loops with stuff from <algorithm>.
* devices\video: simplify handlers for a few devices (nw) Ivan Vangelista2020-03-061-2/+2
|
* Make osd_printf_* use util/strformat semantics. Vas Crabb2019-09-261-1/+1
| | | | | | | | | | | | | | | | | (nw) This has been a long time coming but it's here at last. It should be easier now that logerror, popmessage and osd_printf_* behave like string_format and stream_format. Remember the differences from printf: * Any object with a stream out operator works with %s * %d, %i, %o, %x, %X, etc. work out the size by magic * No sign extending promotion to int for short/char * No widening/narrowing conversions for characters/strings * Same rules on all platforms, insulated from C runtime library * No format warnings from compiler * Assert in debug builds if number of arguments doesn't match format (nw) Also removed a pile of redundant c_str and string_format, and some workarounds for not being able to portably format 64-bit integers or long long.
* midzeus.cpp, zeus2: Bring static variables inside class; eliminate ↵ AJR2019-09-111-5/+5
| | | | auto_alloc (nw)
* Allow passing std::unique_ptr<TYPE> directly to save_pointer and remove ↵ AJR2018-06-241-2/+2
| | | | now-superfluous .get() in many drivers/devices (nw)
* remove safe_pc() and safe_pcbase() (nw) smf-2018-04-131-2/+2
|
* xtal.h is dead, long live to xtal.cpp [O. Galibert] Olivier Galibert2018-01-231-1/+1
|
* Privatize m_screen and other variables of device_video_interface (nw) AJR2018-01-051-13/+12
|
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Start adding save state support to atlantis driver. (nw) Ted Green2017-05-031-9/+23
|
* srcclean (nw) Vas Crabb2017-04-231-45/+45
|
* midwayic: Block register updates until unlocked. (nw) Ted Green2017-04-221-1/+3
| | | | | | zeus2: Fix fast fill routine. (nw) atlantis: Update mwskins dips. (nw) midzeus: Update thegrid dips. (nw)
* zeus2: Handle buffer wrapping during frame clear. Select quad size based on ↵ Ted Green2017-04-191-84/+100
| | | | microcode source and add code for trimesh rendering. (nw)
* zeus2: WIP. Working on depth buffering. (nw) Ted Green2017-04-121-57/+112
|
* video/zeus2.cpp: fixed compile (nw) Ivan Vangelista2017-04-071-0/+2
|
* zeus2: Increase input fifo empty interrupt time and start to use address for ↵ Ted Green2017-04-071-35/+120
| | | | quad selection. (nw)
* zeus2: Add uv scaling. (nw) Ted Green2017-04-041-25/+27
|
* zeus2: Added texture lookup for RGB555 direct color type. (nw) Ted Green2017-04-031-5/+13
|
* (nw) Fixed the build (subCmd set but not used) Robbbert2017-04-031-2/+2
|
* zeus2: WIP Fixed waveram0 write. Change conversion to screen coordinates. ↵ Ted Green2017-04-021-672/+656
| | | | Add initial blending. (nw)
* zeus2: Better texture lookup. (nw) Ted Green2017-03-171-36/+107
|
* Self-registering devices prep: Vas Crabb2017-02-271-1/+1
| | | | | | | | | | | | | | * 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.
* Remove emu.h from headers (nw) Olivier Galibert2017-02-111-0/+1
| | | | | | | | | | | | 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.
* srcclean (nw) Vas Crabb2017-01-221-50/+50
|
* dcs: Remove unused variable (nw) Ted Green2017-01-051-3/+14
| | | | zeus2: Add alternative texture loading subroutines (nw)
* zeus2: Fix unused variable. (nw) Ted Green2017-01-011-1/+1
|
* zeus: WIP Consolidate waveram1 writing and add more logging for models. (nw) Ted Green2017-01-011-140/+237
|
* midwayic: Squelch logerror from interrupt control (nw) Ted Green2016-12-281-19/+35
| | | | zeus2: Add better game selector and use register values for mwskins direct rendering (nw)
* first srcclean pass (nw) Vas Crabb2016-12-251-5/+5
|
* zeusII: WIP: Update screen rectangle to keep mwskins from crashing. (nw) Ted Green2016-12-111-167/+179
|
* zeus2: WIP: Update coordinate scaling and increase z buffer to 24 bits. (nw) Ted Green2016-12-071-132/+365
|
* Do not use FUNC in delegate where applicable (nw) Miodrag Milanovic2016-11-061-4/+4
|
* Misc typo fixes. Jordi Mallach2016-10-271-1/+1
|
* srcclean (nw) Vas Crabb2016-10-231-21/+21
|
* converted lot of TRUE/FALSE to real boolean and updated types (nw) Miodrag Milanovic2016-10-221-15/+15
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-133/+133
| | | | | 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
* zeus2: this should fix compiler tab warning (nw) hap2016-10-071-1/+1
|
* atlantis: Removed unused define parameter. (nw) Ted Green2016-10-071-114/+267
| | | | | | zeus2: Updated waveram organization. Updated quad rendering command size. Updated register naming. (nw) midzeus: Removed midzeus2.h as not needed. (nw) arcade.lua: Removed midzeus2.h and midzeus2.cpp as they aren't used anymore. (nw)
* srcclean again... Vas Crabb2016-08-311-1/+1
|
* devices/zeus2.cpp: fix save state crashing in thegrid and crusnexo (nw) Ivan Vangelista2016-08-301-5/+9
|
* std::min and std:max instead of MIN and MAX, also some more macros converted ↵ Miodrag Milanovic2016-07-311-2/+2
| | | | to inline functions (nw)
* Cleanups and version bump Miodrag Milanovic2016-07-271-6/+6
|
* atlantis: Added analog joystick (nw) Ted Green2016-07-041-128/+260
| | | | | zeus2: Fixed screen resolution in atlantis. Added direct pixel writing for atlantis. Scaling still needs work. (nw) midzeus: Added return data for unknown register access to keep thegrid from hangin. (nw)
* Cleanup and version bumpmame0175 Miodrag Milanovic2016-06-291-26/+25
|
* zeus2: Changed texture size selection and attempt to extract last parameters ↵ Ted Green2016-06-231-46/+60
| | | | from quad 14 (nw)
* zeus2: Better quad size selection (nw) Ted Green2016-06-231-8/+10
|