Made MB14241 Shifter IC a device and moved its source to emu/machine. Updated mw8080bw.c and 8080bw.c accordingly. Also converted fgoal.c to use this implementation in place of its own version.

This commit is contained in:
Fabio Priuli 2009-12-13 12:03:51 +00:00
parent 4d2eba9882
commit 8bdb970d1d
12 changed files with 373 additions and 220 deletions

4
.gitattributes vendored
View File

@ -669,6 +669,8 @@ src/emu/machine/ldcore.h svneol=native#text/plain
src/emu/machine/ldpr8210.c svneol=native#text/plain
src/emu/machine/ldv1000.c svneol=native#text/plain
src/emu/machine/ldvp931.c svneol=native#text/plain
src/emu/machine/mb14241.c svneol=native#text/plain
src/emu/machine/mb14241.h svneol=native#text/plain
src/emu/machine/mb3773.c svneol=native#text/plain
src/emu/machine/mb3773.h svneol=native#text/plain
src/emu/machine/mb87078.c svneol=native#text/plain
@ -2927,8 +2929,6 @@ src/mame/machine/m68kfmly.h svneol=native#text/plain
src/mame/machine/maniach.c svneol=native#text/plain
src/mame/machine/mathbox.c svneol=native#text/plain
src/mame/machine/mathbox.h svneol=native#text/plain
src/mame/machine/mb14241.c svneol=native#text/plain
src/mame/machine/mb14241.h svneol=native#text/plain
src/mame/machine/mc8123.c svneol=native#text/plain
src/mame/machine/mc8123.h svneol=native#text/plain
src/mame/machine/mcr.c svneol=native#text/plain

View File

@ -146,6 +146,7 @@ EMUMACHINEOBJS = \
$(EMUMACHINE)/ldpr8210.o \
$(EMUMACHINE)/ldv1000.o \
$(EMUMACHINE)/ldvp931.o \
$(EMUMACHINE)/mb14241.o \
$(EMUMACHINE)/mb3773.o \
$(EMUMACHINE)/mb87078.o \
$(EMUMACHINE)/mc146818.o \

79
src/emu/machine/mb14241.c Normal file
View File

@ -0,0 +1,79 @@
/***************************************************************************
Midway 8080-based black and white hardware
****************************************************************************/
#include "driver.h"
#include "machine/mb14241.h"
typedef struct _mb14241_state mb14241_state;
struct _mb14241_state
{
UINT16 shift_data; /* 15 bits only */
UINT8 shift_count; /* 3 bits */
};
/*****************************************************************************
INLINE FUNCTIONS
*****************************************************************************/
INLINE mb14241_state *get_safe_token( const device_config *device )
{
assert(device != NULL);
assert(device->token != NULL);
assert(device->type == MB14241);
return (mb14241_state *)device->token;
}
/*****************************************************************************
IMPLEMENTATION
*****************************************************************************/
WRITE8_DEVICE_HANDLER( mb14241_shift_count_w )
{
mb14241_state *mb14241 = get_safe_token(device);
mb14241->shift_count = ~data & 0x07;
}
WRITE8_DEVICE_HANDLER( mb14241_shift_data_w )
{
mb14241_state *mb14241 = get_safe_token(device);
mb14241->shift_data = (mb14241->shift_data >> 8) | ((UINT16)data << 7);
}
READ8_DEVICE_HANDLER( mb14241_shift_result_r )
{
mb14241_state *mb14241 = get_safe_token(device);
return mb14241->shift_data >> mb14241->shift_count;
}
/*****************************************************************************
DEVICE INTERFACE
*****************************************************************************/
static DEVICE_START( mb14241 )
{
mb14241_state *mb14241 = get_safe_token(device);
state_save_register_device_item(device, 0, mb14241->shift_data);
state_save_register_device_item(device, 0, mb14241->shift_count);
}
static DEVICE_RESET( mb14241 )
{
mb14241_state *mb14241 = get_safe_token(device);
mb14241->shift_data = 0;
mb14241->shift_count = 0;
}
static const char DEVTEMPLATE_SOURCE[] = __FILE__;
#define DEVTEMPLATE_ID( p, s ) p##mb14241##s
#define DEVTEMPLATE_FEATURES DT_HAS_START | DT_HAS_RESET
#define DEVTEMPLATE_NAME "MB14241"
#define DEVTEMPLATE_FAMILY "MB14241 Shifter IC"
#define DEVTEMPLATE_CLASS DEVICE_CLASS_VIDEO
#include "devtempl.h"

38
src/emu/machine/mb14241.h Normal file
View File

