Jump to content
IGNORED

FIFA World Cup Viewer with FujiNet


MichaG

Recommended Posts

I've just made a quick-and-dirty FIFA World Cup Viewer with FujiNet's json parser. It's not a masterpiece of design, speed and memory management but it works ;-)
With the letters A to H you can switch between the groups. Displaying of the results is not yet added.

 

N: handler is needed.

20221117_070407.thumb.jpg.6d0bc4f4e4afa5a41a40ad211a0f3ee4.jpg

1 DIM NAME$(32),GRP$(1)
5 DIM RET$(256),N$(256),URL$(256)
10 GR=1
16 URL$="N:HTTPS://api.openligadb.de/getmatchdata/WM2022/2022/1"
30 GOSUB 1200
35 REM GOSUB 1400
40 OPEN #2,12,0,"K:":GET #2,KEY:CLOSE #2
50 GR=KEY-ASC("A")+1
55 IF GR<1 OR GR>8 THEN 40
60 GOTO 30
99 CLOSE #1:END 
100 REM FUNC QUERRY *****************
110 XIO ASC("Q"),#1,12,0,N$
130 INPUT #1,RET$
140 RETURN 
200 REM PROC MATCHDAY ***************
210 FOR I=0 TO 5
214 POSITION 1,I*2+4
215 ? I+1;")";
220 N$="N:/0/matchDateTime"
222 N$(4,4)=STR$(I)
224 POSITION 4,I*2+4
225 N$(4,4)=STR$(I)
228 GOSUB 100:? RET$(3,10)
240 N$="N:/0/team1/teamID"
242 N$(4,4)=STR$(I)
244 POSITION 14,I*2+4
245 GOSUB 100:GOSUB 2100:? RET$,
250 N$="N:/0/team2/teamID"
252 N$(4,4)=STR$(I)
254 POSITION 22,I*2+4
255 GOSUB 100:GOSUB 2100:? "-";RET$
260 N$="N:/0/matchIsFinished"
262 N$(4,4)=STR$(I)
264 POSITION 34,I*2+4
265 GOSUB 100
267 IF RET$="FALSE" THEN ? "_ : _":GOTO 290
290 NEXT I
295 RETURN 
1200 REM SCREEN *********************
1205 POKE 82,0:POKE 752,1
1210 ? "}     World Cup 22 for FujiNet 0.8":? "       by Michael Goroll (MichaG)"
1215 ? " GRP.";
1220 FOR G=1 TO 8
1225 AA=ASC("A")-1
1226 IF G=GR THEN AA=ASC("A")-1
1230 ? CHR$(AA+G);" ";
1250 NEXT G
1260 ? "I=AF J=QF K=HF L=F"
1270 POSITION 8,23:? "powered by openligadb.de";
1285 GOSUB 1300
1290 RETURN 
1300 REM DISPLAY GROUP GR ***********
1310 N$=URL$:N$(LEN(N$))=STR$(GR)
1320 CLOSE #1
1330 OPEN #1,12,0,N$
1335 XIO 252,#1,12,1,"N:"
1340 XIO ASC("P"),#1,12,0,"N:"
1345 GOSUB 200
1350 CLOSE #1
1390 RETURN 
2000 REM PROC Display all Teams
2010 RESTORE 3000
2020 FOR T=1 TO 32
2030 READ ID,NAME$,GRP$
2040 ? ID,NAME$,GRP$
2050 NEXT T
2100 REM PROC Get Teamname **********
2110 RESTORE 3000
2120 FOR T=1 TO 32
2130 READ ID,NAME$,GRP$
2140 IF STR$(ID)=RET$ THEN RET$=NAME$
2150 NEXT T
2160 RETURN 
3000 DATA 764,Argentina,C,750,Australia,D,2673,Belgium,F,753,Brazil,G,2669,Costa Rica,E,758,Denmark,D
3001 DATA 139,Germany,E,2670,Ecuador,A,755,England,B,144,France,D,754,Ghana,H,2672,Iran,B,749,Japan,E
3002 DATA 845,Cameroon,G,5588,Canada,F,4912,Qatar,A,146,Coatia,F,4629,Morocco,F,761,Mexico,C
3003 DATA 147,Netherl.,A,1410,Poland,C,149,Portugal,H,2408,Saudi Arabia,C,38,Switzerland,G,4630,Senegal,A
3004 DATA 1404,Serbia,G,170,Spain,E,751,S.Korea,H,1391,Tunisia,D,849,Uruguay,H,949,USA,B,5572,Wales,

 

WC22V08.BAS

Edited by MichaG
  • Like 10
Link to comment
Share on other sites

On 11/17/2022 at 5:51 AM, MichaG said:

I've just made a quick-and-dirty FIFA World Cup Viewer with FujiNet's json parser. It's not a masterpiece of design, speed and memory management but it works ;-)
With the letters A to H you can switch between the groups. Displaying of the results is not yet added.

 

N: handler is needed.

20221117_070407.thumb.jpg.6d0bc4f4e4afa5a41a40ad211a0f3ee4.jpg

