December 04, 2020, 11:35:30 AM

Author Topic: [bb] ss3.0 by Heliotrope [ 1+ years ago ]  (Read 930 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] ss3.0 by Heliotrope [ 1+ years ago ]
« on: June 29, 2017, 12:28:43 AM »
Title : ss3.0
Author : Heliotrope
Posted : 1+ years ago

Description : computer check

Code :
Code: BlitzBasic
  1. AppTitle "deh - system status3.0"
  2. Graphics 790,800,16,2
  3. tgd = CountGfxDrivers ()
  4. tgm = CountGfxModes ()
  5. Repeat
  6.  
  7.         Text 10,80,"time : " + CurrentTime()
  8.         Text 10,100,"date : " + CurrentDate()
  9.         Text 10,120, "mouseX : " + MouseX()
  10.         Text 10,140,"mouseY : " + MouseY()
  11.         Text 10,160,"mousez : " + MouseZ()
  12.         Text 10,180,"mousexspeed : " + MouseXSpeed()
  13.         Text 10,200,"mouseyspeed : " + MouseYSpeed()
  14.         Text 10,220,"mousezspeed : " + MouseZSpeed()
  15.         If KeyHit (32) Then Gosub drive
  16.         If JoyType =0 Then Text 10,240,"no joystick"
  17.         If JoyType =1 Then Text 10,240,"digital joystick"
  18.         If JoyType =2 Then Text 10,240,"analog joystick"
  19.         If JoyType >0 Then Text 10,290,"joy x : " + JoyX()
  20.         If JoyType >0 Then Text 10,310,"joy y : " + JoyY()
  21.         If JoyType >0 Then Text 10,330,"joy z : " + JoyZ()
  22.         tvm = TotalVidMem () / 1000000
  23.         avm = AvailVidMem () / 1000000
  24.         Text 10,350,"you have " + tgd + " graphics card(s) on your computer"
  25.         Text 10,370,"with a total of " + tgm + " modes and a total memory of "
  26.         Text 10,390, tvm + " megabytes of which " + avm + " megabytes are available"
  27.         l = 410
  28.         g = 0
  29.                 Repeat
  30.                         g=g+1
  31.                         Text 10,l,"the name of graphics card " + g + " is " + GfxDriverName$ (g)
  32.                         l=l+20
  33.                 Until tgd = g
  34.         k = GetKey()
  35.         If k > 0 Then
  36.                 Text 10,260,"keypress : " + k
  37.                 Delay 499
  38.         EndIf
  39.         Delay 101
  40.         Cls
  41.  
  42. Until KeyHit (1)
  43. End
  44.  
  45. .drive
  46. Cls
  47. Delay 100
  48. FlushKeys
  49. Repeat
  50.         Locate 200,100
  51.         Print "hidden harddrive checker"
  52.         Locate 200,400
  53.         d$ = Input$ ("What harddrive do you want to check? ")
  54.         If d$ = "exit" Then Exit
  55.         If FileType (d$) = 0 Then Print "this harddrive does not exist"
  56.         If FileType (d$) = 2 Then  
  57.                 Print "this harddrive does exist"
  58.         EndIf
  59.         WaitKey
  60. Forever
  61. Return


Comments :


GW(Posted 1+ years ago)

 Please stop making Code archive entries. Just make a regular post in the forums instead.The code archives is supposed to be for useful things that others may learn from.


Guy Fawkes(Posted 1+ years ago)

 this IS useful. It's EXTREMELY useful. I could use it in my game to detect the name of a graphics card itself, look it up online, and detect how well a user's graphics card works


Ked(Posted 1+ years ago)

 @ GW: Ouch...@ Rez: That's ridiculous.


N(Posted 1+ years ago)

 I'll choose the middle ground and say you should've just updated your last 'system status' entry, since that one was trash (this one probably is too, but I decided not to look at the actual code since I enjoy my eyesight) and nobody would have missed it had you updated it with a questionably improved version.


_PJ_(Posted 1+ years ago)

 Again,tvm is NEVER GOING TO CHANGE.The value returns the total available graphiics maemory. This combines two or more GPU memory available in the cases of Crossfire / SLiAGAIN, this is wrong:tvm = TotalVidMem () / 1000000avm = AvailVidMem () / 10000001000000 bytes is not a megabyte.You should use Shr 20 to gain a faster and accurate result.


Heliotrope(Posted 1+ years ago)

 Malice, last time you said "shr 10"!Also check this <a href="http://en.wikipedia.org/wiki/Byte" target="_blank">http://en.wikipedia.org/wiki/Byte[/url]and this<a href="http://myitforum.com/cs2/blogs/dhite/archive/2008/08/24/bits-and-bytes-conversion-tables.aspx" target="_blank">http://myitforum.com/cs2/blogs/dhite/archive/2008/08/24/bits-and-bytes-conversion-tables.aspx[/url]and this[img]hardhatdigital.com.au/wp-content/uploads/2009/07/hard-hat-client-logo-aeroplane-jelly.html">


Heliotrope(Posted 1+ years ago)

 GW, I think Rez learnt something from it.


_PJ_(Posted 1+ years ago)

 <div class="quote"> Malice, last time you said "shr 10"!Also check this <a href="http://en.wikipedia.org/wiki/Byte" target="_blank">http://en.wikipedia.org/wiki/Byte[/url]and this<a href="http://myitforum.com/cs2/blogs/dhite/archive/2008/08/24/bits-and-bytes-conversion-tables.aspx" target="_blank">http://myitforum.com/cs2/blogs/dhite/archive/2008/08/24/bits-and-bytes-conversion-tables.aspx[/url]and this<a href="http://math123xyz.com/" target="_blank">http://math123xyz.com/[/url]and this </div>Shr 10 would be to convert  bytes to kB.1 Shr 20 is equivalent to 1 / 2^20 = 1 / 1048576 = 1 / (1024*1024)Since:1024 * Bytes = 1 kB1024 * kB = 1 MBIt is also faster than division which is the slowest of basic numerical calculations.Why post those links? I know what a Byte is, thanks. I do recommend you look at them, though - particularly the one that shows the table that defines a MegaByte as 1024 kiloBytes an a kiloByte as 1024 Bytes. That may help you understand what I'ev been trying to help you to see.If you want to disregard helpful advice, fine - but at least stop this spamming.


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal