diff --git a/src/hw/video/gpu/pbus.hpp b/src/hw/video/gpu/pbus.hpp index b738dbc..1726674 100644 --- a/src/hw/video/gpu/pbus.hpp +++ b/src/hw/video/gpu/pbus.hpp @@ -42,8 +42,6 @@ class pbus { machine *const m_machine; void *m_pci_conf; - struct { - // Contains the ram type, among other unknown info about the ram modules - uint32_t fbio_ram; - }; + // registers + uint32_t fbio_ram; // Contains the ram type, among other unknown info about the ram modules }; diff --git a/src/hw/video/gpu/pcrtc.hpp b/src/hw/video/gpu/pcrtc.hpp index 28e5d08..325c4b5 100644 --- a/src/hw/video/gpu/pcrtc.hpp +++ b/src/hw/video/gpu/pcrtc.hpp @@ -41,10 +41,9 @@ class pcrtc { friend class pmc; machine *const m_machine; - struct { - std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq() - std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq() - uint32_t fb_addr; - uint32_t unknown[1]; - }; + // registers + std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq() + std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq() + uint32_t fb_addr; + uint32_t unknown[1]; }; diff --git a/src/hw/video/gpu/pfb.hpp b/src/hw/video/gpu/pfb.hpp index 1ce0fb4..f129636 100644 --- a/src/hw/video/gpu/pfb.hpp +++ b/src/hw/video/gpu/pfb.hpp @@ -39,9 +39,8 @@ class pfb { friend class pramin; machine *const m_machine; - struct { - uint32_t cfg0, cfg1; - uint32_t nvm; - std::atomic_uint32_t cstatus; // accessed from pfifo::worker with nv2a::get_dma_obj() - }; + // registers + uint32_t cfg0, cfg1; + uint32_t nvm; + std::atomic_uint32_t cstatus; // accessed from pfifo::worker with nv2a::get_dma_obj() }; diff --git a/src/hw/video/gpu/pfifo.hpp b/src/hw/video/gpu/pfifo.hpp index af874f6..3c61483 100644 --- a/src/hw/video/gpu/pfifo.hpp +++ b/src/hw/video/gpu/pfifo.hpp @@ -96,9 +96,8 @@ class pfifo { std::atomic_uint32_t signal; machine *const m_machine; uint8_t *m_ram; - struct { - std::atomic_uint32_t regs[NV_PFIFO_SIZE / 4]; - }; + // registers + std::atomic_uint32_t regs[NV_PFIFO_SIZE / 4]; }; static_assert(sizeof(std::atomic_uint32_t) == 4); diff --git a/src/hw/video/gpu/pmc.hpp b/src/hw/video/gpu/pmc.hpp index 476f82b..fe645d8 100644 --- a/src/hw/video/gpu/pmc.hpp +++ b/src/hw/video/gpu/pmc.hpp @@ -82,10 +82,9 @@ class pmc { friend class pramin; friend class user; machine *const m_machine; - struct { - uint32_t endianness; - std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq() - std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq() - uint32_t engine_enabled; - }; + // registers + uint32_t endianness; + std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq() + std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq() + uint32_t engine_enabled; }; diff --git a/src/hw/video/gpu/pramdac.hpp b/src/hw/video/gpu/pramdac.hpp index 69ad681..f56d43c 100644 --- a/src/hw/video/gpu/pramdac.hpp +++ b/src/hw/video/gpu/pramdac.hpp @@ -43,7 +43,6 @@ class pramdac { friend class ptimer; machine *const m_machine; uint64_t core_freq; // gpu frequency - struct { - uint32_t nvpll_coeff, mpll_coeff, vpll_coeff; - }; + // registers + uint32_t nvpll_coeff, mpll_coeff, vpll_coeff; }; diff --git a/src/hw/video/gpu/ptimer.hpp b/src/hw/video/gpu/ptimer.hpp index 3e6a52a..99c6207 100644 --- a/src/hw/video/gpu/ptimer.hpp +++ b/src/hw/video/gpu/ptimer.hpp @@ -64,10 +64,9 @@ class ptimer { uint64_t counter_offset; // Counter value when it was stopped uint64_t counter_when_stopped; - struct { - std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq() - std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq() - uint32_t multiplier, divider; - uint32_t alarm; - }; + // registers + std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq() + std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq() + uint32_t multiplier, divider; + uint32_t alarm; }; diff --git a/src/hw/video/gpu/pvideo.hpp b/src/hw/video/gpu/pvideo.hpp index 63816d9..765782c 100644 --- a/src/hw/video/gpu/pvideo.hpp +++ b/src/hw/video/gpu/pvideo.hpp @@ -50,8 +50,7 @@ class pvideo { auto get_io_func(bool log, bool enabled, bool is_be); machine *const m_machine; - struct { - uint32_t debug[11]; - uint32_t regs[24]; - }; + // registers + uint32_t debug[11]; + uint32_t regs[24]; };