Search found 625 matches

by Stonemonkey
Jan 03, 2020 2:18
Forum: Hardware Interfaces / Communication
Topic: fbvideoclass (Windows 32/64-bit)
Replies: 23
Views: 18779

Re: fbvideoclass (Windows 32/64-bit)

Hi Joshy, just come across this and there's something I'm wanting to try. There's someone called Johnny Lee on youtube with a video on headtracking using the wii camera and remote, if you've not seen it then check it out to see what im talking about. I'm wanting to try something similar, I have a US...
by Stonemonkey
Dec 27, 2019 23:32
Forum: General
Topic: Date & Time Compression
Replies: 10
Views: 1233

Re: Date & Time Compression

Why does it feel like I'm doing someone's homework? #define encode(t,d,m,o) t=t*m+(d-o) #define decode(s,t,m,o) print s;(t mod m)+o:t\=m function encode_time_and_date(byval _year as ulong,_ byval _month as ulong,_ byval _day as ulong,_ byval _hour as ulong,_ byval _minute as ulong,_ byval _second as...
by Stonemonkey
Dec 27, 2019 0:39
Forum: General
Topic: Squares
Replies: 8041
Views: 774384

Re: Squares

@albert MERRY CHRISTMAS!

I'm away for a few days, no PC, only tablet, will there ever be any chance of FB on arm Android?
by Stonemonkey
Dec 27, 2019 0:35
Forum: General
Topic: Rounding of Single
Replies: 7
Views: 1039

Re: Rounding of Single

No, not a bug, it's rounding to nearest but in the case of x.5 the nearest is neither round up or down so it rounds to even. It's possible to change the FPU rounding mode on x86 but I'm not sure if FB on x64 makes use of the FPU or SSE units for floating point ops, I'll have a look to see what's goi...
by Stonemonkey
Dec 21, 2019 14:38
Forum: General
Topic: Squares
Replies: 8041
Views: 774384

Re: Squares

@albert I think we must have quite large drawing boards.
by Stonemonkey
Dec 13, 2019 20:45
Forum: General
Topic: Squares
Replies: 8041
Views: 774384

Re: Squares

@albert An idea I just tried, taking say 7 bits at a time and counting the number of set bits, direct each 7 bits to one of 2 streams, one stream with mostly 0s and the other with mostly 1s, then compress each stream separately, so the stream with mostly 0s is compressed using 00=0, 1=1 and 01=2, st...
by Stonemonkey
Dec 08, 2019 11:08
Forum: General
Topic: Squares
Replies: 8041
Views: 774384

Re: Squares

@albert I posted code to do that a page or two back. Change the '4' in the main sub to value from 1 to 4 to get permutations containing 1 to 4 different digits. function make_map(byval b as ulong)as ulong return (1 shl(b and 3))or(1 shl((b shr 2)and 3))or(1 shl((b shr 4)and 3))or(1 shl((b shr 6)and ...
by Stonemonkey
Dec 05, 2019 19:13
Forum: General
Topic: Squares
Replies: 8041
Views: 774384

Re: Squares

But was he able to bring all the sheep back?
by Stonemonkey
Dec 03, 2019 20:13
Forum: General
Topic: Squares
Replies: 8041
Views: 774384

Re: Squares

@albert, looks like you've got 0x and x0 giving out the same code.
by Stonemonkey
Dec 01, 2019 10:22
Forum: General
Topic: Squares
Replies: 8041
Views: 774384

Re: Squares

@albert
Sorry, I thought you meant permutations of the sequence containing the digits 1,2,3 and 4
by Stonemonkey
Nov 30, 2019 23:13
Forum: General
Topic: Squares
Replies: 8041
Views: 774384

Re: Squares

28 combinations is 4.8 bits.
by Stonemonkey
Nov 30, 2019 11:12
Forum: Sources, Examples, Tips and Tricks
Topic: CPU burn test
Replies: 8
Views: 1961

Re: CPU burn test

Just some thoughts, i don't know much about it but maybe more randomish memory addressing when you're accessing the array would push the cache more, then there's also the SSE units that you might not be touching with that code, depends if the compiler uses the FPU or SSE instructions, but even if it...
by Stonemonkey
Nov 29, 2019 20:06
Forum: General
Topic: Squares
Replies: 8041
Views: 774384

Re: Squares

@Albert Try changing the '4' in the main sub to a value from 1 to 4 and see what the output is too. function make_map(byval b as ulong)as ulong return (1 shl(b and 3))or(1 shl((b shr 2)and 3))or(1 shl((b shr 4)and 3))or(1 shl((b shr 6)and 3)) end function function count_set_bits(byval b as ulong)as ...
by Stonemonkey
Nov 28, 2019 17:24
Forum: General
Topic: Squares
Replies: 8041
Views: 774384

Re: Squares

@albert

Code: Select all

dim as string a="Hello World"
dim as ubyte ptr c=cptr(ubyte ptr,strptr(a))

for i as integer=0 to 5
    print chr$(c[i])
    c[i]=asc("*")
next

print a
sleep
end
by Stonemonkey
Nov 28, 2019 13:02
Forum: General
Topic: Squares
Replies: 8041
Views: 774384

Re: Squares

Might a string pointer be a pointer pointer?

Dim as ubyte ptr ptr p=cast(....

ubyte_=**p

Or something like that?

Accessing other bytes might need something like

ubyte_=*(*p)[n]
Or something like that, i dunno, at work just now and can't look into it.