(MESS) sms: fixed light phaser support through the gender adapter

and adopted RAM init pattern on Export consoles too (Korean systems
are acknowledged as Export and some Korean games rely on this)
[Enik Land]
This commit is contained in:
Fabio Priuli 2014-03-25 08:06:59 +00:00
parent da231b40e7
commit e0633e84ac
7 changed files with 29 additions and 28 deletions

View File

@ -1,6 +1,6 @@
/**********************************************************************
Sega Master System "Sports Pad" emulation
Sega Master System "Sports Pad" (US model) emulation
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.
@ -112,7 +112,7 @@ ioport_constructor sms_sports_pad_device::device_input_ports() const
//-------------------------------------------------
sms_sports_pad_device::sms_sports_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, SMS_SPORTS_PAD, "Sports Pad", tag, owner, clock, "sms_sports_pad", __FILE__),
device_t(mconfig, SMS_SPORTS_PAD, "Sports Pad US", tag, owner, clock, "sms_sports_pad", __FILE__),
device_sms_control_port_interface(mconfig, *this),
m_sports_in(*this, "SPORTS_IN"),
m_sports_out(*this, "SPORTS_OUT"),

View File

@ -1,6 +1,6 @@
/**********************************************************************
Sega Master System "Sports Pad" emulation
Sega Master System "Sports Pad" (US model) emulation
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.

View File

@ -58,6 +58,14 @@ READ8_MEMBER(sms_gender_adapter_device::read_ram)
return m_subslot->read_ram(space, offset);
}
int sms_gender_adapter_device::get_lphaser_xoffs()
{
if (m_subslot->m_cart)
return m_subslot->m_cart->get_lphaser_xoffs();
else
return 0;
}
//-------------------------------------------------
// write

View File

@ -40,6 +40,8 @@ public:
virtual DECLARE_READ8_MEMBER(read_ram);
virtual DECLARE_WRITE8_MEMBER(write_ram);
virtual int get_lphaser_xoffs();
protected:
// device-level overrides
virtual void device_start();

View File

@ -97,6 +97,14 @@ READ8_MEMBER(sms_expansion_slot_device::read_ram)
return 0xff;
}
int sms_expansion_slot_device::get_lphaser_xoffs()
{
if (m_device)
return m_device->get_lphaser_xoffs();
else
return 0;
}
//-------------------------------------------------
// write
@ -120,15 +128,6 @@ WRITE8_MEMBER(sms_expansion_slot_device::write_ram)
m_device->write_ram(space, offset, data);
}
int sms_expansion_slot_device::get_lphaser_xoffs()
{
if (m_device)
return m_device->get_lphaser_xoffs();
else
return 0;
}
//-------------------------------------------------
// SLOT_INTERFACE( sms_expansion_devices )

View File

@ -198,11 +198,7 @@ public:
DECLARE_WRITE8_MEMBER(sms_store_control_w);
DECLARE_DRIVER_INIT(smssdisp);
DECLARE_READ8_MEMBER(store_read_0000);
DECLARE_READ8_MEMBER(store_read_4000);
DECLARE_READ8_MEMBER(store_read_8000);
DECLARE_READ8_MEMBER(store_cart_peek);
DECLARE_WRITE8_MEMBER(store_write_cart);
DECLARE_WRITE_LINE_MEMBER(sms_store_int_callback);
};

View File

@ -767,18 +767,14 @@ MACHINE_START_MEMBER(sms_state,sms)
{
m_mainram = auto_alloc_array_clear(machine(), UINT8, 0x2000);
save_pointer(NAME(m_mainram), 0x2000);
}
// alibaba and blockhol are ports of games for the MSX system. The
// MSX bios usually initializes callback "vectors" at the top of RAM.
// The code in alibaba does not do this so the IRQ vector only contains
// the "call $4010" without a following RET statement. That is basically
// a bug in the program code. The only way this cartridge could have run
// successfully on a real unit is if the RAM would be initialized with
// a F0 pattern on power up; F0 = RET P. Do that only for consoles of
// Japan region (including Korea), until confirmed on other consoles.
if (m_is_region_japan)
{
// alibaba and blockhol are ports of games for the MSX system. The
// MSX bios usually initializes callback "vectors" at the top of RAM.
// The code in alibaba does not do this so the IRQ vector only contains
// the "call $4010" without a following RET statement. That is basically
// a bug in the program code. The only way this cartridge could have run
// successfully on a real unit is if the RAM would be initialized with
// a F0 pattern on power up; F0 = RET P.
memset(m_mainram, 0xf0, 0x2000);
}
@ -900,7 +896,7 @@ WRITE8_MEMBER(smssdisp_state::sms_store_cart_select_w)
// each slot of the pair, to enable the first where a ROM was found?
slottype = data & 0x08;
logerror("switching in part of %s slot #%d\n", slottype ? "card" : "cartridge", slot );
logerror("switching in part of %s slot #%d\n", slottype ? "card" : "cartridge", slot);
}