Erster Commit: nativer Linux-Port aus macOS-Bytecode
Läuft die Voice Acoustic VA-Remotecontrol (AllDSP AllControl) nativ unter Linux auf echtem wxGTK 3.0 — ohne Wine und ohne dekompilierten App-Code. Ausgeführt wird das unveränderte Python-2.7-Bytecode aus dem macOS-.app; C-Extensions (wxGTK/numpy/ scipy/PortAudio) kommen nativ aus Debian stretch. Enthält: va/ (Original-.pyc + pure-Python-Libs + Assets + launch.py mit den drei Linux-Fixes), Dockerfile/run.sh/entrypoint.sh, reference/ (dekompilierter Quellcode zum Debuggen) und README/STATUS. img.cache (378 MB, regenerierbar) ist per .gitignore ausgeschlossen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,402 @@
|
||||
# uncompyle6 version 3.9.3
|
||||
# Python bytecode version base 2.6 (62161)
|
||||
# Decompiled from: Python 3.9.25 (main, Oct 31 2025, 23:16:49)
|
||||
# [GCC 14.2.0]
|
||||
# Embedded file name: user_config_display.pyc
|
||||
# Compiled at: 2025-03-06 16:11:21
|
||||
import wx, os, data_model, traceback, one_unit, ConfigParser, protocol, sys, select_keys, select_units, d_protocol, mytime
|
||||
from definitions import *
|
||||
from user_config_helpers import *
|
||||
primaryDisplayTypes = {0: 'None', 1: 'D2', 2: 'D3', 3: 'D4', 5: 'PLP', 6: 'XM', 7: 'Reserved', 8: 'CP88'}
|
||||
secondaryDisplayTypes = {0: 'None', 4: 'IO2', 6: 'XM'}
|
||||
displayNavigationStyles = {0: 'No Menu', 1: '2 Buttons and one Rotary Encoder (e.g. D2)', 2: '6 Buttons and one Rotary Encoder (e.g. PLP)'}
|
||||
lclkTypes = {0: 'Default', 1: 'LCLK 1', 2: 'LCLK 2', 3: 'LCLK 3'}
|
||||
displayLineInfoChoices = {0: 'Default',
|
||||
1: 'Unit Name',
|
||||
2: 'Preset Name',
|
||||
3: 'IP Address',
|
||||
4: 'MAC Address',
|
||||
5: 'Temperature',
|
||||
6: 'Nothing',
|
||||
7: 'Sample rate',
|
||||
8: 'AVB Listener State',
|
||||
9: 'DSP Model Name',
|
||||
10: 'DSP Assembly Model Name',
|
||||
11: 'Amplifier Assembly Model Name',
|
||||
12: 'End Product Model Name',
|
||||
13: 'DSP Version String',
|
||||
14: 'DSP Assembly Version String',
|
||||
15: 'Amplifier Assembly Version String',
|
||||
16: 'End Product Version String',
|
||||
30: 'Skip (do not overwrite)',
|
||||
31: '"Initializing..."'}
|
||||
displayInputSignalChoices = {0: 'GPI 2', 1: 'GPI 1', 2: 'D_MISO', 3: 'GPI 0'}
|
||||
|
||||
def getString(str):
|
||||
return one_unit.getString(str)
|
||||
|
||||
|
||||
class displayConfiguration(wx.Panel):
|
||||
|
||||
def __init__(self, parent, frame, uiNumber, panelName):
|
||||
self.frame = frame
|
||||
self.name = panelName
|
||||
self.uiNumber = uiNumber
|
||||
self.parent = parent
|
||||
self.lines = {}
|
||||
wx.Panel.__init__(self, parent, size=(964, 600))
|
||||
self.lines = {0: (self.createLine(0))}
|
||||
self.initFinished = False
|
||||
self.Show(True)
|
||||
return
|
||||
|
||||
def initMe(self, force=False):
|
||||
if self.IsShown() == False and force == False:
|
||||
return
|
||||
if self.initFinished == True:
|
||||
return 0
|
||||
print mytime.displayTime(), 'ucd.initMe configDisplay', self.name
|
||||
self.checkBoxes = {}
|
||||
frame = self.frame
|
||||
uiNumber = self.uiNumber
|
||||
self.uiKeys = getKeys(frame, uiNumber)
|
||||
try:
|
||||
for uiIndex in self.uiKeys:
|
||||
(key, val) = self.uiKeys[uiIndex]
|
||||
if key.channel == 1 and key.num == 128:
|
||||
continue
|
||||
if val[1] == 5:
|
||||
p = self.lines[0]
|
||||
p.key = key
|
||||
p.checkBox.SetValue(1)
|
||||
p.primaryDisplayChoice.SetStringSelection(primaryDisplayTypes[val[2] & 15])
|
||||
p.displayInBitChoice.SetStringSelection(displayInputSignalChoices[val[2] >> 4 & 3])
|
||||
p.secondaryDisplayChoice.SetStringSelection(secondaryDisplayTypes[val[3] & 15])
|
||||
p.displayNavigationChoice.SetStringSelection(displayNavigationStyles[val[4] & 3])
|
||||
flags = val[5]
|
||||
if flags & 1:
|
||||
p.precede8Bits.SetValue(1)
|
||||
if flags & 2:
|
||||
p.showKeys.SetValue(1)
|
||||
if flags & 4 == 0:
|
||||
p.blinkAllForWink.SetValue(1)
|
||||
if flags & 8 == 0:
|
||||
p.lclkDuplicateIO2.SetValue(1)
|
||||
if flags & 16:
|
||||
p.enableSecondaryVUClock.SetValue(1)
|
||||
if flags & 32:
|
||||
p.enableSecondaryLCDClock.SetValue(1)
|
||||
if flags & 64:
|
||||
p.forceSerial.SetValue(1)
|
||||
if flags & 128:
|
||||
p.turnOffLedsDuringMute.SetValue(1)
|
||||
keyBytes = val[6] & 3
|
||||
p.keyBytesChoice.SetStringSelection(str(keyBytes + 1))
|
||||
ledShift = (val[6] & 124) >> 2
|
||||
p.ledShiftChoice.SetStringSelection(str(ledShift))
|
||||
p.displayLineInfoChoice1.SetStringSelection(displayLineInfoChoices[val[4] >> 2 & 31])
|
||||
p.displayLineInfoChoice2.SetStringSelection(displayLineInfoChoices[val[7] & 31])
|
||||
line3Choice = val[4] >> 3 & 16 | val[3] >> 4 & 15
|
||||
p.displayLineInfoChoice3.SetStringSelection(displayLineInfoChoices[line3Choice])
|
||||
line4Choice = val[7] >> 3 & 28 | val[2] >> 6 & 3
|
||||
p.displayLineInfoChoice4.SetStringSelection(displayLineInfoChoices[line4Choice])
|
||||
self.enable(p)
|
||||
break
|
||||
|
||||
except:
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
|
||||
self.initFinished = True
|
||||
self.Show(True)
|
||||
return
|
||||
|
||||
def createLine(self, lineNumber):
|
||||
p = wx.Panel(self, size=(950, 400))
|
||||
p.checkBox = wx.CheckBox(p, 0, ' Select Display', pos=(13, 10), size=(180,
|
||||
20))
|
||||
p.checkBox.SetValue(False)
|
||||
p.primaryDisplayLabel = wx.StaticText(p, -1, 'Primary Display Type', pos=(40,
|
||||
40))
|
||||
p.primaryDisplayChoice = wx.Choice(p, 30, choices=sorted(primaryDisplayTypes.values()), style=wx.BORDER_NONE, pos=(350,
|
||||
38), size=(300,
|
||||
26))
|
||||
p.primaryDisplayConfigureButton = wx.Button(p, 1, 'Auto Configure', pos=(670,
|
||||
40), size=(130,
|
||||
20))
|
||||
self.Bind(wx.EVT_BUTTON, self.OnConfigurePrimary, id=1)
|
||||
p.secondaryDisplayLabel = wx.StaticText(p, -1, 'Secondary Display Type', pos=(40,
|
||||
68))
|
||||
p.secondaryDisplayChoice = wx.Choice(p, 40, choices=sorted(secondaryDisplayTypes.values()), style=wx.BORDER_NONE, pos=(350,
|
||||
66), size=(300,
|
||||
26))
|
||||
p.secondaryDisplayConfigureButton = wx.Button(p, 2, 'Auto Configure', pos=(570,
|
||||
68), size=(130,
|
||||
20))
|
||||
self.Bind(wx.EVT_BUTTON, self.OnConfigureSecondary, id=2)
|
||||
p.secondaryDisplayConfigureButton.Show(False)
|
||||
p.displayNavigationLabel = wx.StaticText(p, -1, 'Display Navigation Style', pos=(40,
|
||||
96))
|
||||
p.displayNavigationChoice = wx.Choice(p, 50, choices=sorted(displayNavigationStyles.values()), style=wx.BORDER_NONE, pos=(350,
|
||||
94), size=(300,
|
||||
26))
|
||||
p.keyBytesLabel = wx.StaticText(p, -1, 'Number Of Key Registers & Secondary Key Offset', pos=(40,
|
||||
124))
|
||||
p.keyBytesChoice = wx.Choice(p, 70, choices=('1', '2', '3', '4'), style=wx.BORDER_NONE, pos=(350,
|
||||
122), size=(300,
|
||||
26))
|
||||
p.ledShiftLabel = wx.StaticText(p, -1, 'Secondary Display LED offset', pos=(40,
|
||||
152))
|
||||
p.ledShiftChoice = wx.Choice(p, 70, choices=[_[1] for i in range(32)], style=wx.BORDER_NONE, pos=(350,
|
||||
150), size=(300,
|
||||
26))
|
||||
p.precede8Bits = wx.CheckBox(p, 60, ' Shift LCD register by 8 bits', pos=(40,
|
||||
180))
|
||||
p.showKeys = wx.CheckBox(p, 61, ' Show key UI code', pos=(40, 208))
|
||||
p.blinkAllForWink = wx.CheckBox(p, 61, ' Blink all front panel LEDs for Wink / Locate', pos=(40,
|
||||
236))
|
||||
p.lclkDuplicateIO2 = wx.CheckBox(p, 62, ' IO2 Display connected to LCLK (P02293)', pos=(40,
|
||||
264))
|
||||
p.enableSecondaryVUClock = wx.CheckBox(p, 63, ' Enable secondary VU clock', pos=(348,
|
||||
180))
|
||||
p.enableSecondaryLCDClock = wx.CheckBox(p, 63, ' Enable secondary LCD clock', pos=(348,
|
||||
208))
|
||||
p.forceSerial = wx.CheckBox(p, 63, ' Force serial key interface', pos=(348,
|
||||
236))
|
||||
p.turnOffLedsDuringMute = wx.CheckBox(p, 64, ' Turn off VU when muted', pos=(348,
|
||||
264))
|
||||
p.displayLineInfoLabelmain = wx.StaticText(p, -1, 'Normal Operation', pos=(350,
|
||||
290))
|
||||
p.displayLineInfoLabelstart = wx.StaticText(p, -1, 'During Startup', pos=(670,
|
||||
290))
|
||||
p.displayLineInfoLabel1 = wx.StaticText(p, -1, 'Display Information Line 1', pos=(40,
|
||||
310))
|
||||
p.displayLineInfoChoice1 = wx.Choice(p, 50, choices=[_[2] for i in sorted(displayLineInfoChoices.keys())], style=wx.BORDER_NONE, pos=(350,
|
||||
310), size=(300,
|
||||
26))
|
||||
p.displayLineInfoLabel2 = wx.StaticText(p, -1, 'Display Information Line 2', pos=(40,
|
||||
336))
|
||||
p.displayLineInfoChoice2 = wx.Choice(p, 50, choices=[_[3] for i in sorted(displayLineInfoChoices.keys())], style=wx.BORDER_NONE, pos=(350,
|
||||
334), size=(300,
|
||||
26))
|
||||
p.displayLineInfoChoice3 = wx.Choice(p, 50, choices=[_[4] for i in sorted(displayLineInfoChoices.keys())], style=wx.BORDER_NONE, pos=(670,
|
||||
310), size=(250,
|
||||
26))
|
||||
p.displayLineInfoChoice4 = wx.Choice(p, 50, choices=[_[5] for i in sorted(displayLineInfoChoices.keys())], style=wx.BORDER_NONE, pos=(670,
|
||||
334), size=(250,
|
||||
26))
|
||||
p.displayInBitLabel = wx.StaticText(p, -1, 'Display Input Signal', pos=(40,
|
||||
360))
|
||||
p.displayInBitChoice = wx.Choice(p, 50, choices=sorted(displayInputSignalChoices.values()), style=wx.BORDER_NONE, pos=(350,
|
||||
360), size=(300,
|
||||
26))
|
||||
self.enable(p)
|
||||
p.key = None
|
||||
self.Bind(wx.EVT_CHECKBOX, self.OnEnabled, id=lineNumber)
|
||||
p.lineNumber = lineNumber
|
||||
return p
|
||||
|
||||
def OnConfigurePrimary(self, e):
|
||||
self.frame.frame.executeOK()
|
||||
line = self.lines[0]
|
||||
pDC = line.primaryDisplayChoice.GetStringSelection()
|
||||
pDCval = 0
|
||||
for s in primaryDisplayTypes.keys():
|
||||
if primaryDisplayTypes[s] == pDC:
|
||||
pDCval = s
|
||||
|
||||
print mytime.displayTime(), 'ucd.OCP', pDCval, pDC
|
||||
dlgMessage = getString('ocp')
|
||||
dlgTitle = getString('acd')
|
||||
self.frame.Show(False)
|
||||
if isMAC():
|
||||
style = wx.OK | wx.CANCEL | wx.STAY_ON_TOP
|
||||
else:
|
||||
style = wx.OK | wx.CANCEL
|
||||
res = wx.MessageBox(dlgMessage, dlgTitle, style)
|
||||
if res != wx.OK:
|
||||
self.frame.Show(True)
|
||||
return
|
||||
self.frame.frame.executeOK()
|
||||
keyBytes = int(line.keyBytesChoice.GetStringSelection())
|
||||
ledShift = int(line.ledShiftChoice.GetStringSelection())
|
||||
cfgName = 'configurations/DP' + pDC + '.cfg'
|
||||
cfg = ConfigParser.ConfigParser()
|
||||
cfg.read(cfgName)
|
||||
print mytime.displayTime(), 'ucd.OCP.reading config', cfgName
|
||||
try:
|
||||
keyBytes = (len(eval(cfg.get('DEFAULT', 'user_config_front_panel_keys'))) + 7) / 8
|
||||
print mytime.displayTime(), 'ucd.OCP.keyBytes:', keyBytes
|
||||
line.keyBytesChoice.SetStringSelection(str(keyBytes))
|
||||
except:
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
|
||||
try:
|
||||
ledShift = len(eval(cfg.get('DEFAULT', 'user_config_front_panel_leds')))
|
||||
print mytime.displayTime(), 'ucd.OCP.ledShift:', ledShift
|
||||
line.ledShiftChoice.SetStringSelection(str(ledShift))
|
||||
except:
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
|
||||
try:
|
||||
menuType = int(cfg.get('DEFAULT', 'menuType'))
|
||||
line.displayNavigationChoice.SetStringSelection(displayNavigationStyles[menuType])
|
||||
except:
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
|
||||
for keyNumber in range(keyBytes * 8):
|
||||
self.frame.frame.clear(self.frame, keyNumber + 32)
|
||||
|
||||
for ledNumber in range(ledShift):
|
||||
self.frame.frame.clear(self.frame, 184, memberID=ledNumber)
|
||||
|
||||
self.frame.frame.clear(self.frame, 88)
|
||||
self.frame.frame.clear(self.frame, 187)
|
||||
self.frame.frame.clear(self.frame, 188)
|
||||
configurationFileName = 'configurations/DP' + pDC + '.csv'
|
||||
f = open(configurationFileName, 'rb')
|
||||
data = f.readlines()
|
||||
f.close()
|
||||
for csvLine in data:
|
||||
try:
|
||||
uiNumber = int(csvLine.split('|')[4])
|
||||
structID = int(csvLine.split('|')[5])
|
||||
except:
|
||||
continue
|
||||
|
||||
if uiNumber == 189 and structID == 5:
|
||||
self.frame.frame.clear(self.frame, uiNumber, structID=5)
|
||||
|
||||
self.frame.frame.parent.waitForSync(msg='ucd.autoconf.Syncing erased keys')
|
||||
self.frame.frame.load(configurationFileName)
|
||||
self.frame.frame.refreshAll()
|
||||
return
|
||||
|
||||
def OnConfigureSecondary(self, e):
|
||||
line = self.lines[0]
|
||||
sDC = line.secondaryDisplayChoice.GetStringSelection()
|
||||
sDCval = 0
|
||||
for s in secondaryDisplayTypes.keys():
|
||||
if secondaryDisplayTypes[s] == sDC:
|
||||
sDCval = s
|
||||
|
||||
print mytime.displayTime(), 'ucd.OCS', sDCval, sDC
|
||||
dlgMessage = getString('ocs')
|
||||
dlgTitle = getString('acd')
|
||||
res = wx.MessageBox(dlgMessage, dlgTitle, wx.OK | wx.CANCEL)
|
||||
if res != wx.OK:
|
||||
return
|
||||
return
|
||||
|
||||
def OnEnabled(self, e):
|
||||
self.enable(self.lines[0])
|
||||
return
|
||||
|
||||
def enable(self, line):
|
||||
val = line.checkBox.GetValue()
|
||||
line.primaryDisplayChoice.Enable(val)
|
||||
line.secondaryDisplayChoice.Enable(val)
|
||||
line.displayNavigationChoice.Enable(val)
|
||||
line.precede8Bits.Enable(val)
|
||||
line.showKeys.Enable(val)
|
||||
line.keyBytesChoice.Enable(val)
|
||||
line.blinkAllForWink.Enable(val)
|
||||
line.ledShiftChoice.Enable(val)
|
||||
return
|
||||
|
||||
def evaluateLine(self, line):
|
||||
if self.lines[0].checkBox.GetValue() == False:
|
||||
return
|
||||
else:
|
||||
pDC = line.primaryDisplayChoice.GetStringSelection()
|
||||
pDCval = 0
|
||||
for s in primaryDisplayTypes.keys():
|
||||
if primaryDisplayTypes[s] == pDC:
|
||||
pDCval = s
|
||||
|
||||
sDC = line.secondaryDisplayChoice.GetStringSelection()
|
||||
sDCval = 0
|
||||
for s in secondaryDisplayTypes.keys():
|
||||
if secondaryDisplayTypes[s] == sDC:
|
||||
sDCval = s
|
||||
|
||||
dNC = line.displayNavigationChoice.GetStringSelection()
|
||||
dNCval = 0
|
||||
for s in displayNavigationStyles.keys():
|
||||
if displayNavigationStyles[s] == dNC:
|
||||
dNCval = s
|
||||
|
||||
line1Choice = line.displayLineInfoChoice1.GetStringSelection()
|
||||
for i in displayLineInfoChoices.keys():
|
||||
if displayLineInfoChoices[i] == line1Choice:
|
||||
line1Choice = i
|
||||
break
|
||||
|
||||
line2Choice = line.displayLineInfoChoice2.GetStringSelection()
|
||||
for i in displayLineInfoChoices.keys():
|
||||
if displayLineInfoChoices[i] == line2Choice:
|
||||
line2Choice = i
|
||||
break
|
||||
|
||||
line3Choice = line.displayLineInfoChoice3.GetStringSelection()
|
||||
for i in displayLineInfoChoices.keys():
|
||||
if displayLineInfoChoices[i] == line3Choice:
|
||||
line3Choice = i
|
||||
break
|
||||
|
||||
line4Choice = line.displayLineInfoChoice4.GetStringSelection()
|
||||
for i in displayLineInfoChoices.keys():
|
||||
if displayLineInfoChoices[i] == line4Choice:
|
||||
line4Choice = i
|
||||
break
|
||||
|
||||
flags = 0
|
||||
if line.precede8Bits.GetValue():
|
||||
flags += 1
|
||||
if line.showKeys.GetValue():
|
||||
flags += 2
|
||||
if line.blinkAllForWink.GetValue() == 0:
|
||||
flags += 4
|
||||
if line.lclkDuplicateIO2.GetValue() == 0:
|
||||
flags += 8
|
||||
if line.enableSecondaryVUClock.GetValue() == 1:
|
||||
flags += 16
|
||||
if line.enableSecondaryLCDClock.GetValue() == 1:
|
||||
flags += 32
|
||||
if line.forceSerial.GetValue() == 1:
|
||||
flags += 64
|
||||
if line.turnOffLedsDuringMute.GetValue() == 1:
|
||||
flags += 128
|
||||
keyBytes = int(line.keyBytesChoice.GetStringSelection()) - 1
|
||||
ledShift = int(line.ledShiftChoice.GetStringSelection())
|
||||
bit = line.displayInBitChoice.GetStringSelection()
|
||||
for i in range(len(displayInputSignalChoices)):
|
||||
if displayInputSignalChoices[i] == bit:
|
||||
bit = i
|
||||
break
|
||||
|
||||
try:
|
||||
sendString = '' + chr(self.uiNumber)
|
||||
sendString += chr(5)
|
||||
sendString += chr(pDCval | bit << 4 | (line4Choice & 3) << 6)
|
||||
sendString += chr(sDCval | (line3Choice & 15) << 4)
|
||||
sendString += chr(dNCval | line1Choice << 2 | (line3Choice & 16) << 3)
|
||||
sendString += chr(flags)
|
||||
sendString += chr(keyBytes | ledShift << 2)
|
||||
sendString += chr(line2Choice | (line4Choice & 28) << 3)
|
||||
mys = 'ucd.eL.String: '
|
||||
for c in sendString:
|
||||
mys += hex(ord(c)) + ':'
|
||||
|
||||
print mys, line.lineNumber
|
||||
self.settingsVerified = True
|
||||
return sendString
|
||||
except:
|
||||
print mytime.displayTime(), 'ucd.ec.eL.failed to build string'
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
# okay decompiling pycode/user_config_display.pyc
|
||||
Reference in New Issue
Block a user