mirror of
https://github.com/holub/mame
synced 2025-06-25 22:04:15 +03:00
Merge branch 'master' of https://github.com/mamedev/mame.git
This commit is contained in:
commit
008091ce22
29
makefile
29
makefile
@ -607,40 +607,17 @@ COBJFLAGS += \
|
||||
# warnings only applicable to C++ compiles
|
||||
CPPONLYFLAGS += \
|
||||
-Woverloaded-virtual
|
||||
|
||||
include $(SRC)/build/cc_detection.mak
|
||||
|
||||
ifdef SANITIZE
|
||||
CCOMFLAGS += -fsanitize=$(SANITIZE)
|
||||
|
||||
ifneq (,$(findstring thread,$(SANITIZE)))
|
||||
CCOMFLAGS += -fPIE
|
||||
endif
|
||||
ifneq (,$(findstring memory,$(SANITIZE)))
|
||||
ifneq (,$(findstring clang,$(CC)))
|
||||
CCOMFLAGS += -fsanitize-memory-track-origins -fPIE
|
||||
endif
|
||||
endif
|
||||
ifneq (,$(findstring undefined,$(SANITIZE)))
|
||||
ifneq (,$(findstring clang,$(CC)))
|
||||
# TODO: check if linker is clang++
|
||||
# produces a lot of messages - disable it for now
|
||||
CCOMFLAGS += -fno-sanitize=alignment
|
||||
# these are false positives because of the way our delegates work
|
||||
CCOMFLAGS += -fno-sanitize=function
|
||||
# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c when this isn't disabled
|
||||
CCOMFLAGS += -fno-sanitize=shift
|
||||
# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c, src/emu/cpu/m6809/hd6309.c when this isn't disabled
|
||||
CCOMFLAGS += -fno-sanitize=object-size
|
||||
# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c, src/emu/cpu/m6809/konami.c, src/emu/cpu/m6809/hd6309.c, src/emu/video/psx.c when this isn't disabled
|
||||
CCOMFLAGS += -fno-sanitize=vptr
|
||||
# clang takes forever to compile src/emu/video/psx.c when this isn't disabled
|
||||
CCOMFLAGS += -fno-sanitize=null
|
||||
# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c when this isn't disabled
|
||||
CCOMFLAGS += -fno-sanitize=signed-integer-overflow
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(SRC)/build/cc_detection.mak
|
||||
|
||||
#-------------------------------------------------
|
||||
# include paths
|
||||
#-------------------------------------------------
|
||||
|
@ -9,6 +9,18 @@ CCOMFLAGS += -Wno-self-assign-field
|
||||
# caused by src/mame/video/jagblit.inc on older clang versions
|
||||
CCOMFLAGS += -Wno-constant-logical-operand
|
||||
|
||||
ifneq (,$(findstring undefined,$(SANITIZE)))
|
||||
# TODO: check if linker is clang++
|
||||
# produces a lot of messages - disable it for now
|
||||
CCOMFLAGS += -fno-sanitize=alignment
|
||||
# these are false positives because of the way our delegates work
|
||||
CCOMFLAGS += -fno-sanitize=function
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring memory,$(SANITIZE)))
|
||||
CCOMFLAGS += -fsanitize-memory-track-origins -fPIE
|
||||
endif
|
||||
|
||||
# TODO: needs to use $(CC)
|
||||
TEST_CLANG := $(shell clang --version)
|
||||
|
||||
@ -29,6 +41,19 @@ CCOMFLAGS += -Wno-deprecated-register -Wno-reserved-user-defined-literal -Wno-c+
|
||||
CCOMFLAGS += -Wno-unknown-warning-option
|
||||
# XCode 6.0.1 gives this when using SDL2 in /Library/Frameworks/SDL2.framework/Headers/SDL_syswm.h:150 included from src/osd/sdl/sdlinc.h
|
||||
CCOMFLAGS += -Wno-extern-c-compat
|
||||
|
||||
ifneq (,$(findstring undefined,$(SANITIZE)))
|
||||
# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c when this isn't disabled
|
||||
CCOMFLAGS += -fno-sanitize=shift
|
||||
# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c, src/emu/cpu/m6809/hd6309.c when this isn't disabled
|
||||
CCOMFLAGS += -fno-sanitize=object-size
|
||||
# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c, src/emu/cpu/m6809/konami.c, src/emu/cpu/m6809/hd6309.c, src/emu/video/psx.c when this isn't disabled
|
||||
CCOMFLAGS += -fno-sanitize=vptr
|
||||
# clang takes forever to compile src/emu/video/psx.c when this isn't disabled
|
||||
CCOMFLAGS += -fno-sanitize=null
|
||||
# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c when this isn't disabled
|
||||
CCOMFLAGS += -fno-sanitize=signed-integer-overflow
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGETOS),emscripten)
|
||||
|
@ -11,11 +11,10 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "miracle.h"
|
||||
#include "bus/midi/midi.h"
|
||||
|
||||
#define MIRACLE_MIDI_WAITING 0
|
||||
#define MIRACLE_MIDI_RECEIVE 1
|
||||
#define MIRACLE_MIDI_SEND 2
|
||||
#define MIRACLE_MIDI_RECEIVE 1 // receive byte from piano
|
||||
#define MIRACLE_MIDI_SEND 2 // send byte to piano
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
@ -25,8 +24,6 @@ const device_type NES_MIRACLE = &device_creator<nes_miracle_device>;
|
||||
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( nes_miracle )
|
||||
// MCFG_CPU_ADD("piano_cpu", I8051, XTAL_11_0592MHz) // xtal to be verified
|
||||
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MACHINE_CONFIG_END
|
||||
@ -58,9 +55,11 @@ void nes_miracle_device::device_timer(emu_timer &timer, device_timer_id id, int
|
||||
//-------------------------------------------------
|
||||
|
||||
nes_miracle_device::nes_miracle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, NES_MIRACLE, "Miracle Piano Controller", tag, owner, clock, "nes_miracle", __FILE__)
|
||||
, device_nes_control_port_interface(mconfig, *this)
|
||||
// , m_cpu(*this, "piano_cpu")
|
||||
device_t(mconfig, NES_MIRACLE, "Miracle Piano Controller", tag, owner, clock, "nes_miracle", __FILE__),
|
||||
device_serial_interface(mconfig, *this),
|
||||
device_nes_control_port_interface(mconfig, *this),
|
||||
m_midiin(*this, "mdin"),
|
||||
m_midiout(*this, "mdout")
|
||||
{
|
||||
}
|
||||
|
||||
@ -90,6 +89,14 @@ void nes_miracle_device::device_reset()
|
||||
m_sent_bits = 0;
|
||||
m_strobe_clock = 0;
|
||||
m_midi_mode = MIRACLE_MIDI_WAITING;
|
||||
|
||||
// set standard MIDI parameters
|
||||
set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1);
|
||||
set_rcv_rate(31250);
|
||||
set_tra_rate(31250);
|
||||
|
||||
m_xmit_read = m_xmit_write = 0;
|
||||
m_tx_busy = false;
|
||||
}
|
||||
|
||||
|
||||
@ -102,17 +109,8 @@ void nes_miracle_device::device_reset()
|
||||
UINT8 nes_miracle_device::read_bit0()
|
||||
{
|
||||
UINT8 ret = 0;
|
||||
if (m_strobe_clock >= 66)
|
||||
{
|
||||
// more than 66 clocks since strobe on write means send mode
|
||||
m_midi_mode = MIRACLE_MIDI_SEND;
|
||||
strobe_timer->reset();
|
||||
m_strobe_on = 0;
|
||||
m_strobe_clock = 0;
|
||||
// printf("send start\n");
|
||||
}
|
||||
|
||||
if (m_midi_mode == MIRACLE_MIDI_SEND)
|
||||
if (m_midi_mode == MIRACLE_MIDI_RECEIVE)
|
||||
{
|
||||
//NES reads from Miracle Piano!
|
||||
// ret |= ...
|
||||
@ -126,9 +124,33 @@ UINT8 nes_miracle_device::read_bit0()
|
||||
//-------------------------------------------------
|
||||
|
||||
// TODO: here, writes to serial midi in bit0, when in MIDI_RECEIVE mode
|
||||
// c4fc = start of recv routine
|
||||
// c53a = start of send routine
|
||||
|
||||
void nes_miracle_device::write(UINT8 data)
|
||||
{
|
||||
// printf("write: %d (%d %02x %d)\n", data & 1, m_sent_bits, m_data_sent, m_midi_mode);
|
||||
|
||||
if (m_midi_mode == MIRACLE_MIDI_SEND)
|
||||
{
|
||||
//NES writes (data & 1) to Miracle Piano!
|
||||
// 1st write is data present flag (1=data present)
|
||||
// next 8 writes are actual data bits (with ^1)
|
||||
m_sent_bits++;
|
||||
m_data_sent <<= 1;
|
||||
m_data_sent |= (data & 1);
|
||||
// then we go back to waiting
|
||||
if (m_sent_bits == 8)
|
||||
{
|
||||
// printf("xmit MIDI byte %02x\n", m_data_sent);
|
||||
xmit_char(m_data_sent);
|
||||
m_midi_mode = MIRACLE_MIDI_WAITING;
|
||||
m_sent_bits = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (data == 1 && !m_strobe_on)
|
||||
{
|
||||
strobe_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1));
|
||||
@ -141,38 +163,88 @@ void nes_miracle_device::write(UINT8 data)
|
||||
// was timer running?
|
||||
if (m_strobe_clock > 0)
|
||||
{
|
||||
// printf("got strobe at %d clocks\n", m_strobe_clock);
|
||||
|
||||
if (m_strobe_clock < 66 && data == 0)
|
||||
{
|
||||
// less than 66 clocks before new write means receive mode
|
||||
// short delay is recieve mode
|
||||
m_midi_mode = MIRACLE_MIDI_RECEIVE;
|
||||
// printf("receive start\n");
|
||||
strobe_timer->reset();
|
||||
m_strobe_on = 0;
|
||||
m_strobe_clock = 0;
|
||||
return;
|
||||
}
|
||||
else if (m_strobe_clock >= 66)
|
||||
{
|
||||
// more than 66 clocks since strobe on write means send mode
|
||||
m_midi_mode = MIRACLE_MIDI_SEND;
|
||||
strobe_timer->reset();
|
||||
m_strobe_on = 0;
|
||||
m_strobe_clock = 0;
|
||||
m_sent_bits = 1;
|
||||
m_data_sent <<= 1;
|
||||
m_data_sent |= (data & 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_midi_mode == MIRACLE_MIDI_SEND && data == 0)
|
||||
{
|
||||
// strobe off after the end of a byte
|
||||
m_midi_mode = MIRACLE_MIDI_WAITING;
|
||||
// printf("send end\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (m_midi_mode == MIRACLE_MIDI_RECEIVE)
|
||||
{
|
||||
//NES writes (data & 1) to Miracle Piano!
|
||||
// 1st write is data present flag (1=data present)
|
||||
// next 8 writes are actual data bits (with ^1)
|
||||
m_sent_bits++;
|
||||
// then we go back to waiting
|
||||
if (m_sent_bits == 9)
|
||||
{
|
||||
// printf("receive end\n");
|
||||
m_midi_mode = MIRACLE_MIDI_WAITING;
|
||||
m_sent_bits = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nes_miracle_device::rcv_complete() // Rx completed receiving byte
|
||||
{
|
||||
receive_register_extract();
|
||||
// UINT8 rcv = get_received_char();
|
||||
}
|
||||
|
||||
void nes_miracle_device::tra_complete() // Tx completed sending byte
|
||||
{
|
||||
// printf("Tx complete\n");
|
||||
// is there more waiting to send?
|
||||
if (m_xmit_read != m_xmit_write)
|
||||
{
|
||||
transmit_register_setup(m_xmitring[m_xmit_read++]);
|
||||
if (m_xmit_read >= XMIT_RING_SIZE)
|
||||
{
|
||||
m_xmit_read = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_tx_busy = false;
|
||||
}
|
||||
}
|
||||
|
||||
void nes_miracle_device::tra_callback() // Tx send bit
|
||||
{
|
||||
// send this to midi out
|
||||
m_midiout->write_txd(transmit_register_get_data_bit());
|
||||
}
|
||||
|
||||
void nes_miracle_device::xmit_char(UINT8 data)
|
||||
{
|
||||
// printf("xmit %02x\n", data);
|
||||
|
||||
// if tx is busy it'll pick this up automatically when it completes
|
||||
// if not, send now!
|
||||
if (!m_tx_busy)
|
||||
{
|
||||
m_tx_busy = true;
|
||||
transmit_register_setup(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
// tx is busy, it'll pick this up next time
|
||||
m_xmitring[m_xmit_write++] = data;
|
||||
if (m_xmit_write >= XMIT_RING_SIZE)
|
||||
{
|
||||
m_xmit_write = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "ctrl.h"
|
||||
//#include "cpu/mcs51/mcs51.h"
|
||||
#include "bus/midi/midi.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
@ -24,15 +24,27 @@
|
||||
// ======================> nes_miracle_device
|
||||
|
||||
class nes_miracle_device : public device_t,
|
||||
public device_serial_interface,
|
||||
public device_nes_control_port_interface
|
||||
{
|
||||
public:
|
||||
static const int XMIT_RING_SIZE = 16;
|
||||
|
||||
// construction/destruction
|
||||
nes_miracle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
// serial overrides
|
||||
virtual void rcv_complete(); // Rx completed receiving byte
|
||||
virtual void tra_complete(); // Tx completed sending byte
|
||||
virtual void tra_callback(); // Tx send bit
|
||||
|
||||
void xmit_char(UINT8 data);
|
||||
|
||||
required_device<midi_port_device> m_midiin, m_midiout;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
@ -44,9 +56,12 @@ protected:
|
||||
static const device_timer_id TIMER_STROBE_ON = 0;
|
||||
emu_timer *strobe_timer;
|
||||
|
||||
//required_device<i8051_device> m_cpu;
|
||||
int m_strobe_on, m_midi_mode, m_sent_bits;
|
||||
UINT32 m_strobe_clock;
|
||||
UINT8 m_data_sent;
|
||||
UINT8 m_xmitring[XMIT_RING_SIZE];
|
||||
int m_xmit_read, m_xmit_write;
|
||||
bool m_tx_busy;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
|
@ -229,7 +229,7 @@ GFXDECODE_END
|
||||
|
||||
static MACHINE_CONFIG_START( gumbo, gumbo_state )
|
||||
|
||||
MCFG_CPU_ADD("maincpu", M68000, 14318180 /2) // or 10mhz? ?
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_14_31818MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(gumbo_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", gumbo_state, irq1_line_hold) // all the same
|
||||
|
||||
@ -248,7 +248,7 @@ static MACHINE_CONFIG_START( gumbo, gumbo_state )
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
MCFG_OKIM6295_ADD("oki", 1122000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
|
||||
MCFG_OKIM6295_ADD("oki", XTAL_14_31818MHz/16, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.47)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.47)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -5112,6 +5112,48 @@ ROM_START( peps0364 ) /* Normal board : Red White & Blue Slots (PS0364) - Payout
|
||||
ROM_LOAD( "cap960.u50", 0x0000, 0x0100, CRC(00dd8d0a) SHA1(542763b12aeb0aec2b410f7c075c52907f45d171) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( peps0366 ) /* Normal board : Double Diamonds Deluxe Slots (PS0366) - Payout 94.99% */
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "ps0366_569-a2c.u68", 0x00000, 0x10000, CRC(32fd35c5) SHA1(8562608bc45328559b7c04ef4026384862bf2d51) ) /* 2 Coins Max / 1 Line */
|
||||
|
||||
ROM_REGION( 0x020000, "gfx1", 0 )
|
||||
ROM_LOAD( "mro-cg1303.u72", 0x00000, 0x8000, CRC(f5bcc47f) SHA1(b132960a095996d1790df4dcedf14a29169fe667) )
|
||||
ROM_LOAD( "mgo-cg1303.u73", 0x08000, 0x8000, CRC(e16cc01b) SHA1(086f2ac533d868dbaa3852516b6fef344dddff13) )
|
||||
ROM_LOAD( "mbo-cg1303.u74", 0x10000, 0x8000, CRC(2c1ffea2) SHA1(efc16869f994415a03663205ca2396e4c26e25a3) )
|
||||
ROM_LOAD( "mxo-cg1303.u75", 0x18000, 0x8000, CRC(7c4578e0) SHA1(70b6cf02225a4804592f44c90365f370fb83281a) )
|
||||
|
||||
ROM_REGION( 0x100, "proms", 0 )
|
||||
ROM_LOAD( "cap1303.u50", 0x0000, 0x0100, CRC(5341ea30) SHA1(63c8f7fa94dcb772c308b307f755a188b9b5e7eb) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( peps0372 ) /* Normal board : Double Diamonds Deluxe Slots (PS0372) - Payout 90.10% */
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "ps0372_569-a2c.u68", 0x00000, 0x10000, CRC(45573591) SHA1(0a15313af506817528eb7319a0994b6993412965) ) /* 3 Coins Max / 1 Line */
|
||||
|
||||
ROM_REGION( 0x020000, "gfx1", 0 )
|
||||
ROM_LOAD( "mro-cg1303.u72", 0x00000, 0x8000, CRC(f5bcc47f) SHA1(b132960a095996d1790df4dcedf14a29169fe667) )
|
||||
ROM_LOAD( "mgo-cg1303.u73", 0x08000, 0x8000, CRC(e16cc01b) SHA1(086f2ac533d868dbaa3852516b6fef344dddff13) )
|
||||
ROM_LOAD( "mbo-cg1303.u74", 0x10000, 0x8000, CRC(2c1ffea2) SHA1(efc16869f994415a03663205ca2396e4c26e25a3) )
|
||||
ROM_LOAD( "mxo-cg1303.u75", 0x18000, 0x8000, CRC(7c4578e0) SHA1(70b6cf02225a4804592f44c90365f370fb83281a) )
|
||||
|
||||
ROM_REGION( 0x100, "proms", 0 )
|
||||
ROM_LOAD( "cap1303.u50", 0x0000, 0x0100, CRC(5341ea30) SHA1(63c8f7fa94dcb772c308b307f755a188b9b5e7eb) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( peps0373 ) /* Normal board : Double Diamonds Deluxe Slots (PS0373) - Payout 87.56% */
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "ps0373_583-a6c.u68", 0x00000, 0x10000, CRC(085bed76) SHA1(8775f7c9654f92eab616cdda4505cbde30154889) ) /* 3 Coins Max / 1 Line */
|
||||
|
||||
ROM_REGION( 0x020000, "gfx1", 0 )
|
||||
ROM_LOAD( "mro-cg1303.u72", 0x00000, 0x8000, CRC(f5bcc47f) SHA1(b132960a095996d1790df4dcedf14a29169fe667) )
|
||||
ROM_LOAD( "mgo-cg1303.u73", 0x08000, 0x8000, CRC(e16cc01b) SHA1(086f2ac533d868dbaa3852516b6fef344dddff13) )
|
||||
ROM_LOAD( "mbo-cg1303.u74", 0x10000, 0x8000, CRC(2c1ffea2) SHA1(efc16869f994415a03663205ca2396e4c26e25a3) )
|
||||
ROM_LOAD( "mxo-cg1303.u75", 0x18000, 0x8000, CRC(7c4578e0) SHA1(70b6cf02225a4804592f44c90365f370fb83281a) )
|
||||
|
||||
ROM_REGION( 0x100, "proms", 0 )
|
||||
ROM_LOAD( "cap1303.u50", 0x0000, 0x0100, CRC(5341ea30) SHA1(63c8f7fa94dcb772c308b307f755a188b9b5e7eb) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( peps0426 ) /* Normal board : Sizzling Sevens Slots (PS0268) - Payout 90.35% */
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "ps0426_571-a3h.u68", 0x00000, 0x10000, CRC(b53771c1) SHA1(23fccd5facb98fc83b8903946435be4f15199ff8) ) /* 3 Coins Max / 1 Lines */
|
||||
@ -9248,6 +9290,9 @@ GAMEL(1996, peps0296, 0, peplus, peplus_slots, peplus_state, peplus,
|
||||
GAMEL(1996, peps0298, peps0042, peplus, peplus_slots, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PS0298) Double Diamond Slots", 0, layout_pe_slots )
|
||||
GAMEL(1996, peps0308, 0, peplus, peplus_slots, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PS0308) Double Jackpot Slots", 0, layout_pe_slots )
|
||||
GAMEL(1996, peps0364, peps0021, peplus, peplus_slots, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PS0364) Red White & Blue Slots", 0, layout_pe_slots )
|
||||
GAMEL(1996, peps0366, 0, peplus, peplus_slots, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PS0366) Double Diamond Deluxe Slots", 0, layout_pe_slots )
|
||||
GAMEL(1996, peps0372, peps0366, peplus, peplus_slots, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PS0372) Double Diamond Deluxe Slots", 0, layout_pe_slots )
|
||||
GAMEL(1996, peps0373, peps0366, peplus, peplus_slots, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PS0373) Double Diamond Deluxe Slots", 0, layout_pe_slots )
|
||||
GAMEL(1996, peps0426, 0, peplus, peplus_slots, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PS0426) Sizzling Sevens Slots", 0, layout_pe_slots )
|
||||
GAMEL(1996, peps0581, peps0021, peplus, peplus_slots, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PS0581) Red White & Blue Slots", 0, layout_pe_slots )
|
||||
GAMEL(1996, peps0615, 0, peplus, peplus_slots, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PS0615) Chaos Slots", 0, layout_pe_slots )
|
||||
|
@ -778,7 +778,6 @@ static MACHINE_CONFIG_START( psikyo3v1, psikyosh_state )
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(64*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 28*8-1)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(psikyosh_state, screen_update_psikyosh)
|
||||
@ -813,9 +812,10 @@ static MACHINE_CONFIG_DERIVED( psikyo5_240, psikyo3v1 )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(ps5_map)
|
||||
|
||||
/* Measured Hsync 16.165 KHz, Vsync 61.68 Hz */
|
||||
/* Ideally this would be driven off the video register. However, it doesn't changeat runtime and MAME will pick a better screen resolution if it knows upfront */
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 30*8-1)
|
||||
MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/8, 443, 0, 40*8, 262, 0, 30*8)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -10,7 +10,8 @@
|
||||
dumb security check, decompressing a single string.
|
||||
|
||||
Each channel appears to be connected to a different set of ROMs, however there is
|
||||
defintiely only 315-5838 single chip.
|
||||
defintiely only a single 315-5838 chip. (could the different channels actually just
|
||||
be mirror addresses, with part of the address determining the ROMs to use?)
|
||||
|
||||
Dead of Alive only uses a single channel, and has the source data in RAM, not ROM.
|
||||
This is similar to how some 5881 games were set up, with the ST-V versions decrypting
|
||||
@ -18,7 +19,7 @@
|
||||
|
||||
Looking at the values read I don't think there is any address based encryption, for
|
||||
example many blocks where you'd expect a zero fill start with repeating patterns
|
||||
of 8f708f70 (different lengths) which would appear to relate to compressed 0x00 data
|
||||
of 8f708f70 (different lengths) channel would appear to relate to compressed 0x00 data
|
||||
|
||||
read addr 0071253c, blah_r 8f708f70 - read count count 00000004
|
||||
read addr 00712540, blah_r 8f708f70 - read count count 00000008
|
||||
@ -46,21 +47,25 @@ sega_315_5838_comp_device::sega_315_5838_comp_device(const machine_config &mconf
|
||||
|
||||
void sega_315_5838_comp_device::device_start()
|
||||
{
|
||||
m_decathlt_lastcount = 0;
|
||||
m_decathlt_prot_uploadmode = 0;
|
||||
m_decathlt_prot_uploadoffset = 0;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
m_channel[i].m_decathlt_lastcount = 0;
|
||||
m_channel[i].m_decathlt_prot_uploadmode = 0;
|
||||
m_channel[i].m_decathlt_prot_uploadoffset = 0;
|
||||
m_channel[i].m_read_ch.bind_relative_to(*owner());
|
||||
|
||||
m_read_ch1.bind_relative_to(*owner());
|
||||
m_read_ch2.bind_relative_to(*owner());
|
||||
}
|
||||
}
|
||||
|
||||
void sega_315_5838_comp_device::device_reset()
|
||||
{
|
||||
memset(m_decathlt_protregs, 0, sizeof(m_decathlt_protregs));
|
||||
m_decathlt_lastcount = 0;
|
||||
m_decathlt_prot_uploadmode = 0;
|
||||
m_decathlt_prot_uploadoffset = 0;
|
||||
m_decathlt_part = 1;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
m_channel[i].m_srcoffset = 0;
|
||||
m_channel[i].m_decathlt_lastcount = 0;
|
||||
m_channel[i].m_decathlt_prot_uploadmode = 0;
|
||||
m_channel[i].m_decathlt_prot_uploadoffset = 0;
|
||||
}
|
||||
|
||||
m_protstate = 0;
|
||||
}
|
||||
@ -77,281 +82,235 @@ FILE* tempfile;
|
||||
#endif
|
||||
|
||||
|
||||
READ32_MEMBER(sega_315_5838_comp_device::decathlt_prot_r)
|
||||
READ32_MEMBER(sega_315_5838_comp_device::decathlt_prot1_r)
|
||||
{
|
||||
return genericdecathlt_prot_r(offset, mem_mask, 0);
|
||||
return genericdecathlt_prot_r(mem_mask, 0);
|
||||
}
|
||||
|
||||
READ32_MEMBER(sega_315_5838_comp_device::decathlt_prot_ch2_r)
|
||||
READ32_MEMBER(sega_315_5838_comp_device::decathlt_prot2_r)
|
||||
{
|
||||
return genericdecathlt_prot_r(offset, mem_mask, 1);
|
||||
return genericdecathlt_prot_r(mem_mask, 1);
|
||||
}
|
||||
|
||||
|
||||
UINT32 sega_315_5838_comp_device::genericdecathlt_prot_r(UINT32 offset, UINT32 mem_mask, int which)
|
||||
UINT32 sega_315_5838_comp_device::genericdecathlt_prot_r(UINT32 mem_mask, int channel)
|
||||
{
|
||||
|
||||
// UINT32 *fake0 = (UINT32*)memregion( ":fake0" )->base();
|
||||
// UINT32 retvalue = 0xffff;
|
||||
|
||||
if (offset==2)
|
||||
switch (m_channel[channel].m_srcoffset)
|
||||
{
|
||||
// UINT32 retvalue = 0xffff;
|
||||
default:
|
||||
|
||||
switch (m_decathlt_protregs[0])
|
||||
{
|
||||
default:
|
||||
m_channel[channel].m_decathlt_lastcount++;
|
||||
|
||||
m_decathlt_lastcount++;
|
||||
UINT32 tempdata = 0;
|
||||
tempdata |= m_channel[channel].m_read_ch(m_channel[channel].m_srcoffset) << 0;
|
||||
m_channel[channel].m_srcoffset++;
|
||||
tempdata |= m_channel[channel].m_read_ch(m_channel[channel].m_srcoffset) << 16;
|
||||
m_channel[channel].m_srcoffset++;
|
||||
|
||||
UINT32 tempdata = 0;
|
||||
|
||||
if (which == 0)
|
||||
{
|
||||
tempdata |= m_read_ch1(m_decathlt_protregs[0]) << 16;
|
||||
m_decathlt_protregs[0]++;
|
||||
tempdata |= m_read_ch1(m_decathlt_protregs[0]) << 0;
|
||||
m_decathlt_protregs[0]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempdata |= m_read_ch2(m_decathlt_protregs[0]) << 16;
|
||||
m_decathlt_protregs[0]++;
|
||||
tempdata |= m_read_ch2(m_decathlt_protregs[0]) << 0;
|
||||
m_decathlt_protregs[0]++;
|
||||
}
|
||||
#ifdef DEBUG_DATA_DUMP
|
||||
//printf("read addr %08x, blah_r %08x - read count count %08x\n", m_channel[channel].m_srcoffset*2, tempdata, m_channel[channel].m_decathlt_lastcount*4);
|
||||
fwrite(&tempdata, 1, 4, tempfile);
|
||||
#else
|
||||
logerror("read addr %08x, blah_r %08x - read count count %08x\n", m_channel[channel].m_srcoffset*2, tempdata, m_channel[channel].m_decathlt_lastcount*4);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_DATA_DUMP
|
||||
//printf("read addr %08x, blah_r %08x - read count count %08x\n", m_decathlt_protregs[0]*2, tempdata, m_decathlt_lastcount*4);
|
||||
fwrite(&tempdata, 1, 4, tempfile);
|
||||
#else
|
||||
logerror("read addr %08x, blah_r %08x - read count count %08x\n", m_decathlt_protregs[0]*2, tempdata, m_decathlt_lastcount*4);
|
||||
#endif
|
||||
|
||||
return tempdata;
|
||||
return tempdata;
|
||||
#if 0
|
||||
case 0x03228e4:
|
||||
if (fake0) retvalue = fake0[(((0x20080/4)+m_decathlt_lastcount))];
|
||||
m_decathlt_lastcount++;
|
||||
return retvalue;
|
||||
case 0x03228e4:
|
||||
if (fake0) retvalue = fake0[(((0x20080/4)+m_channel[channel].m_decathlt_lastcount))];
|
||||
m_channel[channel].m_decathlt_lastcount++;
|
||||
return retvalue;
|
||||
|
||||
case 0x00a9f3a:
|
||||
if (fake0) retvalue = fake0[(((0x00000/4)+m_decathlt_lastcount))];
|
||||
m_decathlt_lastcount++;
|
||||
return retvalue;
|
||||
case 0x00a9f3a:
|
||||
if (fake0) retvalue = fake0[(((0x00000/4)+m_channel[channel].m_decathlt_lastcount))];
|
||||
m_channel[channel].m_decathlt_lastcount++;
|
||||
return retvalue;
|
||||
|
||||
case 0x0213ab4:
|
||||
if (fake0) retvalue = fake0[(((0x40000/4)+m_decathlt_lastcount))];
|
||||
m_decathlt_lastcount++;
|
||||
return retvalue;
|
||||
case 0x0213ab4:
|
||||
if (fake0) retvalue = fake0[(((0x40000/4)+m_channel[channel].m_decathlt_lastcount))];
|
||||
m_channel[channel].m_decathlt_lastcount++;
|
||||
return retvalue;
|
||||
|
||||
case 0x01efaf0:
|
||||
if (fake0) retvalue = fake0[(((0x60000/4)+m_decathlt_lastcount))];
|
||||
m_decathlt_lastcount++;
|
||||
return retvalue;
|
||||
case 0x01efaf0:
|
||||
if (fake0) retvalue = fake0[(((0x60000/4)+m_channel[channel].m_decathlt_lastcount))];
|
||||
m_channel[channel].m_decathlt_lastcount++;
|
||||
return retvalue;
|
||||
|
||||
case 0x033f16c:
|
||||
case 0x038929c:
|
||||
case 0x033f16c:
|
||||
case 0x038929c:
|
||||
|
||||
|
||||
|
||||
case 0x00de05a:
|
||||
case 0x0334258:
|
||||
case 0x019fb82:
|
||||
case 0x033dbf6:
|
||||
case 0x0011ac6:
|
||||
case 0x00060dc:
|
||||
case 0x0000002:
|
||||
case 0x0008c90:
|
||||
case 0x035cdc8:
|
||||
case 0x0327960:
|
||||
case 0x0329b8c:
|
||||
case 0x00d6e92:
|
||||
case 0x000081e:
|
||||
case 0x00035d6:
|
||||
case 0x00089a6:
|
||||
case 0x03315f4:
|
||||
case 0x0023fe0:
|
||||
case 0x001e290:
|
||||
case 0x0026e86:
|
||||
case 0x0012494:
|
||||
case 0x001b35a:
|
||||
case 0x0018424:
|
||||
case 0x00de05a:
|
||||
case 0x0334258:
|
||||
case 0x019fb82:
|
||||
case 0x033dbf6:
|
||||
case 0x0011ac6:
|
||||
case 0x00060dc:
|
||||
case 0x0000002:
|
||||
case 0x0008c90:
|
||||
case 0x035cdc8:
|
||||
case 0x0327960:
|
||||
case 0x0329b8c:
|
||||
case 0x00d6e92:
|
||||
case 0x000081e:
|
||||
case 0x00035d6:
|
||||
case 0x00089a6:
|
||||
case 0x03315f4:
|
||||
case 0x0023fe0:
|
||||
case 0x001e290:
|
||||
case 0x0026e86:
|
||||
case 0x0012494:
|
||||
case 0x001b35a:
|
||||
case 0x0018424:
|
||||
|
||||
return retvalue;
|
||||
return retvalue;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0xffffffff;
|
||||
}
|
||||
|
||||
void sega_315_5838_comp_device::set_prot_addr(UINT32 data, UINT32 mem_mask, int channel)
|
||||
{
|
||||
// printf("set_prot_addr\n");
|
||||
COMBINE_DATA(&m_channel[channel].m_srcoffset);
|
||||
|
||||
//if (m_decathlt_part==0) logerror("%d, last read count was %06x\n",channel, m_channel[channel].m_decathlt_lastcount*4);
|
||||
m_channel[channel].m_decathlt_lastcount = 0;
|
||||
|
||||
if (mem_mask == 0x0000ffff)
|
||||
{
|
||||
printf("set source address to %08x (channel %d)\n", m_channel[channel].m_srcoffset, channel);
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG_DATA_DUMP
|
||||
if (mem_mask == 0x0000ffff)
|
||||
{
|
||||
if (tempfile)
|
||||
fclose(tempfile);
|
||||
|
||||
char filename[256];
|
||||
sprintf(filename, "%d_compressed_%08x", channel, m_channel[channel].m_srcoffset * 2);
|
||||
tempfile = fopen(filename, "w+b");
|
||||
|
||||
// the table and dictionary are uploaded repeatedly, usually before groups of data transfers but
|
||||
// it's always the same tables (one pair for each channel)
|
||||
{
|
||||
FILE* fp;
|
||||
sprintf(filename, "%d_compressed_table1", channel);
|
||||
fp = fopen(filename, "w+b");
|
||||
fwrite(&m_channel[channel].m_decathlt_prottable1, 24, 2, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
{
|
||||
FILE* fp;
|
||||
sprintf(filename, "%d_compressed_dictionary", channel);
|
||||
fp = fopen(filename, "w+b");
|
||||
fwrite(&m_channel[channel].m_decathlt_dictionary, 128, 2, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void sega_315_5838_comp_device::set_upload_mode(UINT16 data, int channel)
|
||||
{
|
||||
if ((data == 0x8000) || (data == 0x0000))
|
||||
{
|
||||
// logerror("changed to upload mode 1\n");
|
||||
m_channel[channel].m_decathlt_prot_uploadmode = 1;
|
||||
m_channel[channel].m_decathlt_prot_uploadoffset = 0;
|
||||
}
|
||||
else if ((data == 0x8080) || (data == 0x0080))
|
||||
{
|
||||
m_channel[channel].m_decathlt_prot_uploadmode = 2;
|
||||
m_channel[channel].m_decathlt_prot_uploadoffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
logerror("%06x Decathlete prot R offset %04x mask %08x regs %08x, %08x, %08x, %08x\n", safe_pc(), offset, mem_mask, m_decathlt_protregs[0], m_decathlt_protregs[1], m_decathlt_protregs[2], m_decathlt_protregs[3]);
|
||||
fatalerror("unknown upload mode\n");
|
||||
}
|
||||
|
||||
return m_decathlt_protregs[offset];
|
||||
}
|
||||
|
||||
|
||||
void sega_315_5838_comp_device::write_prot_data(UINT32 data, UINT32 mem_mask, int offset, int which)
|
||||
void sega_315_5838_comp_device::upload_table_data(UINT16 data, int channel)
|
||||
{
|
||||
|
||||
printf("write_prot_data %08x %08x %08x\n", offset, data, mem_mask);
|
||||
|
||||
m_decathlt_protregs[offset] = (data&mem_mask)|(m_decathlt_protregs[offset]&~mem_mask);
|
||||
// m_decathlt_protregs[0] = 0x0c00000/4;
|
||||
|
||||
if (offset==0) // seems to set a source address
|
||||
if (m_channel[channel].m_decathlt_prot_uploadmode == 1)
|
||||
{
|
||||
m_decathlt_part ^=1;
|
||||
|
||||
//if (m_decathlt_part==0) logerror("%d, last read count was %06x\n",which, m_decathlt_lastcount*4);
|
||||
m_decathlt_lastcount = 0;
|
||||
if (m_decathlt_part==1) logerror("%d Decathlete prot W offset %04x data %08x, %08x, >>> regs %08x <<<<, %08x, %08x, %08x\n",which, offset, data, m_decathlt_protregs[0], m_decathlt_protregs[0]*4, m_decathlt_protregs[1], m_decathlt_protregs[2], m_decathlt_protregs[3]);
|
||||
|
||||
#ifdef DEBUG_DATA_DUMP
|
||||
if (mem_mask == 0x0000ffff)
|
||||
if (m_channel[channel].m_decathlt_prot_uploadoffset >= 24)
|
||||
{
|
||||
if (tempfile)
|
||||
fclose(tempfile);
|
||||
|
||||
char filename[256];
|
||||
sprintf(filename, "%d_compressed_%08x", which, m_decathlt_protregs[0] );
|
||||
tempfile = fopen(filename, "w+b");
|
||||
fatalerror("upload mode 1 error, too big\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
//logerror("uploading table 1 %04x %04x\n",m_channel[channel].m_decathlt_prot_uploadoffset, data&0xffff);
|
||||
m_channel[channel].m_decathlt_prottable1[m_channel[channel].m_decathlt_prot_uploadoffset] = data & 0xffff;
|
||||
m_channel[channel].m_decathlt_prot_uploadoffset++;
|
||||
printf("unk table 1 %04x (channel %d)\n", data & 0xffff, channel);
|
||||
}
|
||||
|
||||
if (offset==1) // uploads 2 tables...
|
||||
else if (m_channel[channel].m_decathlt_prot_uploadmode == 2)
|
||||
{
|
||||
if (mem_mask==0xffff0000)
|
||||
if (m_channel[channel].m_decathlt_prot_uploadoffset >= 128)
|
||||
{
|
||||
if (data == 0x80000000)
|
||||
{
|
||||
// logerror("changed to upload mode 1\n");
|
||||
m_decathlt_prot_uploadmode = 1;
|
||||
m_decathlt_prot_uploadoffset = 0;
|
||||
}
|
||||
else if (data == 0x80800000)
|
||||
{
|
||||
// logerror("changed to upload mode 2\n");
|
||||
m_decathlt_prot_uploadmode = 2;
|
||||
m_decathlt_prot_uploadoffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// logerror("unknown upload mode\n");
|
||||
m_decathlt_prot_uploadmode = 2;
|
||||
m_decathlt_prot_uploadoffset = 0;
|
||||
}
|
||||
|
||||
// logerror("ARGH! %08x %08x\n",mem_mask,data);
|
||||
fatalerror("upload mode 2 error, too big\n");
|
||||
return;
|
||||
}
|
||||
else if (mem_mask==0x0000ffff)
|
||||
{
|
||||
if (m_decathlt_prot_uploadmode==1)
|
||||
{
|
||||
if (m_decathlt_prot_uploadoffset>=24)
|
||||
{
|
||||
// logerror("upload mode 1 error, too big\n");
|
||||
return;
|
||||
}
|
||||
|
||||
//logerror("uploading table 1 %04x %04x\n",m_decathlt_prot_uploadoffset, data&0xffff);
|
||||
m_decathlt_prottable1[m_decathlt_prot_uploadoffset]=data&0xffff;
|
||||
m_decathlt_prot_uploadoffset++;
|
||||
|
||||
printf("table 1 %04x\n", data & 0xffff);
|
||||
|
||||
{
|
||||
/* 0x18 (24) values in this table, rom data is 0x1800000 long, maybe it has
|
||||
something to do with that? or 24-address b its?
|
||||
|
||||
uploaded values appear to be 12-bit, some are repeated
|
||||
*/
|
||||
|
||||
{
|
||||
FILE* fp;
|
||||
if (which==1) fp = fopen("table1x","wb");
|
||||
else fp = fopen("table1","wb");
|
||||
|
||||
{
|
||||
fwrite(&m_decathlt_prottable1,24,2,fp);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (m_decathlt_prot_uploadmode==2)
|
||||
{
|
||||
if (m_decathlt_prot_uploadoffset>=128)
|
||||
{
|
||||
//logerror("upload mode 2 error, too big\n");
|
||||
return;
|
||||
}
|
||||
|
||||
//logerror("uploading table 2 %04x %04x\n",m_decathlt_prot_uploadoffset, data&0xffff);
|
||||
m_decathlt_prottable2[m_decathlt_prot_uploadoffset]=data&0xffff;
|
||||
m_decathlt_prot_uploadoffset++;
|
||||
|
||||
printf("dictionary %04x\n", data & 0xffff);
|
||||
|
||||
|
||||
{
|
||||
/* the table uploaded here is a 256 byte table with 256 unique values, remaps something? */
|
||||
|
||||
{
|
||||
FILE* fp;
|
||||
if (which==1) fp = fopen("table2x","wb");
|
||||
else fp = fopen("table2","wb");
|
||||
|
||||
{
|
||||
fwrite(&m_decathlt_prottable2,128,2,fp);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// logerror("unknown upload mode!\n");
|
||||
}
|
||||
}
|
||||
//logerror("uploading table 2 %04x %04x\n",m_channel[channel].m_decathlt_prot_uploadoffset, data&0xffff);
|
||||
m_channel[channel].m_decathlt_dictionary[m_channel[channel].m_decathlt_prot_uploadoffset] = data & 0xffff;
|
||||
m_channel[channel].m_decathlt_prot_uploadoffset++;
|
||||
printf("dictionary %04x (channel %d)\n", data & 0xffff, channel);
|
||||
}
|
||||
|
||||
if (offset>1)
|
||||
{
|
||||
// logerror("higher offset write\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
WRITE32_MEMBER( sega_315_5838_comp_device::decathlt_prot1_w )
|
||||
void sega_315_5838_comp_device::write_prot_data(UINT32 data, UINT32 mem_mask, int channel, int rev_words)
|
||||
{
|
||||
write_prot_data(data,mem_mask, offset, 0);
|
||||
|
||||
if (mem_mask==0xffff0000)
|
||||
{
|
||||
if (rev_words==0) set_upload_mode(data >> 16, channel);
|
||||
else upload_table_data(data >>16, channel);
|
||||
}
|
||||
else if (mem_mask == 0x0000ffff)
|
||||
{
|
||||
if (rev_words==0) upload_table_data(data & 0xffff, channel);
|
||||
else set_upload_mode(data & 0xffff, channel);
|
||||
}
|
||||
else
|
||||
{
|
||||
fatalerror("write_prot_data invalid mem_mask\b");
|
||||
}
|
||||
}
|
||||
|
||||
WRITE32_MEMBER( sega_315_5838_comp_device::decathlt_prot2_w )
|
||||
{
|
||||
write_prot_data(data,mem_mask, offset, 1);
|
||||
|
||||
|
||||
}
|
||||
WRITE32_MEMBER( sega_315_5838_comp_device::decathlt_prot1_w_doa ) { write_prot_data(data, mem_mask, 0, 1); }
|
||||
WRITE32_MEMBER( sega_315_5838_comp_device::decathlt_prot1_w) { write_prot_data(data, mem_mask, 0, 0); }
|
||||
WRITE32_MEMBER( sega_315_5838_comp_device::decathlt_prot2_w) { write_prot_data(data, mem_mask, 1, 0); }
|
||||
|
||||
WRITE32_MEMBER( sega_315_5838_comp_device::decathlt_prot1_srcaddr_w ) { set_prot_addr(data, mem_mask, 0); }
|
||||
WRITE32_MEMBER( sega_315_5838_comp_device::decathlt_prot2_srcaddr_w) { set_prot_addr(data, mem_mask, 1); }
|
||||
|
||||
|
||||
void sega_315_5838_comp_device::install_decathlt_protection()
|
||||
{
|
||||
/* It uploads 2 tables here, then performs what looks like a number of transfers, setting
|
||||
a source address of some kind (scrambled?) and then making many reads from a single address */
|
||||
|
||||
//todo, install these in the driver, they differ between games
|
||||
cpu_device* cpu = (cpu_device*)machine().device(":maincpu");
|
||||
|
||||
cpu->space(AS_PROGRAM).install_write_handler(0x37FFFF0, 0x37FFFF3, write32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot1_srcaddr_w), this)); // set compressed data source address
|
||||
cpu->space(AS_PROGRAM).install_write_handler(0x37FFFF4, 0x37FFFF7, write32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot1_w), this)); // upload tables
|
||||
cpu->space(AS_PROGRAM).install_read_handler(0x37FFFF8, 0x37FFFFb, read32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot1_r), this)); // read decompressed data
|
||||
|
||||
cpu->space(AS_PROGRAM).install_readwrite_handler(0x37FFFF0, 0x37FFFFF, read32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot_r), this), write32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot1_w), this));
|
||||
/* It accesses the device at this address too, with different tables, for the game textures, should it just act like a mirror, or a secondary device? */
|
||||
cpu->space(AS_PROGRAM).install_readwrite_handler(0x27FFFF0, 0x27FFFFF, read32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot_ch2_r), this), write32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot2_w), this));
|
||||
// the device is addressed here too, uploading a different set of tables and accessing a different part of ROM
|
||||
cpu->space(AS_PROGRAM).install_write_handler(0x27FFFF0, 0x27FFFF3, write32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot2_srcaddr_w), this)); // set compressed data source address
|
||||
cpu->space(AS_PROGRAM).install_write_handler(0x27FFFF4, 0x27FFFF7, write32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot2_w), this)); // upload tables
|
||||
cpu->space(AS_PROGRAM).install_read_handler(0x27FFFF8, 0x27FFFFb, read32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot2_r), this)); // read decompressed data
|
||||
}
|
||||
|
||||
|
||||
@ -387,15 +346,7 @@ WRITE32_MEMBER(sega_315_5838_comp_device::doa_prot_w)
|
||||
{
|
||||
printf("doa_prot_w %08x %08x %08x\n", offset*4, data, mem_mask);
|
||||
|
||||
if (offset == 0x7ff2 / 4)
|
||||
{
|
||||
if (data == 0)
|
||||
{
|
||||
m_protstate = 0;
|
||||
strcpy((char *)m_protram, " TECMO LTD. DEAD OR ALIVE 1996.10.22 VER. 1.00"); // this is the single decompressed string DOA needs
|
||||
}
|
||||
}
|
||||
else logerror("Unhandled Protection WRITE %x @ %x mask %x (PC=%x)\n", data, offset, mem_mask, space.device().safe_pc());
|
||||
m_protstate = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -403,5 +354,13 @@ void sega_315_5838_comp_device::install_doa_protection()
|
||||
{
|
||||
//todo, install these in the driver, they differ between games
|
||||
cpu_device* cpu = (cpu_device*)machine().device(":maincpu");
|
||||
|
||||
m_protstate = 0;
|
||||
strcpy((char *)m_protram, " TECMO LTD. DEAD OR ALIVE 1996.10.22 VER. 1.00"); // this is the single decompressed string DOA needs, note, 2 spaces at start, might indicate a dummy read like with 5881 on Model 2
|
||||
|
||||
cpu->space(AS_PROGRAM).install_readwrite_handler(0x01d80000, 0x01dfffff, read32_delegate(FUNC(sega_315_5838_comp_device::doa_prot_r), this), write32_delegate(FUNC(sega_315_5838_comp_device::doa_prot_w), this));
|
||||
cpu->space(AS_PROGRAM).install_write_handler(0x01d87ff0, 0x01d87ff3, write32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot1_srcaddr_w), this)); // set compressed data source address (always set 0, data is in RAM)
|
||||
cpu->space(AS_PROGRAM).install_write_handler(0x01d87ff4, 0x01d87ff7, write32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot1_w_doa), this)); // upload tab
|
||||
// cpu->space(AS_PROGRAM).install_read_handler(0x01d87ff8, 0x01d87ffb, read32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot1_r), this)); // read decompressed data
|
||||
|
||||
}
|
@ -4,6 +4,8 @@
|
||||
#ifndef __SEGA315_5838_COMP__
|
||||
#define __SEGA315_5838_COMP__
|
||||
|
||||
#define CHANNELS 2
|
||||
|
||||
typedef device_delegate<UINT16 (UINT32)> sega_dec_read_delegate;
|
||||
|
||||
extern const device_type SEGA315_5838_COMP;
|
||||
@ -20,28 +22,36 @@ public:
|
||||
// construction/destruction
|
||||
sega_315_5838_comp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
sega_dec_read_delegate m_read_ch1;
|
||||
sega_dec_read_delegate m_read_ch2;
|
||||
|
||||
static void set_read_cb_ch1(device_t &device,sega_dec_read_delegate readcb)
|
||||
{
|
||||
sega_315_5838_comp_device &dev = downcast<sega_315_5838_comp_device &>(device);
|
||||
dev.m_read_ch1 = readcb;
|
||||
dev.m_channel[0].m_read_ch = readcb;
|
||||
}
|
||||
|
||||
static void set_read_cb_ch2(device_t &device,sega_dec_read_delegate readcb)
|
||||
{
|
||||
sega_315_5838_comp_device &dev = downcast<sega_315_5838_comp_device &>(device);
|
||||
dev.m_read_ch2 = readcb;
|
||||
dev.m_channel[1].m_read_ch = readcb;
|
||||
}
|
||||
|
||||
DECLARE_READ32_MEMBER(decathlt_prot_r);
|
||||
DECLARE_READ32_MEMBER(decathlt_prot_ch2_r);;
|
||||
UINT32 genericdecathlt_prot_r(UINT32 offset, UINT32 mem_mask, int which);
|
||||
DECLARE_READ32_MEMBER(decathlt_prot1_r);
|
||||
DECLARE_READ32_MEMBER(decathlt_prot2_r);;
|
||||
UINT32 genericdecathlt_prot_r(UINT32 mem_mask, int channel);
|
||||
|
||||
void write_prot_data(UINT32 data, UINT32 mem_mask, int offset, int which);
|
||||
void write_prot_data(UINT32 data, UINT32 mem_mask, int channel, int rev_words);
|
||||
|
||||
void upload_table_data(UINT16 data, int channel);
|
||||
void set_upload_mode(UINT16 data, int channel);
|
||||
void set_prot_addr(UINT32 data, UINT32 mem_mask, int channel);
|
||||
|
||||
DECLARE_WRITE32_MEMBER(decathlt_prot1_w_doa);
|
||||
DECLARE_WRITE32_MEMBER(decathlt_prot1_w);
|
||||
DECLARE_WRITE32_MEMBER(decathlt_prot2_w);
|
||||
DECLARE_WRITE32_MEMBER(decathlt_prot1_srcaddr_w);
|
||||
DECLARE_WRITE32_MEMBER(decathlt_prot2_srcaddr_w);
|
||||
|
||||
void install_decathlt_protection();
|
||||
void install_doa_protection();
|
||||
|
||||
@ -55,13 +65,22 @@ protected:
|
||||
private:
|
||||
|
||||
// Decathlete specific variables and functions (see machine/decathlt.c)
|
||||
UINT32 m_decathlt_protregs[4];
|
||||
UINT32 m_decathlt_lastcount;
|
||||
UINT32 m_decathlt_part;
|
||||
UINT32 m_decathlt_prot_uploadmode;
|
||||
UINT32 m_decathlt_prot_uploadoffset;
|
||||
UINT16 m_decathlt_prottable1[24];
|
||||
UINT16 m_decathlt_prottable2[128];
|
||||
struct channel_type
|
||||
{
|
||||
UINT32 m_srcoffset;
|
||||
UINT16 m_decathlt_prottable1[24];
|
||||
UINT16 m_decathlt_dictionary[128];
|
||||
|
||||
UINT32 m_decathlt_lastcount;
|
||||
UINT32 m_decathlt_prot_uploadmode;
|
||||
UINT32 m_decathlt_prot_uploadoffset;
|
||||
sega_dec_read_delegate m_read_ch;
|
||||
|
||||
};
|
||||
|
||||
channel_type m_channel[2];
|
||||
|
||||
|
||||
|
||||
// Doa
|
||||
int m_protstate;
|
||||
|
@ -11217,6 +11217,9 @@ peps0296 // (c) 1996 IGT - International Game Technology
|
||||
peps0298 // (c) 1996 IGT - International Game Technology
|
||||
peps0308 // (c) 1996 IGT - International Game Technology
|
||||
peps0364 // (c) 1996 IGT - International Game Technology
|
||||
peps0366 // (c) 1996 IGT - International Game Technology
|
||||
peps0372 // (c) 1996 IGT - International Game Technology
|
||||
peps0373 // (c) 1996 IGT - International Game Technology
|
||||
peps0426 // (c) 1996 IGT - International Game Technology
|
||||
peps0581 // (c) 1996 IGT - International Game Technology
|
||||
peps0615 // (c) 1996 IGT - International Game Technology
|
||||
|
@ -484,6 +484,10 @@ void bw12_state::machine_start()
|
||||
save_item(NAME(m_motor_on));
|
||||
save_item(NAME(m_motor0));
|
||||
save_item(NAME(m_motor1));
|
||||
save_item(NAME(m_centronics_busy));
|
||||
save_item(NAME(m_centronics_fault));
|
||||
save_item(NAME(m_centronics_perror));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(bw12_state::bankswitch), this));
|
||||
}
|
||||
|
||||
void bw12_state::machine_reset()
|
||||
|
@ -758,7 +758,7 @@ ROM_START( vt101 ) // p/n 5414185-01 'unupgradable/low cost' vt101/vt102/vt131 m
|
||||
// does not have integrated STP or AVO populated
|
||||
// 8085 based instead of I8080
|
||||
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "23-???e4-00.e71", 0x0000, 0x2000, NO_DUMP) // rom is unique to vt101
|
||||
ROM_LOAD( "23-028e4-00.e71", 0x0000, 0x2000, NO_DUMP) // rom is unique to vt101; "CN55004N 8232 // DEC TP03 // 23-028E4-00" 24-pin mask rom (mc68764 pinout)
|
||||
//e69 socket is empty/unpopulated on vt101?
|
||||
//e67 socket is empty/unpopulated on vt101?
|
||||
|
||||
|
@ -13,7 +13,6 @@
|
||||
|
||||
#if (defined(SDLMAME_EMSCRIPTEN))
|
||||
|
||||
#include "js_sound.h"
|
||||
#include "emscripten.h"
|
||||
|
||||
class sound_js : public osd_module, public sound_module
|
||||
|
@ -227,7 +227,7 @@ void sdlvideo_monitor_refresh(sdl_monitor_info *monitor)
|
||||
SDL_VideoDriverName(monitor->monitor_device, sizeof(monitor->monitor_device)-1);
|
||||
if (first_call==0)
|
||||
{
|
||||
char *dimstr = osd_getenv(SDLENV_DESKTOPDIM);
|
||||
const char *dimstr = osd_getenv(SDLENV_DESKTOPDIM);
|
||||
const SDL_VideoInfo *sdl_vi;
|
||||
|
||||
sdl_vi = SDL_GetVideoInfo();
|
||||
|
Loading…
Reference in New Issue
Block a user