mirror of
https://github.com/holub/mame
synced 2025-05-19 20:29:09 +03:00
New Namco 62xx device with internal ROM. [Dr. Decapitator, Phil Bennett, Andrew Gardner]
* Note: This patch simply adds the ROM to MAME. Much work still needs to be done to hook it up to gaplus and document the chip itself. Please note the MCU is currently disabled because the device has a MCFG_DEVICE_DISABLE() in namco62.c.
This commit is contained in:
parent
d0d4183353
commit
db29ff96be
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -3479,6 +3479,8 @@ src/mame/machine/namco51.c svneol=native#text/plain
|
||||
src/mame/machine/namco51.h svneol=native#text/plain
|
||||
src/mame/machine/namco53.c svneol=native#text/plain
|
||||
src/mame/machine/namco53.h svneol=native#text/plain
|
||||
src/mame/machine/namco62.c svneol=native#text/plain
|
||||
src/mame/machine/namco62.h svneol=native#text/plain
|
||||
src/mame/machine/namcoio.c svneol=native#text/plain
|
||||
src/mame/machine/namcoio.h svneol=native#text/plain
|
||||
src/mame/machine/namcond1.c svneol=native#text/plain
|
||||
|
@ -152,6 +152,7 @@ TODO:
|
||||
#include "emu.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "machine/namcoio.h"
|
||||
#include "machine/namco62.h"
|
||||
#include "sound/namco.h"
|
||||
#include "sound/samples.h"
|
||||
#include "includes/gaplus.h"
|
||||
@ -211,6 +212,21 @@ static WRITE8_HANDLER( gaplus_freset_w )
|
||||
namcoio_set_reset_line(io56xx, bit ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
static const namco_62xx_interface namco_62xx_intf =
|
||||
{
|
||||
{ /* port read handlers */
|
||||
//DEVCB_INPUT_PORT("IN0L"),
|
||||
//DEVCB_INPUT_PORT("IN0H"),
|
||||
//DEVCB_INPUT_PORT("IN1L"),
|
||||
//DEVCB_INPUT_PORT("IN1H")
|
||||
},
|
||||
{ /* port write handlers */
|
||||
//DEVCB_HANDLER(out_0),
|
||||
//DEVCB_HANDLER(out_1)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static MACHINE_RESET( gaplus )
|
||||
{
|
||||
/* on reset, VINTON is reset, while the other flags don't seem to be affected */
|
||||
@ -543,6 +559,8 @@ static MACHINE_CONFIG_START( gaplus, driver_device )
|
||||
MCFG_NAMCO56XX_ADD("56xx", intf0_lamps)
|
||||
MCFG_NAMCO58XX_ADD("58xx", intf1)
|
||||
|
||||
MCFG_NAMCO_62XX_ADD("62xx", 24576000/6/2, namco_62xx_intf) /* totally made up - TODO: fix */
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60.606060)
|
||||
|
101
src/mame/machine/namco62.c
Normal file
101
src/mame/machine/namco62.c
Normal file
@ -0,0 +1,101 @@
|
||||
/***************************************************************************
|
||||
|
||||
Namco 62XX
|
||||
|
||||
This custom chip is a Fujitsu MB8843 MCU programmed to act as an I/O
|
||||
device. It is used by just one game: Gaplus.
|
||||
|
||||
TODO: Chip pin description/layout/notes
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "namco62.h"
|
||||
#include "cpu/mb88xx/mb88xx.h"
|
||||
|
||||
#define VERBOSE 0
|
||||
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
||||
|
||||
typedef struct _namco_62xx_state namco_62xx_state;
|
||||
struct _namco_62xx_state
|
||||
{
|
||||
device_t* cpu;
|
||||
devcb_resolved_read8 in[4];
|
||||
devcb_resolved_write8 out[2];
|
||||
};
|
||||
|
||||
INLINE namco_62xx_state *get_safe_token(device_t *device)
|
||||
{
|
||||
assert(device != NULL);
|
||||
assert(device->type() == NAMCO_62XX);
|
||||
|
||||
return (namco_62xx_state *)downcast<legacy_device_base *>(device)->token();
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
DEVICE INTERFACE
|
||||
***************************************************************************/
|
||||
|
||||
static ADDRESS_MAP_START( namco_62xx_map_io, ADDRESS_SPACE_IO, 8 )
|
||||
// AM_RANGE(MB88_PORTK, MB88_PORTK) AM_READ(namco_62xx_K_r)
|
||||
// AM_RANGE(MB88_PORTO, MB88_PORTO) AM_WRITE(namco_62xx_O_w)
|
||||
// AM_RANGE(MB88_PORTR0, MB88_PORTR0) AM_READ(namco_62xx_R0_r)
|
||||
// AM_RANGE(MB88_PORTR2, MB88_PORTR2) AM_READ(namco_62xx_R2_r)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( namco_62xx )
|
||||
MCFG_CPU_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 (TODO: Correct?) */
|
||||
MCFG_CPU_IO_MAP(namco_62xx_map_io)
|
||||
MCFG_DEVICE_DISABLE()
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
ROM_START( namco_62xx )
|
||||
ROM_REGION( 0x800, "mcu", ROMREGION_LOADBYNAME )
|
||||
ROM_LOAD( "62xx.bin", 0x0000, 0x0800, CRC(308dc115) SHA1(fe0a60fc339ac2eeed4879a64c1aab130f9d4cfe) )
|
||||
ROM_END
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
device start callback
|
||||
-------------------------------------------------*/
|
||||
|
||||
static DEVICE_START( namco_62xx )
|
||||
{
|
||||
const namco_62xx_interface *config = (const namco_62xx_interface *)device->baseconfig().static_config();
|
||||
namco_62xx_state *state = get_safe_token(device);
|
||||
astring tempstring;
|
||||
|
||||
assert(config != NULL);
|
||||
|
||||
/* find our CPU */
|
||||
state->cpu = device->subdevice("mcu");
|
||||
assert(state->cpu != NULL);
|
||||
|
||||
/* resolve our read callbacks */
|
||||
devcb_resolve_read8(&state->in[0], &config->in[0], device);
|
||||
devcb_resolve_read8(&state->in[1], &config->in[1], device);
|
||||
devcb_resolve_read8(&state->in[2], &config->in[2], device);
|
||||
devcb_resolve_read8(&state->in[3], &config->in[3], device);
|
||||
|
||||
/* resolve our write callbacks */
|
||||
devcb_resolve_write8(&state->out[0], &config->out[0], device);
|
||||
devcb_resolve_write8(&state->out[1], &config->out[1], device);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
device definition
|
||||
-------------------------------------------------*/
|
||||
|
||||
static const char DEVTEMPLATE_SOURCE[] = __FILE__;
|
||||
|
||||
#define DEVTEMPLATE_ID(p,s) p##namco_62xx##s
|
||||
#define DEVTEMPLATE_FEATURES DT_HAS_START | DT_HAS_ROM_REGION | DT_HAS_MACHINE_CONFIG
|
||||
#define DEVTEMPLATE_NAME "Namco 62xx"
|
||||
#define DEVTEMPLATE_FAMILY "Namco I/O"
|
||||
#include "devtempl.h"
|
||||
|
||||
|
||||
DEFINE_LEGACY_DEVICE(NAMCO_62XX, namco_62xx);
|
27
src/mame/machine/namco62.h
Normal file
27
src/mame/machine/namco62.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef NAMCO62_H
|
||||
#define NAMCO62_H
|
||||
|
||||
#include "devlegcy.h"
|
||||
|
||||
|
||||
typedef struct _namco_62xx_interface namco_62xx_interface;
|
||||
struct _namco_62xx_interface
|
||||
{
|
||||
devcb_read8 in[4]; /* read handlers for ports A-D */
|
||||
devcb_write8 out[2]; /* write handlers for ports A-B */
|
||||
};
|
||||
|
||||
|
||||
#define MCFG_NAMCO_62XX_ADD(_tag, _clock, _interface) \
|
||||
MCFG_DEVICE_ADD(_tag, NAMCO_62XX, _clock) \
|
||||
MCFG_DEVICE_CONFIG(_interface)
|
||||
|
||||
|
||||
READ8_DEVICE_HANDLER( namco_62xx_read );
|
||||
WRITE8_DEVICE_HANDLER( namco_62xx_write );
|
||||
|
||||
|
||||
DECLARE_LEGACY_DEVICE(NAMCO_62XX, namco_62xx);
|
||||
|
||||
|
||||
#endif /* NAMCO62_H */
|
@ -964,6 +964,7 @@ $(MAMEOBJ)/namco.a: \
|
||||
$(MACHINE)/namco50.o \
|
||||
$(MACHINE)/namco51.o \
|
||||
$(MACHINE)/namco53.o \
|
||||
$(MACHINE)/namco62.o \
|
||||
$(AUDIO)/namco52.o \
|
||||
$(AUDIO)/namco54.o \
|
||||
$(AUDIO)/namcoc7x.o \
|
||||
|
Loading…
Reference in New Issue
Block a user