Commit 7b02fc54 by kollo

### version 1.16

parent c0b01702
 ... ... @@ -35,12 +35,12 @@ endif next i return procedure char(x,y,c) local i,j for i=0 to 15 for j=0 to 7 if btst(peek(varptr(f\$)+c+i*256),7-j)=0 pbox x+j*scale,y+i*scale,x+j*scale+scale,y+i*scale+scale-1 local i,j for i=0 to 15 for j=0 to 7 if btst(peek(varptr(f\$)+c+i*256),7-j)=0 pbox x+j*scale,y+i*scale,x+j*scale+scale,y+i*scale+scale-1 endif next j next i next j next i return
TomTom/TTCar.bas 0 → 100644
This diff is collapsed.
TomTom/TTmoto.bas 0 → 100644
This diff is collapsed.
 ... ... @@ -14,7 +14,7 @@ arrayfill h(),0 h(0)=1 ! Das Ende Zeichen count=0 gh=0 f\$="huffman.bas" f\$="text.txt" if exist(f\$) open "I",#1,f\$ content\$=input\$(#1,lof(#1)) ... ... @@ -93,6 +93,7 @@ print "};" ' Jetzt die codierung seek #1,0 kod\$="" kodcount=0 for j=0 to l-1 a=peek(varptr(content\$)+j) and 0xff for i=0 to count-1 ... ... @@ -100,7 +101,8 @@ for j=0 to l-1 kod\$=kod\$+t\$(255-i) while len(kod\$)>=8 kkk\$=left\$(kod\$,8) print kkk\$;" "; @output(kkk\$) inc kodcount kod\$=right\$(kod\$,len(kod\$)-8) wend exit if true ... ... @@ -114,9 +116,10 @@ a=0 for i=0 to count-1 if a(255-i)=a kod\$=kod\$+t\$(255-i) while len(kod\$)>=8 while len(kod\$) kkk\$=left\$(kod\$,8) print kkk\$;" "; @output(kkk\$) inc kodcount kod\$=right\$(kod\$,len(kod\$)-8) wend exit if true ... ... @@ -125,15 +128,29 @@ a=0 if i=count print "ERROR" endif print kod\$ print "New Size: ";len(kod\$)/8 print "Compression: ";len(kod\$)/8/lof(#1) print "Compression: ";len(kod\$)/lof(#1);" Bits pro Zeichen. Soll:";log(count)/log(2) print "New Size: ";kodcount print "Compression: ";kodcount/lof(#1) print "Compression: ";8*kodcount/lof(#1);" Bits pro Zeichen. Soll:";log(count)/log(2) close quit procedure output(b\$) local i local a a=0 for i=0 to 7 if peek(varptr(b\$)+i)-asc("0")=1 a=bset(a,i) else endif next i print "0x";hex\$(a,2,2);", "; flush return procedure doit(sta,sto) local oo,x1,x2,i,hh,gh x1=sta ... ...
 ... ... @@ -2147,7 +2147,7 @@ procedure hoehenprofil print #11,"set y2label "+chr\$(34)+"Geschwindigkeit [km/h]"+chr\$(34) print #11,"set origin 0,0" print #11,"set size 1,0.5" print #11,"plot [:][-10:3000] "+chr\$(34)+dattmp\$+chr\$(34)+" u (\$2/1000):4 t "; print #11,"plot [:][-10:200] "+chr\$(34)+dattmp\$+chr\$(34)+" u (\$2/1000):4 t "; print #11,chr\$(34)+"Hoehe"+chr\$(34)+" w steps , "; print #11,chr\$(34)+dattmp\$+chr\$(34)+" u (\$2/1000):(\$5) t "; print #11,chr\$(34)+"Geschwindigkeit"+chr\$(34)+" w steps" ... ...
 ' output of inline.bas for X11-Basic 07.12.2010 ' /export/TomTom/INTERNAL/SDKRegistry/xearth.bmp 9270 Bytes. (compressed: 2803 Bytes, 30%) xearth\$="" xearth\$=xearth\$+"`S*^-SPYW-:0NE\V[`_6JEMI(N`cI/1PY(>0>G`[=" xearth\$=xearth\$+"ZJ1\$6:A=\$1E1UUWNQM*4\$W+X>_VB?RV+L])1@',7GHP<@9c9V%F:&C22XEB-II0CKRb@B`H-'4W/=:OPI+" xearth\$=xearth\$+"_.+C\*F/8U@&33%\$?C>%6*D(C*,S1PP)HE&C:P.K:E1/>`32./+:(/)6TZY+bbM:0/<*V;KN5-" xearth\$=xearth\$+"B431B5MQB`5??b*PAWXPZ\MCP2@Z<*P/P,UO\K<=3/7*A,4.'7PU`*O80>N4cD^9" xearth\$=xearth\$+"EU/1.4.M0Y)4)OCQKW.5ML=*]R-HXTNZM4\$T5A]C^+IFIUVRCXY*\$ASG?XLICO9\" xearth\$=xearth\$+"?4E^2c_E88HTS^78>7C)b0HZMPOLXBW9,1BT)8D1@?QJGI/(H:N>:2\$W.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)'K-.\$(T97c=F" xearth\$=xearth\$+":AB5]1D3%BP[E@=FR,%[VK5)Z-8?:`S<0..OF[NCK:=_MY?FES\$'1YU&" xearth\$=xearth\$+"^J,+,Db1\ZI/&,G^GPU^)UC]4A16CJ;5G.FL@\$>3**56G9\9(VG0?HPR`-OIL3A9" xearth\$=xearth\$+"/1RAa]JF_F(9[.NU'-)9,5b6:M77..B\EB@%MZSRJ1b8,c\S%NG`O-P`=Z2K@FDJ" xearth\$=xearth\$+"%BRE]B&S^4L+5L)YaZ**NP[335*6a3R1LB`W^62U&Y4;PHFC@A;'LE5^YJ--SN_\$" xearth\$=xearth\$+"\);;U=YU4-71E/&0\$6XL_``56\$]EQ-b?*B>:V^TX0OE+\:62:G?]YXEUVJcTbY+-" xearth\$=xearth\$+"9\$=Nb=F4[" xearth\$=xearth\$+"-WI(\$RZU3G2\$*)NA[L5%Q*&+`\$NB%1Y/&:@(+BEQH4S,H\@+;_6C\$:YQ]B4X,LK<" xearth\$=xearth\$+"'3^ERXM<]=*[Z&aFH`T\B;/1S7J4B`N3KS+R'??LI2@-BXW=cZ8G-RTLTYQP9O51@^ZaF-]D11FO@I
 ' Mandelbrotfraktale (c) Markus Hoffmann bx=0 by=0 bw=256 bh=256 sx=-2.2 sy=-1.7 sw=3.4 sh=3.4 sizew ,bw,bh clearw t=timer for x=bx to bx+bw for y=by to by+bh gx=(x-bx)/bw*sw+sx gy=(y-by)/bh*sh+sy zx=gx zy=gy for c=0 to 255 nzx=zx^2-zy^2+gx zy=2*zx*zy+gy zx=nzx exit if zx^2+zy^2>4 next c color c*256+c*64 plot x,y next y vsync next x print timer-t;" Sekunden." quit data "Benchmark fot the virtual machine by Markus Hoffmann 2010"
 ' savescreen Test for X11-basic (c) Markus hoffmann 2008 ' ' ' In the framebuffer-version (TomTom etc) the file format is ' .bmp 24 Bit ' for i=0 to 32 for j=0 to 20 circle i*20,j*20,8 if odd(j+i) pcircle i*20,j*20,3 endif next j next i circle 100,100,30 circle 200,200,60 pcircle 200,300,70 a\$=system\$("locate .bmp") while len(a\$) wort_sep a\$,chr\$(10),0,t\$,a\$ if exist(t\$) open "I",#1,t\$ t\$=input\$(#1,lof(#1)) put 0,0,t\$ close vsync pause 1 endif wend quit
 ' Test der Shared_memory Funktinen shmid=shm_malloc(32,12345) print "SHMID:"'shmid adr=shm_attach(shmid) print "ADR:"'hex\$(adr) ' Show all *.bmp images (X11-Basic) if len(param\$(2)) t\$=mkd\$(val(param\$(2))) bmove varptr(t\$),adr,len(t\$) ' shm_free shmid else weiss=get_color(65535,65535,65535) grau=get_color(65535/1.2,65535/1.2,65535/1.2) schwarz=get_color(0,0,0) rot=get_color(65535,0,0) groesse=0.7 offset=22 faktor=1000 SIZEW ,800*groesse+200,200*groesse+200 t\$=system\$("locate .bmp") plot 1,1 vsync COLOR schwarz PBOX 0,0,800*groesse+200,200*groesse+200 t\$=space\$(32) 'if peek(adr)=200 do bmove adr,varptr(t\$),32 aa=a a=cvd(t\$) if a<>aa @display(a) endif 'endif 't\$=chr\$(200)+" Hallo, ich bins "+time\$ 'bmove varptr(t\$),adr,len(t\$) 'system "ipcs" 'pause 5 'shm_detach adr 'system "ipcs" 'pause 5 exit if a=4711 pause 1 loop shm_free shmid endif weiss=get_color(65525,65525,65535) while len(t\$) wort_sep t\$,chr\$(10),0,a\$,t\$ if exist(a\$) open "I",#1,a\$ g\$=input\$(#1,lof(#1)) color 0 color get_color(65525,30000,0) pbox 0,0,640,400 put 0,0,g\$ color weiss text 100,100,a\$ vsync print a\$ keyevent close vsync endif wend quit procedure display(wert) COLOR schwarz PBOX 20,92,800*groesse+200,200*groesse+200 COLOR weiss DEFLINE ,25*groesse,2 DEFTEXT 1,groesse,2*groesse LTEXT 500-LTEXTLEN(STR\$(wert)),100,STR\$(wert) VSYNC return
 ' Test of the SORT function (c) Markus Hoffmann 2010 ' works only with version 1.16 ' n=1000000 dim t\$(n) dim u%(n) for i=0 to n-1 t\$(i)=str\$(random(n)) u%(i)=i next i print "los." t=timer sort t\$(),n,u%() t1=timer-t for i=0 to 20 print i,t\$(i),u%(i) next i print "Zeit: ";t1;" Sek." t=timer sort u%(),n t2=timer-t for i=0 to 20 print i,t\$(i),u%(i) next i print "Zeit: ";t2;" Sek." quit
 defline ,80 color get_color(54424,0,0) line 100,100,99,200 line 200,200,199,100 for i=0 to 360 step 30 color get_color(65535,65535,0) line 400,400,400+200*cos(i/180*pi),400+200*sin(i/180*pi) vsync pause 0.1 color 0 ' line 400,400,400+200*cos(i/180*pi),400+200*sin(i/180*pi) ' pause 0.01 next i pause 1 quit
File deleted
utils/fontcon.bas 0 → 100644
 open "I",#1,"spat-a.fnt" print "const unsigned char fontdata816[]={" for j=0 to 255 print " "; for i=0 to 15 a=inp(#1) print "0x";hex\$(a,2,2,1); if j<>255 or i<>15 print ","; endif next i print " /*";j;"*/" next j print "};" close quit
 ... ... @@ -2,13 +2,15 @@ ' This program creates a html-File and thumbnail-pictures of all ' *.jpg, *.gif and *.png files ' (c) Markus Hoffmann 2003 ' (c) Markus Hoffmann 2003-2010 ' ' Revision 1 ??-2003 ' Revision 3 07-2005 ' Revision 4 11-2005 ' Revision 5 12-2005 ' Revision 6 12-2006 ' Revision 7 11-2009 (convert angepasst) ' Revision 8 02-2010 README Dateien in Header, wenn vorhanden tmpfile\$="fotoweb"+str\$(timer) ... ... @@ -31,7 +33,7 @@ while len(tmp\$) endif wend tmp\$=system\$("ls *.jpg *.JPG *.gif *.png *.eps *.fig *.bmp *.avi *.AVI") tmp\$=system\$("ls *.jpg *.JPG *.gif *.png *.eps *.fig *.bmp *.avi *.AVI *.mpg *.MPG") if len(tmp\$)<2 print "No pictures found" quit ... ... @@ -40,7 +42,16 @@ endif open "O",#2,"fotoweb.html" print #2," fotoweb V.1.03 (c) Markus Hoffmann" print #2,"" print #2,"

MH picture galery

" ' README einbinden, wenn vorhanden if exist("README") open "I",#33,"README" rm\$=input\$(#33,lof(#33)) close #33 print #2,rm\$ else print #2,"

MH picture galery

" endif print #2,"
"+env\$("PWD")+"
" if len(ordner\$) print #2,"

Subfolders:

"+ordner\$+"

" ... ... @@ -73,7 +84,10 @@ while len(tmp\$) system "convert -fill black -colors 64 +dither -comment 'fotoweb V.1.03' -geometry x76 -draw 'text 0,10 "+chr\$(34)+"%m:%wx%h"+chr\$(34)+"' -fill red -font x:fixed -draw 'text 0,74 "+chr\$(34)+"oooooooooooooo"+chr\$(34)+"' -border 2x2 "+chr\$(34)+"y-0.ppm"+chr\$(34)+" "+chr\$(34)+"thumbs/"+t\$+".png"+chr\$(34) system "rm -f y-0.ppm" else system "convert -fill black -colors 64 +dither -comment 'fotoweb V.1.03' -geometry x76 -draw 'text 0,10 "+chr\$(34)+"%m:%wx%h"+chr\$(34)+"' -fill red -font x:fixed -draw 'text 0,74 "+chr\$(34)+"%f"+chr\$(34)+"' -border 2x2 "+chr\$(34)+t\$+chr\$(34)+" "+chr\$(34)+"thumbs/"+t\$+".png"+chr\$(34) info1\$=system\$("echo `identify -format "+chr\$(34)+"%f"+chr\$(34)+" "+chr\$(34)+t\$+chr\$(34)+"`") info2\$=system\$("echo `identify -format "+chr\$(34)+"%m:%wx%h"+chr\$(34)+" "+chr\$(34)+t\$+chr\$(34)+"`") system "echo `identify -format "+chr\$(34)+"%m:Name: %f, %b Bytes, %wx%h"+chr\$(34)+" "+chr\$(34)+t\$+chr\$(34)+"`" system "convert -fill black -colors 64 +dither -comment 'fotoweb V.1.03' -geometry x76 -draw 'text 0,10 "+chr\$(34)+info2\$+chr\$(34)+"' -fill red -font x:fixed -draw 'text 0,74 "+chr\$(34)+info1\$+chr\$(34)+"' -border 2x2 "+chr\$(34)+t\$+chr\$(34)+" "+chr\$(34)+"thumbs/"+t\$+".png"+chr\$(34) endif system "chmod 644 "+chr\$(34)+"thumbs/"+t\$+".png"+chr\$(34) print "T"; ... ...

utils/mp3resample.bas 100755 → 100644
File mode changed from 100755 to 100644
utils/raw2bmp.bas 100755 → 100644
 ... ... @@ -6,7 +6,10 @@ ' the defaults w=320 w=480 ! Large screen h=272 w=320 ! small screen h=240 idepth=16 depth=24 ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!