summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/mega32x.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/mega32x.h')
-rw-r--r--src/mame/machine/mega32x.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mame/machine/mega32x.h b/src/mame/machine/mega32x.h
index 523ba1ffe77..71571029e88 100644
--- a/src/mame/machine/mega32x.h
+++ b/src/mame/machine/mega32x.h
@@ -13,7 +13,7 @@
#include "sound/dac.h"
#include "emupal.h"
-class sega_32x_device : public device_t
+class sega_32x_device : public device_t, public device_palette_interface
{
public:
void pause_cpu();
@@ -30,9 +30,6 @@ public:
update_total_scanlines(mode3);
}
- // configuration
- template <typename T> void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward<T>(tag)); }
-
DECLARE_READ32_MEMBER( _32x_sh2_master_4000_common_4002_r );
DECLARE_READ32_MEMBER( _32x_sh2_slave_4000_common_4002_r );
DECLARE_READ32_MEMBER( _32x_sh2_common_4004_common_4006_r );
@@ -101,7 +98,7 @@ public:
SH2_DMA_FIFO_DATA_AVAILABLE_CB(_32x_fifo_available_callback);
void _32x_render_videobuffer_to_screenbuffer_helper(int scanline);
- void _32x_render_videobuffer_to_screenbuffer(int x, uint32_t priority, uint16_t &lineptr);
+ void _32x_render_videobuffer_to_screenbuffer(int x, uint32_t priority, uint32_t &lineptr);
int sh2_master_pwmint_enable, sh2_slave_pwmint_enable;
void _32x_check_framebuffer_swap(bool enabled);
@@ -120,6 +117,9 @@ protected:
virtual void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;
+ // device_palette_interface overrides
+ virtual uint32_t palette_entries() const override { return 32*32*32/**2*/; }
+
void update_total_scanlines(bool mode3) { m_total_scanlines = mode3 ? (m_base_total_scanlines * 2) : m_base_total_scanlines; } // this gets set at each EOF
/* our main vblank handler resets this */
@@ -194,7 +194,6 @@ private:
std::unique_ptr<uint16_t[]> m_32x_dram1;
uint16_t *m_32x_display_dram, *m_32x_access_dram;
std::unique_ptr<uint16_t[]> m_32x_palette;
- std::unique_ptr<uint16_t[]> m_32x_palette_lookup;
uint16_t m_fifo_block_a[4];
uint16_t m_fifo_block_b[4];
@@ -204,8 +203,6 @@ private:
int m_current_fifo_read_pos;
int m_fifo_block_a_full;
int m_fifo_block_b_full;
-
- required_device<palette_device> m_palette;
};