Mamehooker

Having technical difficulties with Supermodel? Last-minute wardrobe malfunction? Get help here.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Mamehooker

Postby gareth_iowc » Sun Jun 28, 2020 1:31 pm

Hi all,

Is anyone using mamehooker? I have it working with over emulators but not SM3.

I'm using r779 release and starting it with "supermodel.exe -outputs=win Roms\dayto2pe.zip -res=1024,768" with no joy. I'm sure I had it working some time ago.

supermodel.exe is set to run as admin the same as mamehooker
gareth_iowc
 
Posts: 37
Joined: Sat Nov 17, 2012 1:02 pm

Re: Mamehooker

Postby Spindizzi » Mon Jun 29, 2020 1:59 am

Hi,
I don't use Mamehooker, but my own software to read outputs from supermodel and mame.

supermodel outputs are working normally (-outputs=win). tested on rev803 and an arduino
Spindizzi
 
Posts: 196
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Mamehooker

Postby gareth_iowc » Mon Jun 29, 2020 1:57 pm

Confirmed working 803 :) thanks
gareth_iowc
 
Posts: 37
Joined: Sat Nov 17, 2012 1:02 pm

Re: Mamehooker

Postby sonic32 » Sat Jan 23, 2021 2:40 am

Hi,

I will try to use Ardulino Mega for lighting (VR, etc ..) lighting

I use the Program (Sumo.exe) Spindizzi is the creator - Thanks :)

So far we work, only one game (outruners) MAME
And it works badly, only the internal diode (TX) still flashes for all outputs from this game.

I uploaded this program to Ardulin, the only thing I found on the internet,
----------------------------------------------------------------------------------------------
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();
}
}
}
--------------------------------------------------------------------------
Please can anyone advise how to adjust it to work properly.

I have Ardulino for 3 days and I'm just learning .. :oops:
User avatar
sonic32
 
Posts: 169
Joined: Tue Dec 20, 2011 11:43 am
Location: Slovakia

Re: Mamehooker

Postby Spindizzi » Sun Jan 24, 2021 1:53 am

hi,
I use 115200bauds (hardcoded) so you need to init arduino with
Serial.begin(115200);

after, just follow the pseudo code in the read me

loop until receive '='
if next character 'L' read 3 other characters (state and lamp number)
process data
output the processed data
return to main loop
if next character 'D' read 4 other characters (digit number and value)
process data
output the processed data
return to main loop
Spindizzi
 
Posts: 196
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Mamehooker

Postby sonic32 » Sun Jan 24, 2021 6:04 am

Well thank you Spindizzi :)

I have to create my own pseudocode to Ardulino according to the instructions in readme.txt

To make Ardulino work properly .
User avatar
sonic32
 
Posts: 169
Joined: Tue Dec 20, 2011 11:43 am
Location: Slovakia

Re: Mamehooker

Postby Spindizzi » Mon Jan 25, 2021 12:05 am

very simple sketch to use

you have just to use the defined variables to suit your needs (output data y to out number x)

Code: Select all
/*************************************************/
/* Simple sketch example                         */
/* this file is a part of the project SUMO       */
/* SUMO: Simple Use of Mame Output               */
/* created by spindizzi (c)2019                  */
/*************************************************/

int digits=0,leds=0,leds_state=0,digit_number=0;

int ReceivedChar;


void setup()
{
Serial.begin(115200);
}


void loop()
{
if (Serial.available())
  {
  ReceivedChar = getChar();
  //delay(100);
  if (ReceivedChar == '=')
    {
    traitement_trame();
    }
  }
}


char getChar()
{
  while(Serial.available() == 0);
  return((char)Serial.read());
}

void traitement_trame()
{
  String str_leds,str_leds_state,str_digits,str_digit_number;
 
  ReceivedChar = getChar();
  switch (ReceivedChar)
  {
  case 'L':
    {
    str_leds="";
    str_leds_state="";
    str_leds_state+=getChar();
    str_leds+=getChar();
    str_leds+=getChar();
    leds=str_leds.toInt();
    leds=leds-1;
    leds_state=str_leds_state.toInt();

    // do what you want with the datas
    // leds : value 0 to 99 represents the led number
    // leds_state : state of the led (0 -> off, 1 -> on)

    break;
    }
   
  case 'D':
  {
    str_digits="";
    str_digit_number="";
    str_digit_number+=getChar();
    str_digits+=getChar();
    str_digits+=getChar();
    str_digits+=getChar();
    digits=str_digits.toInt();
    digit_number=str_digit_number.toInt();
   
    // do what you want with the datas
    // digits : value 0 to 255 (if bits=1 -> on, if bits=0 -> off)
    // digit_number : the number of the digit to use
     
    break;
    }
  }
}

Spindizzi
 
Posts: 196
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Mamehooker

Postby sonic32 » Mon Jan 25, 2021 5:02 am

Well thank you Spindizzi

Great, it works, :shock:

Thank you, for the pseudocode, it works perfectly ..
User avatar
sonic32
 
Posts: 169
Joined: Tue Dec 20, 2011 11:43 am
Location: Slovakia

Re: Mamehooker

Postby sonic32 » Mon Jan 25, 2021 12:23 pm

Great work, the outputs work wonderfully :shock:

VR lights move from left to right and then vice versa, exactly copying the game.

Race Loaders flashes great, I have to use stronger lights

Thanks for that Spindizzi
User avatar
sonic32
 
Posts: 169
Joined: Tue Dec 20, 2011 11:43 am
Location: Slovakia


Return to The Fitting Room

Who is online

Users browsing this forum: No registered users and 1 guest

cron