summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/s3c44b0.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/s3c44b0.h')
-rw-r--r--src/devices/machine/s3c44b0.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/devices/machine/s3c44b0.h b/src/devices/machine/s3c44b0.h
index e082937ea83..b78dc2e20d6 100644
--- a/src/devices/machine/s3c44b0.h
+++ b/src/devices/machine/s3c44b0.h
@@ -13,6 +13,7 @@
#pragma once
+#include <algorithm>
/*******************************************************************************
MACROS & CONSTANTS
@@ -166,9 +167,9 @@ public:
protected:
// device-level overrides
- virtual void device_start() override;
+ virtual void device_start() override ATTR_COLD;
virtual void device_post_load() override;
- virtual void device_reset() override;
+ virtual void device_reset() override ATTR_COLD;
private:
struct s3c44b0_memcon_regs_t
@@ -214,6 +215,16 @@ private:
struct s3c44b0_lcd_regs_t
{
+ void clear()
+ {
+ lcdcon1 = lcdcon2 = 0;
+ lcdsaddr1 = lcdsaddr2 = lcdsaddr3 = 0;
+ redlut = greenlut = bluelut = 0;
+ std::fill(std::begin(reserved), std::end(reserved), 0);
+ lcdcon3 = 0;
+ dithmode = 0;
+ }
+
uint32_t lcdcon1;
uint32_t lcdcon2;
uint32_t lcdsaddr1;
@@ -390,6 +401,22 @@ private:
struct s3c44b0_lcd_t
{
+ void clear()
+ {
+ regs.clear();
+ timer = nullptr;
+ vramaddr_cur = vramaddr_max = 0;
+ offsize = 0;
+ pagewidth_cur = pagewidth_max = 0;
+ modesel = 0;
+ bswp = 0;
+ vpos = hpos = 0;
+ framerate = 0;
+ hpos_min = hpos_max = hpos_end = vpos_min = vpos_max = vpos_end = 0;
+ frame_time = attotime::zero;
+ frame_period = pixeltime = scantime = 0;
+ }
+
s3c44b0_lcd_regs_t regs;
emu_timer *timer;
std::unique_ptr<uint8_t[]> bitmap;