so wondering around the internet i found that some folks at MFME forums have managed to use an arduino mega as an ipac and it seems to work like a charm, them some dude named eric claimed he used all the time with mame. im trying to set this up and it works just fine.
code for using arduino on mamehooker is simple:
void setup() {
Serial.begin(9600);
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(54, INPUT);
pinMode(55, OUTPUT);
}
void loop() {
while (Serial.available() > 0) {
int pin = Serial.parseInt();
int value = Serial.parseInt();
if (Serial.read() == 'x') {
digitalWrite(pin, value);
Serial.println();
}
}
}
now after that i just modify the rom ini with something like
[General]
MameStart=cmo 4 baud=9600_parity=N_data=8_stop=1
MameStop=cmc 4
StateChange=
OnRotate=
OnPause=
[KeyStates]
RefreshTime=
[Output]
lamp1=cmw 4 2., cmw 4 %s%, cmw 4 x
lamp2=cmw 4 3., cmw 4 %s%, cmw 4 x
lamp3=cmw 4 4., cmw 4 %s%, cmw 4 x
lamp4=cmw 4 5., cmw 4 %s%, cmw 4 x
lamp5=cmw 4 6., cmw 4 %s%, cmw 4 x
lamp8=cmw 4 9., cmw 4 %s%, cmw 4 x
lamp6=cmw 4 7., cmw 4 %s%, cmw 4 x
lamp0=
lamp9=cmw 4 10., cmw 4 %s%, cmw 4 x
lamp12=cmw 4 13., cmw 4 %s%, cmw 4 x
lamp7=cmw 4 8., cmw 4 %s%, cmw 4 x
lamp10=cmw 4 11., cmw 4 %s%, cmw 4 x
lamp11=cmw 4 12., cmw 4 %s%, cmw 4 x
lamp13=cmw 4 13., cmw 4 %s%, cmw 4 x
lamps work like a charm.
I just need help with one thing i can not figure out,the hopper, i would like the output 55 to be the hopper trigger so on pin 55 should stay on, not flashing until input 54 wich is the sensor sends a number of pulses, anyway heres the code hope someone can help me out. thanks