10/27/2010 2:37pm - Uplink Activity Report - 96 changes

Is the code publicly available? I'd be interested in seeing the code. If it's not too far out of wack, I wouldn't be opposed to helping out migrate the code to sourceforge or the likes so we could make it easier to work with/rewrite if necessary.
 
The code is not publiclly available, it was written for us and donated to us by the late JohnH.

However with that said here is the parts of the code that was giving them trouble... (Imagine going through all of this, and this is just a fraction of the code JohnH wrote for us!)

5 SCS=30:NVERSF=0:TSID17T=0:STARTSDT=0:DIM NID16(SCS),VN16(SCS),SN16(SCS),LSN16(SCS),J16(SCS) ,T16(SCS),SF16(SCS),F16(SCS),K16(SCS),TID16(SCS),Z 16(SCS),PC16(SCS)
10 GOSUB 30000
20 J=0:F16=9:R16=0:M16=0:SL16=0:XC=0:X=1:pC16=200:NID 16(1)=30000:SN16(1)=30000:D=1:H16=0:H0=0:H32=0:H33=0:H17=0:Q17=0
100 J=J+1:GET 1,J
101 IF A$="G" THEN 102 ELSE 100
102 GET 1,J+188:IF A$="G" THEN 108 ELSE 100
108 IF J<50000! THEN 100
110 GET 1,J+1:K=ASC(A$):IF K>127 THEN K=K-128:E=1:pRINT "TRANSPORT ERROR":GOTO 111 ELSE E=0
111 IF K>63 THEN K=K-64:S=1:GOTO 112 ELSE S=0
112 IF K>31 THEN K=K-32:p=1:GOTO 120 ELSE P=0
120 GET 1,J+2:pID=K*256+ASC(A$)
130 GET 1,J+3:K=ASC(A$):IF K>127 THEN K=K-128:SCR=2:GOTO 131 ELSE SCR=0
131 IF K>63 THEN K=K-64:SCR=SCR+1
132 IF K>31 THEN K=K-32:AFC=2:GOTO 133 ELSE AFC=0
133 IF K>15 THEN K=K-16:AFC=AFC+1
134 C=K
135 IF AFC=0 THEN J=J+188:GOTO 102
140 IF S=0 THEN T=J+4:SF=0:GOTO 141 ELSE GET 1,J+4:T=J+5:SF=J+5+ASC(A$)
141 GET 1,T:IF PID=16 THEN 176
145 GET 1,T:IF PID=17 THEN 180 ELSE J=J+188:GOTO 102
150 IF T>=J+187 THEN J=J+188:GOTO 102 ELSE T=T+1:GOTO 141
160 J=J+188:GOTO 102
176 IF H16=4 THEN J=J+188:GOTO 102 ELSE IF R16=1 THEN K16=ASC(A$):GOTO 1000 ELSE IF S=0 THEN 150 ELSE SL16=0:T=SF:R16=1:GET 1,SF:K16=ASC(A$):Z16=1:GOTO 1000
180 IF R17=1 THEN K17=ASC(A$):GOTO 5000 ELSE IF S=0 THEN 150 ELSE SL17=0:T=SF:R17=1:GET 1,SF:K17=ASC(A$):Z17=1:GOTO 5000
1000 IF Z16=0 THEN Z16=1:GOTO 150 ELSE Z16=0:IF SL16=0 THEN SL16=5005:F16=9:GOTO 1050 ELSE SL16=SL16-1:F16=F16+1:GOTO 1050
<snip>
 
Last edited by a moderator:
Is the code publicly available? I'd be interested in seeing the code. If it's not too far out of wack, I wouldn't be opposed to helping out migrate the code to sourceforge or the likes so we could make it easier to work with/rewrite if necessary.

One piece is GWBasic...the biggest part is Delphi. I wouldn't release it publicly as I have some modules I wrote in Delphi that I would like to keep private for the time being as they are used in other apps I support.
 
So what was the error. I see pretty much what the code snip is trying to do parsing the data. Of course it would be easier seeing sample input data.

It looks like the PID is two bytes, first byte is 0PSXXXXX where P is set to the state of the P bit, S is set to the state of the S bit and XXXXX is 0-31 * 256 + next char to give a PID of 0 to 8191