@ -0,0 +1,38 @@
/*****************************************************************************
MB14241 shifter IC emulation
*****************************************************************************/
#ifndef __MB14241_H__
#define __MB14241_H__
#include "devcb.h"
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
DEVICE_GET_INFO( mb14241 );
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define MB14241 DEVICE_GET_INFO_NAME( mb14241 )
#define MDRV_MB14241_ADD(_tag) \
MDRV_DEVICE_ADD(_tag, MB14241, 0)
/***************************************************************************
DEVICE I/O FUNCTIONS
***************************************************************************/
WRITE8_DEVICE_HANDLER ( mb14241_shift_count_w );
WRITE8_DEVICE_HANDLER ( mb14241_shift_data_w );
READ8_DEVICE_HANDLER( mb14241_shift_result_r );
#endif /* __MB14241_H__ */

View File

@ -205,9 +205,9 @@ INPUT_PORTS_END
static ADDRESS_MAP_START( invadpt2_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, invadpt2_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(invadpt2_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w)
AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w)
ADDRESS_MAP_END
@ -241,14 +241,17 @@ INPUT_PORTS_END
static MACHINE_DRIVER_START( invadpt2 )
/* basic machine hardware */
MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_IO_MAP(invadpt2_io_map)
MDRV_MACHINE_START(extra_8080bw)
MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_IO_MAP(invadpt2_io_map)
MDRV_MACHINE_START(extra_8080bw)
/* 60 Hz signal clocks two LS161. Ripple carry will */
/* reset circuit, if LS161 not cleared before. */
MDRV_WATCHDOG_VBLANK_INIT(255)
MDRV_WATCHDOG_VBLANK_INIT(255)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(invadpt2)
@ -267,9 +270,9 @@ MACHINE_DRIVER_END
static ADDRESS_MAP_START( spcewars_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, spcewars_sh_port_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(spcewars_sh_port_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w)
ADDRESS_MAP_END
@ -300,7 +303,10 @@ static MACHINE_DRIVER_START( spcewars )
MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_IO_MAP(spcewars_io_map)
MDRV_MACHINE_START(extra_8080bw)
MDRV_MACHINE_START(extra_8080bw)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* sound hardware */
MDRV_IMPORT_FROM(invaders_samples_audio)
@ -369,8 +375,8 @@ INPUT_PORTS_END
static MACHINE_DRIVER_START( astropal )
/* basic machine hardware */
MDRV_IMPORT_FROM(invaders)
MDRV_CPU_MODIFY("maincpu")
MDRV_IMPORT_FROM(invaders)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_IO_MAP(astropal_io_map)
MACHINE_DRIVER_END
@ -419,11 +425,11 @@ INPUT_PORTS_END
static MACHINE_DRIVER_START( cosmo )
/* basic machine hardware */
MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_MODIFY("maincpu")
MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(cosmo_map)
MDRV_CPU_IO_MAP(cosmo_io_map)
MDRV_MACHINE_START(extra_8080bw)
MDRV_MACHINE_START(extra_8080bw)
/* video hardware */
MDRV_VIDEO_UPDATE(cosmo)
@ -492,9 +498,9 @@ INPUT_PORTS_END
static ADDRESS_MAP_START( invrvnge_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, invrvnge_sh_port_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(invrvnge_sh_port_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
ADDRESS_MAP_END
@ -546,6 +552,9 @@ static MACHINE_DRIVER_START( invrvnge )
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_IO_MAP(invrvnge_io_map)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* sound hardware */
MDRV_IMPORT_FROM(invaders_samples_audio)
@ -573,9 +582,9 @@ static INPUT_PORTS_START( spclaser )
PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW1:1" )
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW1:2" )
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:3" )
PORT_DIPNAME( 0x80, 0x00, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x00, "1 Coin/1 Or 2 Players" )
PORT_DIPSETTING( 0x80, "1 Coin/1 Player 2 Coins/2 Players" ) /* Irrelevant, causes bugs */
PORT_DIPNAME( 0x80, 0x00, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x00, "1 Coin/1 Or 2 Players" )
PORT_DIPSETTING( 0x80, "1 Coin/1 Player 2 Coins/2 Players" ) /* Irrelevant, causes bugs */
/* Dummy port for cocktail mode (not used) */
PORT_MODIFY(CABINET_PORT_TAG)
@ -623,9 +632,9 @@ INPUT_PORTS_END
static ADDRESS_MAP_START( lrescue_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, lrescue_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(lrescue_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x05, 0x05) AM_WRITE(lrescue_sh_port_2_w)
ADDRESS_MAP_END
@ -648,7 +657,10 @@ static MACHINE_DRIVER_START( lrescue )
MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_IO_MAP(lrescue_io_map)
MDRV_MACHINE_START(extra_8080bw)
MDRV_MACHINE_START(extra_8080bw)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(invadpt2)
@ -763,9 +775,9 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( rollingc_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(rollingc_sh_port_w)
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
ADDRESS_MAP_END
@ -795,6 +807,9 @@ static MACHINE_DRIVER_START( rollingc )
MDRV_CPU_PROGRAM_MAP(rollingc_map)
MDRV_CPU_IO_MAP(rollingc_io_map)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(rollingc)
@ -822,9 +837,9 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( schaser_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, schaser_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(schaser_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x05, 0x05) AM_WRITE(schaser_sh_port_2_w)
AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w)
ADDRESS_MAP_END
@ -897,6 +912,9 @@ static MACHINE_DRIVER_START( schaser )
MDRV_MACHINE_START(schaser)
MDRV_MACHINE_RESET(schaser)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(schaser)
@ -923,9 +941,9 @@ MACHINE_DRIVER_END
static ADDRESS_MAP_START( schasrcv_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, schasrcv_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(schasrcv_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x05, 0x05) AM_WRITE(schasrcv_sh_port_2_w)
ADDRESS_MAP_END
@ -961,7 +979,10 @@ static MACHINE_DRIVER_START( schasrcv )
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(schaser_map)
MDRV_CPU_IO_MAP(schasrcv_io_map)
MDRV_MACHINE_START(extra_8080bw)
MDRV_MACHINE_START(extra_8080bw)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(schasrcv)
@ -1001,11 +1022,11 @@ static ADDRESS_MAP_START( sflush_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x1fff) AM_RAM
AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE(&mw8080bw_ram) AM_SIZE(&mw8080bw_ram_size)
AM_RANGE(0x8008, 0x8008) AM_READ_PORT("PADDLE")
AM_RANGE(0x8009, 0x8009) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x8009, 0x8009) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x800a, 0x800a) AM_READ_PORT("IN2")
AM_RANGE(0x800b, 0x800b) AM_READ_PORT("IN0")
AM_RANGE(0x8018, 0x8018) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x8019, 0x8019) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x8018, 0x8018) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x8019, 0x8019) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x801a, 0x801a) AM_WRITENOP
AM_RANGE(0x801c, 0x801c) AM_WRITENOP
AM_RANGE(0x801d, 0x801d) AM_WRITENOP
@ -1013,19 +1034,6 @@ static ADDRESS_MAP_START( sflush_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xd800, 0xffff) AM_ROM
ADDRESS_MAP_END
static MACHINE_DRIVER_START( sflush )
/* basic machine hardware */
MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_REPLACE("maincpu",M6800,2000000) /* ?? */
MDRV_CPU_PROGRAM_MAP(sflush_map)
MDRV_CPU_VBLANK_INT_HACK(irq0_line_pulse,2)
MDRV_MACHINE_START(sflush)
/* video hardware */
MDRV_VIDEO_UPDATE(sflush)
MACHINE_DRIVER_END
static INPUT_PORTS_START( sflush )
PORT_START("IN0")
@ -1056,6 +1064,23 @@ static INPUT_PORTS_START( sflush )
INPUT_PORTS_END
static MACHINE_DRIVER_START( sflush )
/* basic machine hardware */
MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_REPLACE("maincpu",M6800,2000000) /* ?? */
MDRV_CPU_PROGRAM_MAP(sflush_map)
MDRV_CPU_VBLANK_INT_HACK(irq0_line_pulse,2)
MDRV_MACHINE_START(sflush)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(sflush)
MACHINE_DRIVER_END
/*******************************************************/
/* */
@ -1066,9 +1091,9 @@ INPUT_PORTS_END
static ADDRESS_MAP_START( lupin3_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, lupin3_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(lupin3_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x05, 0x05) AM_WRITE(lupin3_sh_port_2_w)
AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w)
ADDRESS_MAP_END
@ -1153,7 +1178,10 @@ static MACHINE_DRIVER_START( lupin3 )
MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_IO_MAP(lupin3_io_map)
MDRV_MACHINE_START(extra_8080bw)
MDRV_MACHINE_START(extra_8080bw)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(indianbt)
@ -1170,7 +1198,10 @@ static MACHINE_DRIVER_START( lupin3a )
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(schaser_map)
MDRV_CPU_IO_MAP(lupin3_io_map)
MDRV_MACHINE_START(extra_8080bw)
MDRV_MACHINE_START(extra_8080bw)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(lupin3)
@ -1224,10 +1255,10 @@ static MACHINE_START( polaris )
// It sounds better then the actual circuit used.
// Probably an unfinished feature.
static ADDRESS_MAP_START( polaris_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("discrete", polaris_sh_port_1_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, mb14241_0_shift_data_w)
AM_RANGE(0x03, 0x03) AM_DEVREADWRITE("mb14241", mb14241_shift_result_r, mb14241_shift_data_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("discrete", polaris_sh_port_2_w)
AM_RANGE(0x05, 0x05) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x06, 0x06) AM_DEVWRITE("discrete", polaris_sh_port_3_w)
@ -1297,7 +1328,10 @@ static MACHINE_DRIVER_START( polaris )
MDRV_CPU_IO_MAP(polaris_io_map)
MDRV_WATCHDOG_VBLANK_INIT(255)
MDRV_CPU_VBLANK_INT("screen", polaris_interrupt)
MDRV_MACHINE_START(polaris)
MDRV_MACHINE_START(polaris)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(polaris)
@ -1396,9 +1430,9 @@ INPUT_PORTS_END
static ADDRESS_MAP_START( ballbomb_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, ballbomb_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(ballbomb_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x05, 0x05) AM_WRITE(ballbomb_sh_port_2_w)
ADDRESS_MAP_END
@ -1420,7 +1454,10 @@ static MACHINE_DRIVER_START( ballbomb )
MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_IO_MAP(ballbomb_io_map)
MDRV_MACHINE_START(extra_8080bw)
MDRV_MACHINE_START(extra_8080bw)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(ballbomb)
@ -1495,7 +1532,7 @@ static MACHINE_DRIVER_START( yosakdon )
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(yosakdon_map)
MDRV_CPU_IO_MAP(yosakdon_io_map)
MDRV_MACHINE_START(extra_8080bw)
MDRV_MACHINE_START(extra_8080bw)
/* sound hardware */
MDRV_IMPORT_FROM(invaders_samples_audio)
@ -1577,9 +1614,9 @@ static READ8_HANDLER(indianbt_r)
static ADDRESS_MAP_START( indianbt_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ(indianbt_r)
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN0")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, indianbt_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(indianbt_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x05, 0x05) AM_WRITE(indianbt_sh_port_2_w)
AM_RANGE(0x06, 0x06) AM_WRITENOP /* sound ? */
AM_RANGE(0x07, 0x07) AM_DEVWRITE("discrete", indianbt_sh_port_3_w)
@ -1592,7 +1629,10 @@ static MACHINE_DRIVER_START( indianbt )
MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_IO_MAP(indianbt_io_map)
MDRV_MACHINE_START(extra_8080bw)
MDRV_MACHINE_START(extra_8080bw)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(indianbt)
@ -1619,9 +1659,9 @@ static WRITE8_HANDLER( steelwkr_sh_port_3_w )
static ADDRESS_MAP_START( steelwkr_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, invadpt2_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_WRITE(invadpt2_sh_port_1_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w)
AM_RANGE(0x06, 0x06) AM_WRITE(steelwkr_sh_port_3_w)
ADDRESS_MAP_END
@ -1665,6 +1705,9 @@ static MACHINE_DRIVER_START( steelwkr )
MDRV_CPU_IO_MAP(steelwkr_io_map)
MDRV_MACHINE_START(extra_8080bw)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_VIDEO_UPDATE(invadpt2)
@ -1797,7 +1840,7 @@ static MACHINE_DRIVER_START( shuttlei )
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(shuttlei_map)
MDRV_CPU_IO_MAP(shuttlei_io_map)
MDRV_MACHINE_START(extra_8080bw)
MDRV_MACHINE_START(extra_8080bw)
/* video hardware */
MDRV_SCREEN_MODIFY("screen")
@ -1881,8 +1924,8 @@ static INPUT_PORTS_START( darthvdr )
PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )

View File

@ -18,6 +18,7 @@ Differences between these sets include
#include "driver.h"
#include "cpu/m6800/m6800.h"
#include "machine/mb14241.h"
#include "includes/fgoal.h"
@ -138,25 +139,19 @@ static READ8_HANDLER( fgoal_row_r )
static WRITE8_HANDLER( fgoal_row_w )
{
fgoal_state *state = (fgoal_state *)space->machine->driver_data;
state->row = data;
state->shift_data = state->shift_data >> 8;
mb14241_shift_data_w(state->mb14241, 0, 0);
}
static WRITE8_HANDLER( fgoal_col_w )
{
fgoal_state *state = (fgoal_state *)space->machine->driver_data;
state->col = data;
state->shift_bits = data & 7;
mb14241_shift_count_w(state->mb14241, 0, data);
}
static WRITE8_HANDLER( fgoal_shifter_w )
{
fgoal_state *state = (fgoal_state *)space->machine->driver_data;
state->shift_data = (state->shift_data >> 8) | (data << 8); /* MB14241 custom chip */
}
static READ8_HANDLER( fgoal_address_hi_r )
{
return video_ram_address(space->machine) >> 8;
@ -167,11 +162,10 @@ static READ8_HANDLER( fgoal_address_lo_r )
return video_ram_address(space->machine) & 0xff;
}
static READ8_HANDLER( fgoal_shifter_r )
{
fgoal_state *state = (fgoal_state *)space->machine->driver_data;
UINT8 v = state->shift_data >> (8 - state->shift_bits);
UINT8 v = mb14241_shift_result_r(state->mb14241, 0);
return BITSWAP8(v, 7, 6, 5, 4, 3, 2, 1, 0);
}
@ -179,7 +173,7 @@ static READ8_HANDLER( fgoal_shifter_r )
static READ8_HANDLER( fgoal_shifter_reverse_r )
{
fgoal_state *state = (fgoal_state *)space->machine->driver_data;
UINT8 v = state->shift_data >> (8 - state->shift_bits);
UINT8 v = mb14241_shift_result_r(state->mb14241, 0);
return BITSWAP8(v, 0, 1, 2, 3, 4, 5, 6, 7);
}
@ -230,7 +224,7 @@ static ADDRESS_MAP_START( cpu_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x00f1, 0x00f1) AM_WRITE(fgoal_col_w)
AM_RANGE(0x00f2, 0x00f2) AM_WRITE(fgoal_row_w)
AM_RANGE(0x00f3, 0x00f3) AM_WRITE(fgoal_col_w)
AM_RANGE(0x00f4, 0x00f7) AM_WRITE(fgoal_shifter_w)
AM_RANGE(0x00f4, 0x00f7) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x00f8, 0x00fb) AM_WRITE(fgoal_sound1_w)
AM_RANGE(0x00fc, 0x00ff) AM_WRITE(fgoal_sound2_w)
@ -347,6 +341,7 @@ static MACHINE_START( fgoal )
fgoal_state *state = (fgoal_state *)machine->driver_data;
state->maincpu = devtag_get_device(machine, "maincpu");
state->mb14241 = devtag_get_device(machine, "mb14241");
state_save_register_global(machine, state->xpos);
state_save_register_global(machine, state->ypos);
@ -354,8 +349,6 @@ static MACHINE_START( fgoal )
state_save_register_global(machine, state->fgoal_player);
state_save_register_global(machine, state->row);
state_save_register_global(machine, state->col);
state_save_register_global(machine, state->shift_data);
state_save_register_global(machine, state->shift_bits);
state_save_register_global(machine, state->prev_coin);
}
@ -371,8 +364,6 @@ static MACHINE_RESET( fgoal )
state->fgoal_player = 0;
state->row = 0;
state->col = 0;
state->shift_data = 0;
state->shift_bits = 0;
state->prev_coin = 0;
}
@ -388,6 +379,9 @@ static MACHINE_DRIVER_START( fgoal )
MDRV_MACHINE_START(fgoal)
MDRV_MACHINE_RESET(fgoal)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(60)

