I am working on a Christmas theme to use with all my themed tables:
Ice Age (skateball mod)
Christmas (arkon 1980) Playboy mod
Charlie Brown
JP's the Grinch
Ice age and Christmas are both rom based and they have a similar LED update routine that is different from the tables I have that work with these flex dmds. The commented lines are the original and I replaced them with the script below. With ice age this works except it kills the leds in the desktop table and my flippers get stuck or don't respond! Is there an obvious fix? The main difference between the two is the original does not use the "num" variable. I don't understand the routine at all, or how it controls LEDs. If there is not an obvious fix, can anyone help if I share the files?
'Sub UpdateLeds
' On Error Resume Next
' Dim ChgLED, ii, jj, chg, stat
' ChgLED = Controller.ChangedLEDs(&HFF, &HFFFF)
'If Not IsEmpty(ChgLED)Then
' For ii = 0 To UBound(ChgLED)
' chg = chgLED(ii, 1):stat = chgLED(ii, 2)
' For jj = 0 to 10
' If stat = Patterns(jj)OR stat = Patterns2(jj)then Digits(chgLED(ii, 0)).SetValue jj
' Next
'Next
'End IF
'End Sub
Sub UpdateLeds
On Error Resume Next
Dim ChgLED,ii,num,chg,stat,obj
ChgLED=Controller.ChangedLEDs (&Hffffffff, &Hffffffff)
If Not IsEmpty(ChgLED) Then
For ii=0 To UBound(chgLED)
num=chgLED(ii,0):chg=chgLED(ii,1):stat=chgLED(ii,2)
If UseFlexDMD then UpdateFlexChar num, stat
For Each obj In Digits(num)
If chg And 1 Then obj.State=stat And 1
chg=chg\2:stat=stat\2
Next
Next
If UseFlexDMD then FlexDMDUpdate
End If
End Sub