summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/cidelsa.h
diff options
context:
space:
mode:
author Curt Coder <curtcoder@mail.com>2011-04-16 17:55:38 +0000
committer Curt Coder <curtcoder@mail.com>2011-04-16 17:55:38 +0000
commitc98ef8f23af64e8d81a037e3b60b9c6c801a1ddf (patch)
tree037911eb42a6b1b8eb21707fbf5c1b02865d6ff9 /src/mame/includes/cidelsa.h
parentf575cd348f3a898d86684e9a2e40bf8c3e2877a6 (diff)
Refactored CDP1852 into a C++ device and cleaned up the Cidelsa driver slightly. (no whatsnew)
Diffstat (limited to 'src/mame/includes/cidelsa.h')
-rw-r--r--src/mame/includes/cidelsa.h47
1 files changed, 34 insertions, 13 deletions
diff --git a/src/mame/includes/cidelsa.h b/src/mame/includes/cidelsa.h
index 768b769ee53..f16175bdc4b 100644
--- a/src/mame/includes/cidelsa.h
+++ b/src/mame/includes/cidelsa.h
@@ -1,8 +1,17 @@
+#pragma once
+
#ifndef __CIDELSA__
#define __CIDELSA__
+#define ADDRESS_MAP_MODERN
+
+#include "emu.h"
#include "cpu/cosmac/cosmac.h"
+#include "cpu/cop400/cop400.h"
#include "sound/cdp1869.h"
+#include "sound/ay8910.h"
+#include "machine/cdp1852.h"
+#include "machine/nvram.h"
#define SCREEN_TAG "screen"
#define CDP1802_TAG "cdp1802"
@@ -32,30 +41,21 @@ public:
cidelsa_state(running_machine &machine, const driver_device_config_base &config)
: driver_device(machine, config),
m_maincpu(*this, CDP1802_TAG),
- m_vis(*this, CDP1869_TAG),
- m_psg(*this, AY8910_TAG)
+ m_vis(*this, CDP1869_TAG)
{ }
required_device<cosmac_device> m_maincpu;
required_device<cdp1869_device> m_vis;
- optional_device<device_t> m_psg;
+ virtual void machine_start();
virtual void machine_reset();
virtual void video_start();
virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) { m_vis->update_screen(&bitmap, &cliprect); return false; }
- DECLARE_READ8_MEMBER( draco_sound_in_r );
- DECLARE_READ8_MEMBER( draco_sound_ay8910_r );
-
DECLARE_WRITE8_MEMBER( cdp1869_w );
- DECLARE_WRITE8_MEMBER( draco_sound_bankswitch_w );
- DECLARE_WRITE8_MEMBER( draco_sound_g_w );
- DECLARE_WRITE8_MEMBER( draco_sound_ay8910_w );
DECLARE_WRITE8_MEMBER( destryer_out1_w );
DECLARE_WRITE8_MEMBER( altair_out1_w );
- DECLARE_WRITE8_MEMBER( draco_out1_w );
- DECLARE_WRITE8_MEMBER( draco_ay8910_port_b_w );
DECLARE_READ_LINE_MEMBER( clear_r );
@@ -72,10 +72,31 @@ public:
UINT8 *m_pageram;
UINT8 *m_pcbram;
UINT8 *m_charram;
+};
+
+class draco_state : public cidelsa_state
+{
+public:
+ draco_state(running_machine &machine, const driver_device_config_base &config)
+ : cidelsa_state(machine, config),
+ m_psg(*this, AY8910_TAG)
+ { }
+
+ required_device<device_t> m_psg;
+
+ virtual void machine_start();
+
+ DECLARE_READ8_MEMBER( sound_in_r );
+ DECLARE_READ8_MEMBER( psg_r );
+ DECLARE_WRITE8_MEMBER( sound_bankswitch_w );
+ DECLARE_WRITE8_MEMBER( sound_g_w );
+ DECLARE_WRITE8_MEMBER( psg_w );
+ DECLARE_WRITE8_MEMBER( out1_w );
+ DECLARE_WRITE8_MEMBER( psg_pb_w );
// sound state
- int m_draco_sound;
- int m_draco_ay_latch;
+ int m_sound;
+ int m_psg_latch;
};
/*----------- defined in video/cidelsa.c -----------*/