View File

@ -170,7 +170,8 @@ static UINT8 rev_shift_res;
static READ8_HANDLER( mw8080bw_shift_result_rev_r )
{
UINT8 ret = mb14241_0_shift_result_r(space, 0);
const device_config *mb14241 = devtag_get_device(space->machine, "mb14241");
UINT8 ret = mb14241_shift_result_r(mb14241, 0);
return BITSWAP8(ret,0,1,2,3,4,5,6,7);
}
@ -178,6 +179,7 @@ static READ8_HANDLER( mw8080bw_shift_result_rev_r )
static READ8_HANDLER( mw8080bw_reversable_shift_result_r )
{
const device_config *mb14241 = devtag_get_device(space->machine, "mb14241");
UINT8 ret;
if (rev_shift_res)
@ -186,7 +188,7 @@ static READ8_HANDLER( mw8080bw_reversable_shift_result_r )
}
else
{
ret = mb14241_0_shift_result_r(space, 0);
ret = mb14241_shift_result_r(mb14241, 0);
}
return ret;
@ -194,7 +196,8 @@ static READ8_HANDLER( mw8080bw_reversable_shift_result_r )
static WRITE8_HANDLER( mw8080bw_reversable_shift_count_w)
{
mb14241_0_shift_count_w(space, offset, data);
const device_config *mb14241 = devtag_get_device(space->machine, "mb14241");
mb14241_shift_count_w(mb14241, offset, data);
rev_shift_res = data & 0x08;
}
@ -335,12 +338,12 @@ static ADDRESS_MAP_START( seawolf_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ(mw8080bw_shift_result_rev_r)
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x01, 0x01) AM_WRITE(seawolf_explosion_lamp_w)
AM_RANGE(0x02, 0x02) AM_WRITE(seawolf_periscope_lamp_w)
AM_RANGE(0x03, 0x03) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x05, 0x05) AM_WRITE(seawolf_audio_w)
ADDRESS_MAP_END
@ -413,6 +416,9 @@ static MACHINE_DRIVER_START( seawolf )
MDRV_CPU_IO_MAP(seawolf_io_map)
/* there is no watchdog */
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(seawolf_audio)
@ -428,11 +434,16 @@ MACHINE_DRIVER_END
static WRITE8_HANDLER( gunfight_io_w )
{
if (offset & 0x01) gunfight_audio_w(space, 0, data);
const device_config *mb14241 = devtag_get_device(space->machine, "mb14241");
if (offset & 0x02) mb14241_0_shift_count_w(space, 0, data);
if (offset & 0x01)
gunfight_audio_w(space, 0, data);
if (offset & 0x04) mb14241_0_shift_data_w(space, 0, data);
if (offset & 0x02)
mb14241_shift_count_w(mb14241, 0, data);
if (offset & 0x04)
mb14241_shift_data_w(mb14241, 0, data);
}
@ -441,7 +452,7 @@ static ADDRESS_MAP_START( gunfight_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
/* no decoder, just 3 AND gates */
AM_RANGE(0x00, 0x07) AM_WRITE(gunfight_io_w)
@ -507,6 +518,9 @@ static MACHINE_DRIVER_START( gunfight )
MDRV_CPU_IO_MAP(gunfight_io_map)
/* there is no watchdog */
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(gunfight_audio)
@ -617,11 +631,16 @@ static CUSTOM_INPUT( tornbase_score_input_r )
static WRITE8_HANDLER( tornbase_io_w )
{
if (offset & 0x01) tornbase_audio_w(devtag_get_device(space->machine, "discrete"), 0, data);
const device_config *mb14241 = devtag_get_device(space->machine, "mb14241");
if (offset & 0x02) mb14241_0_shift_count_w(space, 0, data);
if (offset & 0x01)
tornbase_audio_w(devtag_get_device(space->machine, "discrete"), 0, data);
if (offset & 0x04) mb14241_0_shift_data_w(space, 0, data);
if (offset & 0x02)
mb14241_shift_count_w(mb14241, 0, data);
if (offset & 0x04)
mb14241_shift_data_w(mb14241, 0, data);
}
@ -630,7 +649,7 @@ static ADDRESS_MAP_START( tornbase_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
/* no decoder, just 3 AND gates */
AM_RANGE(0x00, 0x07) AM_WRITE(tornbase_io_w)
@ -730,6 +749,9 @@ static MACHINE_DRIVER_START( tornbase)
MDRV_CPU_IO_MAP(tornbase_io_map)
/* there is no watchdog */
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(tornbase_audio)
@ -748,11 +770,11 @@ static ADDRESS_MAP_START( zzzap_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x02, 0x02) AM_WRITE(zzzap_audio_1_w)
AM_RANGE(0x03, 0x03) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x05, 0x05) AM_WRITE(zzzap_audio_2_w)
AM_RANGE(0x07, 0x07) AM_WRITE(watchdog_reset_w)
ADDRESS_MAP_END
@ -843,6 +865,9 @@ static MACHINE_DRIVER_START( zzzap )
MDRV_CPU_IO_MAP(zzzap_io_map)
MDRV_WATCHDOG_TIME_INIT(NSEC(PERIOD_OF_555_MONOSTABLE_NSEC(RES_M(1), CAP_U(1)))) /* 1.1s */
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
/* MDRV_IMPORT_FROM(zzzap_audio) */
@ -985,7 +1010,7 @@ static ADDRESS_MAP_START( boothill_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mw8080bw_reversable_shift_result_r)
AM_RANGE(0x01, 0x01) AM_WRITE(mw8080bw_reversable_shift_count_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x03, 0x03) AM_DEVWRITE("discrete", boothill_audio_w)
AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x05, 0x05) AM_DEVWRITE("discrete", midway_tone_generator_lo_w)
@ -1046,6 +1071,9 @@ static MACHINE_DRIVER_START( boothill )
MDRV_MACHINE_START(boothill)
MDRV_WATCHDOG_TIME_INIT(NSEC(PERIOD_OF_555_MONOSTABLE_NSEC(RES_K(270), CAP_U(10)))) /* 2.97s */
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(boothill_audio)
@ -1214,10 +1242,10 @@ static ADDRESS_MAP_START( desertgu_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ(mw8080bw_shift_result_rev_r)
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x01, 0x01) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x03, 0x03) AM_DEVWRITE("discrete", desertgu_audio_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x05, 0x05) AM_DEVWRITE("discrete", midway_tone_generator_lo_w)
@ -1284,6 +1312,9 @@ static MACHINE_DRIVER_START( desertgu )
MDRV_MACHINE_START(desertgu)
MDRV_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(desertgu_audio)
@ -1334,10 +1365,10 @@ static ADDRESS_MAP_START( dplay_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x01, 0x01) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x03, 0x03) AM_DEVWRITE("discrete", dplay_audio_w)
AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x05, 0x05) AM_DEVWRITE("discrete", midway_tone_generator_lo_w)
@ -1481,6 +1512,9 @@ static MACHINE_DRIVER_START( dplay )
MDRV_CPU_IO_MAP(dplay_io_map)
MDRV_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(dplay_audio)
@ -1511,7 +1545,7 @@ static ADDRESS_MAP_START( gmissile_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mw8080bw_reversable_shift_result_r)
AM_RANGE(0x01, 0x01) AM_WRITE(mw8080bw_reversable_shift_count_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x03, 0x03) AM_WRITE(gmissile_audio_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x05, 0x05) AM_WRITE(gmissile_audio_2_w)
@ -1573,6 +1607,9 @@ static MACHINE_DRIVER_START( gmissile )
MDRV_MACHINE_START(gmissile)
MDRV_WATCHDOG_VBLANK_INIT(255) /* really based on a 60Hz clock source */
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(gmissile_audio)
@ -1603,7 +1640,7 @@ static ADDRESS_MAP_START( m4_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mw8080bw_reversable_shift_result_r)
AM_RANGE(0x01, 0x01) AM_WRITE(mw8080bw_reversable_shift_count_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x03, 0x03) AM_WRITE(m4_audio_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x05, 0x05) AM_WRITE(m4_audio_2_w)
@ -1663,6 +1700,9 @@ static MACHINE_DRIVER_START( m4 )
MDRV_MACHINE_START(m4)
MDRV_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(m4_audio)
@ -1720,10 +1760,10 @@ static ADDRESS_MAP_START( clowns_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x01, 0x01) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x03, 0x03) AM_WRITE(clowns_audio_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x05, 0x05) AM_DEVWRITE("discrete", midway_tone_generator_lo_w)
@ -1837,6 +1877,9 @@ static MACHINE_DRIVER_START( clowns )
MDRV_MACHINE_START(clowns)
MDRV_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(clowns_audio)
@ -1856,10 +1899,10 @@ static ADDRESS_MAP_START( spacwalk_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2")
AM_RANGE(0x03, 0x03) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x01, 0x01) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x03, 0x03) AM_DEVWRITE("discrete", spacwalk_audio_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x05, 0x05) AM_DEVWRITE("discrete", midway_tone_generator_lo_w)
@ -1929,6 +1972,9 @@ static MACHINE_DRIVER_START( spacwalk )
MDRV_MACHINE_START(clowns)
MDRV_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(spacwalk_audio)
@ -1944,15 +1990,15 @@ MACHINE_DRIVER_END
static ADDRESS_MAP_START( shuffle_io_map, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_GLOBAL_MASK(0xf) /* yes, 4, and no mirroring on the read handlers */
AM_RANGE(0x01, 0x01) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x01, 0x01) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x02, 0x02) AM_READ_PORT("IN0")
AM_RANGE(0x03, 0x03) AM_READ(mw8080bw_shift_result_rev_r)
AM_RANGE(0x04, 0x04) AM_READ_PORT("IN1")
AM_RANGE(0x05, 0x05) AM_READ_PORT("IN2")
AM_RANGE(0x06, 0x06) AM_READ_PORT("IN3")
AM_RANGE(0x01, 0x01) AM_MIRROR(0x08) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x02, 0x02) AM_MIRROR(0x08) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x01, 0x01) AM_MIRROR(0x08) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x02, 0x02) AM_MIRROR(0x08) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x04, 0x04) AM_MIRROR(0x08) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x05, 0x05) AM_MIRROR(0x08) AM_DEVWRITE("discrete", shuffle_audio_1_w)
AM_RANGE(0x06, 0x06) AM_MIRROR(0x08) AM_DEVWRITE("discrete", shuffle_audio_2_w)
@ -2007,6 +2053,9 @@ static MACHINE_DRIVER_START( shuffle )
MDRV_CPU_IO_MAP(shuffle_io_map)
MDRV_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(shuffle_audio)
@ -2025,10 +2074,10 @@ static ADDRESS_MAP_START( dogpatch_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x01, 0x01) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x03, 0x03) AM_WRITE(dogpatch_audio_w)
AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x05, 0x05) AM_DEVWRITE("discrete", midway_tone_generator_lo_w)
@ -2092,6 +2141,9 @@ static MACHINE_DRIVER_START( dogpatch )
/* Midway boards of the era used the same circuit */
MDRV_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(dogpatch_audio)
@ -2311,10 +2363,10 @@ static ADDRESS_MAP_START( phantom2_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ(mw8080bw_shift_result_rev_r)
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x01, 0x01) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x05, 0x05) AM_WRITE(phantom2_audio_1_w)
AM_RANGE(0x06, 0x06) AM_WRITE(phantom2_audio_2_w)
@ -2370,6 +2422,9 @@ static MACHINE_DRIVER_START( phantom2 )
MDRV_VIDEO_UPDATE(phantom2)
MDRV_VIDEO_EOF(phantom2)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(phantom2_audio)
@ -2388,8 +2443,9 @@ static READ8_HANDLER( bowler_shift_result_r )
/* ZV - not too sure why this is needed, I don't see
anything unusual on the schematics that would cause
the bits to flip */
const device_config *mb14241 = devtag_get_device(space->machine, "mb14241");
return ~mb14241_0_shift_result_r(space,0);
return ~mb14241_shift_result_r(mb14241, 0);
}
static WRITE8_HANDLER( bowler_lights_1_w )
@ -2437,8 +2493,8 @@ static ADDRESS_MAP_START( bowler_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x05, 0x05) AM_READ_PORT("IN2")
AM_RANGE(0x06, 0x06) AM_READ_PORT("IN3")
AM_RANGE(0x01, 0x01) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x05, 0x05) AM_DEVWRITE("discrete", bowler_audio_1_w)
AM_RANGE(0x06, 0x06) AM_WRITE(bowler_audio_2_w)
@ -2501,6 +2557,9 @@ static MACHINE_DRIVER_START( bowler )
MDRV_CPU_IO_MAP(bowler_io_map)
MDRV_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(bowler_audio)
@ -2633,11 +2692,11 @@ static ADDRESS_MAP_START( invaders_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVWRITE("discrete", invaders_audio_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x05, 0x05) AM_DEVWRITE("discrete", invaders_audio_2_w)
AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w)
ADDRESS_MAP_END
@ -2730,6 +2789,9 @@ MACHINE_DRIVER_START( invaders )
/* video hardware */
MDRV_VIDEO_UPDATE(invaders)
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(invaders_audio)
@ -2761,10 +2823,10 @@ static ADDRESS_MAP_START( blueshrk_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ(mw8080bw_shift_result_rev_r)
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x01, 0x01) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x03, 0x03) AM_DEVWRITE("discrete", blueshrk_audio_w)
AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w)
ADDRESS_MAP_END
@ -2806,6 +2868,9 @@ static MACHINE_DRIVER_START( blueshrk )
MDRV_CPU_IO_MAP(blueshrk_io_map)
MDRV_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(blueshrk_audio)
@ -2839,12 +2904,12 @@ static ADDRESS_MAP_START( invad2ct_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1")
AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2")
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mb14241_0_shift_result_r)
AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x01, 0x01) AM_DEVWRITE("discrete", invad2ct_audio_3_w)
AM_RANGE(0x02, 0x02) AM_WRITE(mb14241_0_shift_count_w)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x03, 0x03) AM_DEVWRITE("discrete", invad2ct_audio_1_w)
AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x05, 0x05) AM_DEVWRITE("discrete", invad2ct_audio_2_w)
AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x07, 0x07) AM_DEVWRITE("discrete", invad2ct_audio_4_w)
@ -2904,6 +2969,9 @@ static MACHINE_DRIVER_START( invad2ct )
MDRV_CPU_IO_MAP(invad2ct_io_map)
MDRV_WATCHDOG_TIME_INIT(USEC(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)))
/* add shifter */
MDRV_MB14241_ADD("mb14241")
/* audio hardware */
MDRV_IMPORT_FROM(invad2ct_audio)