The next byte has 2 bit SCR value, 2 bit AFC value, and a 0-15 4 bit number. If AFC value is 0 we just skip 188 bytes to the next record.

Then if S was 0 SF is set to 0 T is set to 4, and we go on, otherwise the next byte is the length of a variable field which we set SF to the character after that field and T is set to 5

Special case handling of PID 16 and 17. Actually it looks like it is just scanning the buffer looking for these 2 PIDs and processes them in some way. All other PIDs just jump to the next record.
 
Ouch. basic nightmare.I do not envy you guys having to work your way through that to find the bug. That is alot of hard work. Kudos to you both. If you ever consider porting the code to something outside of GW-BASIC I'd be happy to throw my hat in to help, I work in the .net languages and would be happy to help. What/how is the raw data pulled from the streams?
 
A NOTE FROM SCOTT

After MANY MANY hours of work DIGIBLUR and one other very helpful SatelliteGuys Member who at this point wants to remain unknown have gotten our Uplink Software working again! They spent many hours going through the thousand of lines of the code created by the late JohnH to order to find the cause of the issue and fix the problem.

First a very big THANK YOU from me to both people who worked so long and so hard to fix the issue.

Secondly I would like to reward both people because I understand time is money. I am giving both men $25 each in the form of an Amazon.COM Gift Card for their hard work. I wish it could be more but times are tough at the moment.

Also a number of people have asked if they could donate to help get this issue fixed, the answer is YES. I have setup a special donation address which can be found by CLICKING HERE. People wishing to donate to them may do so there. I will be taking all donations made through this URL and will split them 50/50 amung both parties and on November 1st I will buy them each a Amazon.COM gift card with the money plus my own personal $25 to each as well. 100% of your money will go to them for their hard work. I will personally eat the costs of any Paypal fees that are charged.

To make sure I am not pocketing any money I will be posting the members username that have donated and the amount the donates so we can keep a running tally in public.
If you want your donatation to these guys as Anonymous type Anonymous in the username box.
AGAIN IF YOU WANT TO REMAIN ANONYMOUS PLEASE PUT ANONYMOUS IN THE MEMEMBER NAME BOX! (IF YOU LEAVE IT BLANK Paypal Inserts your full name!)

Example for my $50...

Donated By | Amount
Scott Greczkowski $50
Anoymous.....$5

Nobody has to donate anything but if you want to join me in saying thats for their time and effort in fixing the software please CLICK HERE. Deadliine to donate is by NOON ET on Sunday October 31st. (And then I am ordering the Gift Cards) :)

Thank you again Digiblur and Mystery Person for your hard work!

I WOULD DONATE IF IT WAS AFTER THE 31ST I ONLY GET PAID ONCE A MONTH AND DONT GET PAID TILL THE 3RD SINCE IM ON DISABILITY
 
I WOULD DONATE IF IT WAS AFTER THE 31ST I ONLY GET PAID ONCE A MONTH AND DONT GET PAID TILL THE 3RD SINCE IM ON DISABILITY
Don't worry about it, I am sure a thank you is good enough.

I got to be honest, the only reason I did it was because I know they worked many hours at it and I wasn't in a place where I could give them more as a thank you from SatelliteGuys (and I feel bad about that honestly). And since a few folks asked over the past 4 weeks if they could give them money to fix the uplink software, I decided to take a collection for those who wanted to give to their work. I never expected the outpouring of support they have received so far!
 
Don't worry about it, I am sure a thank you is good enough.

I got to be honest, the only reason I did it was because I know they worked many hours at it and I wasn't in a place where I could give them more as a thank you from SatelliteGuys (and I feel bad about that honestly). And since a few folks asked over the past 4 weeks if they could give them money to fix the uplink software, I decided to take a collection for those who wanted to give to their work. I never expected the outpouring of support they have received so far!

i would of still liked to donate for all the hard work they did.thank you digi and mystery dude appreciate it very much the hard work you went through
 

9/23/2010 - 10/27/2010 Uplink Report

D

10/29/2010 2:22pm - Uplink Activity Report - 3 changes

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

Who Read This Thread (Total Members: 1)