SeongGino / QMamehook

Mamehook at home:
GNU Lesser General Public License v2.1
7 stars 1 forks source link

Read full string from network output generated by OutputBlaster #4

Open l3giona1re opened 2 months ago

l3giona1re commented 2 months ago

In testing QMAMEHOOK with OutputBlaster ([https://github.com/Boomslangnz/OutputBlaster]), I see that outputblaster sends the output to the network port as full strings like so:

Waiting for MAME-compatible Network Output @ localhost:8000 ...
Connected to output server instance!
Detected game name:
"Transformers Human Alliance"
Loading: "D:/Tools/Mame Hooker/ini/MAME/Transformers Human Alliance.ini"
Opened port no 1
"LampStart = 0"
"VisualChange2D/3D = 0"
"Boost Lamp = 0"
"Shoot2p = 0"
"1p Controller Lamp = 0"
"2p Controller Lamp = 0"
"1p Brake Lamp = 0"
"2p Brake Lamp = 1"
"Emblem Lamp Red = 1"
"Emblem Lamp Green = 1"
"Emblem Lamp Blue = 0"
"Intake Left = 1"
"LampStart = 1"

QMameHook, would create the "Transformers Human Alliance.ini" if none is available and from what we can see in there it only includes the first word of the string, which makes me think that QMamehook doesn't parse the full string correctly:

MameStart="cmo 1 baud=9600_parity=N_data=8_stop=1", "cmo 2 baud=9600_parity=N_data=8_stop=1", cmw 1 S6M1x2M3x1, cmw 2 S6M1x2M3x1
MameStop=cmw 1 M1x1M3x0E, cmw 2 M1x1M3x0E, cmc 1, cmc 2
StateChange=
OnRotate=
OnPause=

[KeyStates]
RefreshTime=

[Output]
LampStart=
VisualChange2D\3D=
Boost=
Shoot2p=cmw 1 F2x0xF0x0 | cmw 1 F2x1xF0x1
Emblem=
Intake=
1p=
2p=

Note: the command to provide feedback for "Shoot2p" output does work.

Could Qmamehook please support parsing the string sent by outputblaster. This would enable integration/support for Teknoparrot games.

SeongGino commented 2 months ago

Sounds more like an out-of-spec implementation on the server's side, as no other network implem uses whitespace in the names.

l3giona1re commented 2 months ago

ok, I'll submit an issue with outputblaster then