From 7d5c6e56647fb0423442e3a3a601627df8db6adf Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Thu, 23 Aug 2012 13:24:03 +0000 Subject: [PATCH] Template for King device --- .gitattributes | 2 ++ src/emu/emu.mak | 7 ++-- src/emu/video/huc6272.c | 75 +++++++++++++++++++++++++++++++++++++++++ src/emu/video/huc6272.h | 57 +++++++++++++++++++++++++++++++ src/mess/drivers/pcfx.c | 4 ++- 5 files changed, 141 insertions(+), 4 deletions(-) create mode 100644 src/emu/video/huc6272.c create mode 100644 src/emu/video/huc6272.h diff --git a/.gitattributes b/.gitattributes index cc401a121b0..a7e675fc41a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1586,6 +1586,8 @@ src/emu/video/huc6261.c svneol=native#text/plain src/emu/video/huc6261.h svneol=native#text/plain src/emu/video/huc6270.c svneol=native#text/plain src/emu/video/huc6270.h svneol=native#text/plain +src/emu/video/huc6272.c svneol=native#text/plain +src/emu/video/huc6272.h svneol=native#text/plain src/emu/video/i8275.c svneol=native#text/plain src/emu/video/i8275.h svneol=native#text/plain src/emu/video/k053250.c svneol=native#text/plain diff --git a/src/emu/emu.mak b/src/emu/emu.mak index 6f5778eb7f2..dab0e261855 100644 --- a/src/emu/emu.mak +++ b/src/emu/emu.mak @@ -289,15 +289,16 @@ EMUVIDEOOBJS = \ $(EMUVIDEO)/huc6260.o \ $(EMUVIDEO)/huc6261.o \ $(EMUVIDEO)/huc6270.o \ - $(EMUVIDEO)/i8275.o \ + $(EMUVIDEO)/huc6272.o \ + $(EMUVIDEO)/i8275.o \ $(EMUVIDEO)/k053250.o \ $(EMUVIDEO)/mc6845.o \ $(EMUVIDEO)/msm6255.o \ $(EMUVIDEO)/pc_cga.o \ $(EMUVIDEO)/cgapal.o \ $(EMUVIDEO)/pc_vga.o \ - $(EMUVIDEO)/poly.o \ - $(EMUVIDEO)/psx.o \ + $(EMUVIDEO)/poly.o \ + $(EMUVIDEO)/psx.o \ $(EMUVIDEO)/ramdac.o \ $(EMUVIDEO)/resnet.o \ $(EMUVIDEO)/rgbutil.o \ diff --git a/src/emu/video/huc6272.c b/src/emu/video/huc6272.c new file mode 100644 index 00000000000..a2a7b3fcc1a --- /dev/null +++ b/src/emu/video/huc6272.c @@ -0,0 +1,75 @@ +/*************************************************************************** + + Hudson/NEC HuC6272 "King" device + +***************************************************************************/ + +#include "emu.h" +#include "video/huc6272.h" + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +const device_type huc6272 = &device_creator; + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// huc6272_device - constructor +//------------------------------------------------- + +huc6272_device::huc6272_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, huc6272, "huc6272", tag, owner, clock) +{ + +} + + +//------------------------------------------------- +// device_validity_check - perform validity checks +// on this device +//------------------------------------------------- + +void huc6272_device::device_validity_check(validity_checker &valid) const +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void huc6272_device::device_start() +{ + +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void huc6272_device::device_reset() +{ +} + + +//************************************************************************** +// READ/WRITE HANDLERS +//************************************************************************** + +READ16_MEMBER( huc6272_device::read ) +{ + return 0; +} + +WRITE16_MEMBER( huc6272_device::write ) +{ +} diff --git a/src/emu/video/huc6272.h b/src/emu/video/huc6272.h new file mode 100644 index 00000000000..629cacdb3f9 --- /dev/null +++ b/src/emu/video/huc6272.h @@ -0,0 +1,57 @@ +/*************************************************************************** + +Template for skeleton device + +***************************************************************************/ + +#pragma once + +#ifndef __huc6272DEV_H__ +#define __huc6272DEV_H__ + + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_HUC6272_ADD(_tag,_freq) \ + MCFG_DEVICE_ADD(_tag, huc6272, _freq) \ + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> huc6272_device + +class huc6272_device : public device_t +{ +public: + // construction/destruction + huc6272_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // I/O operations + DECLARE_WRITE16_MEMBER( write ); + DECLARE_READ16_MEMBER( read ); + +protected: + // device-level overrides + virtual void device_validity_check(validity_checker &valid) const; + virtual void device_start(); + virtual void device_reset(); +}; + + +// device type definition +extern const device_type huc6272; + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + + + +#endif diff --git a/src/mess/drivers/pcfx.c b/src/mess/drivers/pcfx.c index 84e552c8008..ffdd718cc2f 100644 --- a/src/mess/drivers/pcfx.c +++ b/src/mess/drivers/pcfx.c @@ -11,6 +11,7 @@ #include "cpu/v810/v810.h" #include "video/huc6261.h" #include "video/huc6270.h" +#include "video/huc6272.h" typedef struct _pcfx_pad_t pcfx_pad_t; @@ -165,7 +166,7 @@ static ADDRESS_MAP_START( pcfx_io, AS_IO, 32, pcfx_state ) 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 */ - AM_RANGE( 0x00000600, 0x000006FF ) AM_NOP /* HuC6272 */ + AM_RANGE( 0x00000600, 0x000006FF ) AM_DEVREADWRITE16( "huc6272", huc6272_device, read, write, 0xffff ) /* HuC6272 */ AM_RANGE( 0x00000C80, 0x00000C83 ) AM_NOP AM_RANGE( 0x00000E00, 0x00000EFF ) AM_READWRITE16( irq_read, irq_write, 0xffff ) /* Interrupt controller */ AM_RANGE( 0x00000F00, 0x00000FFF ) AM_NOP @@ -489,6 +490,7 @@ static MACHINE_CONFIG_START( pcfx, pcfx_state ) MCFG_HUC6270_ADD( "huc6270_a", pcfx_huc6270_a_config ) MCFG_HUC6270_ADD( "huc6270_b", pcfx_huc6270_b_config ) MCFG_HUC6261_ADD( "huc6261", XTAL_21_4772MHz, pcfx_huc6261_config ) + MCFG_HUC6272_ADD( "huc6272", XTAL_21_4772MHz ) MACHINE_CONFIG_END