Author Topic: V-Liner  (Read 4813 times)

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
V-Liner
« on: December 28, 2004, 08:29:40 AM »
Well.

I try the 2 V-Liner games drivers that I compile on FBA.

Both have an error on the switches.

Mosty it looking for the switches anyway on FBA.

It won't work on FBA correcty that most of us beleave on the switches.

It the same error that IQ show on his website. :)

Offline neo04

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-0
V-Liner
« Reply #1 on: December 28, 2004, 10:11:42 AM »
this is a mame driver by HalRIN (beta)

Code: [Select]

INPUT_PORTS_START( vliner )
PORT_START_TAG("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) // this should be button4 for better inputs

PORT_START_TAG("IN1")

PORT_START_TAG("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* memory card inserted */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* memory card write protection */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

NGIN3

PORT_START_TAG("IN4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )

PORT_START_TAG("IN5")

NGIN6

INPUT_PORTS_END


static data16_t neogeo_sram16_2[0x2000];

READ16_HANDLER( neogeo_sram16_2_r )
{
return neogeo_sram16_2[offset];
}

WRITE16_HANDLER( neogeo_sram16_2_w )
{
COMBINE_DATA(&neogeo_sram16_2[offset]);
}

READ16_HANDLER( vliner_2c0000_r )
{
return 0x0003;
}

READ16_HANDLER( vliner_coins_r )
{
data16_t res;
res = readinputport(4);

if( !Machine->sample_rate ){
res |= 0x0100;
}

return res;
}

READ16_HANDLER( vliner_timer16_r )
{
data16_t res;
int coinflip = pd4990a_testbit_r(0);
int databit = pd4990a_databit_r(0);

res = 0x3f ^ (coinflip << 6) ^ (databit << 7);

if( Machine->sample_rate ){
res |= result_code << 8;
if (pending_command) res &= 0x7fff;
}

return res;
}


DRIVER_INIT( vliner )
{
init_neogeo();

memory_install_read16_handler( 0, ADDRESS_SPACE_PROGRAM, 0x200000, 0x201fff, 0, 0, neogeo_sram16_2_r );
memory_install_write16_handler( 0, ADDRESS_SPACE_PROGRAM, 0x200000, 0x201fff, 0, 0, neogeo_sram16_2_w );

// memory_install_write16_handler( 0, ADDRESS_SPACE_PROGRAM, 0x240000, 0x240001, 0, 0, vliner_240000_w ); unknown

memory_install_read16_handler( 0, ADDRESS_SPACE_PROGRAM, 0x320000, 0x320001, 0, 0, vliner_timer16_r );
memory_install_read16_handler( 0, ADDRESS_SPACE_PROGRAM, 0x280000, 0x280001, 0, 0, vliner_coins_r );
memory_install_read16_handler( 0, ADDRESS_SPACE_PROGRAM, 0x2c0000, 0x2c0001, 0, 0, vliner_2c0000_r );
}


maybe iq can change it to fba code..:P

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
V-Liner
« Reply #2 on: December 28, 2004, 10:44:24 AM »
Some of that code does not work for me in Mame and I have it working without part of it anyway.
IQ Forum Member