summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2017-01-26 17:52:11 +0100
committer angelosa <salese_corp_ltd@email.it>2017-01-26 17:52:11 +0100
commit4ba1c0f2cad36dc23613e0dec24e7e439d3e80fd (patch)
tree4bc1811c70fbe01b754b9aff5f9ba1661803d29c
parentb0e451007038f85542667abce9077d179f51d4e0 (diff)
Added stub Rainbow device (nw)
-rw-r--r--scripts/src/video.lua12
-rw-r--r--src/devices/video/huc6271.cpp65
-rw-r--r--src/devices/video/huc6271.h57
-rw-r--r--src/devices/video/huc6272.cpp2
-rw-r--r--src/devices/video/huc6272.h2
-rw-r--r--src/mame/drivers/pcfx.cpp5
6 files changed, 140 insertions, 3 deletions
diff --git a/scripts/src/video.lua b/scripts/src/video.lua
index a5f12c2c565..ba52eb78bcd 100644
--- a/scripts/src/video.lua
+++ b/scripts/src/video.lua
@@ -390,6 +390,18 @@ end
--------------------------------------------------
--
+--@src/devices/video/huc6271.h,VIDEOS["HUC6271"] = true
+--------------------------------------------------
+
+if (VIDEOS["HUC6271"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/video/huc6271.cpp",
+ MAME_DIR .. "src/devices/video/huc6271.h",
+ }
+end
+
+--------------------------------------------------
+--
--@src/devices/video/huc6272.h,VIDEOS["HUC6272"] = true
--------------------------------------------------
diff --git a/src/devices/video/huc6271.cpp b/src/devices/video/huc6271.cpp
new file mode 100644
index 00000000000..e75b8ccae13
--- /dev/null
+++ b/src/devices/video/huc6271.cpp
@@ -0,0 +1,65 @@
+// license:BSD-3-Clause
+// copyright-holders:Angelo Salese
+/***************************************************************************
+
+ Hudson/NEC HuC6271 "Rainbow" device
+
+***************************************************************************/
+
+#include "emu.h"
+#include "huc6271.h"
+
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+// device type definition
+const device_type huc6271 = &device_creator<huc6271_device>;
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// huc6271_device - constructor
+//-------------------------------------------------
+
+huc6271_device::huc6271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, huc6271, "HuC6271 \"Rainbow\"", tag, owner, clock, "huc6271", __FILE__)
+{
+}
+
+DEVICE_ADDRESS_MAP_START( regs, 16, huc6271_device )
+ AM_RANGE(0x00, 0x01) AM_WRITENOP // hscroll
+ AM_RANGE(0x02, 0x03) AM_WRITENOP // control
+ AM_RANGE(0x04, 0x05) AM_WRITENOP // hsync
+ AM_RANGE(0x06, 0x07) AM_WRITENOP // base Y
+ AM_RANGE(0x08, 0x09) AM_WRITENOP // base U
+ AM_RANGE(0x0a, 0x0b) AM_WRITENOP // base V
+ADDRESS_MAP_END
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void huc6271_device::device_start()
+{
+}
+
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void huc6271_device::device_reset()
+{
+}
+
+
+//**************************************************************************
+// READ/WRITE HANDLERS
+//**************************************************************************
+
diff --git a/src/devices/video/huc6271.h b/src/devices/video/huc6271.h
new file mode 100644
index 00000000000..155b964b395
--- /dev/null
+++ b/src/devices/video/huc6271.h
@@ -0,0 +1,57 @@
+// license:BSD-3-Clause
+// copyright-holders:Angelo Salese
+/***************************************************************************
+
+ Hudson/NEC HuC6271 "Rainbow" device
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __HUC6271DEV_H__
+#define __HUC6271DEV_H__
+
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_HUC6271_ADD(_tag,_freq) \
+ MCFG_DEVICE_ADD(_tag, huc6271, _freq)
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> huc6271_device
+
+class huc6271_device : public device_t
+{
+public:
+ // construction/destruction
+ huc6271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ // I/O operations
+ DECLARE_ADDRESS_MAP(regs, 16);
+
+protected:
+ // device-level overrides
+// virtual void device_validity_check(validity_checker &valid) const;
+ virtual void device_start() override;
+ virtual void device_reset() override;
+};
+
+
+// device type definition
+extern const device_type huc6271;
+
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+
+
+#endif
diff --git a/src/devices/video/huc6272.cpp b/src/devices/video/huc6272.cpp
index 17869d27cba..2e4be104527 100644
--- a/src/devices/video/huc6272.cpp
+++ b/src/devices/video/huc6272.cpp
@@ -37,7 +37,7 @@ ADDRESS_MAP_END
//-------------------------------------------------
huc6272_device::huc6272_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, huc6272, "huc6272", tag, owner, clock, "huc6272", __FILE__),
+ : device_t(mconfig, huc6272, "HuC6272 \"King\"", tag, owner, clock, "huc6272", __FILE__),
device_memory_interface(mconfig, *this),
m_program_space_config("microprg", ENDIANNESS_LITTLE, 16, 4, 0, nullptr, *ADDRESS_MAP_NAME(microprg_map)),
m_data_space_config("kram", ENDIANNESS_LITTLE, 32, 32, 0, nullptr, *ADDRESS_MAP_NAME(kram_map)),
diff --git a/src/devices/video/huc6272.h b/src/devices/video/huc6272.h
index d6274531b38..5fcbdaf1901 100644
--- a/src/devices/video/huc6272.h
+++ b/src/devices/video/huc6272.h
@@ -2,7 +2,7 @@
// copyright-holders:Wilbert Pol
/***************************************************************************
-Template for skeleton device
+ Hudson/NEC HuC6272 "King" device
***************************************************************************/
diff --git a/src/mame/drivers/pcfx.cpp b/src/mame/drivers/pcfx.cpp
index 11a5e93e6e6..204cc34446e 100644
--- a/src/mame/drivers/pcfx.cpp
+++ b/src/mame/drivers/pcfx.cpp
@@ -13,6 +13,7 @@
#include "cpu/v810/v810.h"
#include "video/huc6261.h"
#include "video/huc6270.h"
+#include "video/huc6271.h"
#include "video/huc6272.h"
struct pcfx_pad_t
@@ -181,7 +182,7 @@ WRITE16_MEMBER( pcfx_state::pad_w )
static ADDRESS_MAP_START( pcfx_io, AS_IO, 32, pcfx_state )
AM_RANGE( 0x00000000, 0x000000FF ) AM_READWRITE16(pad_r, pad_w, 0xffffffff) /* PAD */
AM_RANGE( 0x00000100, 0x000001FF ) AM_NOP /* HuC6230 */
- AM_RANGE( 0x00000200, 0x000002FF ) AM_NOP /* HuC6271 */
+ AM_RANGE( 0x00000200, 0x000002FF ) AM_DEVICE16( "huc6271", huc6271_device, regs, 0xffff ) /* HuC6271 */
AM_RANGE( 0x00000300, 0x000003FF ) AM_DEVREADWRITE16( "huc6261", huc6261_device, read, write, 0xffff ) /* HuC6261 */
AM_RANGE( 0x00000400, 0x000004FF ) AM_DEVREADWRITE8( "huc6270_a", huc6270_device, read, write, 0xffff ) /* HuC6270-A */
AM_RANGE( 0x00000500, 0x000005FF ) AM_DEVREADWRITE8( "huc6270_b", huc6270_device, read, write, 0xffff ) /* HuC6270-B */
@@ -497,6 +498,8 @@ static MACHINE_CONFIG_START( pcfx, pcfx_state )
MCFG_HUC6261_VDC2("huc6270_b")
MCFG_HUC6272_ADD( "huc6272", XTAL_21_4772MHz )
+
+ MCFG_HUC6271_ADD( "huc6271", XTAL_21_4772MHz )
MACHINE_CONFIG_END