mirror of
https://github.com/holub/mame
synced 2025-10-05 16:50:57 +03:00
mpu 4 and 5 (nw)
This commit is contained in:
parent
8aa532b3b0
commit
efa918f931
@ -1199,25 +1199,25 @@ createMAMEProjects(_target, _subtarget, "barcrest")
|
||||
files {
|
||||
MAME_DIR .. "src/mame/drivers/mpu2.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu3.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4hw.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4sw.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4sw.inc",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4.inc",
|
||||
MAME_DIR .. "src/mame/includes/mpu4.h",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4mod2sw.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4mod4yam.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4mod2sw.inc",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4mod4yam.inc",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4plasma.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4dealem.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4vid.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4avan.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4union.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4concept.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4empire.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4mdm.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4crystal.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4bwb.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4misc.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu5hw.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4avan.inc",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4union.inc",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4concept.inc",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4empire.inc",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4mdm.inc",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4crystal.inc",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4bwb.inc",
|
||||
MAME_DIR .. "src/mame/drivers/mpu4misc.inc",
|
||||
MAME_DIR .. "src/mame/drivers/mpu5.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mpu5.inc",
|
||||
MAME_DIR .. "src/mame/video/awpvid.cpp",
|
||||
MAME_DIR .. "src/mame/video/awpvid.h",
|
||||
MAME_DIR .. "src/mame/machine/meters.cpp",
|
||||
|
@ -734,19 +734,8 @@ mpu12wbk.cpp
|
||||
mpu2.cpp
|
||||
mpu3.cpp
|
||||
mpu4.cpp
|
||||
mpu4avan.cpp
|
||||
mpu4bwb.cpp
|
||||
mpu4concept.cpp
|
||||
mpu4crystal.cpp
|
||||
mpu4dealem.cpp
|
||||
mpu4empire.cpp
|
||||
mpu4mdm.cpp
|
||||
mpu4misc.cpp
|
||||
mpu4mod2sw.cpp
|
||||
mpu4mod4yam.cpp
|
||||
mpu4plasma.cpp
|
||||
mpu4sw.cpp
|
||||
mpu4union.cpp
|
||||
mpu4vid.cpp
|
||||
mpu5.cpp
|
||||
mquake.cpp
|
||||
|
File diff suppressed because it is too large
Load Diff
2737
src/mame/drivers/mpu4.inc
Normal file
2737
src/mame/drivers/mpu4.inc
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,14 +8,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mpu4.h"
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mod4oki );
|
||||
INPUT_PORTS_EXTERN( mpu4 );
|
||||
|
||||
#define GAME_FLAGS (MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_MECHANICAL)
|
||||
|
||||
|
||||
|
||||
#undef GAME_CUSTOM
|
@ -21,18 +21,11 @@
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mpu4.h"
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mod4oki );
|
||||
MACHINE_CONFIG_EXTERN( bwboki );
|
||||
MACHINE_CONFIG_EXTERN( mod2 );
|
||||
INPUT_PORTS_EXTERN( mpu4 );
|
||||
|
||||
#define GAME_FLAGS (MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_MECHANICAL)
|
||||
|
||||
|
||||
#define M4BIGMT_EXTRA_ROMS \
|
||||
ROM_REGION( 0x180000, "altmsm6376", 0 ) /* this is NOT the same, some samples are changed */ \
|
@ -2,15 +2,9 @@
|
||||
// copyright-holders:David Haywood
|
||||
/* MPU4 games by 'Concept' */
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mpu4.h"
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mod4oki );
|
||||
INPUT_PORTS_EXTERN( mpu4 );
|
||||
|
||||
#define GAME_FLAGS (MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_MECHANICAL)
|
||||
|
||||
|
||||
#define M4RHFEVC_EXTRA_ROMS \
|
||||
ROM_REGION( 0x080000, "msm6376", 0 ) \
|
||||
ROM_LOAD( "rhfs1.bin", 0x0000, 0x03de5e, CRC(0dddd05f) SHA1(908a58752fb1cf76667695a40bcaa7778201c3a2) )
|
@ -4,17 +4,10 @@
|
||||
|
||||
/* Crystal games tend to have scrambled ROM + a different sound chip */
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mpu4.h"
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mod4oki );
|
||||
MACHINE_CONFIG_EXTERN( mpu4crys );
|
||||
INPUT_PORTS_EXTERN( mpu4 );
|
||||
|
||||
#define GAME_FLAGS (MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_MECHANICAL)
|
||||
|
||||
|
||||
|
||||
#define M4FRKSTN_SOUND \
|
||||
ROM_REGION( 0x40000, "upd", 0 ) \
|
||||
ROM_LOAD("fr1snd.bin", 0x00000, 0x40000, CRC(2d77bbde) SHA1(0397ede538e913dc2972e260589022564fcd8fe4) )
|
@ -2,15 +2,9 @@
|
||||
// copyright-holders:David Haywood
|
||||
/* MPU4 games by 'Empire' */
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mpu4.h"
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mod4oki );
|
||||
INPUT_PORTS_EXTERN( mpu4 );
|
||||
|
||||
#define GAME_FLAGS (MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_MECHANICAL)
|
||||
|
||||
|
||||
ROM_START( m4apachg )
|
||||
ROM_REGION( 0x020000, "maincpu", 0 )
|
File diff suppressed because it is too large
Load Diff
@ -2,17 +2,9 @@
|
||||
// copyright-holders:David Haywood
|
||||
/* MPU4 games by MDM */
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mpu4.h"
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mod4oki );
|
||||
INPUT_PORTS_EXTERN( mpu4 );
|
||||
|
||||
#define GAME_FLAGS (MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_MECHANICAL)
|
||||
|
||||
|
||||
|
||||
ROM_START( m42punlm )
|
||||
ROM_REGION( 0x020000, "maincpu", 0 )
|
||||
ROM_LOAD( "2pun0-0.bin", 0x0000, 0x020000, CRC(f8fd7b92) SHA1(400a66d0b401b2df2e2fb0f70eae6da7e547a50b) )
|
@ -2,15 +2,9 @@
|
||||
// copyright-holders:David Haywood
|
||||
/* MPU4 sets from various other manufactuers which appear to be based off unique code / behaviors (no barcrest headers etc.) */
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mpu4.h"
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mod4oki );
|
||||
INPUT_PORTS_EXTERN( mpu4 );
|
||||
|
||||
#define GAME_FLAGS (MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_MECHANICAL)
|
||||
|
||||
|
||||
|
||||
ROM_START( m4bangin )
|
||||
ROM_REGION( 0x020000, "maincpu", 0 )
|
@ -14,20 +14,13 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mpu4.h"
|
||||
#include "connect4.lh"
|
||||
|
||||
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mod2 );
|
||||
INPUT_PORTS_EXTERN( mpu4 );
|
||||
INPUT_PORTS_EXTERN( mpu4jackpot8tkn );
|
||||
|
||||
|
||||
|
||||
#define GAME_FLAGS (MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_MECHANICAL)
|
||||
|
||||
DRIVER_INIT_MEMBER( mpu4_state, m4_showstring_mod2 )
|
||||
{
|
||||
DRIVER_INIT_CALL( m4default );
|
@ -2,13 +2,9 @@
|
||||
// copyright-holders:David Haywood
|
||||
/* This is MPU4 MOD4 with a Y2413 instead of an OKI */
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mpu4.h"
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mod4yam );
|
||||
INPUT_PORTS_EXTERN( mpu4 );
|
||||
|
||||
#define GAME_FLAGS (MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK)
|
||||
|
||||
#include "gamball.lh"
|
||||
|
@ -16,9 +16,6 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mpu4.h"
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mod4yam );
|
||||
MACHINE_CONFIG_EXTERN( mod4oki );
|
||||
MACHINE_CONFIG_EXTERN( mod2 );
|
||||
@ -27,8 +24,6 @@ INPUT_PORTS_EXTERN( grtecp );
|
||||
INPUT_PORTS_EXTERN( mpu4jackpot8tkn );
|
||||
INPUT_PORTS_EXTERN( mpu4jackpot8per );
|
||||
|
||||
#define GAME_FLAGS (MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_MECHANICAL)
|
||||
|
||||
DRIVER_INIT_MEMBER(mpu4_state,m4debug)
|
||||
{
|
||||
// many original barcrest / bwb sets have identification info around here
|
@ -2,16 +2,10 @@
|
||||
// copyright-holders:David Haywood
|
||||
/* MPU4 games by 'Union' */
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/mpu4.h"
|
||||
|
||||
MACHINE_CONFIG_EXTERN( mod4oki );
|
||||
MACHINE_CONFIG_EXTERN( mod2 );
|
||||
INPUT_PORTS_EXTERN( mpu4 );
|
||||
|
||||
#define GAME_FLAGS (MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_MECHANICAL)
|
||||
|
||||
|
||||
ROM_START( m4cwalk )
|
||||
ROM_REGION( 0x010000, "maincpu", 0 )
|
||||
ROM_LOAD( "cw1_1.bin", 0x0000, 0x010000, CRC(a1108d79) SHA1(fa2a5510f2bb2d3811550547bad7c3ef0eb0ddc0) )
|
File diff suppressed because it is too large
Load Diff
8125
src/mame/drivers/mpu5.inc
Normal file
8125
src/mame/drivers/mpu5.inc
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,402 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:David Haywood
|
||||
/* MPU5 hardware emulation */
|
||||
|
||||
/* This file contains the hardware emulation, the mpu5.c contains the set listings */
|
||||
|
||||
/*
|
||||
Many of the games in here also seem to exist on other hardware.
|
||||
|
||||
MPU5
|
||||
|
||||
Skeleton Driver
|
||||
|
||||
-- there are a wide range of titles running on this hardware
|
||||
|
||||
-- the driver does nothing, and currently only serves to act as a placeholder to document what existed on this hardware
|
||||
|
||||
-- the main CPU is a 68340, which is a 32-bit 680xx variant with modified opcodes etc. (CPU32 core)
|
||||
|
||||
-- Much of the communication is done via a 68681 DUART.
|
||||
|
||||
-- The ASIC acts as the main I/O control, including an interface to a Z89321 DSP and a 16bit DAC.
|
||||
|
||||
-- Help wanted, the MFME sources (which are based on MAME anyway) should be of some help here, if somebody
|
||||
in the FM emu community wants to adopt this driver they're welcome to it.
|
||||
|
||||
-- As a result of games being on multiple systems, and some of the original sets being a mess there could be one or two
|
||||
out of position here (eg MPU4 video instead of MPU5) or with missing roms if there was extra hardware (nothing has been
|
||||
removed from the rom loading comments, so if there were extra roms present they're still commented)
|
||||
|
||||
Some duplicate roms have been commented out for now, please don't remove these lines until the sets are properly sorted.
|
||||
|
||||
Some games weren't even in the right zips, Eg the Red Hot Fever (MPU4) cotnained a mislabled MPU5 'Raise The Roof' set
|
||||
with extra roms, probably actually from the MPU4 Red Hot Fever. The game names are usually stored somewhat as plain
|
||||
ASCII so spotting such problems is easy enough.
|
||||
|
||||
In general things have been added here if the rom structure and initial code looks like the MPU5 boot code
|
||||
|
||||
|
||||
|
||||
15/07/11 - rom loading for most games added, still some missing tho and clones still need sorting out properly.
|
||||
*/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "machine/sec.h"
|
||||
#include "mpu5.lh"
|
||||
|
||||
#include "machine/68340.h"
|
||||
|
||||
class mpu5_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mpu5_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu")
|
||||
{ }
|
||||
UINT32* m_cpuregion;
|
||||
std::unique_ptr<UINT32[]> m_mainram;
|
||||
SEC sec;
|
||||
|
||||
UINT8 m_led_strobe_temp;
|
||||
UINT8 m_led_strobe;
|
||||
UINT8 m_pic_clk;
|
||||
bool m_pic_transfer_in_progress;
|
||||
UINT8 m_pic_bit1;
|
||||
UINT8 m_pic_data;
|
||||
UINT8 m_pic_clocked_bits;
|
||||
UINT8 m_pic_stored_input;
|
||||
UINT8 m_pic_output_bit;
|
||||
UINT8 m_input_strobe;
|
||||
|
||||
DECLARE_READ32_MEMBER(mpu5_mem_r);
|
||||
DECLARE_WRITE32_MEMBER(mpu5_mem_w);
|
||||
|
||||
DECLARE_READ32_MEMBER(asic_r32);
|
||||
DECLARE_READ8_MEMBER(asic_r8);
|
||||
DECLARE_WRITE32_MEMBER(asic_w32);
|
||||
DECLARE_WRITE8_MEMBER(asic_w8);
|
||||
|
||||
DECLARE_READ32_MEMBER(pic_r);
|
||||
DECLARE_WRITE32_MEMBER(pic_w);
|
||||
|
||||
protected:
|
||||
|
||||
// devices
|
||||
required_device<m68340cpu_device> m_maincpu;
|
||||
virtual void machine_start() override;
|
||||
};
|
||||
|
||||
READ8_MEMBER(mpu5_state::asic_r8)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x01:
|
||||
{
|
||||
return 0x99;
|
||||
}
|
||||
|
||||
case 0x02:
|
||||
{
|
||||
//send init and ready for now - need to work on full DSP
|
||||
return 0x85;
|
||||
}
|
||||
|
||||
case 0x0b:
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
{
|
||||
int pc = space.device().safe_pc();
|
||||
logerror("%08x maincpu read from ASIC - offset %01x\n", pc, offset);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
READ32_MEMBER(mpu5_state::asic_r32)
|
||||
{
|
||||
UINT32 retdata = 0;
|
||||
if (mem_mask&0xff000000) retdata |= asic_r8(space,(offset*4)+0) <<24;
|
||||
if (mem_mask&0x00ff0000) retdata |= asic_r8(space,(offset*4)+1) <<16;
|
||||
if (mem_mask&0x0000ff00) retdata |= asic_r8(space,(offset*4)+2) <<8;
|
||||
if (mem_mask&0x000000ff) retdata |= asic_r8(space,(offset*4)+3) <<0;
|
||||
return retdata;
|
||||
}
|
||||
|
||||
READ32_MEMBER(mpu5_state::mpu5_mem_r)
|
||||
{
|
||||
int pc = space.device().safe_pc();
|
||||
int addr = offset *4;
|
||||
int cs = m68340_get_cs(m_maincpu, addr);
|
||||
|
||||
switch ( cs )
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
switch (addr & 0xf0)
|
||||
{
|
||||
case 0xd0:
|
||||
{
|
||||
logerror("%08x PIC read\n", pc);
|
||||
break;
|
||||
}
|
||||
case 0xe0:
|
||||
{
|
||||
logerror("%08x DUART read\n", pc);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0xf0:
|
||||
{
|
||||
return asic_r32(space, offset&3,mem_mask);
|
||||
}
|
||||
|
||||
default:
|
||||
logerror("%08x maincpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 4:
|
||||
offset &=0x3fff;
|
||||
return (m_mainram[offset]);
|
||||
|
||||
case 1:if (offset < 0x100000) // make sure to log an error instead of crashing when reading beyond end of region
|
||||
return m_cpuregion[offset];
|
||||
|
||||
|
||||
default:
|
||||
logerror("%08x maincpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs);
|
||||
|
||||
}
|
||||
|
||||
return 0x0000;
|
||||
}
|
||||
|
||||
// Each board is fitted with an ASIC that does most of the heavy lifting, including sound playback.
|
||||
WRITE8_MEMBER(mpu5_state::asic_w8)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x03:
|
||||
{
|
||||
if (m_led_strobe_temp != data)
|
||||
{
|
||||
m_led_strobe_temp = data;
|
||||
|
||||
switch (m_led_strobe_temp)
|
||||
{
|
||||
case 0x00:
|
||||
m_led_strobe = 0;
|
||||
break;
|
||||
case 0x01:
|
||||
m_led_strobe = 1;
|
||||
break;
|
||||
case 0x02:
|
||||
m_led_strobe = 2;
|
||||
break;
|
||||
case 0x04:
|
||||
m_led_strobe = 3;
|
||||
break;
|
||||
case 0x08:
|
||||
m_led_strobe = 4;
|
||||
break;
|
||||
case 0x10:
|
||||
m_led_strobe = 5;
|
||||
break;
|
||||
case 0x20:
|
||||
m_led_strobe = 6;
|
||||
break;
|
||||
case 0x40:
|
||||
m_led_strobe = 7;
|
||||
break;
|
||||
case 0x80:
|
||||
m_led_strobe = 8;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x09:
|
||||
{
|
||||
//Assume SEC fitted for now
|
||||
sec.write_data_line(~data&0x01);
|
||||
sec.write_clock_line(~data&0x02);
|
||||
sec.write_cs_line(~data&0x04);
|
||||
}
|
||||
case 0x0b:
|
||||
{
|
||||
output().set_value("statuslamp1", ((data&0x10) != 0));
|
||||
|
||||
output().set_value("statuslamp2", ((data&0x20) != 0));
|
||||
|
||||
if (data & 0x40)
|
||||
{
|
||||
// m_dsp_pin =1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
int pc = space.device().safe_pc();
|
||||
logerror("%08x maincpu write to ASIC - offset %01x data %02x\n", pc, offset, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
WRITE32_MEMBER(mpu5_state::asic_w32)
|
||||
{
|
||||
if (mem_mask&0xff000000) asic_w8(space,(offset*4)+0, (data>>24)&0xff);
|
||||
if (mem_mask&0x00ff0000) asic_w8(space,(offset*4)+1, (data>>16)&0xff);
|
||||
if (mem_mask&0x0000ff00) asic_w8(space,(offset*4)+2, (data>>8) &0xff);
|
||||
if (mem_mask&0x000000ff) asic_w8(space,(offset*4)+3, (data>>0) &0xff);
|
||||
}
|
||||
|
||||
|
||||
READ32_MEMBER(mpu5_state::pic_r)
|
||||
{
|
||||
int pc = space.device().safe_pc();
|
||||
logerror("%08x maincpu read from PIC - offset %01x\n", pc, offset);
|
||||
return m_pic_output_bit;
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(mpu5_state::pic_w)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x04:
|
||||
{
|
||||
if (m_pic_clk)
|
||||
{
|
||||
m_pic_transfer_in_progress = true;
|
||||
}
|
||||
m_pic_bit1 = (data & 0x01);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x06:
|
||||
case 0x07:
|
||||
{
|
||||
if ( (!data) && (m_pic_transfer_in_progress) && (m_pic_clk))
|
||||
{
|
||||
//clock in the stored bit (rudimentary protection here)
|
||||
m_pic_data = (m_pic_data << 1);
|
||||
m_pic_data |= m_pic_bit1;
|
||||
m_pic_stored_input <<= 1;
|
||||
m_pic_clocked_bits ++;
|
||||
|
||||
if (m_pic_clocked_bits >=8)
|
||||
{
|
||||
m_pic_data =0;
|
||||
m_pic_clocked_bits =0;
|
||||
|
||||
if (m_input_strobe <4)
|
||||
{
|
||||
m_input_strobe +=1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pic_output_bit = BIT(m_pic_stored_input,7);
|
||||
}
|
||||
m_pic_transfer_in_progress = false;
|
||||
m_pic_clk = (data != 0);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
int pc = space.device().safe_pc();
|
||||
logerror("%08x maincpu write to PIC - offset %01x data %02x\n", pc, offset, data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(mpu5_state::mpu5_mem_w)
|
||||
{
|
||||
int pc = space.device().safe_pc();
|
||||
int addr = offset *4;
|
||||
int cs = m68340_get_cs(m_maincpu, addr);
|
||||
|
||||
switch ( cs )
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
switch (addr & 0xf0)
|
||||
{
|
||||
case 0xd0:
|
||||
{
|
||||
pic_w(space, (addr& 0x0f),data,mem_mask);
|
||||
break;
|
||||
}
|
||||
case 0xe0:
|
||||
{
|
||||
logerror("%08x DUART write\n", pc);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0xf0:
|
||||
{
|
||||
asic_w32(space, offset&3,data,mem_mask);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
logerror("%08x maincpu write access offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 4:
|
||||
offset &=0x3fff;
|
||||
COMBINE_DATA(&m_mainram[offset]);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
default:
|
||||
logerror("%08x maincpu write access offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( mpu5_map, AS_PROGRAM, 32, mpu5_state )
|
||||
AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(mpu5_mem_r, mpu5_mem_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
INPUT_PORTS_START( mpu5 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
void mpu5_state::machine_start()
|
||||
{
|
||||
m_cpuregion = (UINT32*)memregion( "maincpu" )->base();
|
||||
m_mainram = make_unique_clear<UINT32[]>(0x10000);
|
||||
m_pic_output_bit =0;
|
||||
}
|
||||
|
||||
|
||||
MACHINE_CONFIG_START( mpu5, mpu5_state )
|
||||
MCFG_CPU_ADD("maincpu", M68340, 16000000) // ?
|
||||
MCFG_CPU_PROGRAM_MAP(mpu5_map)
|
||||
|
||||
MCFG_DEFAULT_LAYOUT(layout_mpu5)
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
/* unknown sound */
|
||||
MACHINE_CONFIG_END
|
@ -20680,7 +20680,7 @@ m4wnud // Unknown MPU4 'W Nudge'
|
||||
m4zill // Zillionare's Challenge (Pure Leisure)
|
||||
m4zilla //
|
||||
|
||||
@source:mpu4avan.cpp
|
||||
//@source:mpu4avan.inc
|
||||
m4abeaut //
|
||||
m4abeaut_1 //
|
||||
m4abeaut_2 //
|
||||
@ -21182,7 +21182,7 @@ m4trg__x //
|
||||
m4trg__y //
|
||||
m4trg__z //
|
||||
|
||||
@source:mpu4bwb.cpp
|
||||
//@source:mpu4bwb.inc
|
||||
m4abra // Abracadabra (Bwb)
|
||||
m4abra__a //
|
||||
m4abra__b //
|
||||
@ -21644,7 +21644,7 @@ m4xtrm // X-treme (Bwb)
|
||||
m4xtrm__a //
|
||||
m4xtrm__b //
|
||||
|
||||
@source:mpu4concept.cpp
|
||||
//@source:mpu4concept.inc
|
||||
m4nudgwc // Nudge a Win (Concept)
|
||||
m4nudgwc__a //
|
||||
m4nudgwc__b //
|
||||
@ -21716,7 +21716,7 @@ m4spnwnc // Spin-A-Win (Concept)
|
||||
m4spnwnc__a //
|
||||
m4spnwnc__b //
|
||||
|
||||
@source:mpu4crystal.cpp
|
||||
//@source:mpu4crystal.inc
|
||||
m4aladn // Aladdin's Cave (Crystal)
|
||||
m4aladna //
|
||||
m4aladnb //
|
||||
@ -21819,10 +21819,7 @@ m4twstrd //
|
||||
m4tylb // Thank Your Lucky Bars (Crystal)
|
||||
m4tylba //
|
||||
|
||||
@source:mpu4dealem.cpp
|
||||
v4dealem // Deal 'Em
|
||||
|
||||
@source:mpu4empire.cpp
|
||||
//@source:mpu4empire.inc
|
||||
m4apachg // Apache Gold (Empire)
|
||||
m4apachga //
|
||||
m4apachgb //
|
||||
@ -21905,7 +21902,7 @@ m4ttrail // Treasure Trail (Empire)
|
||||
m4ttraila //
|
||||
m4ttrailb //
|
||||
|
||||
@source:mpu4mdm.cpp
|
||||
//@source:mpu4mdm.inc
|
||||
m42punlm // 2p Unlimited (Mdm)
|
||||
m4bigapl // The Big Apple (Mdm)
|
||||
m4bigapla //
|
||||
@ -21951,7 +21948,7 @@ m4themob // The Mob (Mdm)
|
||||
m4themoba //
|
||||
m4themobb //
|
||||
|
||||
@source:mpu4misc.cpp
|
||||
//@source:mpu4misc.inc
|
||||
m4bangin // Bangin' Away (Global)
|
||||
m4bangina //
|
||||
m4banginb //
|
||||
@ -22090,7 +22087,7 @@ m4wwc // Wacky Weekend Club (Global)
|
||||
m4wwca //
|
||||
m4wwcb //
|
||||
|
||||
@source:mpu4mod2sw.cpp
|
||||
//@source:mpu4mod2sw.inc
|
||||
m421 // Twenty One (Barcrest)
|
||||
m421club // 21 Club (Barcrest)
|
||||
m4actbnka //
|
||||
@ -22335,7 +22332,7 @@ m4wayin // Way In (Barcrest)
|
||||
m4wayina //
|
||||
m4wildms // Wild Mystery (Barcrest)
|
||||
|
||||
@source:mpu4mod4yam.cpp
|
||||
//@source:mpu4mod4yam.inc
|
||||
m4acechs // Ace Chase (Bwb)
|
||||
m4acechs__a //
|
||||
m4acechs__b //
|
||||
@ -22618,16 +22615,7 @@ m4vivalv__y //
|
||||
m4vivalv__z //
|
||||
m4voodoo // Voodoo 1000 (Barcrest)
|
||||
|
||||
@source:mpu4plasma.cpp
|
||||
m4apach // Apache (Barcrest)
|
||||
m4bigchf // Big Chief (Barcrest)
|
||||
m4bigchfa //
|
||||
m4bigchfb //
|
||||
m4bigchfc //
|
||||
m4click // Clickity Click (Barcrest)
|
||||
m4elite // Elite (Barcrest)
|
||||
|
||||
@source:mpu4sw.cpp
|
||||
//@source:mpu4sw.inc
|
||||
m4actbnk // Action Bank (Barcrest)
|
||||
m4actbnk__a //
|
||||
m4actbnk__b //
|
||||
@ -26007,7 +25995,7 @@ m4wta__x //
|
||||
m4wta__y //
|
||||
m4wta__z //
|
||||
|
||||
@source:mpu4union.cpp
|
||||
//@source:mpu4union.inc
|
||||
m4crzbn // Crazy Bingo
|
||||
m4cwalk // Cake Walk (Union)
|
||||
m4eezee // Eezee Fruits (Union)
|
||||
@ -26041,6 +26029,18 @@ m4uniboxa //
|
||||
m4unique // Unique (Union)
|
||||
m4uniquep //
|
||||
|
||||
@source:mpu4dealem.cpp
|
||||
v4dealem // Deal 'Em
|
||||
|
||||
@source:mpu4plasma.cpp
|
||||
m4apach // Apache (Barcrest)
|
||||
m4bigchf // Big Chief (Barcrest)
|
||||
m4bigchfa //
|
||||
m4bigchfb //
|
||||
m4bigchfc //
|
||||
m4click // Clickity Click (Barcrest)
|
||||
m4elite // Elite (Barcrest)
|
||||
|
||||
@source:mpu4vid.cpp
|
||||
v4addlad // Adders and Ladders
|
||||
v4addlad20 //
|
||||
|
Loading…
Reference in New Issue
Block a user