Sry but it is not working.
Also it was not what i wanted to achieve.
I found the part where i can start from. Its this file -->mame\src\mame\drivers\ksys573.cpp
Somwhere here are the controlls for the I/O i supose:
/* punch mania */
ADC083X_INPUT_CB(konami573_cassette_xi_device::punchmania_inputs_callback)
{
ksys573_state *state = machine().driver_data<ksys573_state>();
double *pad_position = state->m_pad_position;
int pads = state->m_pads->read();
for( int i = 0; i < 6; i++ )
{
if( ( pads & ( 1 << i ) ) != 0 )
{
pad_position[ i ] = 5;
}
}
switch( input )
{
case ADC083X_CH0:
return pad_position[ 0 ]; /* Left Top */
case ADC083X_CH1:
return pad_position[ 1 ]; /* Left Middle */
case ADC083X_CH2:
return pad_position[ 2 ]; /* Left Bottom */
case ADC083X_CH3:
return pad_position[ 3 ]; /* Right Top */
case ADC083X_CH4:
return pad_position[ 4 ]; /* Right Middle */
case ADC083X_CH5:
return pad_position[ 5 ]; /* Right Bottom */
case ADC083X_COM:
return 0;
case ADC083X_VREF:
return 5;
}
return 5;
}
static MACHINE_CONFIG_FRAGMENT( punchmania_cassette_install )
MCFG_DEVICE_MODIFY( "adc0838" )
MCFG_ADC083X_INPUT_CB( konami573_cassette_xi_device, punchmania_inputs_callback )
MACHINE_CONFIG_END
int pad_light[ 6 ];
WRITE8_MEMBER( ksys573_state::punchmania_output_callback )
{
double *pad_position = m_pad_position;
char pad[ 7 ];
switch( offset )
{
case 8:
output_set_value( "select left right", !data );
break;
case 9:
pad_light[ 2 ] = !data;
output_set_value( "left bottom lamp", !data );
break;
case 10:
pad_light[ 1 ] = !data;
output_set_value( "left middle lamp", !data );
break;
case 11:
output_set_value( "start lamp", !data );
break;
case 12:
pad_light[ 0 ] = !data;
output_set_value( "left top lamp", !data );
break;
case 13:
pad_light[ 4 ] = !data;
output_set_value( "right middle lamp", !data );
break;
case 14:
pad_light[ 3 ] = !data;
output_set_value( "right top lamp", !data );
break;
case 15:
pad_light[ 5 ] = !data;
output_set_value( "right bottom lamp", !data );
break;
case 16:
if( data )
{
pad_position[ 0 ] = 0; // left top motor +
}
break;
case 17:
if( data )
{
pad_position[ 1 ] = 0; // left middle motor +
}
break;
case 18:
if( data )
{
pad_position[ 1 ] = 5; // left middle motor -
}
break;
case 19:
if( data )
{
pad_position[ 0 ] = 5; // left top motor -
}
break;
case 20:
if( data )
{
pad_position[ 2 ] = 0; // left bottom motor +
}
break;
case 21:
if( data )
{
pad_position[ 3 ] = 5; // right top motor -
}
break;
case 22:
if( data )
{
pad_position[ 3 ] = 0; // right top motor +
}
break;
case 23:
if( data )
{
pad_position[ 2 ] = 5; // left bottom motor -
}
break;
case 26:
if( data )
{
pad_position[ 5 ] = 0; // right bottom motor +
}
break;
case 27:
if( data )
{
pad_position[ 4 ] = 0; // right middle motor +
}
break;
case 30:
if( data )
{
pad_position[ 4 ] = 5; // right middle motor -
}
break;
case 31:
if( data )
{
pad_position[ 5 ] = 5; // right bottom motor -
}
break;
}
sprintf( pad, "%d%d%d%d%d%d",
( int )pad_position[ 0 ], ( int )pad_position[ 1 ], ( int )pad_position[ 2 ],
( int )pad_position[ 3 ], ( int )pad_position[ 4 ], ( int )pad_position[ 5 ] );
if( pad_light[ 0 ] ) pad[ 0 ] = '*';
if( pad_light[ 1 ] ) pad[ 1 ] = '*';
if( pad_light[ 2 ] ) pad[ 2 ] = '*';
if( pad_light[ 3 ] ) pad[ 3 ] = '*';
if( pad_light[ 4 ] ) pad[ 4 ] = '*';
if( pad_light[ 5 ] ) pad[ 5 ] = '*';
popmessage( "%s", pad );
}
DRIVER_INIT_MEMBER( ksys573_state,pnchmn )
{
gx700pwfbf_init( &ksys573_state::punchmania_output_callback );
}
I will tinker around and try to get those motor I/Os to work and aply some hooks to them.... also need to recompile mame now xD.
Is it the right file where i can mess with the motors? First i want to simulate their behaiviour and then make I/Os to put real motors instead.
If someone has this cabinet could you plz contact me. I need some verification on how the cabinet "should" work.