PureBasic 6.30 beta 1 is ready !
Re: PureBasic 6.30 beta 1 is ready !
I have a tool that makes several HID Brymen BC-86X adapters available on the network. I removed my own HID and Libusb code and replaced it with the new PB HID library. On an old notebook with a Pentium M CPU and Linux LMDE6 32-bit, the tool has now been working flawlessly for several hours.
Peter
Peter
Re: PureBasic 6.30 beta 1 is ready !
I completely forgot about Placeholder text.
Now I can drop so many tool tips and callbacks.
And import c libs is gonna be fun. Need idle's help.
Now I can drop so many tool tips and callbacks.

And import c libs is gonna be fun. Need idle's help.

The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: PureBasic 6.30 beta 1 is ready !
Thanks, great to see new updates to my favorite language. <3
Please, please, please don't forget about the "RotateSprite"-Bug, though.
viewtopic.php?t=87215
Please, please, please don't forget about the "RotateSprite"-Bug, though.

viewtopic.php?t=87215
Now these points of data make a beautiful line,
And we're out of Beta, we're releasing on time.
And we're out of Beta, we're releasing on time.
Re: PureBasic 6.30 beta 1 is ready !
Very nice update! Thanks, Fred and team!
- DeanH
- Enthusiast
- Posts: 278
- Joined: Wed May 07, 2008 4:57 am
- Location: Adelaide, South Australia
- Contact:
Re: PureBasic 6.30 beta 1 is ready !
Thank you for the update. I have tweaked the original PackerCallback code to work. Only had to change two lines.
Code: Select all
UseZipPacker()
;UseLZMAPacker()
;UseBriefLZPacker()
; ------------------------------------------------------------
;
; PureBasic - Compressor example file
;
; (c) 2002 - Fantaisie Software
;
; ------------------------------------------------------------
;
; This procedure is a 'Callback'. This means there will be called
; automatically by the program at regular interval, so we could
; see the progress of the compression
;
Procedure PackerProgress(SourcePosition, DestinationPosition)
Shared FileLength
Result.f = (SourcePosition/FileLength)*100
SetGadgetState(0, Round(Result,0))
While (WindowEvent()) : Wend ; Process all the window event befor quit
ProcedureReturn 1
EndProcedure
If OpenWindow(0, 100, 200, 300, 40, "Packer - Progress Window")
ProgressBarGadget(0, 10, 10, 280, 20, 0, 100)
If ReadFile(0, OpenFileRequester("Choose a file to compress", "", "*.*", 0))
FileLength = Lof(0)
; Allocate the 2 memory buffers needed for compression..
*Source = AllocateMemory(FileLength)
*Target = AllocateMemory(FileLength+8)
If FileLength And *Source And *Target
ReadData(0, *Source, FileLength) ; Read the whole file in the memory buffer
PackerCallback(@PackerProgress())
; Compress our file, which is in memory (and use a timer to see the time spend by compression..)
CompressedLength = CompressMemory(*Source, FileLength, *Target, FileLength)
If CompressedLength
DecompressedLength = UncompressMemory(*Target, CompressedLength, *Source, FileLength)
If DecompressedLength = FileLength
MessageRequester("Info", "De/Compression succeded:"+#LF$+#LF$+"Old size: "+Str(FileLength)+#LF$+"New size:"+Str(CompressedLength))
EndIf
Else
MessageRequester("Error", "Can't compress the file")
EndIf
EndIf
FreeMemory(*Source)
FreeMemory(*Target)
CloseFile(0)
EndIf
EndIf
Re: PureBasic 6.30 beta 1 is ready !
Does PackerCallback work for unpacking too? Does it support all packing (and maybe unpacking) routines (memory, file...)?
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: PureBasic 6.30 beta 1 is ready !
With PB x86, you need the Quad data type for the parameters of the callback procedure, otherwise you will get an error message:DeanH wrote: Thu Sep 04, 2025 5:12 am Thank you for the update. I have tweaked the original PackerCallback code to work.
Code: Select all
[ERROR] PackerCallback(): The Procedure specified in '@ProcedureName()' does not have the required argument or returntype.
Procedure PackerProgress(SourcePosition.q, DestinationPosition.q) -> OK for 32/64-bit
- DeanH
- Enthusiast
- Posts: 278
- Joined: Wed May 07, 2008 4:57 am
- Location: Adelaide, South Australia
- Contact:
Re: PureBasic 6.30 beta 1 is ready !
I just took the exact code in the original documentation with PB4.6, copied that into the 64-bit version of 6.30 beta 1 and changed the two lines. The revised doc should reflect what you have said.PeDe wrote: Thu Sep 04, 2025 6:49 amWith PB x86, you need the Quad data type for the parameters of the callback procedure, otherwise you will get an error message:DeanH wrote: Thu Sep 04, 2025 5:12 am Thank you for the update. I have tweaked the original PackerCallback code to work.
PeterCode: Select all
[ERROR] PackerCallback(): The Procedure specified in '@ProcedureName()' does not have the required argument or returntype. Procedure PackerProgress(SourcePosition.q, DestinationPosition.q) -> OK for 32/64-bit
It does not show a progressbar when unpacking. I tried it. The original doc says it only does when packing but not unpacking. That's what I found. It would be nice if it could. I am grateful for this new bit, though. As a test, I packed two files, each about 500Mb. Showed progress for each one separately.
Re: PureBasic 6.30 beta 1 is ready !
Thank you so much!
This is a never-ending process of improving and improving Purebasic.
Thank you very much for all your hard work over the years!
This is a never-ending process of improving and improving Purebasic.
Thank you very much for all your hard work over the years!
PB 6.21 beta, PureVision User
Re: PureBasic 6.30 beta 1 is ready !
It's interesting that this function already existed in PB v4.61 or earlier. However, the second parameter ‘DestinationPosition’ now returns the total size of the uncompressed data.DeanH wrote: Thu Sep 04, 2025 7:03 am I just took the exact code in the original documentation with PB4.6, copied that into the 64-bit version of 6.30 beta 1 and changed the two lines. The revised doc should reflect what you have said.
Peter
-
- Addict
- Posts: 1535
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: PureBasic 6.30 beta 1 is ready !
The function HIDError() is not supported in Linux? The function return text not implemented yet instead of an error description.
Strange situation. Function ExamineHIDs(#USB_VID, #USB_PID) found the device and returns the number 1. But function OpenHID(#HID, #USB_VID, #USB_PID) cannot open the device and returns 0. Running on superuser (sudo in terminal) does not solve the problem.
In MacOS, similar problem. Function ExamineHIDs() found the device, but function OpenHID() cannot open the device and returns 0. HIDError() return text Device with requested VID/PID/(SerialNumber) not found
On Windows this code works great.
Strange situation. Function ExamineHIDs(#USB_VID, #USB_PID) found the device and returns the number 1. But function OpenHID(#HID, #USB_VID, #USB_PID) cannot open the device and returns 0. Running on superuser (sudo in terminal) does not solve the problem.
In MacOS, similar problem. Function ExamineHIDs() found the device, but function OpenHID() cannot open the device and returns 0. HIDError() return text Device with requested VID/PID/(SerialNumber) not found
On Windows this code works great.
-
- Addict
- Posts: 1535
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: PureBasic 6.30 beta 1 is ready !
Test code.In MacOS function OpenHID() returs 0, but the function OpenHIDPath() returns non-zero and successfully opens the device and successfully transfers data with it using ReceiveHIDFeatureReport(). Probably in function OpenHID() there is a bug.
In Linux functions OpenHID() and OpenHIDPath() returns 0.
Added.
If in Linux, run the application with superuser rights, then the function OpenHIDPath() opens the device. OpenHID() return 0.
This is probably a bug function OpenHID() in Linux and MacOS.
Code: Select all
Debug OpenHID(0, #USB_VID, #USB_PID)
ExamineHIDs(#USB_VID, #USB_PID)
If NextHID()
Debug OpenHIDPath(0, HIDInfo(#PB_HID_Path))
Debug HIDInfo(#PB_HID_Path)
EndIf
In Linux functions OpenHID() and OpenHIDPath() returns 0.
Added.
If in Linux, run the application with superuser rights, then the function OpenHIDPath() opens the device. OpenHID() return 0.
This is probably a bug function OpenHID() in Linux and MacOS.
Re: PureBasic 6.30 beta 1 is ready !
Same here, HID commands work great in Windows 10 but under not Ubuntu 20.0.4
Ubuntu can Enumerate the plugged in HID devices and display them but connection error when using OpenHid

Ubuntu can Enumerate the plugged in HID devices and display them but connection error when using OpenHid
