EDIT: Dawgz Rule posted an easier solution below. I included the full solution in my post below.
Hi,
I was admiring rockyrocket's Tempest(ish) caberet cab
http://forum.arcadecontrols.com/index.php/topic,123455.0Since he put on Battle Zone stickers and only has one joystick I wanted to recommend the single joystick control Battle Zone MAME patch.
I read his thread again and it seems he is using the AAE Emulator which I think still has the single joystick hack.
But now I want to have the Battle Zone single stick hack in my MAME setup.
EDIT: Dawgz Rule posted an easier solution below. I included the full solution in my post below.
I found the 141u1 patch here
http://forum.arcadecontrols.com/index.php/topic,108813.msg1155082.html but it does not work with 147 sources as things are different now.
I manually put the changes into the new source code.
The input_port_read() no longer exists in MAME. More on this here:
http://mame.dorando.at/svn/?start=16119
I tried to use the ioport function but don't quite understand how to translate the changes into the new MAME format.
This is what the patch adds/changes in the Battle Zone code:
mame/audio/bzone.c:/* Translation table for one-joystick emulation */
static UINT8 one_joy_trans[] =
{
0x00,0x0A,0x05,0x00,0x06,0x02,0x04,0x00,
0x09,0x08,0x01,0x00,0x00,0x00,0x00,0x00
};
static READ8_DEVICE_HANDLER( bzone_IN3_r )
{
int res = input_port_read(device->machine, "IN3");
if (input_port_read(device->machine, "SELECT") == 1)
res |= one_joy_trans[input_port_read(device->machine, "FAKE") & 0x0f];
return res;
}
static const pokey_interface bzone_pokey_interface =
{
{ DEVCB_NULL },
DEVCB_HANDLER(bzone_IN3_r)
};
mame/drivers/bzone.c:static INPUT_PORTS_START( bzone )
BZONEIN0
BZONEDSW0
BZONEDSW1
PORT_START("IN3")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_2WAY PORT_CONDITION("SELECT",0x01,EQUALS,0x00)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_2WAY PORT_CONDITION("SELECT",0x01,EQUALS,0x00)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_2WAY PORT_CONDITION("SELECT",0x01,EQUALS,0x00)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_2WAY PORT_CONDITION("SELECT",0x01,EQUALS,0x00)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("SELECT")
PORT_CONFNAME( 0x01, 0x00, "Controller Type" )
PORT_CONFSETTING( 0x00, "Real" )
PORT_CONFSETTING( 0x01, "8-way Joystick" )
PORT_START("FAKE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_CONDITION("SELECT",0x01,EQUALS,0x01)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_CONDITION("SELECT",0x01,EQUALS,0x01)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_CONDITION("SELECT",0x01,EQUALS,0x01)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_CONDITION("SELECT",0x01,EQUALS,0x01)
BZONEADJ
INPUT_PORTS_END
The diff file is here
http://forum.arcadecontrols.com/index.php?action=dlattach;topic=108813.0;attach=160066Can this single stick Battle Zone hack be made to work with current MAME?
Thanks!
EDIT: Dawgz Rule posted an easier solution below. I included the full solution in my post below.