View File

@ -14,11 +14,11 @@ struct _fgoal_state
/* misc */
int fgoal_player;
UINT8 row, col;
unsigned shift_data, shift_bits;
int prev_coin;
/* devices */
const device_config *maincpu;
const device_config *mb14241;
};

View File

@ -1,50 +0,0 @@
/***************************************************************************
Midway 8080-based black and white hardware
****************************************************************************/
#include "driver.h"
#include "mb14241.h"
#define MAX_MB14241 1
struct MB14241
{
UINT16 shift_data; /* 15 bits only */
UINT8 shift_count; /* 3 bits */
};
static struct MB14241 chips[MAX_MB14241];
static void mb14241_shift_count_w(int num, UINT8 data)
{
chips[num].shift_count = ~data & 0x07;
}
WRITE8_HANDLER( mb14241_0_shift_count_w ) { mb14241_shift_count_w(0, data); }
static void mb14241_shift_data_w(int num, UINT8 data)
{
chips[num].shift_data = (chips[num].shift_data >> 8) | ((UINT16)data << 7);
}
WRITE8_HANDLER( mb14241_0_shift_data_w ) { mb14241_shift_data_w(0, data); }
static UINT8 mb14241_shift_result_r(int num)
{
return chips[num].shift_data >> chips[num].shift_count;
}
READ8_HANDLER( mb14241_0_shift_result_r ) { return mb14241_shift_result_r(0); }
void mb14241_init(running_machine *machine,int num)
{
state_save_register_item(machine, "mb14241", NULL, num, chips[num].shift_data);
state_save_register_item(machine, "mb14241", NULL, num, chips[num].shift_count);
}

View File

@ -1,16 +0,0 @@
/*****************************************************************************
MB14241 shifter IC emulation
*****************************************************************************/
#ifndef __MB14241_H__
#define __MB14241_H__
void mb14241_init(running_machine *machine,int num);
WRITE8_HANDLER( mb14241_0_shift_count_w );
WRITE8_HANDLER( mb14241_0_shift_data_w );
READ8_HANDLER( mb14241_0_shift_result_r );
#endif

View File

@ -6,8 +6,6 @@
#include "driver.h"
#include "mw8080bw.h"
#include "machine/mb14241.h"
/*************************************
*
@ -108,7 +106,6 @@ static void mw8080bw_start_interrupt_timer(running_machine *machine)
MACHINE_START( mw8080bw )
{
mw8080bw_create_interrupt_timer(machine);
mb14241_init(machine,0);
}

View File

@ -326,7 +326,6 @@ DRVLIBS = \
#-------------------------------------------------
$(MAMEOBJ)/shared.a: \
$(MACHINE)/mb14241.o \
$(MACHINE)/nmk112.o \
$(MACHINE)/pckeybrd.o \
$(MACHINE)/pcshare.o \