Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Mamehooker : Output is 80 instead of 1  (Read 2907 times)

0 Members and 1 Guest are viewing this topic.

Iro

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:June 14, 2020, 01:39:51 pm
Mamehooker : Output is 80 instead of 1
« on: October 29, 2019, 04:03:36 pm »
Hello,
I'm using Mamehooker 5.1 and Mame 0.213
In some games , the output for ON is not 1 but 80.
So when it's 0/1 , %s% work, but not with 0/80.
How can I resolve this problem ?

Thank you :)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker : Output is 80 instead of 1
« Reply #1 on: October 29, 2019, 10:04:21 pm »
Which game and which output?

Iro

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:June 14, 2020, 01:39:51 pm
Re: Mamehooker : Output is 80 instead of 1
« Reply #2 on: October 30, 2019, 03:00:31 pm »
Hello,
On Ken Sei Mogura for example , for molex_x.
I  tried molea_1=uls 1 2 0|uls 1 2 1 but it still not work
Thank you :)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker : Output is 80 instead of 1
« Reply #3 on: October 30, 2019, 04:16:31 pm »
The best that I can tell the mole outputs on that game are controlling the motors for the moles and NOT lights.  This is why it comes up as 80.  1 does not always equate to "on" in every situation.  You can use the buffer math operations to see if the value is greater than 1 and the resulting value placed in the buffer will be 0 if false and 1 if true.  Then you run your light function with The buffer state instead of the regular state. 

Iro

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:June 14, 2020, 01:39:51 pm
Re: Mamehooker : Output is 80 instead of 1
« Reply #4 on: October 31, 2019, 06:00:52 am »
OK thanks
So I tried the buffer math opération but i don't understand how it works  :-[
Where I put the command bmo %s% > 1 1  (put the result of state value greater than one in buffer 1) ?

I tried
Code: [Select]
[General]
MameStart=bmo %s% > 1 1
...
[Output]
molea_0=uls 1 34 sbf 1
Mamehoker crashed

Code: [Select]
[General]
MameStart=
...
[Output]
molea_0=uls 1 34 %s%|uls 1 34 bmo %s% > 1 1
or
molea_0=uls 1 34 0|uls 1 34 bmo %s% > 1 1
or
molea_0=uls 1 34 %s%|uls 1 34 %s% -79
or
molea_0=uls 1 34 bmo %s% > 1
Nothings worked :(

Thank you :)
« Last Edit: October 31, 2019, 06:35:26 am by Iro »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker : Output is 80 instead of 1
« Reply #5 on: October 31, 2019, 01:01:52 pm »
That's not how it works.  The bmo function has to be called.... then you put a comma, and then you do the function you were wanting to call only use %b#%, where "#" equals the buffer you stored it in, instead of "%s%"

I teach people to fish, I don't hand them out.  I'll try to write a tutorial this weekend if I get time. 

Iro

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:June 14, 2020, 01:39:51 pm
Re: Mamehooker : Output is 80 instead of 1
« Reply #6 on: November 01, 2019, 04:29:08 am »
Hello so I tried
molea_0=bmo %s% > 1 1,uls 1 2 %b1%
It works for one but not for all and I had weird behavior.
And if I understand, i should set one different buffer for each output ? If yes, it will miss buffers.
Anyway, I took the problem the other way : I compiled a specific mame to output 1 instead of 80  :lol :lol
And it works now.
But I you have time, I think a tutorial for the  bmo will be helpful.

Thank you  :cheers:

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker : Output is 80 instead of 1
« Reply #7 on: November 01, 2019, 02:10:01 pm »
It should be

molea_0=bmo %s% > 0, uls 1 2 %b1% 

but other than that it's fine.  It might be pulling the buffer state from the previous read though.... I need to get a new version out as the last public build is horribly outdated.  I'll run a couple of tests this weekend.