1 DIM NAME$(32),GRP$(1)
5 DIM RET$(256),N$(256),URL$(256)
10 GR=1
16 URL$="N:HTTPS://api.openligadb.de/getmatchdata/WM2022/2022/1"
30 GOSUB 1200
35 REM GOSUB 1400
40 OPEN #2,12,0,"K:":GET #2,KEY:CLOSE #2
50 GR=KEY-ASC("A")+1
55 IF GR<1 OR GR>8 THEN 40
60 GOTO 30
99 CLOSE #1:END 
100 REM FUNC QUERRY *****************
110 XIO ASC("Q"),#1,12,0,N$
130 INPUT #1,RET$
140 RETURN 
200 REM PROC MATCHDAY ***************
210 FOR I=0 TO 5
214 POSITION 1,I*2+4
215 ? I+1;")";
220 N$="N:/0/matchDateTime"
222 N$(4,4)=STR$(I)
224 POSITION 4,I*2+4
225 N$(4,4)=STR$(I)
228 GOSUB 100:? RET$(3,10)
240 N$="N:/0/team1/teamID"
242 N$(4,4)=STR$(I)
244 POSITION 14,I*2+4
245 GOSUB 100:GOSUB 2100:? RET$,
250 N$="N:/0/team2/teamID"
252 N$(4,4)=STR$(I)
254 POSITION 22,I*2+4
255 GOSUB 100:GOSUB 2100:? "-";RET$
260 N$="N:/0/matchIsFinished"
262 N$(4,4)=STR$(I)
264 POSITION 34,I*2+4
265 GOSUB 100
267 IF RET$="FALSE" THEN ? "_ : _":GOTO 290
290 NEXT I
295 RETURN 
1200 REM SCREEN *********************
1205 POKE 82,0:POKE 752,1
1210 ? "}     World Cup 22 for FujiNet 0.8":? "       by Michael Goroll (MichaG)"
1215 ? " GRP.";
1220 FOR G=1 TO 8
1225 AA=ASC("A")-1
1226 IF G=GR THEN AA=ASC("A")-1
1230 ? CHR$(AA+G);" ";
1250 NEXT G
1260 ? "I=AF J=QF K=HF L=F"
1270 POSITION 8,23:? "powered by openligadb.de";
1285 GOSUB 1300
1290 RETURN 
1300 REM DISPLAY GROUP GR ***********
1310 N$=URL$:N$(LEN(N$))=STR$(GR)
1320 CLOSE #1
1330 OPEN #1,12,0,N$
1335 XIO 252,#1,12,1,"N:"
1340 XIO ASC("P"),#1,12,0,"N:"
1345 GOSUB 200
1350 CLOSE #1
1390 RETURN 
2000 REM PROC Display all Teams
2010 RESTORE 3000
2020 FOR T=1 TO 32
2030 READ ID,NAME$,GRP$
2040 ? ID,NAME$,GRP$
2050 NEXT T
2100 REM PROC Get Teamname **********
2110 RESTORE 3000
2120 FOR T=1 TO 32
2130 READ ID,NAME$,GRP$
2140 IF STR$(ID)=RET$ THEN RET$=NAME$
2150 NEXT T
2160 RETURN 
3000 DATA 764,Argentina,C,750,Australia,D,2673,Belgium,F,753,Brazil,G,2669,Costa Rica,E,758,Denmark,D
3001 DATA 139,Germany,E,2670,Ecuador,A,755,England,B,144,France,D,754,Ghana,H,2672,Iran,B,749,Japan,E
3002 DATA 845,Cameroon,G,5588,Canada,F,4912,Qatar,A,146,Coatia,F,4629,Morocco,F,761,Mexico,C
3003 DATA 147,Netherl.,A,1410,Poland,C,149,Portugal,H,2408,Saudi Arabia,C,38,Switzerland,G,4630,Senegal,A
3004 DATA 1404,Serbia,G,170,Spain,E,751,S.Korea,H,1391,Tunisia,D,849,Uruguay,H,949,USA,B,5572,Wales,

 

WC22V08.BAS 2.5 kB · 1 download

Excellent @MichaG. :) Awesome innit? :)

  • Like 1
Link to comment
Share on other sites

Once this gets to a stable point, I can help you make a boot disk. :)

 

an example procedure:

 

* Format disk with mydos, put system files on it

* put NDEV.AR0 from the mydos DOS disk on there

* use LoadGo.atr in the Utilities folder on apps to make an autorun.sys for basic, put it on disk as AUTORUN.AR1

* done

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 11/20/2022 at 4:24 PM, tschak909 said:

Once this gets to a stable point, I can help you make a boot disk. :)

 

an example procedure:

 

* Format disk with mydos, put system files on it

* put NDEV.AR0 from the mydos DOS disk on there

* use LoadGo.atr in the Utilities folder on apps to make an autorun.sys for basic, put it on disk as AUTORUN.AR1

* done

 

Would love a bootdisk!

 

Link to comment
Share on other sites

I found this autorun by @JAC! very good, in the ATR disk image just replace AUTORUN.BAS with your program, named AUTORUN.BAS.

Moreover, it enables BASIC.

Autorun by Jac!.zip

 

I added the program, I haven't tested it yet with FujiNet.

WC22V091.atr

 

Here is a stock DOS 2.5 disk with the program. RUN "D:WC22.BAS" to run it.

WC22.atr

 

 

  • Thanks 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...