Template for King device

This commit is contained in:
Angelo Salese 2012-08-23 13:24:03 +00:00
parent 5f995d42a4
commit 7d5c6e5664
5 changed files with 141 additions and 4 deletions

2
.gitattributes vendored
View File

@ -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

View File

@ -289,6 +289,7 @@ EMUVIDEOOBJS = \
$(EMUVIDEO)/huc6260.o \
$(EMUVIDEO)/huc6261.o \
$(EMUVIDEO)/huc6270.o \
$(EMUVIDEO)/huc6272.o \
$(EMUVIDEO)/i8275.o \
$(EMUVIDEO)/k053250.o \
$(EMUVIDEO)/mc6845.o \

75
src/emu/video/huc6272.c Normal file
View File

@ -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<huc6272_device>;
//**************************************************************************
// 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 )
{
}

57
src/emu/video/huc6272.h Normal file
View File

@ -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

View File

@ -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