From 6ffc98289c9466cb01941c05a5b3088ac022a0b6 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Thu, 8 Jul 2021 18:35:00 -0700 Subject: video/voodoo.cpp: Major rewrite: (#8267) * 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. --- src/mame/machine/konppc.cpp | 12 ++++++------ src/mame/machine/konppc.h | 2 +- src/mame/machine/n64.cpp | 1 + src/mame/machine/xbox.cpp | 1 + 4 files changed, 9 insertions(+), 7 deletions(-) (limited to 'src/mame/machine') diff --git a/src/mame/machine/konppc.cpp b/src/mame/machine/konppc.cpp index d7525801d10..c372c29e856 100644 --- a/src/mame/machine/konppc.cpp +++ b/src/mame/machine/konppc.cpp @@ -436,7 +436,7 @@ void konppc_device::nwk_fifo_0_w(offs_t offset, uint32_t data, uint32_t mem_mask } else { - m_voodoo[0]->voodoo_w(offset ^ 0x80000, data, mem_mask); + m_voodoo[0]->write(offset ^ 0x80000, data, mem_mask); } } @@ -453,7 +453,7 @@ void konppc_device::nwk_fifo_1_w(offs_t offset, uint32_t data, uint32_t mem_mask } else { - m_voodoo[1]->voodoo_w(offset ^ 0x80000, data, mem_mask); + m_voodoo[1]->write(offset ^ 0x80000, data, mem_mask); } } @@ -465,7 +465,7 @@ uint32_t konppc_device::nwk_voodoo_0_r(offs_t offset) } else { - return m_voodoo[0]->voodoo_r(offset); + return m_voodoo[0]->read(offset); } } @@ -477,7 +477,7 @@ uint32_t konppc_device::nwk_voodoo_1_r(offs_t offset) } else { - return m_voodoo[1]->voodoo_r(offset); + return m_voodoo[1]->read(offset); } } @@ -494,7 +494,7 @@ void konppc_device::nwk_voodoo_0_w(offs_t offset, uint32_t data, uint32_t mem_ma } else { - m_voodoo[0]->voodoo_w(offset, data, mem_mask); + m_voodoo[0]->write(offset, data, mem_mask); } } @@ -511,6 +511,6 @@ void konppc_device::nwk_voodoo_1_w(offs_t offset, uint32_t data, uint32_t mem_ma } else { - m_voodoo[1]->voodoo_w(offset, data, mem_mask); + m_voodoo[1]->write(offset, data, mem_mask); } } diff --git a/src/mame/machine/konppc.h b/src/mame/machine/konppc.h index c397a02bbd1..41b6e49ad9a 100644 --- a/src/mame/machine/konppc.h +++ b/src/mame/machine/konppc.h @@ -73,7 +73,7 @@ private: // device finders optional_device_array m_dsp; optional_device_array m_k033906; - optional_device_array m_voodoo; + optional_device_array m_voodoo; // internal state uint32_t dsp_comm_ppc[MAX_CG_BOARDS][2]; diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp index 35459505d3b..f157cb104ed 100644 --- a/src/mame/machine/n64.cpp +++ b/src/mame/machine/n64.cpp @@ -4,6 +4,7 @@ #include "emu.h" #include "debugger.h" +#include "screen.h" #include "cpu/mips/mips3.h" #include "cpu/mips/mips3com.h" #include "includes/n64.h" diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp index 74af8e4eb71..9618cb2f36a 100644 --- a/src/mame/machine/xbox.cpp +++ b/src/mame/machine/xbox.cpp @@ -13,6 +13,7 @@ #include "debugger.h" #include "romload.h" +#include "screen.h" #include -- cgit v1.2.3