I added more verbose traces for the communication when using the videoampcmd.exe command line tool.
If Calamity reads this topic, maybe he can find this information helpful to add the support for the videoamp into switchres/groovymame.
Here are some outputs of examples commands, all in text format.
Get status from the board at COM4 baudrate 500000:
$ ./VideoampCmd.exe -status -verbose
[USBSerial] Opened port COM4 at 500000
[USBSerial] SEND>>U
[USBSerial] RECV<<Mhsy=0 frq=0.00 dip=0 min=0.00 max=0.00 edi=0
[USBSerial] SEND>>F
[USBSerial] RECV<<Mfmi0=14500.00 fma0=16000.00 fen0=0 fmi1=23500.00 fma1=25500.00 fen1=0 fmi2=29000.00 fma2=31500.00 fen2=0 fmi3=0.00 fma3=80000.00 fen3=0
[USBSerial] SEND>>$get edidmode
[USBSerial] RECV<<Medidmode=801
[USBSerial] SEND>>$get edidpid
[USBSerial] RECV<<Medidpid=5
[USBSerial] SEND>>$get edidseg
[USBSerial] RECV<<Medidseg=1
Status:
Firmware ver.= 0.3.2.24
Board type= 0x0
Serial number= 0x0
Sync active= 0
Current Freq= 0.00
DIP switches= 0000
Min Frequency= 0.00
Max Frequency= 0.00
EDID Bus Read= 0
EDID VideoMode= 0x0801
EDID ProductID= 0x0005
EDID Segments= 1
[USBSerial] Closing port COM4
Now more explanations on the text commands we can see:
- the board wait for a first character that is either a command by itself, or a "long" command starting with a special "$" character.
- the board replies with messages starting by letter "M" (for Message)
- "U" command returns : hsync (hsy) enable (1) or not (0), current measured hsync frequency (frq), Dip switch position (dip), current filter range (min)/(max), number of reads of the EDID performed by the computer (edi)
- "F" command returns the 4 filter banks parameters: min (fmi0), max (fma0), always enabled (fen0)
- "$get edidmode" long command to get EDID mode of the board (reserved for internal use).
- "$get edidpid" long command to get EDID product ID (reserved for internal use).
- "$get edidset" long command to get EDID buffer size expressed in 128-bytes segments.
Set a 128 bytes EDID from a file "generic_15.bin" (obtained from switchres) into the board's eprom, still at COM4 baudrate 500000:
$ ./VideoampCmd.exe -edid generic_15.bin -verbose
[USBSerial] Opened port COM4 at 500000
Set EDID mode to external
[USBSerial] SEND>>$set edidmode=0801
[USBSerial] RECV<<MSet uint16 edidmode to 0x801
EDID to write:
0x0000: 00 FF FF FF FF FF FF 00 4E F2 00 00 00 00 00 00
0x0010: 05 1F 01 03 6D 30 24 78 0A 5E C0 A4 59 4A 98 25
0x0020: 20 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
0x0030: 01 01 01 01 01 01 8B 02 40 60 10 F0 15 00 0D 1F
0x0040: 23 00 E5 6C 11 00 00 18 00 00 00 FF 00 53 77 69
0x0050: 74 63 68 72 65 73 32 30 30 0A 00 00 00 FD 00 31
0x0060: 41 0F 0F FF 00 0A 20 20 20 20 20 20 00 00 00 FC
0x0070: 00 67 65 6E 65 72 69 63 5F 31 35 00 00 0A 00 05
Number of 128-bytes segments: 1
[USBSerial] SEND>>$set edidseg=0001
[USBSerial] RECV<<MSet uint8 edidseg to 0x1
[USBSerial] SEND>>$setedid 0000 00 FF FF FF FF FF FF 00 4E F2 00 00 00 00 00 00
[USBSerial] RECV<<MEDID set at 0x0000: 00 FF FF FF FF FF FF 00 4E F2 00 00 00 00 00 00
[USBSerial] SEND>>$setedid 0010 05 1F 01 03 6D 30 24 78 0A 5E C0 A4 59 4A 98 25
[USBSerial] RECV<<MEDID set at 0x0010: 05 1F 01 03 6D 30 24 78 0A 5E C0 A4 59 4A 98 25
[USBSerial] SEND>>$setedid 0020 20 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
[USBSerial] RECV<<MEDID set at 0x0020: 20 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
[USBSerial] SEND>>$setedid 0030 01 01 01 01 01 01 8B 02 40 60 10 F0 15 00 0D 1F
[USBSerial] RECV<<MEDID set at 0x0030: 01 01 01 01 01 01 8B 02 40 60 10 F0 15 00 0D 1F
[USBSerial] SEND>>$setedid 0040 23 00 E5 6C 11 00 00 18 00 00 00 FF 00 53 77 69
[USBSerial] RECV<<MEDID set at 0x0040: 23 00 E5 6C 11 00 00 18 00 00 00 FF 00 53 77 69
[USBSerial] SEND>>$setedid 0050 74 63 68 72 65 73 32 30 30 0A 00 00 00 FD 00 31
[USBSerial] RECV<<MEDID set at 0x0050: 74 63 68 72 65 73 32 30 30 0A 00 00 00 FD 00 31
[USBSerial] SEND>>$setedid 0060 41 0F 0F FF 00 0A 20 20 20 20 20 20 00 00 00 FC
[USBSerial] RECV<<MEDID set at 0x0060: 41 0F 0F FF 00 0A 20 20 20 20 20 20 00 00 00 FC
[USBSerial] SEND>>$setedid 0070 00 67 65 6E 65 72 69 63 5F 31 35 00 00 0A 00 05
[USBSerial] RECV<<MEDID set at 0x0070: 00 67 65 6E 65 72 69 63 5F 31 35 00 00 0A 00 05
[USBSerial] SEND>>$savecfg
[USBSerial] Closing port COM4
Here are the explanations:
- the protocol always expects unsigned hex digits (2/4/8 depending on the integer) or float32 values.
- to set a value, a long command using "$" is needed.
- to set the EDID data, many chunks of 16 bytes in hex is used.
- "$set edidmode=0801" long command set the edidmode value to hex 0801 (external binary EDID).
- "$set edidseg=0001" long command set the number of 128bytes segments for the EDID to hex 0001 (1 segment of 128 bytes).
- "$setedid 0000 00 FF FF FF FF FF FF 00 4E F2 00 00 00 00 00 00" long command set 16 bytes of the EDID binary buffer at offset 0x0000 to the bytes 00 FF FF FF FF FF FF 00 4E F2 00 00 00 00 00 00.
- "$savecfg" save the current edid configuration (mode and segment number) to internal eprom.